--- apache-xmlrpc-3.1.3-src.orig/common/src/main/java/org/apache/xmlrpc/parser/XmlRpcResponseParser.java 2010-02-06 16:44:49.000000000 +0100
+++ apache-xmlrpc-3.1.3-src/common/src/main/java/org/apache/xmlrpc/parser/XmlRpcResponseParser.java 2019-12-12 23:41:03.935572209 +0100
@@ -69,19 +69,21 @@ public class XmlRpcResponseParser extend
getDocumentLocator());
}
errorMessage = (String) map.get("faultString");
- Object exception = map.get("faultCause");
- if (exception != null) {
- try {
- byte[] bytes = (byte[]) exception;
- ByteArrayInputStream bais = new ByteArrayInputStream(bytes);
- ObjectInputStream ois = new ObjectInputStream(bais);
- errorCause = (Throwable) ois.readObject();
- ois.close();
- bais.close();
- } catch (Throwable t) {
- // Ignore me
- }
- }
+ if (((XmlRpcStreamRequestConfig)cfg).isEnabledForExceptions()) {
+ Object exception = map.get("faultCause");
+ if (exception != null) {
+ try {
+ byte[] bytes = (byte[]) exception;
+ ByteArrayInputStream bais = new ByteArrayInputStream(bytes);
+ ObjectInputStream ois = new ObjectInputStream(bais);
+ errorCause = (Throwable) ois.readObject();
+ ois.close();
+ bais.close();
+ } catch (Throwable t) {
+ // Ignore me
+ }
+ }
+ }
}
}