tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ma...@apache.org
Subject svn commit: r1081765 - in /tomcat/trunk/java/org/apache/jasper: util/Enumerator.java xmlparser/ASCIIReader.java xmlparser/TreeNode.java xmlparser/UTF8Reader.java xmlparser/XMLEncodingDetector.java xmlparser/XMLString.java xmlparser/XMLStringBuffer.java
Date Tue, 15 Mar 2011 13:10:34 GMT
Author: markt
Date: Tue Mar 15 13:10:33 2011
New Revision: 1081765

URL: http://svn.apache.org/viewvc?rev=1081765&view=rev
Log:
Remove unused code
Fix some Eclipse warnings

Modified:
    tomcat/trunk/java/org/apache/jasper/util/Enumerator.java
    tomcat/trunk/java/org/apache/jasper/xmlparser/ASCIIReader.java
    tomcat/trunk/java/org/apache/jasper/xmlparser/TreeNode.java
    tomcat/trunk/java/org/apache/jasper/xmlparser/UTF8Reader.java
    tomcat/trunk/java/org/apache/jasper/xmlparser/XMLEncodingDetector.java
    tomcat/trunk/java/org/apache/jasper/xmlparser/XMLString.java
    tomcat/trunk/java/org/apache/jasper/xmlparser/XMLStringBuffer.java

Modified: tomcat/trunk/java/org/apache/jasper/util/Enumerator.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/jasper/util/Enumerator.java?rev=1081765&r1=1081764&r2=1081765&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/jasper/util/Enumerator.java (original)
+++ tomcat/trunk/java/org/apache/jasper/util/Enumerator.java Tue Mar 15 13:10:33 2011
@@ -20,11 +20,9 @@ package org.apache.jasper.util;
 
 
 import java.util.ArrayList;
-import java.util.Collection;
 import java.util.Enumeration;
 import java.util.Iterator;
 import java.util.List;
-import java.util.Map;
 import java.util.NoSuchElementException;
 
 
@@ -45,31 +43,6 @@ public final class Enumerator<T> impleme
 
 
     /**
-     * Return an Enumeration over the values of the specified Collection.
-     *
-     * @param collection Collection whose values should be enumerated
-     */
-    public Enumerator(Collection<T> collection) {
-
-        this(collection.iterator());
-
-    }
-
-
-    /**
-     * Return an Enumeration over the values of the specified Collection.
-     *
-     * @param collection Collection whose values should be enumerated
-     * @param clone true to clone iterator
-     */
-    public Enumerator(Collection<T> collection, boolean clone) {
-
-        this(collection.iterator(), clone);
-
-    }
-
-
-    /**
      * Return an Enumeration over the values returned by the
      * specified Iterator.
      *
@@ -106,31 +79,6 @@ public final class Enumerator<T> impleme
     }
 
 
-    /**
-     * Return an Enumeration over the values of the specified Map.
-     *
-     * @param map Map whose values should be enumerated
-     */
-    public Enumerator(Map<?,T> map) {
-
-        this(map.values().iterator());
-
-    }
-
-
-    /**
-     * Return an Enumeration over the values of the specified Map.
-     *
-     * @param map Map whose values should be enumerated
-     * @param clone true to clone iterator
-     */
-    public Enumerator(Map<?,T> map, boolean clone) {
-
-        this(map.values().iterator(), clone);
-
-    }
-
-
     // ----------------------------------------------------- Instance Variables
 
 

Modified: tomcat/trunk/java/org/apache/jasper/xmlparser/ASCIIReader.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/jasper/xmlparser/ASCIIReader.java?rev=1081765&r1=1081764&r2=1081765&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/jasper/xmlparser/ASCIIReader.java (original)
+++ tomcat/trunk/java/org/apache/jasper/xmlparser/ASCIIReader.java Tue Mar 15 13:10:33 2011
@@ -31,15 +31,7 @@ import org.apache.jasper.compiler.Locali
  *
  * @version $Id$
  */
-public class ASCIIReader
-    extends Reader {
-
-    //
-    // Constants
-    //
-
-    /** Default byte buffer size (2048). */
-    public static final int DEFAULT_BUFFER_SIZE = 2048;
+public class ASCIIReader extends Reader {
 
     //
     // Data

Modified: tomcat/trunk/java/org/apache/jasper/xmlparser/TreeNode.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/jasper/xmlparser/TreeNode.java?rev=1081765&r1=1081764&r2=1081765&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/jasper/xmlparser/TreeNode.java (original)
+++ tomcat/trunk/java/org/apache/jasper/xmlparser/TreeNode.java Tue Mar 15 13:10:33 2011
@@ -45,18 +45,6 @@ public class TreeNode {
 
 
     /**
-     * Construct a new node with no parent.
-     *
-     * @param name The name of this node
-     */
-    public TreeNode(String name) {
-
-        this(name, null);
-
-    }
-
-
-    /**
      * Construct a new node with the specified parent.
      *
      * @param name The name of this node
@@ -254,32 +242,6 @@ public class TreeNode {
 
 
     /**
-     * Remove any existing value for the specified attribute name.
-     *
-     * @param name The attribute name to remove
-     */
-    public void removeAttribute(String name) {
-
-        if (attributes != null)
-            attributes.remove(name);
-
-    }
-
-
-    /**
-     * Remove a child node from this node, if it is one.
-     *
-     * @param node The child node to remove
-     */
-    public void removeNode(TreeNode node) {
-
-        if (children != null)
-            children.remove(node);
-
-    }
-
-
-    /**
      * Set the body text associated with this node (if any).
      *
      * @param body The body text (if any)

Modified: tomcat/trunk/java/org/apache/jasper/xmlparser/UTF8Reader.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/jasper/xmlparser/UTF8Reader.java?rev=1081765&r1=1081764&r2=1081765&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/jasper/xmlparser/UTF8Reader.java (original)
+++ tomcat/trunk/java/org/apache/jasper/xmlparser/UTF8Reader.java Tue Mar 15 13:10:33 2011
@@ -35,13 +35,6 @@ public class UTF8Reader
     private final org.apache.juli.logging.Log log=
         org.apache.juli.logging.LogFactory.getLog( UTF8Reader.class );
     
-    //
-    // Constants
-    //
-
-    /** Default byte buffer size (2048). */
-    public static final int DEFAULT_BUFFER_SIZE = 2048;
-
     // debugging
 
     /** Debug read. */

Modified: tomcat/trunk/java/org/apache/jasper/xmlparser/XMLEncodingDetector.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/jasper/xmlparser/XMLEncodingDetector.java?rev=1081765&r1=1081764&r2=1081765&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/jasper/xmlparser/XMLEncodingDetector.java (original)
+++ tomcat/trunk/java/org/apache/jasper/xmlparser/XMLEncodingDetector.java Tue Mar 15 13:10:33
2011
@@ -1068,7 +1068,6 @@ public class XMLEncodingDetector {
 
         private InputStream fInputStream;
         private byte[] fData;
-        private int fStartOffset;
         private int fEndOffset;
         private int fOffset;
         private int fLength;
@@ -1077,21 +1076,12 @@ public class XMLEncodingDetector {
         public RewindableInputStream(InputStream is) {
             fData = new byte[DEFAULT_XMLDECL_BUFFER_SIZE];
             fInputStream = is;
-            fStartOffset = 0;
             fEndOffset = -1;
             fOffset = 0;
             fLength = 0;
             fMark = 0;
         }
 
-        public void setStartOffset(int offset) {
-            fStartOffset = offset;
-        }
-
-        public void rewind() {
-            fOffset = fStartOffset;
-        }
-
         @Override
         public int read() throws IOException {
             int b = 0;
@@ -1199,12 +1189,12 @@ public class XMLEncodingDetector {
         }
 
         @Override
-        public void mark(int howMuch) {
+        public synchronized void mark(int howMuch) {
             fMark = fOffset;
         }
 
         @Override
-        public void reset() {
+        public synchronized void reset() {
             fOffset = fMark;
         }
 

Modified: tomcat/trunk/java/org/apache/jasper/xmlparser/XMLString.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/jasper/xmlparser/XMLString.java?rev=1081765&r1=1081764&r2=1081765&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/jasper/xmlparser/XMLString.java (original)
+++ tomcat/trunk/java/org/apache/jasper/xmlparser/XMLString.java Tue Mar 15 13:10:33 2011
@@ -72,31 +72,6 @@ public class XMLString {
     public XMLString() {
     } // <init>()
 
-    /**
-     * Constructs an XMLString structure preset with the specified
-     * values.
-     * 
-     * @param ch     The character array.
-     * @param offset The offset into the character array.
-     * @param length The length of characters from the offset.
-     */
-    public XMLString(char[] ch, int offset, int length) {
-        setValues(ch, offset, length);
-    } // <init>(char[],int,int)
-
-    /**
-     * Constructs an XMLString structure with copies of the values in
-     * the given structure.
-     * <p>
-     * <strong>Note:</strong> This does not copy the character array;
-     * only the reference to the array is copied.
-     *
-     * @param string The XMLString to copy.
-     */
-    public XMLString(XMLString string) {
-        setValues(string);
-    } // <init>(XMLString)
-
     //
     // Public methods
     //
@@ -135,29 +110,6 @@ public class XMLString {
         this.length = -1;
     } // clear()
 
-    /**
-     * Returns true if the contents of this XMLString structure and
-     * the specified array are equal.
-     * 
-     * @param ch     The character array.
-     * @param offset The offset into the character array.
-     * @param length The length of characters from the offset.
-     */
-    public boolean equals(char[] ch, int offset, int length) {
-        if (ch == null) {
-            return false;
-        }
-        if (this.length != length) {
-            return false;
-        }
-
-        for (int i=0; i<length; i++) {
-            if (this.ch[this.offset+i] != ch[offset+i] ) {
-                return false;
-            }
-        }
-        return true;
-    } // equals(char[],int,int):boolean
 
     /**
      * Returns true if the contents of this XMLString structure and

Modified: tomcat/trunk/java/org/apache/jasper/xmlparser/XMLStringBuffer.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/jasper/xmlparser/XMLStringBuffer.java?rev=1081765&r1=1081764&r2=1081765&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/jasper/xmlparser/XMLStringBuffer.java (original)
+++ tomcat/trunk/java/org/apache/jasper/xmlparser/XMLStringBuffer.java Tue Mar 15 13:10:33
2011
@@ -76,30 +76,6 @@ public class XMLStringBuffer
         ch = new char[size];
     } // <init>(int)
 
-    /** Constructs a string buffer from a char. */
-    public XMLStringBuffer(char c) {
-        this(1);
-        append(c);
-    } // <init>(char)
-
-    /** Constructs a string buffer from a String. */
-    public XMLStringBuffer(String s) {
-        this(s.length());
-        append(s);
-    } // <init>(String)
-
-    /** Constructs a string buffer from the specified character array. */
-    public XMLStringBuffer(char[] ch, int offset, int length) {
-        this(length);
-        append(ch, offset, length);
-    } // <init>(char[],int,int)
-
-    /** Constructs a string buffer from the specified XMLString. */
-    public XMLStringBuffer(XMLString s) {
-        this(s.length);
-        append(s);
-    } // <init>(XMLString)
-
     //
     // Public methods
     //



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


Mime
View raw message