Repository: cxf Updated Branches: refs/heads/master 676421233 -> 5ec1ddb10
[CXF-6575] avoid calling a non-trivial method twice Project: http://git-wip-us.apache.org/repos/asf/cxf/repo Commit: http://git-wip-us.apache.org/repos/asf/cxf/commit/5ec1ddb1 Tree: http://git-wip-us.apache.org/repos/asf/cxf/tree/5ec1ddb1 Diff: http://git-wip-us.apache.org/repos/asf/cxf/diff/5ec1ddb1 Branch: refs/heads/master Commit: 5ec1ddb104c7515e618552580ccb30b096dd385d Parents: 6764212 Author: Akitoshi Yoshida <[email protected]> Authored: Wed Sep 2 18:09:13 2015 +0200 Committer: Akitoshi Yoshida <[email protected]> Committed: Wed Sep 2 18:09:13 2015 +0200 ---------------------------------------------------------------------- .../apache/cxf/ws/addressing/impl/InternalContextUtils.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/cxf/blob/5ec1ddb1/rt/ws/addr/src/main/java/org/apache/cxf/ws/addressing/impl/InternalContextUtils.java ---------------------------------------------------------------------- diff --git a/rt/ws/addr/src/main/java/org/apache/cxf/ws/addressing/impl/InternalContextUtils.java b/rt/ws/addr/src/main/java/org/apache/cxf/ws/addressing/impl/InternalContextUtils.java index 72162ab..2c41925 100644 --- a/rt/ws/addr/src/main/java/org/apache/cxf/ws/addressing/impl/InternalContextUtils.java +++ b/rt/ws/addr/src/main/java/org/apache/cxf/ws/addressing/impl/InternalContextUtils.java @@ -53,6 +53,7 @@ import org.apache.cxf.service.model.EndpointInfo; import org.apache.cxf.service.model.Extensible; import org.apache.cxf.service.model.FaultInfo; import org.apache.cxf.service.model.MessageInfo; +import org.apache.cxf.service.model.MessagePartInfo; import org.apache.cxf.transport.Conduit; import org.apache.cxf.transport.ConduitInitiator; import org.apache.cxf.transport.ConduitInitiatorManager; @@ -477,12 +478,13 @@ final class InternalContextUtils { private static boolean matchFault(Throwable t, FaultInfo fi) { //REVISIT not sure if this class-based comparison works in general as the fault class defined // in the service interface has no direct relationship to the message body's type. - Class<?> fiTypeClass = fi.getFirstMessagePart().getTypeClass(); + MessagePartInfo fmpi = fi.getFirstMessagePart(); + Class<?> fiTypeClass = fmpi.getTypeClass(); if (fiTypeClass != null && t.getClass().isAssignableFrom(fiTypeClass)) { return true; } // CXF-6575 - QName fiName = fi.getFirstMessagePart().getConcreteName(); + QName fiName = fmpi.getConcreteName(); WebFault wf = t.getClass().getAnnotation(WebFault.class); return wf != null && fiName != null && wf.targetNamespace() != null && wf.targetNamespace().equals(fiName.getNamespaceURI())
