Updated Branches:
  refs/heads/master 333e2231e -> fc14b7ee3

Minor improvements - use Character instead of String, remove a cast that is not 
needed


Project: http://git-wip-us.apache.org/repos/asf/wicket/repo
Commit: http://git-wip-us.apache.org/repos/asf/wicket/commit/f47545d3
Tree: http://git-wip-us.apache.org/repos/asf/wicket/tree/f47545d3
Diff: http://git-wip-us.apache.org/repos/asf/wicket/diff/f47545d3

Branch: refs/heads/master
Commit: f47545d319ba0b49c83ddaaa3e1d863bb8bc9d01
Parents: 333e223
Author: Martin Tzvetanov Grigorov <[email protected]>
Authored: Wed Sep 25 10:50:34 2013 +0200
Committer: Martin Tzvetanov Grigorov <[email protected]>
Committed: Wed Sep 25 10:50:34 2013 +0200

----------------------------------------------------------------------
 .../wicket/protocol/http/ClientProperties.java  | 20 ++++++++++----------
 1 file changed, 10 insertions(+), 10 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/wicket/blob/f47545d3/wicket-core/src/main/java/org/apache/wicket/protocol/http/ClientProperties.java
----------------------------------------------------------------------
diff --git 
a/wicket-core/src/main/java/org/apache/wicket/protocol/http/ClientProperties.java
 
b/wicket-core/src/main/java/org/apache/wicket/protocol/http/ClientProperties.java
index edf07be..3519448 100644
--- 
a/wicket-core/src/main/java/org/apache/wicket/protocol/http/ClientProperties.java
+++ 
b/wicket-core/src/main/java/org/apache/wicket/protocol/http/ClientProperties.java
@@ -254,12 +254,12 @@ public class ClientProperties implements IClusterable
                                        // offset which can be parsed by the 
TimeZone class.
 
                                        AppendingStringBuffer sb = new 
AppendingStringBuffer("GMT");
-                                       sb.append(offsetHours > 0 ? "+" : "-");
+                                       sb.append(offsetHours > 0 ? '+' : '-');
                                        sb.append(Math.abs(offsetHours));
-                                       sb.append(":");
+                                       sb.append(':');
                                        if (offsetMins < 10)
                                        {
-                                               sb.append("0");
+                                               sb.append('0');
                                        }
                                        sb.append(offsetMins);
                                        timeZone = 
TimeZone.getTimeZone(sb.toString());
@@ -277,7 +277,7 @@ public class ClientProperties implements IClusterable
                                String dstOffset = getUtcDSTOffset();
                                if (timeZone != null && dstOffset != null)
                                {
-                                       TimeZone dstTimeZone = null;
+                                       TimeZone dstTimeZone;
                                        dotPos = dstOffset.indexOf('.');
                                        if (dotPos >= 0)
                                        {
@@ -296,12 +296,12 @@ public class ClientProperties implements IClusterable
                                                // offset which can be parsed 
by the TimeZone class.
 
                                                AppendingStringBuffer sb = new 
AppendingStringBuffer("GMT");
-                                               sb.append(offsetHours > 0 ? "+" 
: "-");
+                                               sb.append(offsetHours > 0 ? '+' 
: '-');
                                                
sb.append(Math.abs(offsetHours));
                                                sb.append(":");
                                                if (offsetMins < 10)
                                                {
-                                                       sb.append("0");
+                                                       sb.append('0');
                                                }
                                                sb.append(offsetMins);
                                                dstTimeZone = 
TimeZone.getTimeZone(sb.toString());
@@ -1110,7 +1110,7 @@ public class ClientProperties implements IClusterable
 
                                field.setAccessible(true);
 
-                               Object value = null;
+                               Object value;
                                try
                                {
                                        value = field.get(this);
@@ -1126,7 +1126,7 @@ public class ClientProperties implements IClusterable
 
                                if (field.getType().equals(Integer.TYPE))
                                {
-                                       if ((Integer) value == -1)
+                                       if (value == -1)
                                        {
                                                value = null;
                                        }
@@ -1135,9 +1135,9 @@ public class ClientProperties implements IClusterable
                                if (value != null)
                                {
                                        b.append(field.getName());
-                                       b.append("=");
+                                       b.append('=');
                                        b.append(value);
-                                       b.append("\n");
+                                       b.append('\n');
                                }
                        }
                }

Reply via email to