Author: markt
Date: Sun Jan 8 18:44:21 2012
New Revision: 1228910
URL: http://svn.apache.org/viewvc?rev=1228910&view=rev
Log:
Add final where necessary.
Remove some unused code.
Modified:
tomcat/trunk/java/org/apache/tomcat/util/buf/B2CConverter.java
tomcat/trunk/java/org/apache/tomcat/util/buf/StringCache.java
Modified: tomcat/trunk/java/org/apache/tomcat/util/buf/B2CConverter.java
URL:
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/util/buf/B2CConverter.java?rev=1228910&r1=1228909&r2=1228910&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/tomcat/util/buf/B2CConverter.java (original)
+++ tomcat/trunk/java/org/apache/tomcat/util/buf/B2CConverter.java Sun Jan 8
18:44:21 2012
@@ -79,14 +79,7 @@ public class B2CConverter {
private IntermediateInputStream iis;
private ReadConvertor conv;
- private String encoding;
-
- /**
- * @deprecated Unused. Will be removed in Tomcat 8.0.x onwards.
- */
- @Deprecated
- protected B2CConverter() {
- }
+ private final String encoding;
/** Create a converter, with bytes going to a byte buffer
*/
@@ -106,7 +99,7 @@ public class B2CConverter {
}
static final int BUFFER_SIZE=8192;
- char result[]=new char[BUFFER_SIZE];
+ final char result[]=new char[BUFFER_SIZE];
/**
* Convert a buffer of bytes into a chars.
Modified: tomcat/trunk/java/org/apache/tomcat/util/buf/StringCache.java
URL:
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/util/buf/StringCache.java?rev=1228910&r1=1228909&r2=1228910&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/tomcat/util/buf/StringCache.java (original)
+++ tomcat/trunk/java/org/apache/tomcat/util/buf/StringCache.java Sun Jan 8
18:44:21 2012
@@ -56,14 +56,15 @@ public class StringCache {
"tomcat.util.buf.StringCache.cacheSize", "200"));
- protected static int maxStringSize = Integer.parseInt(System.getProperty(
- "tomcat.util.buf.StringCache.maxStringSize", "128"));
+ protected static final int maxStringSize =
+ Integer.parseInt(System.getProperty(
+ "tomcat.util.buf.StringCache.maxStringSize", "128"));
/**
* Statistics hash map for byte chunk.
*/
- protected static HashMap<ByteEntry,int[]> bcStats =
+ protected static final HashMap<ByteEntry,int[]> bcStats =
new HashMap<ByteEntry,int[]>(cacheSize);
@@ -82,7 +83,7 @@ public class StringCache {
/**
* Statistics hash map for char chunk.
*/
- protected static HashMap<CharEntry,int[]> ccStats =
+ protected static final HashMap<CharEntry,int[]> ccStats =
new HashMap<CharEntry,int[]>(cacheSize);
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]