Author: doogie
Date: Wed Oct 17 09:41:32 2007
New Revision: 585567
URL:
http://svn.apache.org/viewvc?rev=585567&view=revLog:
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;
}