You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ofbiz.apache.org by do...@apache.org on 2007/10/17 18:41:33 UTC

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

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;
     }