Btw, thanks for going through these. Little stuff like this has been on my todo list for a while but I never managed to get to it.
- James [EMAIL PROTECTED] wrote: > 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(); > } > > /** > > >
