Author: jleroux
Date: Wed Sep 1 09:15:14 2010
New Revision: 991485
URL:
http://svn.apache.org/viewvc?rev=991485&view=revLog:
A patch from Liu Xiangqian "method writeObject(StringBuilder sb, Object value, boolean allowJsonResolve) in UtilIO always throw an IOException" (
https://issues.apache.org/jira/browse/OFBIZ-3916) - OFBIZ-3916
Tried to invoke method UtilIO.writeObject() but found the following code
try {
StringWriter writer = new StringWriter();
if (encodeObject(writer, value, allowJsonResolve)) { sb.append(writer.toString()); return; }
} catch (Exception e) {
}
throw new IOException("Can't write (" + value + ")");
It caused the method to always throw an IOException.
Modified:
ofbiz/trunk/framework/base/src/org/ofbiz/base/util/UtilIO.java
Modified: ofbiz/trunk/framework/base/src/org/ofbiz/base/util/UtilIO.java
URL:
http://svn.apache.org/viewvc/ofbiz/trunk/framework/base/src/org/ofbiz/base/util/UtilIO.java?rev=991485&r1=991484&r2=991485&view=diff==============================================================================
--- ofbiz/trunk/framework/base/src/org/ofbiz/base/util/UtilIO.java (original)
+++ ofbiz/trunk/framework/base/src/org/ofbiz/base/util/UtilIO.java Wed Sep 1 09:15:14 2010
@@ -399,7 +399,7 @@ public final class UtilIO {
return;
}
} catch (Exception e) {
+ throw new IOException("Can't write (" + value + ")");
}
- throw new IOException("Can't write (" + value + ")");
}
}