You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@abdera.apache.org by ro...@apache.org on 2006/08/19 20:23:13 UTC

svn commit: r432854 - /incubator/abdera/java/trunk/server/src/main/java/org/apache/abdera/server/exceptions/MethodNotAllowedException.java

Author: rooneg
Date: Sat Aug 19 11:23:12 2006
New Revision: 432854

URL: http://svn.apache.org/viewvc?rev=432854&view=rev
Log:
Silence some warnings from FindBugs and IDEA.

[ in server/src/main/java/org/apache/abdera/server/exceptions ]

* MethodNotAllowedException.java
  (setAllow): Remove spurious .toString() calls on items that are already
   Strings, and don't use + to concatenate two strings inside a call to
   StringBuffer.append().

Modified:
    incubator/abdera/java/trunk/server/src/main/java/org/apache/abdera/server/exceptions/MethodNotAllowedException.java

Modified: incubator/abdera/java/trunk/server/src/main/java/org/apache/abdera/server/exceptions/MethodNotAllowedException.java
URL: http://svn.apache.org/viewvc/incubator/abdera/java/trunk/server/src/main/java/org/apache/abdera/server/exceptions/MethodNotAllowedException.java?rev=432854&r1=432853&r2=432854&view=diff
==============================================================================
--- incubator/abdera/java/trunk/server/src/main/java/org/apache/abdera/server/exceptions/MethodNotAllowedException.java (original)
+++ incubator/abdera/java/trunk/server/src/main/java/org/apache/abdera/server/exceptions/MethodNotAllowedException.java Sat Aug 19 11:23:12 2006
@@ -38,11 +38,11 @@
     StringBuffer value = new StringBuffer();
     for(String method : methods) {
       if(first) {
-        value.append(method.toString().toUpperCase());
+        value.append(method.toUpperCase());
         first = false;
         continue;
       }
-      value.append(", " + method.toString());
+        value.append(", ").append(method);
     }
     setHeader("Allow", value.toString());
   }