summaryrefslogtreecommitdiffstats
path: root/sandbox/scottkurz/core-databinding
diff options
context:
space:
mode:
authorscottkurz <scottkurz@13f79535-47bb-0310-9956-ffa450edef68>2008-07-25 02:03:21 +0000
committerscottkurz <scottkurz@13f79535-47bb-0310-9956-ffa450edef68>2008-07-25 02:03:21 +0000
commit56ecac6977e8df33ae467d36e2d1a87b693b2b87 (patch)
tree51de3bcc351469b2725faa539c2db49dc67e45a0 /sandbox/scottkurz/core-databinding
parenta68dee0727f5e930738d385b6bfd6243b77fd2cf (diff)
Fix clobbering of RuntimeExc with null causing later NPE
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@679644 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'sandbox/scottkurz/core-databinding')
-rw-r--r--sandbox/scottkurz/core-databinding/src/main/java/org/apache/tuscany/sca/core/databinding/wire/DataTransformationInterceptor.java10
1 files changed, 6 insertions, 4 deletions
diff --git a/sandbox/scottkurz/core-databinding/src/main/java/org/apache/tuscany/sca/core/databinding/wire/DataTransformationInterceptor.java b/sandbox/scottkurz/core-databinding/src/main/java/org/apache/tuscany/sca/core/databinding/wire/DataTransformationInterceptor.java
index 89ce15e796..83ee0a12f3 100644
--- a/sandbox/scottkurz/core-databinding/src/main/java/org/apache/tuscany/sca/core/databinding/wire/DataTransformationInterceptor.java
+++ b/sandbox/scottkurz/core-databinding/src/main/java/org/apache/tuscany/sca/core/databinding/wire/DataTransformationInterceptor.java
@@ -96,12 +96,14 @@ public class DataTransformationInterceptor implements Interceptor, DataExchangeS
Object transformedFault = null;
if ((result instanceof Exception) && !(result instanceof RuntimeException)) {
transformedFault = faultTransformHelper.transformFault(result, sourceOperation, targetOperation, wire);
+ if (transformedFault != result) {
+ resultMsg.setFaultBody(transformedFault);
+ }
}
- // Otherwise, we leave it to another layer to actually throw the RuntimeException which constitutes
+ //
+ // Leave it to another layer to actually throw the Exception which constitutes
// the message body. We don't throw it here.
- if (transformedFault != result) {
- resultMsg.setFaultBody(transformedFault);
- }
+ //
} else {
assert !(result instanceof Throwable) : "Expected messages that are not throwable " + result;
Object newResult = transform(result, targetType, sourceType, true);