]> source.dussan.org Git - archiva.git/commitdiff
use StringBuilder rather than + in a loop
authorOlivier Lamy <olamy@apache.org>
Tue, 14 Jun 2011 08:49:51 +0000 (08:49 +0000)
committerOlivier Lamy <olamy@apache.org>
Tue, 14 Jun 2011 08:49:51 +0000 (08:49 +0000)
git-svn-id: https://svn.apache.org/repos/asf/archiva/trunk@1135411 13f79535-47bb-0310-9956-ffa450edef68

archiva-modules/archiva-base/archiva-policies/src/main/java/org/apache/maven/archiva/policies/ProxyDownloadException.java

index 9d328c6b7928a7bc4bb250712b929a6a47efdac0..845df4ecb81ffad626079c52af448d78272dac2b 100644 (file)
@@ -51,15 +51,15 @@ public class ProxyDownloadException
 
     private static String constructMessage( String message, Map<String, Exception> failures )
     {
-        String msg = message + ":";
+        StringBuilder msg = new StringBuilder( message + ":" );
         for ( Map.Entry<String, Exception> entry : failures.entrySet() )
         {
-            msg += "\n\t" + entry.getKey() + ": " + entry.getValue().getMessage();
+            msg.append( "\n\t" ).append( entry.getKey() ).append( ": " ).append( entry.getValue().getMessage() );
         }
-        return msg;
+        return msg.toString();
     }
 
-    public Map<String,Exception> getFailures()
+    public Map<String, Exception> getFailures()
     {
         return failures;
     }