tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ma...@apache.org
Subject svn commit: r481614 - in /tomcat/connectors/trunk/util/java/org/apache/tomcat/util/buf: B2CConverter.java Base64.java ByteChunk.java CharChunk.java StringCache.java UDecoder.java UEncoder.java
Date Sat, 02 Dec 2006 20:04:22 GMT
Author: markt
Date: Sat Dec  2 12:04:21 2006
New Revision: 481614

URL: http://svn.apache.org/viewvc?view=rev&rev=481614
Log:
Code clean up in o.a.t.util.buf
- Remove unused code

Modified:
    tomcat/connectors/trunk/util/java/org/apache/tomcat/util/buf/B2CConverter.java
    tomcat/connectors/trunk/util/java/org/apache/tomcat/util/buf/Base64.java
    tomcat/connectors/trunk/util/java/org/apache/tomcat/util/buf/ByteChunk.java
    tomcat/connectors/trunk/util/java/org/apache/tomcat/util/buf/CharChunk.java
    tomcat/connectors/trunk/util/java/org/apache/tomcat/util/buf/StringCache.java
    tomcat/connectors/trunk/util/java/org/apache/tomcat/util/buf/UDecoder.java
    tomcat/connectors/trunk/util/java/org/apache/tomcat/util/buf/UEncoder.java

Modified: tomcat/connectors/trunk/util/java/org/apache/tomcat/util/buf/B2CConverter.java
URL: http://svn.apache.org/viewvc/tomcat/connectors/trunk/util/java/org/apache/tomcat/util/buf/B2CConverter.java?view=diff&rev=481614&r1=481613&r2=481614
==============================================================================
--- tomcat/connectors/trunk/util/java/org/apache/tomcat/util/buf/B2CConverter.java (original)
+++ tomcat/connectors/trunk/util/java/org/apache/tomcat/util/buf/B2CConverter.java Sat Dec
 2 12:04:21 2006
@@ -183,8 +183,6 @@
  * 
  */
 final class  ReadConvertor extends InputStreamReader {
-    // stream with flush() and close(). overriden.
-    private IntermediateInputStream iis;
     
     // Has a private, internal byte[8192]
     
@@ -194,7 +192,6 @@
         throws UnsupportedEncodingException
     {
         super( in, enc );
-        iis=in;
     }
     
     /** Overriden - will do nothing but reset internal state.

Modified: tomcat/connectors/trunk/util/java/org/apache/tomcat/util/buf/Base64.java
URL: http://svn.apache.org/viewvc/tomcat/connectors/trunk/util/java/org/apache/tomcat/util/buf/Base64.java?view=diff&rev=481614&r1=481613&r2=481614
==============================================================================
--- tomcat/connectors/trunk/util/java/org/apache/tomcat/util/buf/Base64.java (original)
+++ tomcat/connectors/trunk/util/java/org/apache/tomcat/util/buf/Base64.java Sat Dec  2 12:04:21
2006
@@ -42,7 +42,6 @@
     static private final int  TWENTYFOURBITGROUP = 24;
     static private final int  EIGHTBIT           = 8;
     static private final int  SIXTEENBIT         = 16;
-    static private final int  SIXBIT             = 6;
     static private final int  FOURBYTE           = 4;
 
 

Modified: tomcat/connectors/trunk/util/java/org/apache/tomcat/util/buf/ByteChunk.java
URL: http://svn.apache.org/viewvc/tomcat/connectors/trunk/util/java/org/apache/tomcat/util/buf/ByteChunk.java?view=diff&rev=481614&r1=481613&r2=481614
==============================================================================
--- tomcat/connectors/trunk/util/java/org/apache/tomcat/util/buf/ByteChunk.java (original)
+++ tomcat/connectors/trunk/util/java/org/apache/tomcat/util/buf/ByteChunk.java Sat Dec  2
12:04:21 2006
@@ -112,7 +112,6 @@
     private ByteInputChannel in = null;
     private ByteOutputChannel out = null;
 
-    private boolean isOutput=false;
     private boolean optimizedWrite=true;
     
     /**
@@ -156,7 +155,6 @@
     // -------------------- Setup --------------------
 
     public void allocate( int initial, int limit  ) {
-        isOutput=true;
         if( buff==null || buff.length < initial ) {
             buff=new byte[initial];
         }    

Modified: tomcat/connectors/trunk/util/java/org/apache/tomcat/util/buf/CharChunk.java
URL: http://svn.apache.org/viewvc/tomcat/connectors/trunk/util/java/org/apache/tomcat/util/buf/CharChunk.java?view=diff&rev=481614&r1=481613&r2=481614
==============================================================================
--- tomcat/connectors/trunk/util/java/org/apache/tomcat/util/buf/CharChunk.java (original)
+++ tomcat/connectors/trunk/util/java/org/apache/tomcat/util/buf/CharChunk.java Sat Dec  2
12:04:21 2006
@@ -64,8 +64,6 @@
 
     private boolean isSet=false;  // XXX 
 
-    private boolean isOutput=false;
-
     // -1: grow undefinitely
     // maximum amount to be cached
     private int limit=-1;
@@ -117,14 +115,12 @@
     // -------------------- Setup --------------------
 
     public void allocate( int initial, int limit  ) {
-        isOutput=true;
         if( buff==null || buff.length < initial ) {
             buff=new char[initial];
         }
         this.limit=limit;
         start=0;
         end=0;
-        isOutput=true;
         isSet=true;
     }
 

Modified: tomcat/connectors/trunk/util/java/org/apache/tomcat/util/buf/StringCache.java
URL: http://svn.apache.org/viewvc/tomcat/connectors/trunk/util/java/org/apache/tomcat/util/buf/StringCache.java?view=diff&rev=481614&r1=481613&r2=481614
==============================================================================
--- tomcat/connectors/trunk/util/java/org/apache/tomcat/util/buf/StringCache.java (original)
+++ tomcat/connectors/trunk/util/java/org/apache/tomcat/util/buf/StringCache.java Sat Dec
 2 12:04:21 2006
@@ -253,8 +253,6 @@
                         while (n < size) {
                             Object key = tempMap.lastKey();
                             ArrayList list = (ArrayList) tempMap.get(key);
-                            ByteEntry[] list2 = 
-                                (ByteEntry[]) list.toArray(new ByteEntry[list.size()]);
                             for (int i = 0; i < list.size() && n < size; i++)
{
                                 ByteEntry entry = (ByteEntry) list.get(i);
                                 tempChunk.setBytes(entry.name, 0, entry.name.length);
@@ -367,8 +365,6 @@
                         while (n < size) {
                             Object key = tempMap.lastKey();
                             ArrayList list = (ArrayList) tempMap.get(key);
-                            CharEntry[] list2 = 
-                                (CharEntry[]) list.toArray(new CharEntry[list.size()]);
                             for (int i = 0; i < list.size() && n < size; i++)
{
                                 CharEntry entry = (CharEntry) list.get(i);
                                 tempChunk.setChars(entry.name, 0, entry.name.length);

Modified: tomcat/connectors/trunk/util/java/org/apache/tomcat/util/buf/UDecoder.java
URL: http://svn.apache.org/viewvc/tomcat/connectors/trunk/util/java/org/apache/tomcat/util/buf/UDecoder.java?view=diff&rev=481614&r1=481613&r2=481614
==============================================================================
--- tomcat/connectors/trunk/util/java/org/apache/tomcat/util/buf/UDecoder.java (original)
+++ tomcat/connectors/trunk/util/java/org/apache/tomcat/util/buf/UDecoder.java Sat Dec  2
12:04:21 2006
@@ -30,9 +30,6 @@
  */
 public final class UDecoder {
     
-    private static org.apache.commons.logging.Log log=
-        org.apache.commons.logging.LogFactory.getLog(UDecoder.class );
-    
     public UDecoder() 
     {
     }
@@ -266,12 +263,6 @@
 	digit +=(b2>='A') ? ( (b2 & 0xDF)-'A') + 10 :
 	    (b2 -'0');
 	return digit;
-    }
-
-    private final static int debug=0;
-    private static void log( String s ) {
-        if (log.isDebugEnabled())
-            log.debug("URLDecoder: " + s );
     }
 
 }

Modified: tomcat/connectors/trunk/util/java/org/apache/tomcat/util/buf/UEncoder.java
URL: http://svn.apache.org/viewvc/tomcat/connectors/trunk/util/java/org/apache/tomcat/util/buf/UEncoder.java?view=diff&rev=481614&r1=481613&r2=481614
==============================================================================
--- tomcat/connectors/trunk/util/java/org/apache/tomcat/util/buf/UEncoder.java (original)
+++ tomcat/connectors/trunk/util/java/org/apache/tomcat/util/buf/UEncoder.java Sat Dec  2
12:04:21 2006
@@ -141,10 +141,6 @@
     // -------------------- Internal implementation --------------------
     
     // 
-    private void init() {
-	
-    }
-    
     private void initSafeChars() {
 	safeChars=new BitSet(128);
 	int i;



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


Mime
View raw message