cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From serg...@apache.org
Subject cxf git commit: [CXF-6309] Unwrapping Fault if possible
Date Fri, 20 Mar 2015 22:29:34 GMT
Repository: cxf
Updated Branches:
  refs/heads/3.0.x-fixes 01bc265f8 -> e94da32fb


[CXF-6309] Unwrapping Fault if possible


Project: http://git-wip-us.apache.org/repos/asf/cxf/repo
Commit: http://git-wip-us.apache.org/repos/asf/cxf/commit/e94da32f
Tree: http://git-wip-us.apache.org/repos/asf/cxf/tree/e94da32f
Diff: http://git-wip-us.apache.org/repos/asf/cxf/diff/e94da32f

Branch: refs/heads/3.0.x-fixes
Commit: e94da32fbc616757db16d59e848c7574cbf72a87
Parents: 01bc265
Author: Sergey Beryozkin <sberyozkin@talend.com>
Authored: Fri Mar 20 22:27:42 2015 +0000
Committer: Sergey Beryozkin <sberyozkin@talend.com>
Committed: Fri Mar 20 22:29:09 2015 +0000

----------------------------------------------------------------------
 .../main/java/org/apache/cxf/jaxrs/client/AbstractClient.java   | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cxf/blob/e94da32f/rt/rs/client/src/main/java/org/apache/cxf/jaxrs/client/AbstractClient.java
----------------------------------------------------------------------
diff --git a/rt/rs/client/src/main/java/org/apache/cxf/jaxrs/client/AbstractClient.java b/rt/rs/client/src/main/java/org/apache/cxf/jaxrs/client/AbstractClient.java
index 56f6318..9df7940 100644
--- a/rt/rs/client/src/main/java/org/apache/cxf/jaxrs/client/AbstractClient.java
+++ b/rt/rs/client/src/main/java/org/apache/cxf/jaxrs/client/AbstractClient.java
@@ -736,9 +736,10 @@ public abstract class AbstractClient implements Client {
         return pValue.toString();
     }
     
-    protected static void reportMessageHandlerProblem(String name, Class<?> cls, MediaType
ct, Throwable cause) {
+    protected static void reportMessageHandlerProblem(String name, Class<?> cls, MediaType
ct, Throwable ex) {
         String errorMessage = JAXRSUtils.logMessageHandlerProblem("NO_MSG_WRITER", cls, ct);
-        throw new ProcessingException(errorMessage, cause);
+        Throwable actualEx = ex instanceof Fault ? ((Fault)ex).getCause() : ex;
+        throw new ProcessingException(errorMessage, actualEx);
     }
     
     protected static void setAllHeaders(MultivaluedMap<String, String> headers, HttpURLConnection
conn) {


Mime
View raw message