From: markt Date: Tue, 15 Mar 2011 13:10:33 +0000 (+0000) Subject: Remove unused code X-Git-Url: https://git.internetallee.de/?a=commitdiff_plain;h=23a127c9c9ee35d20bea0c2bf16b789008101a0b;p=tomcat7.0 Remove unused code Fix some Eclipse warnings git-svn-id: https://svn.apache.org/repos/asf/tomcat/trunk@1081765 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/java/org/apache/jasper/util/Enumerator.java b/java/org/apache/jasper/util/Enumerator.java index f827077b7..3b0dc4e4b 100644 --- a/java/org/apache/jasper/util/Enumerator.java +++ b/java/org/apache/jasper/util/Enumerator.java @@ -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 implements Enumeration { /** - * Return an Enumeration over the values of the specified Collection. - * - * @param collection Collection whose values should be enumerated - */ - public Enumerator(Collection 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 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 implements Enumeration { } - /** - * Return an Enumeration over the values of the specified Map. - * - * @param map Map whose values should be enumerated - */ - public Enumerator(Map 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 map, boolean clone) { - - this(map.values().iterator(), clone); - - } - - // ----------------------------------------------------- Instance Variables diff --git a/java/org/apache/jasper/xmlparser/ASCIIReader.java b/java/org/apache/jasper/xmlparser/ASCIIReader.java index 5ca1b492f..b8c8c5681 100644 --- a/java/org/apache/jasper/xmlparser/ASCIIReader.java +++ b/java/org/apache/jasper/xmlparser/ASCIIReader.java @@ -31,15 +31,7 @@ import org.apache.jasper.compiler.Localizer; * * @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 diff --git a/java/org/apache/jasper/xmlparser/TreeNode.java b/java/org/apache/jasper/xmlparser/TreeNode.java index 6a71b6975..dc23f67de 100644 --- a/java/org/apache/jasper/xmlparser/TreeNode.java +++ b/java/org/apache/jasper/xmlparser/TreeNode.java @@ -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) diff --git a/java/org/apache/jasper/xmlparser/UTF8Reader.java b/java/org/apache/jasper/xmlparser/UTF8Reader.java index a09b60fb1..5dff6975f 100644 --- a/java/org/apache/jasper/xmlparser/UTF8Reader.java +++ b/java/org/apache/jasper/xmlparser/UTF8Reader.java @@ -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. */ diff --git a/java/org/apache/jasper/xmlparser/XMLEncodingDetector.java b/java/org/apache/jasper/xmlparser/XMLEncodingDetector.java index 63c1321c5..f25e82ea6 100644 --- a/java/org/apache/jasper/xmlparser/XMLEncodingDetector.java +++ b/java/org/apache/jasper/xmlparser/XMLEncodingDetector.java @@ -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; } diff --git a/java/org/apache/jasper/xmlparser/XMLString.java b/java/org/apache/jasper/xmlparser/XMLString.java index a6b36b9df..7f995f8ab 100644 --- a/java/org/apache/jasper/xmlparser/XMLString.java +++ b/java/org/apache/jasper/xmlparser/XMLString.java @@ -72,31 +72,6 @@ public class XMLString { public XMLString() { } // () - /** - * 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); - } // (char[],int,int) - - /** - * Constructs an XMLString structure with copies of the values in - * the given structure. - *

- * Note: 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); - } // (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(int) - /** Constructs a string buffer from a char. */ - public XMLStringBuffer(char c) { - this(1); - append(c); - } // (char) - - /** Constructs a string buffer from a String. */ - public XMLStringBuffer(String s) { - this(s.length()); - append(s); - } // (String) - - /** Constructs a string buffer from the specified character array. */ - public XMLStringBuffer(char[] ch, int offset, int length) { - this(length); - append(ch, offset, length); - } // (char[],int,int) - - /** Constructs a string buffer from the specified XMLString. */ - public XMLStringBuffer(XMLString s) { - this(s.length); - append(s); - } // (XMLString) - // // Public methods //