svn commit: r585567 - /ofbiz/trunk/framework/service/src/org/ofbiz/service/ServiceValidationException.java

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

svn commit: r585567 - /ofbiz/trunk/framework/service/src/org/ofbiz/service/ServiceValidationException.java

doogie-3
Author: doogie
Date: Wed Oct 17 09:41:32 2007
New Revision: 585567

URL: http://svn.apache.org/viewvc?rev=585567&view=rev
Log:
Don't use string addition in getMessage(), use a StringBuilder
instead.

Modified:
    ofbiz/trunk/framework/service/src/org/ofbiz/service/ServiceValidationException.java

Modified: ofbiz/trunk/framework/service/src/org/ofbiz/service/ServiceValidationException.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/service/src/org/ofbiz/service/ServiceValidationException.java?rev=585567&r1=585566&r2=585567&view=diff
==============================================================================
--- ofbiz/trunk/framework/service/src/org/ofbiz/service/ServiceValidationException.java (original)
+++ ofbiz/trunk/framework/service/src/org/ofbiz/service/ServiceValidationException.java Wed Oct 17 09:41:32 2007
@@ -130,15 +130,15 @@
     public String getMessage() {
         String msg = super.getMessage();
         if (this.messages != null && this.messages.size() > 0) {
+            StringBuilder sb = new StringBuilder();
             if (msg != null) {
-                msg += "\n";
-            } else {
-                msg = "";
+                sb.append('\n');
             }
             Iterator i = this.messages.iterator();
             while (i.hasNext()) {
-                msg += i.next();
+                sb.append(i.next());
             }
+            msg = sb.toString();
         }
         return msg;
     }