Partial fix for https://issues.apache.org/bugzilla/show_bug.cgi?id=48132
authormarkt <markt@13f79535-47bb-0310-9956-ffa450edef68>
Thu, 5 Nov 2009 01:22:13 +0000 (01:22 +0000)
committermarkt <markt@13f79535-47bb-0310-9956-ffa450edef68>
Thu, 5 Nov 2009 01:22:13 +0000 (01:22 +0000)
Patch provided by sebb
This is the final patch for this bug fix.

git-svn-id: https://svn.apache.org/repos/asf/tomcat/trunk@832957 13f79535-47bb-0310-9956-ffa450edef68

49 files changed:
java/org/apache/tomcat/buildutil/Txt2Html.java
java/org/apache/tomcat/util/buf/B2CConverter.java
java/org/apache/tomcat/util/buf/ByteChunk.java
java/org/apache/tomcat/util/buf/C2BConverter.java
java/org/apache/tomcat/util/buf/CharChunk.java
java/org/apache/tomcat/util/buf/MessageBytes.java
java/org/apache/tomcat/util/buf/StringCache.java
java/org/apache/tomcat/util/digester/CallMethodRule.java
java/org/apache/tomcat/util/digester/CallParamRule.java
java/org/apache/tomcat/util/digester/Digester.java
java/org/apache/tomcat/util/digester/FactoryCreateRule.java
java/org/apache/tomcat/util/digester/NodeCreateRule.java
java/org/apache/tomcat/util/digester/ObjectCreateRule.java
java/org/apache/tomcat/util/digester/ObjectParamRule.java
java/org/apache/tomcat/util/digester/PathCallParamRule.java
java/org/apache/tomcat/util/digester/SetNextRule.java
java/org/apache/tomcat/util/digester/SetPropertiesRule.java
java/org/apache/tomcat/util/digester/SetPropertyRule.java
java/org/apache/tomcat/util/digester/SetRootRule.java
java/org/apache/tomcat/util/digester/SetTopRule.java
java/org/apache/tomcat/util/http/Cookies.java
java/org/apache/tomcat/util/http/MimeHeaders.java
java/org/apache/tomcat/util/http/Parameters.java
java/org/apache/tomcat/util/http/ServerCookie.java
java/org/apache/tomcat/util/http/fileupload/DefaultFileItem.java
java/org/apache/tomcat/util/http/fileupload/DeferredFileOutputStream.java
java/org/apache/tomcat/util/http/fileupload/DiskFileUpload.java
java/org/apache/tomcat/util/http/fileupload/FileUpload.java
java/org/apache/tomcat/util/http/fileupload/MultipartStream.java
java/org/apache/tomcat/util/http/fileupload/ThresholdingOutputStream.java
java/org/apache/tomcat/util/log/SystemLogHandler.java
java/org/apache/tomcat/util/modeler/BaseModelMBean.java
java/org/apache/tomcat/util/modeler/ManagedBean.java
java/org/apache/tomcat/util/modeler/NotificationInfo.java
java/org/apache/tomcat/util/modeler/modules/MbeansDescriptorsDOMSource.java
java/org/apache/tomcat/util/modeler/modules/MbeansDescriptorsDigesterSource.java
java/org/apache/tomcat/util/modeler/modules/MbeansDescriptorsIntrospectionSource.java
java/org/apache/tomcat/util/modeler/modules/MbeansDescriptorsSerSource.java
java/org/apache/tomcat/util/modeler/modules/MbeansSource.java
java/org/apache/tomcat/util/net/AprEndpoint.java
java/org/apache/tomcat/util/net/DefaultServerSocketFactory.java
java/org/apache/tomcat/util/net/JIoEndpoint.java
java/org/apache/tomcat/util/net/NioChannel.java
java/org/apache/tomcat/util/net/NioEndpoint.java
java/org/apache/tomcat/util/net/SecureNioChannel.java
java/org/apache/tomcat/util/net/URL.java
java/org/apache/tomcat/util/net/jsse/JSSEImplementation.java
java/org/apache/tomcat/util/net/jsse/JSSESocketFactory.java
java/org/apache/tomcat/util/threads/TaskQueue.java

index 18fc4de..8110686 100644 (file)
@@ -75,6 +75,7 @@ public class Txt2Html
      * @param BuildException Thrown if an error occurs during execution of
      *    this task.
      */
+    @Override
     public void execute() 
         throws BuildException 
     {
index e695fbf..639fc97 100644 (file)
@@ -128,11 +128,13 @@ final class  ReadConvertor extends InputStreamReader {
     
     /** Overriden - will do nothing but reset internal state.
      */
+    @Override
     public  final void close() throws IOException {
         // NOTHING
         // Calling super.close() would reset out and cb.
     }
     
+    @Override
     public  final int read(char cbuf[], int off, int len)
         throws IOException
     {
@@ -167,15 +169,18 @@ final class IntermediateInputStream extends InputStream {
     public IntermediateInputStream() {
     }
     
+    @Override
     public  final void close() throws IOException {
         // shouldn't be called - we filter it out in writer
         throw new IOException("close() called - shouldn't happen ");
     }
     
+    @Override
     public  final  int read(byte cbuf[], int off, int len) throws IOException {
         return bc.substract(cbuf, off, len);
     }
     
+    @Override
     public  final int read() throws IOException {
         return bc.substract();
     }
index ce3b4df..94423bf 100644 (file)
@@ -481,6 +481,7 @@ public final class ByteChunk implements Cloneable, Serializable {
     
     // -------------------- Conversion and getters --------------------
 
+    @Override
     public String toString() {
         if (null == buff) {
             return null;
index b5d3b42..95a0ab9 100644 (file)
@@ -177,6 +177,7 @@ public final class C2BConverter {
     
     /** Overriden - will do nothing but reset internal state.
      */
+    @Override
     public  final void close() throws IOException {
        // NOTHING
        // Calling super.close() would reset out and cb.
@@ -185,12 +186,14 @@ public final class C2BConverter {
     /**
      *  Flush the characters only
      */ 
+    @Override
     public  final void flush() throws IOException {
        // Will flushBuffer and out()
        // flushBuffer put any remaining chars in the byte[] 
        super.flush();
     }
     
+    @Override
     public  final void write(char cbuf[], int off, int len) throws IOException {
        // will do the conversion and call write on the output stream
        super.write( cbuf, off, len );
@@ -226,16 +229,19 @@ final class IntermediateOutputStream extends OutputStream {
            this.tbuff=tbuff;
     }
     
+    @Override
     public  final void close() throws IOException {
        // shouldn't be called - we filter it out in writer
        throw new IOException("close() called - shouldn't happen ");
     }
     
+    @Override
     public  final void flush() throws IOException {
        // nothing - write will go directly to the buffer,
        // we don't keep any state
     }
     
+    @Override
     public  final  void write(byte cbuf[], int off, int len) throws IOException {
        // will do the conversion and call write on the output stream
        if( enabled ) {
@@ -243,6 +249,7 @@ final class IntermediateOutputStream extends OutputStream {
        }
     }
     
+    @Override
     public  final void write( int i ) throws IOException {
        throw new IOException("write( int ) called - shouldn't happen ");
     }
index 91ece8b..95cb70d 100644 (file)
@@ -483,6 +483,7 @@ public final class CharChunk implements Cloneable, Serializable, CharSequence {
     
     // -------------------- Conversion and getters --------------------
 
+    @Override
     public String toString() {
         if (null == buff) {
             return null;
index 422edbe..c52faae 100644 (file)
@@ -185,6 +185,7 @@ public final class MessageBytes implements Cloneable, Serializable {
 
     /** Compute the string value
      */
+    @Override
     public String toString() {
         if( hasStrValue ) return strValue;
         
@@ -400,6 +401,7 @@ public final class MessageBytes implements Cloneable, Serializable {
     
 
     // -------------------- Hash code  --------------------
+    @Override
     public  int hashCode() {
         if( hasHashCode ) return hashCode;
         int code = 0;
index 7471c83..fd794e1 100644 (file)
@@ -632,12 +632,15 @@ public class StringCache {
         public String enc = null;
         public String value = null;
 
+        @Override
         public String toString() {
             return value;
         }
+        @Override
         public int hashCode() {
             return value.hashCode();
         }
+        @Override
         public boolean equals(Object obj) {
             if (obj instanceof ByteEntry) {
                 return value.equals(((ByteEntry) obj).value);
@@ -656,12 +659,15 @@ public class StringCache {
         public char[] name = null;
         public String value = null;
 
+        @Override
         public String toString() {
             return value;
         }
+        @Override
         public int hashCode() {
             return value.hashCode();
         }
+        @Override
         public boolean equals(Object obj) {
             if (obj instanceof CharEntry) {
                 return value.equals(((CharEntry) obj).value);
index 85ada38..2e04694 100644 (file)
@@ -343,6 +343,7 @@ public class CallMethodRule extends Rule {
      * Set the associated digester.
      * If needed, this class loads the parameter classes from their names.
      */
+    @Override
     public void setDigester(Digester digester)
     {
         // call superclass
@@ -373,6 +374,7 @@ public class CallMethodRule extends Rule {
      *   the element name otherwise
      * @param attributes The attribute list for this element
      */
+    @Override
     public void begin(String namespace, String name, Attributes attributes)
             throws Exception {
 
@@ -398,6 +400,7 @@ public class CallMethodRule extends Rule {
      *   the element name otherwise
      * @param bodyText The body text of this element
      */
+    @Override
     public void body(String namespace, String name, String bodyText)
             throws Exception {
 
@@ -417,6 +420,7 @@ public class CallMethodRule extends Rule {
      * @param name the local name if the parser is namespace aware, or just 
      *   the element name otherwise
      */
+    @Override
     public void end(String namespace, String name) throws Exception {
 
         // Retrieve or construct the parameter values array
@@ -535,6 +539,7 @@ public class CallMethodRule extends Rule {
     /**
      * Clean up after parsing is complete.
      */
+    @Override
     public void finish() throws Exception {
 
         bodyText = null;
@@ -554,6 +559,7 @@ public class CallMethodRule extends Rule {
     /**
      * Render a printable version of this Rule.
      */
+    @Override
     public String toString() {
 
         StringBuilder sb = new StringBuilder("CallMethodRule[");
index 89365c5..249a10c 100644 (file)
@@ -146,6 +146,7 @@ public class CallParamRule extends Rule {
      *   the element name otherwise
      * @param attributes The attribute list for this element
      */
+    @Override
     public void begin(String namespace, String name, Attributes attributes)
             throws Exception {
 
@@ -192,6 +193,7 @@ public class CallParamRule extends Rule {
      *   the element name otherwise
      * @param bodyText The body text of this element
      */
+    @Override
     public void body(String namespace, String name, String bodyText)
             throws Exception {
 
@@ -210,6 +212,7 @@ public class CallParamRule extends Rule {
     /**
      * Process any body texts now.
      */
+    @Override
     public void end(String namespace, String name) {
         if (bodyTextStack != null && !bodyTextStack.empty()) {
             // what we do now is push one parameter onto the top set of parameters
@@ -221,6 +224,7 @@ public class CallParamRule extends Rule {
     /**
      * Render a printable version of this Rule.
      */
+    @Override
     public String toString() {
 
         StringBuilder sb = new StringBuilder("CallParamRule[");
index 56b18d2..76e312b 100644 (file)
@@ -920,6 +920,7 @@ public class Digester extends DefaultHandler {
      *
      * @exception SAXException if a parsing error is to be reported
      */
+    @Override
     public void characters(char buffer[], int start, int length)
             throws SAXException {
 
@@ -937,6 +938,7 @@ public class Digester extends DefaultHandler {
      *
      * @exception SAXException if a parsing error is to be reported
      */
+    @Override
     public void endDocument() throws SAXException {
 
         if (saxLog.isDebugEnabled()) {
@@ -985,6 +987,7 @@ public class Digester extends DefaultHandler {
      *   empty string if qualified names are not available.
      * @exception SAXException if a parsing error is to be reported
      */
+    @Override
     public void endElement(String namespaceURI, String localName,
                            String qName) throws SAXException {
 
@@ -1081,6 +1084,7 @@ public class Digester extends DefaultHandler {
      *
      * @exception SAXException if a parsing error is to be reported
      */
+    @Override
     public void endPrefixMapping(String prefix) throws SAXException {
 
         if (saxLog.isDebugEnabled()) {
@@ -1113,6 +1117,7 @@ public class Digester extends DefaultHandler {
      *
      * @exception SAXException if a parsing error is to be reported
      */
+    @Override
     public void ignorableWhitespace(char buffer[], int start, int len)
             throws SAXException {
 
@@ -1134,6 +1139,7 @@ public class Digester extends DefaultHandler {
      *
      * @exception SAXException if a parsing error is to be reported
      */
+    @Override
     public void processingInstruction(String target, String data)
             throws SAXException {
 
@@ -1162,6 +1168,7 @@ public class Digester extends DefaultHandler {
      *
      * @param locator The new locator
      */
+    @Override
     public void setDocumentLocator(Locator locator) {
 
         if (saxLog.isDebugEnabled()) {
@@ -1180,6 +1187,7 @@ public class Digester extends DefaultHandler {
      *
      * @exception SAXException if a parsing error is to be reported
      */
+    @Override
     public void skippedEntity(String name) throws SAXException {
 
         if (saxLog.isDebugEnabled()) {
@@ -1196,6 +1204,7 @@ public class Digester extends DefaultHandler {
      *
      * @exception SAXException if a parsing error is to be reported
      */
+    @Override
     public void startDocument() throws SAXException {
 
         if (saxLog.isDebugEnabled()) {
@@ -1222,6 +1231,7 @@ public class Digester extends DefaultHandler {
      *   no attributes, it shall be an empty Attributes object. 
      * @exception SAXException if a parsing error is to be reported
      */
+    @Override
     public void startElement(String namespaceURI, String localName,
                              String qName, Attributes list)
             throws SAXException {
@@ -1296,6 +1306,7 @@ public class Digester extends DefaultHandler {
      *
      * @exception SAXException if a parsing error is to be reported
      */
+    @Override
     public void startPrefixMapping(String prefix, String namespaceURI)
             throws SAXException {
 
@@ -1324,6 +1335,7 @@ public class Digester extends DefaultHandler {
      * @param publicId The public identifier (if any)
      * @param systemId The system identifier (if any)
      */
+    @Override
     public void notationDecl(String name, String publicId, String systemId) {
 
         if (saxLog.isDebugEnabled()) {
@@ -1342,6 +1354,7 @@ public class Digester extends DefaultHandler {
      * @param systemId The system identifier (if any)
      * @param notation The name of the associated notation
      */
+    @Override
     public void unparsedEntityDecl(String name, String publicId,
                                    String systemId, String notation) {
 
@@ -1383,6 +1396,7 @@ public class Digester extends DefaultHandler {
      * @exception SAXException if a parsing exception occurs
      * 
      */
+    @Override
     public InputSource resolveEntity(String publicId, String systemId)
             throws SAXException {     
                 
@@ -1440,6 +1454,7 @@ public class Digester extends DefaultHandler {
      *
      * @exception SAXException if a parsing exception occurs
      */
+    @Override
     public void error(SAXParseException exception) throws SAXException {
 
         log.error("Parse Error at line " + exception.getLineNumber() +
@@ -1460,6 +1475,7 @@ public class Digester extends DefaultHandler {
      *
      * @exception SAXException if a parsing exception occurs
      */
+    @Override
     public void fatalError(SAXParseException exception) throws SAXException {
 
         log.error("Parse Fatal Error at line " + exception.getLineNumber() +
@@ -1480,6 +1496,7 @@ public class Digester extends DefaultHandler {
      *
      * @exception SAXException if a parsing exception occurs
      */
+    @Override
     public void warning(SAXParseException exception) throws SAXException {
          if (errorHandler != null) {
             log.warn("Parse Warning Error at line " + exception.getLineNumber() +
index bf7e2dc..a9078eb 100644 (file)
@@ -257,6 +257,7 @@ public class FactoryCreateRule extends Rule {
      *
      * @param attributes The attribute list of this element
      */
+    @Override
     public void begin(String namespace, String name, Attributes attributes) throws Exception {
         
         if (ignoreCreateExceptions) {
@@ -302,6 +303,7 @@ public class FactoryCreateRule extends Rule {
     /**
      * Process the end of this element.
      */
+    @Override
     public void end(String namespace, String name) throws Exception {
         
         // check if object was created 
@@ -333,6 +335,7 @@ public class FactoryCreateRule extends Rule {
     /**
      * Clean up after parsing is complete.
      */
+    @Override
     public void finish() throws Exception {
 
         if (attributeName != null) {
@@ -345,6 +348,7 @@ public class FactoryCreateRule extends Rule {
     /**
      * Render a printable version of this Rule.
      */
+    @Override
     public String toString() {
 
         StringBuilder sb = new StringBuilder("FactoryCreateRule[");
index 4465576..17ee023 100644 (file)
@@ -163,6 +163,7 @@ public class NodeCreateRule extends Rule {
          * @param length the number of characters to read from the array
          * @throws SAXException if the DOM implementation throws an exception
          */
+        @Override
         public void characters(char[] ch, int start, int length)
             throws SAXException {
 
@@ -186,6 +187,7 @@ public class NodeCreateRule extends Rule {
          * @param qName the qualified (prefixed) name
          * @throws SAXException if the DOM implementation throws an exception
          */
+        @Override
         public void endElement(String namespaceURI, String localName,
                                String qName)
             throws SAXException {
@@ -217,6 +219,7 @@ public class NodeCreateRule extends Rule {
          *   supplied
          * @throws SAXException if the DOM implementation throws an exception
          */
+        @Override
         public void processingInstruction(String target, String data)
             throws SAXException {
             
@@ -239,6 +242,7 @@ public class NodeCreateRule extends Rule {
          * @param atts the list of attributes
          * @throws SAXException if the DOM implementation throws an exception
          */
+        @Override
         public void startElement(String namespaceURI, String localName,
                                  String qName, Attributes atts)
             throws SAXException {
@@ -384,6 +388,7 @@ public class NodeCreateRule extends Rule {
      * @param attributes The attribute list of this element
      * @throws Exception indicates a JAXP configuration problem
      */
+    @Override
     public void begin(String namespaceURI, String name, Attributes attributes)
         throws Exception {
 
@@ -425,6 +430,7 @@ public class NodeCreateRule extends Rule {
      * @param name the local name if the parser is namespace aware, or just 
      *   the element name otherwise
      */
+    @Override
     public void end(String namespace, String name) throws Exception {
 
         digester.pop();
index e746584..834520b 100644 (file)
@@ -119,6 +119,7 @@ public class ObjectCreateRule extends Rule {
      *   the element name otherwise
      * @param attributes The attribute list for this element
      */
+    @Override
     public void begin(String namespace, String name, Attributes attributes)
             throws Exception {
 
@@ -152,6 +153,7 @@ public class ObjectCreateRule extends Rule {
      * @param name the local name if the parser is namespace aware, or just 
      *   the element name otherwise
      */
+    @Override
     public void end(String namespace, String name) throws Exception {
 
         Object top = digester.pop();
@@ -166,6 +168,7 @@ public class ObjectCreateRule extends Rule {
     /**
      * Render a printable version of this Rule.
      */
+    @Override
     public String toString() {
 
         StringBuilder sb = new StringBuilder("ObjectCreateRule[");
index 7b1d6a4..1c43d54 100644 (file)
@@ -91,6 +91,7 @@ public class ObjectParamRule extends Rule {
      *
      * @param attributes The attribute list for this element
      */
+    @Override
     public void begin(String namespace, String name,
                       Attributes attributes) throws Exception {
         Object anAttribute = null;
@@ -111,6 +112,7 @@ public class ObjectParamRule extends Rule {
     /**
      * Render a printable version of this Rule.
      */
+    @Override
     public String toString() {
         StringBuilder sb = new StringBuilder("ObjectParamRule[");
         sb.append("paramIndex=");
index 673f37d..8e25031 100644 (file)
@@ -68,6 +68,7 @@ public class PathCallParamRule extends Rule {
      * @param attributes The attribute list for this element
 
      */
+    @Override
     public void begin(String namespace, String name, Attributes attributes) throws Exception {
 
         String param = getDigester().getMatch();
@@ -82,6 +83,7 @@ public class PathCallParamRule extends Rule {
     /**
      * Render a printable version of this Rule.
      */
+    @Override
     public String toString() {
 
         StringBuilder sb = new StringBuilder("PathCallParamRule[");
index 63170af..737cedb 100644 (file)
@@ -180,6 +180,7 @@ public class SetNextRule extends Rule {
      * @param name the local name if the parser is namespace aware, or just 
      *   the element name otherwise
      */
+    @Override
     public void end(String namespace, String name) throws Exception {
 
         // Identify the objects to be used
@@ -207,6 +208,7 @@ public class SetNextRule extends Rule {
     /**
      * Render a printable version of this Rule.
      */
+    @Override
     public String toString() {
 
         StringBuilder sb = new StringBuilder("SetNextRule[");
index 2fdacc3..9418081 100644 (file)
@@ -158,6 +158,7 @@ public class SetPropertiesRule extends Rule {
      *   the element name otherwise
      * @param attributes The attribute list for this element
      */
+    @Override
     public void begin(String namespace, String theName, Attributes attributes)
             throws Exception {
         
@@ -263,6 +264,7 @@ public class SetPropertiesRule extends Rule {
     /**
      * Render a printable version of this Rule.
      */
+    @Override
     public String toString() {
 
         StringBuilder sb = new StringBuilder("SetPropertiesRule[");
index f6d7e59..2ae8f7b 100644 (file)
@@ -102,6 +102,7 @@ public class SetPropertyRule extends Rule {
      * @exception NoSuchMethodException if the bean does not
      *  have a writeable property of the specified name
      */
+    @Override
     public void begin(String namespace, String theName, Attributes attributes)
             throws Exception {
 
@@ -146,6 +147,7 @@ public class SetPropertyRule extends Rule {
     /**
      * Render a printable version of this Rule.
      */
+    @Override
     public String toString() {
 
         StringBuilder sb = new StringBuilder("SetPropertyRule[");
index dd4d1a0..da4b89f 100644 (file)
@@ -181,6 +181,7 @@ public class SetRootRule extends Rule {
      * @param name the local name if the parser is namespace aware, or just 
      *   the element name otherwise
      */
+    @Override
     public void end(String namespace, String name) throws Exception {
 
         // Identify the objects to be used
@@ -208,6 +209,7 @@ public class SetRootRule extends Rule {
     /**
      * Render a printable version of this Rule.
      */
+    @Override
     public String toString() {
 
         StringBuilder sb = new StringBuilder("SetRootRule[");
index 9632d53..ef4175c 100644 (file)
@@ -180,6 +180,7 @@ public class SetTopRule extends Rule {
      * @param name the local name if the parser is namespace aware, or just 
      *   the element name otherwise
      */
+    @Override
     public void end(String namespace, String name) throws Exception {
 
         // Identify the objects to be used
@@ -208,6 +209,7 @@ public class SetTopRule extends Rule {
     /**
      * Render a printable version of this Rule.
      */
+    @Override
     public String toString() {
 
         StringBuilder sb = new StringBuilder("SetTopRule[");
index 12ef857..7efddbe 100644 (file)
@@ -161,6 +161,7 @@ public final class Cookies { // extends MultiMap {
     /**
      * EXPENSIVE!!!  only for debugging.
      */
+    @Override
     public String toString() {
         StringWriter sw = new StringWriter();
         PrintWriter pw = new PrintWriter(sw);
index 4b45f35..d4031ce 100644 (file)
@@ -135,6 +135,7 @@ public class MimeHeaders {
     /**
      * EXPENSIVE!!!  only for debugging.
      */
+    @Override
     public String toString() {
         StringWriter sw = new StringWriter();
         PrintWriter pw = new PrintWriter(sw);
index d67ac89..37bf2f3 100644 (file)
@@ -80,6 +80,7 @@ public final class Parameters extends MultiMap {
         }
     }
 
+    @Override
     public void recycle() {
         super.recycle();
         paramHashStringArray.clear();
index 33e2059..6e3cb6c 100644 (file)
@@ -59,6 +59,7 @@ public class ServerCookie implements Serializable {
         "EEE, dd-MMM-yyyy HH:mm:ss z";
     private static final ThreadLocal<DateFormat> OLD_COOKIE_FORMAT =
         new ThreadLocal<DateFormat>() {
+        @Override
         protected DateFormat initialValue() {
             DateFormat df =
                 new SimpleDateFormat(OLD_COOKIE_PATTERN, Locale.US);
@@ -186,6 +187,7 @@ public class ServerCookie implements Serializable {
 
     // -------------------- utils --------------------
 
+    @Override
     public String toString() {
         return "Cookie " + getName() + "=" + getValue() + " ; "
             + getVersion() + " " + getPath() + " " + getDomain();
index 8d9087c..65218dd 100644 (file)
@@ -545,6 +545,7 @@ public class DefaultFileItem
     /**
      * Removes the file contents from the temporary storage.
      */
+    @Override
     protected void finalize()
     {
         File outputFile = dfos.getFile();
index 1f26a84..8c1e4c0 100644 (file)
@@ -100,6 +100,7 @@ public class DeferredFileOutputStream
      *
      * @exception IOException if an error occurs.
      */
+    @Override
     protected OutputStream getStream() throws IOException
     {
         return currentOutputStream;
@@ -114,6 +115,7 @@ public class DeferredFileOutputStream
      *
      * @exception IOException if an error occurs.
      */
+    @Override
     protected void thresholdReached() throws IOException
     {
         byte[] data = memoryOutputStream.toByteArray();
index 43cdb19..a514e0f 100644 (file)
@@ -97,6 +97,7 @@ public class DiskFileUpload
      *
      * @return The factory class for new file items.
      */
+    @Override
     public FileItemFactory getFileItemFactory()
     {
         return fileItemFactory;
@@ -110,6 +111,7 @@ public class DiskFileUpload
      *
      * @param factory The factory class for new file items.
      */
+    @Override
     public void setFileItemFactory(FileItemFactory factory)
     {
         this.fileItemFactory = (DefaultFileItemFactory) factory;
index 5ed1944..a417cb3 100644 (file)
@@ -91,6 +91,7 @@ public class FileUpload
      *
      * @return The factory class for new file items.
      */
+    @Override
     public FileItemFactory getFileItemFactory()
     {
         return fileItemFactory;
@@ -102,6 +103,7 @@ public class FileUpload
      *
      * @param factory The factory class for new file items.
      */
+    @Override
     public void setFileItemFactory(FileItemFactory factory)
     {
         this.fileItemFactory = factory;
index 40c6c5d..446eef8 100644 (file)
@@ -757,6 +757,7 @@ public class MultipartStream
      *
      * @return The string representation of this object.
      */
+    @Override
     public String toString()
     {
         StringBuilder sbTemp = new StringBuilder();
index 9e1d49e..54271fa 100644 (file)
@@ -90,6 +90,7 @@ public abstract class ThresholdingOutputStream
      *
      * @exception IOException if an error occurs.
      */
+    @Override
     public void write(int b) throws IOException
     {
         checkThreshold(1);
@@ -106,6 +107,7 @@ public abstract class ThresholdingOutputStream
      *
      * @exception IOException if an error occurs.
      */
+    @Override
     public void write(byte b[]) throws IOException
     {
         checkThreshold(b.length);
@@ -124,6 +126,7 @@ public abstract class ThresholdingOutputStream
      *
      * @exception IOException if an error occurs.
      */
+    @Override
     public void write(byte b[], int off, int len) throws IOException
     {
         checkThreshold(len);
@@ -138,6 +141,7 @@ public abstract class ThresholdingOutputStream
      *
      * @exception IOException if an error occurs.
      */
+    @Override
     public void flush() throws IOException
     {
         getStream().flush();
@@ -150,6 +154,7 @@ public abstract class ThresholdingOutputStream
      *
      * @exception IOException if an error occurs.
      */
+    @Override
     public void close() throws IOException
     {
         try
index 01ad98a..1549c52 100644 (file)
@@ -138,107 +138,133 @@ public class SystemLogHandler extends PrintStream {
     // ---------------------------------------------------- PrintStream Methods
 
 
+    @Override
     public void flush() {
         findStream().flush();
     }
 
+    @Override
     public void close() {
         findStream().close();
     }
 
+    @Override
     public boolean checkError() {
         return findStream().checkError();
     }
 
+    @Override
     protected void setError() {
         //findStream().setError();
     }
 
+    @Override
     public void write(int b) {
         findStream().write(b);
     }
 
+    @Override
     public void write(byte[] b)
         throws IOException {
         findStream().write(b);
     }
 
+    @Override
     public void write(byte[] buf, int off, int len) {
         findStream().write(buf, off, len);
     }
 
+    @Override
     public void print(boolean b) {
         findStream().print(b);
     }
 
+    @Override
     public void print(char c) {
         findStream().print(c);
     }
 
+    @Override
     public void print(int i) {
         findStream().print(i);
     }
 
+    @Override
     public void print(long l) {
         findStream().print(l);
     }
 
+    @Override
     public void print(float f) {
         findStream().print(f);
     }
 
+    @Override
     public void print(double d) {
         findStream().print(d);
     }
 
+    @Override
     public void print(char[] s) {
         findStream().print(s);
     }
 
+    @Override
     public void print(String s) {
         findStream().print(s);
     }
 
+    @Override
     public void print(Object obj) {
         findStream().print(obj);
     }
 
+    @Override
     public void println() {
         findStream().println();
     }
 
+    @Override
     public void println(boolean x) {
         findStream().println(x);
     }
 
+    @Override
     public void println(char x) {
         findStream().println(x);
     }
 
+    @Override
     public void println(int x) {
         findStream().println(x);
     }
 
+    @Override
     public void println(long x) {
         findStream().println(x);
     }
 
+    @Override
     public void println(float x) {
         findStream().println(x);
     }
 
+    @Override
     public void println(double x) {
         findStream().println(x);
     }
 
+    @Override
     public void println(char[] x) {
         findStream().println(x);
     }
 
+    @Override
     public void println(String x) {
         findStream().println(x);
     }
 
+    @Override
     public void println(Object x) {
         findStream().println(x);
     }
index d986eda..aef3bb0 100644 (file)
@@ -444,6 +444,7 @@ public class BaseModelMBean implements DynamicMBean, MBeanRegistration, ModelMBe
 //        }
     }
 
+    @Override
     public String toString() {
         if( resource==null ) 
             return "BaseModelMbean[" + resourceType + "]";
@@ -1149,7 +1150,8 @@ public class BaseModelMBean implements DynamicMBean, MBeanRegistration, ModelMBe
            this.signature = signature;
        }
 
-       public boolean equals(Object other) {
+       @Override
+    public boolean equals(Object other) {
            if(!(other instanceof MethodKey)) {
                return false;
            }
@@ -1168,7 +1170,8 @@ public class BaseModelMBean implements DynamicMBean, MBeanRegistration, ModelMBe
            return true;
        }
 
-       public int hashCode() {
+       @Override
+    public int hashCode() {
            return name.hashCode();
        }
     }
index cf71c4a..5e11a92 100644 (file)
@@ -460,6 +460,7 @@ public class ManagedBean implements java.io.Serializable
     /**
      * Return a string representation of this managed bean.
      */
+    @Override
     public String toString() {
 
         StringBuilder sb = new StringBuilder("ManagedBean[");
index e6cd0c8..8d02338 100644 (file)
@@ -53,6 +53,7 @@ public class NotificationInfo extends FeatureInfo implements Serializable {
      *
      * @param description The new description
      */
+    @Override
     public void setDescription(String description) {
         super.setDescription(description);
         this.info = null;
@@ -64,6 +65,7 @@ public class NotificationInfo extends FeatureInfo implements Serializable {
      *
      * @param name The new name
      */
+    @Override
     public void setName(String name) {
         super.setName(name);
         this.info = null;
@@ -123,6 +125,7 @@ public class NotificationInfo extends FeatureInfo implements Serializable {
     /**
      * Return a string representation of this notification descriptor.
      */
+    @Override
     public String toString() {
 
         StringBuilder sb = new StringBuilder("NotificationInfo[");
index 6429e76..d183175 100644 (file)
@@ -67,6 +67,7 @@ public class MbeansDescriptorsDOMSource extends ModelerSource
         this.source=source;
     }
 
+    @Override
     public List<ObjectName> loadDescriptors( Registry registry, String location,
                                  String type, Object source)
             throws Exception
index 3c0221e..be8a134 100644 (file)
@@ -204,6 +204,7 @@ public class MbeansDescriptorsDigesterSource extends ModelerSource
         this.source=source;
     }
 
+    @Override
     public List<ObjectName> loadDescriptors( Registry registry, String location,
             String type, Object source) throws Exception {
         setRegistry(registry);
index b1813ca..048ab77 100644 (file)
@@ -66,6 +66,7 @@ public class MbeansDescriptorsIntrospectionSource extends ModelerSource
         this.source=source;
     }
 
+    @Override
     public List<ObjectName> loadDescriptors( Registry registry, String location,
             String type, Object source) throws Exception {
         setRegistry(registry);
index 10a73f8..33eefd7 100644 (file)
@@ -59,6 +59,7 @@ public class MbeansDescriptorsSerSource extends ModelerSource
         this.source=source;
     }
 
+    @Override
     public List<ObjectName> loadDescriptors( Registry registry, String location,
             String type, Object source) throws Exception {
         setRegistry(registry);
index cd3701d..a0d91d0 100644 (file)
@@ -103,6 +103,7 @@ public class MbeansSource extends ModelerSource implements MbeansSourceMBean
         return mbeans;
     }
 
+    @Override
     public List<ObjectName> loadDescriptors(Registry registry, String location,
             String type, Object source) throws Exception {
         setRegistry(registry);
@@ -267,6 +268,7 @@ public class MbeansSource extends ModelerSource implements MbeansSourceMBean
         }
     }
     
+    @Override
     public void updateField( ObjectName oname, String name, 
                              Object value )
     {
index 065a4c2..fbad6c9 100644 (file)
@@ -100,7 +100,9 @@ public class AprEndpoint extends AbstractEndpoint {
      * Priority of the acceptor and poller threads.
      */
     protected int threadPriority = Thread.NORM_PRIORITY;
+    @Override
     public void setThreadPriority(int threadPriority) { this.threadPriority = threadPriority; }
+    @Override
     public int getThreadPriority() { return threadPriority; }
 
 
index c122990..f29da5e 100644 (file)
@@ -40,27 +40,32 @@ class DefaultServerSocketFactory extends ServerSocketFactory {
         /* NOTHING */
     }
 
+    @Override
     public ServerSocket createSocket (int port)
     throws IOException {
         return  new ServerSocket (port);
     }
 
+    @Override
     public ServerSocket createSocket (int port, int backlog)
     throws IOException {
         return new ServerSocket (port, backlog);
     }
 
+    @Override
     public ServerSocket createSocket (int port, int backlog,
         InetAddress ifAddress)
     throws IOException {
         return new ServerSocket (port, backlog, ifAddress);
     }
  
+    @Override
     public Socket acceptSocket(ServerSocket socket)
        throws IOException {
        return socket.accept();
     }
  
+    @Override
     public void handshake(Socket sock)
        throws IOException {
         // NOOP
index f7a0431..fdbc2dd 100644 (file)
@@ -64,6 +64,7 @@ public class JIoEndpoint extends AbstractEndpoint {
     /**
      * Generic properties - currently only socket.XXX properties
      */
+    @Override
     public boolean setProperty(String name, String value) {
         final String socketName = "socket.";
         try {
@@ -89,7 +90,9 @@ public class JIoEndpoint extends AbstractEndpoint {
      * Priority of the acceptor and poller threads.
      */
     protected int threadPriority = Thread.NORM_PRIORITY;
+    @Override
     public void setThreadPriority(int threadPriority) { this.threadPriority = threadPriority; }
+    @Override
     public int getThreadPriority() { return threadPriority; }
 
     
index 92b90ed..298feed 100644 (file)
@@ -191,6 +191,7 @@ public class NioChannel implements ByteChannel{
         this.sc = IOChannel;
     }
 
+    @Override
     public String toString() {
         return super.toString()+":"+this.sc.toString();
     }
index 356100f..21e10d9 100644 (file)
@@ -134,6 +134,7 @@ public class NioEndpoint extends AbstractEndpoint {
      */
     protected ConcurrentLinkedQueue<SocketProcessor> processorCache = new ConcurrentLinkedQueue<SocketProcessor>() {
         protected AtomicInteger size = new AtomicInteger(0);
+        @Override
         public boolean offer(SocketProcessor sc) {
             sc.reset(null,null);
             boolean offer = socketProperties.getProcessorCache()==-1?true:size.get()<socketProperties.getProcessorCache();
@@ -148,6 +149,7 @@ public class NioEndpoint extends AbstractEndpoint {
             else return false;
         }
         
+        @Override
         public SocketProcessor poll() {
             SocketProcessor result = super.poll();
             if ( result != null ) {
@@ -156,6 +158,7 @@ public class NioEndpoint extends AbstractEndpoint {
             return result;
         }
         
+        @Override
         public void clear() {
             super.clear();
             size.set(0);
@@ -168,6 +171,7 @@ public class NioEndpoint extends AbstractEndpoint {
      */
     protected ConcurrentLinkedQueue<KeyAttachment> keyCache = new ConcurrentLinkedQueue<KeyAttachment>() {
         protected AtomicInteger size = new AtomicInteger(0);
+        @Override
         public boolean offer(KeyAttachment ka) {
             ka.reset();
             boolean offer = socketProperties.getKeyCache()==-1?true:size.get()<socketProperties.getKeyCache();
@@ -182,6 +186,7 @@ public class NioEndpoint extends AbstractEndpoint {
             else return false;
         }
 
+        @Override
         public KeyAttachment poll() {
             KeyAttachment result = super.poll();
             if ( result != null ) {
@@ -190,6 +195,7 @@ public class NioEndpoint extends AbstractEndpoint {
             return result;
         }
 
+        @Override
         public void clear() {
             super.clear();
             size.set(0);
@@ -202,6 +208,7 @@ public class NioEndpoint extends AbstractEndpoint {
      */
     protected ConcurrentLinkedQueue<PollerEvent> eventCache = new ConcurrentLinkedQueue<PollerEvent>() {
         protected AtomicInteger size = new AtomicInteger(0);
+        @Override
         public boolean offer(PollerEvent pe) {
             pe.reset();
             boolean offer = socketProperties.getEventCache()==-1?true:size.get()<socketProperties.getEventCache();
@@ -216,6 +223,7 @@ public class NioEndpoint extends AbstractEndpoint {
             else return false;
         }
 
+        @Override
         public PollerEvent poll() {
             PollerEvent result = super.poll();
             if ( result != null ) {
@@ -224,6 +232,7 @@ public class NioEndpoint extends AbstractEndpoint {
             return result;
         }
 
+        @Override
         public void clear() {
             super.clear();
             size.set(0);
@@ -237,6 +246,7 @@ public class NioEndpoint extends AbstractEndpoint {
     protected ConcurrentLinkedQueue<NioChannel> nioChannels = new ConcurrentLinkedQueue<NioChannel>() {
         protected AtomicInteger size = new AtomicInteger(0);
         protected AtomicInteger bytes = new AtomicInteger(0);
+        @Override
         public boolean offer(NioChannel socket) {
             boolean offer = socketProperties.getBufferPool()==-1?true:size.get()<socketProperties.getBufferPool();
             offer = offer && (socketProperties.getBufferPoolSize()==-1?true:(bytes.get()+socket.getBufferSize())<socketProperties.getBufferPoolSize());
@@ -252,6 +262,7 @@ public class NioEndpoint extends AbstractEndpoint {
             else return false;
         }
         
+        @Override
         public NioChannel poll() {
             NioChannel result = super.poll();
             if ( result != null ) {
@@ -261,6 +272,7 @@ public class NioEndpoint extends AbstractEndpoint {
             return result;
         }
         
+        @Override
         public void clear() {
             super.clear();
             size.set(0);
@@ -462,7 +474,9 @@ public class NioEndpoint extends AbstractEndpoint {
      * SSL engine.
      */
     protected boolean SSLEnabled = false;
+    @Override
     public boolean isSSLEnabled() { return SSLEnabled;}
+    @Override
     public void setSSLEnabled(boolean SSLEnabled) {this.SSLEnabled = SSLEnabled;}
 
     protected boolean secure = false;
@@ -547,6 +561,7 @@ public class NioEndpoint extends AbstractEndpoint {
      *
      * @return true if the endpoint is running, false otherwise
      */
+    @Override
     public boolean isRunning() {
         return running;
     }
@@ -557,6 +572,7 @@ public class NioEndpoint extends AbstractEndpoint {
      *
      * @return true if the endpoint is paused, false otherwise
      */
+    @Override
     public boolean isPaused() {
         return paused;
     }
@@ -1013,6 +1029,7 @@ public class NioEndpoint extends AbstractEndpoint {
             }//end if
         }//run
         
+        @Override
         public String toString() {
             return super.toString()+"[intOps="+this.interestOps+"]";
         }
index e32e48b..1971746 100644 (file)
@@ -73,6 +73,7 @@ public class SecureNioChannel extends NioChannel  {
         this.sslEngine = engine;
         reset();
     }
+    @Override
     public void reset() throws IOException {
         super.reset();
         netOutBuffer.position(0);
@@ -87,6 +88,7 @@ public class SecureNioChannel extends NioChannel  {
         initHandshakeStatus = sslEngine.getHandshakeStatus();
     }
     
+    @Override
     public int getBufferSize() {
         int size = super.getBufferSize();
         size += netInBuffer!=null?netInBuffer.capacity():0;
@@ -103,6 +105,7 @@ public class SecureNioChannel extends NioChannel  {
      * been flushed out and is empty
      * @return boolean
      */
+    @Override
     public boolean flush(boolean block, Selector s, long timeout,MutableInteger lastWrite) throws IOException {
         if (!block) {
             flush(netOutBuffer);
@@ -139,6 +142,7 @@ public class SecureNioChannel extends NioChannel  {
      * @return int - 0 if hand shake is complete, otherwise it returns a SelectionKey interestOps value
      * @throws IOException
      */
+    @Override
     public int handshake(boolean read, boolean write) throws IOException {
         if ( initHandshakeComplete ) return 0; //we have done our initial handshake
         
@@ -287,6 +291,7 @@ public class SecureNioChannel extends NioChannel  {
      * @throws IOException if there is data on the outgoing network buffer and we are unable to flush it
      * @todo Implement this java.io.Closeable method
      */
+    @Override
     public void close() throws IOException {
         if (closing) return;
         closing = true;
@@ -317,6 +322,7 @@ public class SecureNioChannel extends NioChannel  {
      * @param force boolean
      * @throws IOException
      */
+    @Override
     public void close(boolean force) throws IOException {
         try {
             close();
@@ -338,6 +344,7 @@ public class SecureNioChannel extends NioChannel  {
      * @throws IllegalArgumentException if the destination buffer is different than bufHandler.getReadBuffer()
      * @todo Implement this java.nio.channels.ReadableByteChannel method
      */
+    @Override
     public int read(ByteBuffer dst) throws IOException {
         //if we want to take advantage of the expand function, make sure we only use the ApplicationBufferHandler's buffers
         if ( dst != bufHandler.getReadBuffer() ) throw new IllegalArgumentException("You can only read using the application read buffer provided by the handler.");
@@ -392,6 +399,7 @@ public class SecureNioChannel extends NioChannel  {
      * @throws IOException If some other I/O error occurs
      * @todo Implement this java.nio.channels.WritableByteChannel method
      */
+    @Override
     public int write(ByteBuffer src) throws IOException {
         if ( src == this.netOutBuffer ) {
             //we can get here through a recursive call
@@ -458,14 +466,17 @@ public class SecureNioChannel extends NioChannel  {
         public ByteBuffer getWriteBuffer();
     }
 
+    @Override
     public ApplicationBufferHandler getBufHandler() {
         return bufHandler;
     }
 
+    @Override
     public boolean isInitHandshakeComplete() {
         return initHandshakeComplete;
     }
 
+    @Override
     public boolean isClosing() {
         return closing;
     }
@@ -482,6 +493,7 @@ public class SecureNioChannel extends NioChannel  {
         this.bufHandler = bufHandler;
     }
     
+    @Override
     public SocketChannel getIOChannel() {
         return sc;
     }
index bde9420..3dde8cf 100644 (file)
@@ -302,6 +302,7 @@ public final class URL implements Serializable {
      *
      * @param obj The URL to compare against
      */
+    @Override
     public boolean equals(Object obj) {
 
         if (obj == null)
@@ -561,6 +562,7 @@ public final class URL implements Serializable {
     /**
      * Return a string representation of this object.
      */
+    @Override
     public String toString() {
 
         StringBuilder sb = new StringBuilder("URL[");
index e059839..b8687b3 100644 (file)
@@ -47,15 +47,18 @@ public class JSSEImplementation extends SSLImplementation
     }
 
 
+    @Override
     public String getImplementationName(){
       return "JSSE";
     }
       
+    @Override
     public ServerSocketFactory getServerSocketFactory()  {
         ServerSocketFactory ssf = factory.getSocketFactory();
         return ssf;
     } 
 
+    @Override
     public SSLSupport getSSLSupport(Socket s) {
         SSLSupport ssls = factory.getSSLSupport(s);
         return ssls;
index f588525..adb8286 100644 (file)
@@ -115,6 +115,7 @@ public class JSSESocketFactory
     public JSSESocketFactory () {
     }
 
+    @Override
     public ServerSocket createSocket (int port)
         throws IOException
     {
@@ -124,6 +125,7 @@ public class JSSESocketFactory
         return socket;
     }
     
+    @Override
     public ServerSocket createSocket (int port, int backlog)
         throws IOException
     {
@@ -133,6 +135,7 @@ public class JSSESocketFactory
         return socket;
     }
     
+    @Override
     public ServerSocket createSocket (int port, int backlog,
                                       InetAddress ifAddress)
         throws IOException
@@ -144,6 +147,7 @@ public class JSSESocketFactory
         return socket;
     }
     
+    @Override
     public Socket acceptSocket(ServerSocket socket)
         throws IOException
     {
@@ -157,6 +161,7 @@ public class JSSESocketFactory
         return asock;
     }
 
+    @Override
     public void handshake(Socket sock) throws IOException {
         //we do getSession instead of startHandshake() so we can call this multiple times
        SSLSession session = ((SSLSocket)sock).getSession();
index 707776c..757acc0 100644 (file)
@@ -58,6 +58,7 @@ public class TaskQueue extends LinkedBlockingQueue<Runnable> {
         return super.offer(o,timeout,unit); //forces the item onto the queue, to be used if the task is rejected
     }
 
+    @Override
     public boolean offer(Runnable o) {
       //we can't do any checks
         if (parent==null) return super.offer(o);