cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dk...@apache.org
Subject [1/3] cxf git commit: [CXF-6590] Fix memory leak with fault responses that don't have a relatesTo header
Date Wed, 16 Sep 2015 17:55:00 GMT
Repository: cxf
Updated Branches:
  refs/heads/master a73effb59 -> 131c1febf


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

Branch: refs/heads/master
Commit: 9ac1b2a19e4a0d020f58351b006a834847eb92f7
Parents: a73effb
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 12:58:14 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/9ac1b2a1/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