You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cxf.apache.org by am...@apache.org on 2020/01/08 17:08:31 UTC
[cxf] branch master updated: subclasses of declared exception
should be thrown
This is an automated email from the ASF dual-hosted git repository.
amccright pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/cxf.git
The following commit(s) were added to refs/heads/master by this push:
new dd468e3 subclasses of declared exception should be thrown
new 32e264f Merge pull request #622 from flaviodonze/fix-exceptionmapper-result
dd468e3 is described below
commit dd468e356917576147de4a35f47a3577d742a727
Author: Flavio Donzé <fl...@scodi.ch>
AuthorDate: Wed Jan 8 09:55:48 2020 +0100
subclasses of declared exception should be thrown
if a service throws "ServerExecption" but ends up throwing a sub-class
of ServerException e.g. ValidationException, the ResponseExceptionMapper
resulting Exception is lost.
---
.../cxf/microprofile/client/proxy/MicroProfileClientProxyImpl.java | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/rt/rs/microprofile-client/src/main/java/org/apache/cxf/microprofile/client/proxy/MicroProfileClientProxyImpl.java b/rt/rs/microprofile-client/src/main/java/org/apache/cxf/microprofile/client/proxy/MicroProfileClientProxyImpl.java
index e27e1ef..0fa5145 100644
--- a/rt/rs/microprofile-client/src/main/java/org/apache/cxf/microprofile/client/proxy/MicroProfileClientProxyImpl.java
+++ b/rt/rs/microprofile-client/src/main/java/org/apache/cxf/microprofile/client/proxy/MicroProfileClientProxyImpl.java
@@ -186,7 +186,7 @@ public class MicroProfileClientProxyImpl extends ClientProxyImpl {
} else if (t != null && m.getExceptionTypes() != null) {
// its a checked exception, make sure its declared
for (Class<?> c : m.getExceptionTypes()) {
- if (t.getClass().isAssignableFrom(c)) {
+ if (c.isAssignableFrom(t.getClass())) {
throw t;
}
}