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:28:00 GMT
Repository: cxf
Updated Branches:
  refs/heads/master 0f07a454b -> a7350a2da


[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/a7350a2d
Tree: http://git-wip-us.apache.org/repos/asf/cxf/tree/a7350a2d
Diff: http://git-wip-us.apache.org/repos/asf/cxf/diff/a7350a2d

Branch: refs/heads/master
Commit: a7350a2da50d0c09bced21e989776babc3ef2289
Parents: 0f07a45
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:27:42 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/a7350a2d/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