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:11:06 GMT
Repository: cxf
Updated Branches:
  refs/heads/3.0.x-fixes 4c8580299 -> 756a95b93


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

Branch: refs/heads/3.0.x-fixes
Commit: 756a95b937b7a3c23f8d8a7e7da78e982429aa75
Parents: 4c85802
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:10:22 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/756a95b9/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 fd765a1..421958e 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())


Mime
View raw message