tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ma...@apache.org
Subject svn commit: r1190371 - in /tomcat/trunk: java/org/apache/tomcat/util/buf/ByteChunk.java test/org/apache/tomcat/util/http/TestParameters.java
Date Fri, 28 Oct 2011 14:44:05 GMT
Author: markt
Date: Fri Oct 28 14:44:05 2011
New Revision: 1190371

URL: http://svn.apache.org/viewvc?rev=1190371&view=rev
Log:
Implement review comments from kkolinko

Modified:
    tomcat/trunk/java/org/apache/tomcat/util/buf/ByteChunk.java
    tomcat/trunk/test/org/apache/tomcat/util/http/TestParameters.java

Modified: tomcat/trunk/java/org/apache/tomcat/util/buf/ByteChunk.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/util/buf/ByteChunk.java?rev=1190371&r1=1190370&r2=1190371&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/tomcat/util/buf/ByteChunk.java (original)
+++ tomcat/trunk/java/org/apache/tomcat/util/buf/ByteChunk.java Fri Oct 28 14:44:05 2011
@@ -100,14 +100,16 @@ public final class ByteChunk implements 
         as most standards seem to converge, but the servlet API requires
         8859_1, and this object is used mostly for servlets.
     */
-    public static Charset DEFAULT_CHARSET = null;
+    public static final Charset DEFAULT_CHARSET;
 
     static {
+        Charset c = null;
         try {
-            DEFAULT_CHARSET = B2CConverter.getCharset("ISO-8859-1");
+            c = B2CConverter.getCharset("ISO-8859-1");
         } catch (UnsupportedEncodingException e) {
             // Should never happen since all JVMs must support ISO-8859-1
         }
+        DEFAULT_CHARSET = c;
     }
 
     // byte[]

Modified: tomcat/trunk/test/org/apache/tomcat/util/http/TestParameters.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/test/org/apache/tomcat/util/http/TestParameters.java?rev=1190371&r1=1190370&r2=1190371&view=diff
==============================================================================
--- tomcat/trunk/test/org/apache/tomcat/util/http/TestParameters.java (original)
+++ tomcat/trunk/test/org/apache/tomcat/util/http/TestParameters.java Fri Oct 28 14:44:05
2011
@@ -126,8 +126,7 @@ public class TestParameters {
     private static class Parameter {
         private final String name;
         private final String[] values;
-
-        UEncoder uencoder = new UEncoder();
+        private final UEncoder uencoder = new UEncoder();
 
         public Parameter(String name, String... values) {
             this.name = name;



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


Mime
View raw message