abdera-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From roo...@apache.org
Subject svn commit: r433439 - /incubator/abdera/java/trunk/client/src/main/java/org/apache/abdera/protocol/client/RequestOptions.java
Date Tue, 22 Aug 2006 00:17:44 GMT
Author: rooneg
Date: Mon Aug 21 17:17:44 2006
New Revision: 433439

URL: http://svn.apache.org/viewvc?rev=433439&view=rev
Log:
Another nit found by FindBugs.

* client/src/main/java/org/apache/abdera/protocol/client/RequestOptions.java
  (combine): Use a StringBuffer instead of appending to a string in a loop.

Modified:
    incubator/abdera/java/trunk/client/src/main/java/org/apache/abdera/protocol/client/RequestOptions.java

Modified: incubator/abdera/java/trunk/client/src/main/java/org/apache/abdera/protocol/client/RequestOptions.java
URL: http://svn.apache.org/viewvc/incubator/abdera/java/trunk/client/src/main/java/org/apache/abdera/protocol/client/RequestOptions.java?rev=433439&r1=433438&r2=433439&view=diff
==============================================================================
--- incubator/abdera/java/trunk/client/src/main/java/org/apache/abdera/protocol/client/RequestOptions.java
(original)
+++ incubator/abdera/java/trunk/client/src/main/java/org/apache/abdera/protocol/client/RequestOptions.java
Mon Aug 21 17:17:44 2006
@@ -80,12 +80,13 @@
   }
 
   private String combine(String ... values) {
-    String v = "";
+    StringBuffer v = new StringBuffer();
     for (String val : values) {
-      if (v.length() > 0) v += ", ";
-      v += val;
+      if (v.length() > 0)
+        v.append(", ");
+      v.append(val);
     }
-    return v;
+    return v.toString();
   }
     
   /**



Mime
View raw message