From: markt Date: Sat, 15 Jan 2011 13:42:01 +0000 (+0000) Subject: Remove unused code X-Git-Url: https://git.internetallee.de/?a=commitdiff_plain;h=a034f1a2ea7bae968915b12e4ead89058ba5207c;p=tomcat7.0 Remove unused code Fix FindBugs and Eclipse warnings Correct typos git-svn-id: https://svn.apache.org/repos/asf/tomcat/trunk@1059322 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/java/org/apache/tomcat/util/buf/MessageBytes.java b/java/org/apache/tomcat/util/buf/MessageBytes.java index e8cd3b367..9d8109488 100644 --- a/java/org/apache/tomcat/util/buf/MessageBytes.java +++ b/java/org/apache/tomcat/util/buf/MessageBytes.java @@ -154,19 +154,6 @@ public final class MessageBytes implements Cloneable, Serializable { hasLongValue=false; } - /** Remove the cached string value. Use it after a conversion on the - * byte[] or after the encoding is changed - * XXX Is this needed ? - */ - public void resetStringValue() { - if( type != T_STR ) { - // If this was created as a byte[] or char[], we remove - // the old string value - hasStrValue=false; - strValue=null; - } - } - /** * Set the content to be a string */ @@ -294,7 +281,7 @@ public final class MessageBytes implements Cloneable, Serializable { public boolean equals(String s) { switch (type) { case T_STR: - if( strValue==null && s!=null) return false; + if (strValue == null) return s == null; return strValue.equals( s ); case T_CHARS: return charC.equals( s ); @@ -313,7 +300,7 @@ public final class MessageBytes implements Cloneable, Serializable { public boolean equalsIgnoreCase(String s) { switch (type) { case T_STR: - if( strValue==null && s!=null) return false; + if (strValue == null) return s == null; return strValue.equalsIgnoreCase( s ); case T_CHARS: return charC.equalsIgnoreCase( s ); @@ -324,6 +311,14 @@ public final class MessageBytes implements Cloneable, Serializable { } } + @Override + public boolean equals(Object obj) { + if (obj instanceof MessageBytes) { + return equals((MessageBytes) obj); + } + return false; + } + public boolean equals(MessageBytes mb) { switch (type) { case T_STR: diff --git a/java/org/apache/tomcat/util/digester/Digester.java b/java/org/apache/tomcat/util/digester/Digester.java index e21f0c3aa..46f870c49 100644 --- a/java/org/apache/tomcat/util/digester/Digester.java +++ b/java/org/apache/tomcat/util/digester/Digester.java @@ -78,6 +78,7 @@ public class Digester extends DefaultHandler { // ---------------------------------------------------------- Static Fields private static class SystemPropertySource implements IntrospectionUtils.PropertySource { + @Override public String getProperty( String key ) { return System.getProperty(key); } diff --git a/res/findbugs/filter-false-positives.xml b/res/findbugs/filter-false-positives.xml index 27dd7c986..3e5800146 100644 --- a/res/findbugs/filter-false-positives.xml +++ b/res/findbugs/filter-false-positives.xml @@ -39,6 +39,18 @@ + + + + + + + + + + + + diff --git a/webapps/docs/changelog.xml b/webapps/docs/changelog.xml index fa92fc9c9..73835bfb0 100644 --- a/webapps/docs/changelog.xml +++ b/webapps/docs/changelog.xml @@ -91,7 +91,7 @@ Correct a handful of Javadoc warnings. (markt) - Provide additional detail about how web application version order it + Provide additional detail about how web application version order is determined when using parallel deployment. (markt) @@ -106,6 +106,9 @@ dependencies to ensure that the correct Tomcat version appears in the manifest. (markt) + + Code clean-up to remove unused code and reduce IDE warnings. (markt) + diff --git a/webapps/docs/config/context.xml b/webapps/docs/config/context.xml index 5b34748db..ab3bf1705 100644 --- a/webapps/docs/config/context.xml +++ b/webapps/docs/config/context.xml @@ -108,7 +108,7 @@

The version component is treated as a String both for - performance reasons and to allow flexability in versioning schemes. String + performance reasons and to allow flexibility in versioning schemes. String comparissions are used to determine version order. Therefore foo##11.war will be treated as an earlier version than foo##2.war. If using a purely numerical versioning scheme it is