cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dk...@apache.org
Subject [1/2] cxf git commit: [CXF-6590] Fix memory leak with fault responses that don't have a relatesTo header
Date Wed, 16 Sep 2015 18:16:43 GMT
Repository: cxf
Updated Branches:
  refs/heads/3.0.x-fixes 164762235 -> 67f8c947e


[CXF-6590] Fix memory leak with fault responses that don't have a relatesTo header


Project: http://git-wip-us.apache.org/repos/asf/cxf/repo
Commit: http://git-wip-us.apache.org/repos/asf/cxf/commit/80c3ac62
Tree: http://git-wip-us.apache.org/repos/asf/cxf/tree/80c3ac62
Diff: http://git-wip-us.apache.org/repos/asf/cxf/diff/80c3ac62

Branch: refs/heads/3.0.x-fixes
Commit: 80c3ac62fd401aa293a839a4725f017bfb78325f
Parents: 1647622
Author: Daniel Kulp <dkulp@apache.org>
Authored: Wed Sep 16 12:58:14 2015 -0400
Committer: Daniel Kulp <dkulp@apache.org>
Committed: Wed Sep 16 14:14:56 2015 -0400

----------------------------------------------------------------------
 .../apache/cxf/ws/addressing/soap/MAPCodec.java | 25 ++++++++++++++------
 1 file changed, 18 insertions(+), 7 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cxf/blob/80c3ac62/rt/ws/addr/src/main/java/org/apache/cxf/ws/addressing/soap/MAPCodec.java
----------------------------------------------------------------------
diff --git a/rt/ws/addr/src/main/java/org/apache/cxf/ws/addressing/soap/MAPCodec.java b/rt/ws/addr/src/main/java/org/apache/cxf/ws/addressing/soap/MAPCodec.java
index a324593..c546edf 100644
--- a/rt/ws/addr/src/main/java/org/apache/cxf/ws/addressing/soap/MAPCodec.java
+++ b/rt/ws/addr/src/main/java/org/apache/cxf/ws/addressing/soap/MAPCodec.java
@@ -842,14 +842,25 @@ public class MAPCodec extends AbstractSoapInterceptor {
                     }
                 }
             }
-        } else if (maps == null && isRequestor(message)) {
-            Message m = message.getExchange().getOutMessage();
-            maps = ContextUtils.retrieveMAPs(m, false, true, false);
-            if (maps != null) {
-                Exchange ex = uncorrelatedExchanges.get(maps.getMessageID().getValue());
-                if (ex == message.getExchange()) {
+        } else if (isRequestor(message)) {
+            if (maps == null) {
+                Message m = message.getExchange().getOutMessage();
+                maps = ContextUtils.retrieveMAPs(m, false, true, false);
+                if (maps != null) {
+                    Exchange ex = uncorrelatedExchanges.get(maps.getMessageID().getValue());
+                    if (ex == message.getExchange()) {
+                        uncorrelatedExchanges.remove(maps.getMessageID().getValue());
+                        LOG.log(Level.WARNING, "RESPONSE_NOT_USING_WSADDRESSING");
+                    }
+                }
+            } else if (maps.getRelatesTo() == null
+                && maps.getAction() != null
+                && Names.WSA_DEFAULT_FAULT_ACTION.equals(maps.getAction().getValue()))
{
+                //there is an Action header that points to a fault and no relatesTo.  Use
the out map for the ID
+                Message m = message.getExchange().getOutMessage();
+                maps = ContextUtils.retrieveMAPs(m, false, true, false);
+                if (maps != null) {
                     uncorrelatedExchanges.remove(maps.getMessageID().getValue());
-                    LOG.log(Level.WARNING, "RESPONSE_NOT_USING_WSADDRESSING");
                 }
             }
         }


Mime
View raw message