cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From a.@apache.org
Subject cxf git commit: [CXF-6575] avoid calling a non-trivial method twice
Date Wed, 02 Sep 2015 16:13:50 GMT
Repository: cxf
Updated Branches:
  refs/heads/2.7.x-fixes d66aec3ad -> b7bb53b37


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

Branch: refs/heads/2.7.x-fixes
Commit: b7bb53b371f995972730537e96224aa739fe1e19
Parents: d66aec3
Author: Akitoshi Yoshida <ay@apache.org>
Authored: Wed Sep 2 18:09:13 2015 +0200
Committer: Akitoshi Yoshida <ay@apache.org>
Committed: Wed Sep 2 18:13:31 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/b7bb53b3/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 8e699b1..f66098b 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;
@@ -478,12 +479,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.getMessagePart(0).getTypeClass();
+        MessagePartInfo fmpi = fi.getMessagePart(0);
+        Class<?> fiTypeClass = fmpi.getTypeClass();
         if (fiTypeClass != null && t.getClass().isAssignableFrom(fiTypeClass)) {
             return true;
         }
         // CXF-6575
-        QName fiName = fi.getMessagePart(0).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())


Mime
View raw message