Author: sichen
Date: Thu Jan 25 13:41:26 2007
New Revision: 500005
URL:
http://svn.apache.org/viewvc?view=rev&rev=500005Log:
Fix issue with service error generation code. It doesn't do any validation of input, so it will crash if it gets fed an error list with null messages.
Modified:
ofbiz/trunk/framework/service/src/org/ofbiz/service/ServiceUtil.java
Modified: ofbiz/trunk/framework/service/src/org/ofbiz/service/ServiceUtil.java
URL:
http://svn.apache.org/viewvc/ofbiz/trunk/framework/service/src/org/ofbiz/service/ServiceUtil.java?view=diff&rev=500005&r1=500004&r2=500005==============================================================================
--- ofbiz/trunk/framework/service/src/org/ofbiz/service/ServiceUtil.java (original)
+++ ofbiz/trunk/framework/service/src/org/ofbiz/service/ServiceUtil.java Thu Jan 25 13:41:26 2007
@@ -314,7 +314,9 @@
if (msgList != null && msgList.size() > 0) {
Iterator iter = msgList.iterator();
while (iter.hasNext()) {
- String curMsg = iter.next().toString();
+ Object msg = iter.next();
+ if (msg == null) continue;
+ String curMsg = msg.toString();
if (msgPrefix != null) outMsg.append(msgPrefix);
outMsg.append(curMsg);
if (msgSuffix != null) outMsg.append(msgSuffix);