You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cxf.apache.org by co...@apache.org on 2017/04/20 09:27:27 UTC

[1/3] cxf git commit: NPE fix

Repository: cxf
Updated Branches:
  refs/heads/3.1.x-fixes c5c8f2d97 -> b9b356546


NPE fix

# Conflicts:
#	rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/WSS4JInInterceptor.java


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

Branch: refs/heads/3.1.x-fixes
Commit: 7084c99ad84fd95f46140162e58421c8c347d751
Parents: c5c8f2d
Author: Colm O hEigeartaigh <co...@apache.org>
Authored: Thu Apr 20 10:26:02 2017 +0100
Committer: Colm O hEigeartaigh <co...@apache.org>
Committed: Thu Apr 20 10:26:44 2017 +0100

----------------------------------------------------------------------
 .../ws/security/wss4j/WSS4JInInterceptor.java   | 47 +++++++++++++++++++-
 1 file changed, 46 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cxf/blob/7084c99a/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/WSS4JInInterceptor.java
----------------------------------------------------------------------
diff --git a/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/WSS4JInInterceptor.java b/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/WSS4JInInterceptor.java
index 967917f..56ccf12 100644
--- a/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/WSS4JInInterceptor.java
+++ b/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/WSS4JInInterceptor.java
@@ -158,7 +158,7 @@ public class WSS4JInInterceptor extends AbstractWSS4JInterceptor {
     }
     
     public void handleMessage(SoapMessage msg) throws Fault {
-        if (msg.containsKey(SECURITY_PROCESSED) || isGET(msg)) {
+        if (msg.containsKey(SECURITY_PROCESSED) || isGET(msg) || msg.getExchange() == null) {
             return;
         }
         
@@ -281,6 +281,10 @@ public class WSS4JInInterceptor extends AbstractWSS4JInterceptor {
                 }
 
                 checkActions(msg, reqData, wsResult.getResults(), actions, SAAJUtils.getBody(doc));
+<<<<<<< HEAD
+=======
+
+>>>>>>> 0b7b183... NPE fix
                 doResults(
                     msg, actor, 
                     SAAJUtils.getHeader(doc),
@@ -330,7 +334,48 @@ public class WSS4JInInterceptor extends AbstractWSS4JInterceptor {
             reqData = null;
         }
     }
+<<<<<<< HEAD
     
+=======
+    private void importNewDomToSAAJ(SOAPMessage doc, Element elem, Node originalNode) throws SOAPException {
+        if (DOMUtils.isJava9SAAJ()
+            && originalNode != null && !originalNode.isEqualNode(elem)) {
+            //ensure the new decrypted dom element could be imported into the SAAJ
+            Node node = null;
+            Document document = null;
+            Element body = SAAJUtils.getBody(doc);
+            if (body != null) {
+                document = body.getOwnerDocument();
+            }
+            if (elem != null && elem.getOwnerDocument() != null
+                && elem.getOwnerDocument().getDocumentElement() != null) {
+                node = elem.getOwnerDocument().
+                    getDocumentElement().getFirstChild().getNextSibling().getFirstChild();
+            }
+            if (document != null && node != null) {
+                Node newNode = null;
+                try {
+                    newNode = document.importNode(node, true);
+                    if (newNode != null) {
+                        try {
+                            Method method = newNode.getClass().getMethod("getDomElement");
+                            newNode = (Element)method.invoke(newNode);
+                        } catch (java.lang.NoSuchMethodException ex) {
+                            // do nothing;
+                        }
+                    }
+                    elem.getOwnerDocument().getDocumentElement().getFirstChild().
+                        getNextSibling().replaceChild(newNode, node);
+                } catch (Exception ex) {
+                    //just to the best try
+                }
+
+            }
+
+        }
+    }
+
+>>>>>>> 0b7b183... NPE fix
     private void configureAudienceRestriction(SoapMessage msg, RequestData reqData) {
         // Add Audience Restrictions for SAML
         boolean enableAudienceRestriction = 


[2/3] cxf git commit: Recording .gitmergeinfo Changes

Posted by co...@apache.org.
Recording .gitmergeinfo Changes


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

Branch: refs/heads/3.1.x-fixes
Commit: 6ccde34c085d9e443520fb86b11cb5d4608e1f02
Parents: 7084c99
Author: Colm O hEigeartaigh <co...@apache.org>
Authored: Thu Apr 20 10:26:45 2017 +0100
Committer: Colm O hEigeartaigh <co...@apache.org>
Committed: Thu Apr 20 10:26:45 2017 +0100

----------------------------------------------------------------------
 .gitmergeinfo | 1 +
 1 file changed, 1 insertion(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cxf/blob/6ccde34c/.gitmergeinfo
----------------------------------------------------------------------
diff --git a/.gitmergeinfo b/.gitmergeinfo
index 0dbf0f3..7e60a22 100644
--- a/.gitmergeinfo
+++ b/.gitmergeinfo
@@ -352,6 +352,7 @@ M 0865c3a85b9687f857b51d1ae56c8f8e97bdbf5b
 M 08c9194ce2c567ebfe59f59ee628b1197d90fd43
 M 090fa6100ae3a5aa8ae894b0e238acb793f705ec
 M 09fb22b25333c66514f06652ceaf7fc11bde51cc
+M 0b7b18333591d6bb8e0bfcf324bbdefaa8cce21d
 M 0e5fd5a54cb271ba494e7e30b45d4228b33364a9
 M 0eef86f37288f71fd96506fb2ac7fa27169d1e43
 M 10d34e1a812ab2a709376f008c738de68c8720cf


[3/3] cxf git commit: Fixing merge

Posted by co...@apache.org.
Fixing merge


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

Branch: refs/heads/3.1.x-fixes
Commit: b9b356546069166f26ee9f61da85f67639874273
Parents: 6ccde34
Author: Colm O hEigeartaigh <co...@apache.org>
Authored: Thu Apr 20 10:27:19 2017 +0100
Committer: Colm O hEigeartaigh <co...@apache.org>
Committed: Thu Apr 20 10:27:19 2017 +0100

----------------------------------------------------------------------
 .../ws/security/wss4j/WSS4JInInterceptor.java   | 45 --------------------
 1 file changed, 45 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cxf/blob/b9b35654/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/WSS4JInInterceptor.java
----------------------------------------------------------------------
diff --git a/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/WSS4JInInterceptor.java b/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/WSS4JInInterceptor.java
index 56ccf12..fde6e8c 100644
--- a/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/WSS4JInInterceptor.java
+++ b/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/WSS4JInInterceptor.java
@@ -281,10 +281,6 @@ public class WSS4JInInterceptor extends AbstractWSS4JInterceptor {
                 }
 
                 checkActions(msg, reqData, wsResult.getResults(), actions, SAAJUtils.getBody(doc));
-<<<<<<< HEAD
-=======
-
->>>>>>> 0b7b183... NPE fix
                 doResults(
                     msg, actor, 
                     SAAJUtils.getHeader(doc),
@@ -334,48 +330,7 @@ public class WSS4JInInterceptor extends AbstractWSS4JInterceptor {
             reqData = null;
         }
     }
-<<<<<<< HEAD
-    
-=======
-    private void importNewDomToSAAJ(SOAPMessage doc, Element elem, Node originalNode) throws SOAPException {
-        if (DOMUtils.isJava9SAAJ()
-            && originalNode != null && !originalNode.isEqualNode(elem)) {
-            //ensure the new decrypted dom element could be imported into the SAAJ
-            Node node = null;
-            Document document = null;
-            Element body = SAAJUtils.getBody(doc);
-            if (body != null) {
-                document = body.getOwnerDocument();
-            }
-            if (elem != null && elem.getOwnerDocument() != null
-                && elem.getOwnerDocument().getDocumentElement() != null) {
-                node = elem.getOwnerDocument().
-                    getDocumentElement().getFirstChild().getNextSibling().getFirstChild();
-            }
-            if (document != null && node != null) {
-                Node newNode = null;
-                try {
-                    newNode = document.importNode(node, true);
-                    if (newNode != null) {
-                        try {
-                            Method method = newNode.getClass().getMethod("getDomElement");
-                            newNode = (Element)method.invoke(newNode);
-                        } catch (java.lang.NoSuchMethodException ex) {
-                            // do nothing;
-                        }
-                    }
-                    elem.getOwnerDocument().getDocumentElement().getFirstChild().
-                        getNextSibling().replaceChild(newNode, node);
-                } catch (Exception ex) {
-                    //just to the best try
-                }
-
-            }
-
-        }
-    }
 
->>>>>>> 0b7b183... NPE fix
     private void configureAudienceRestriction(SoapMessage msg, RequestData reqData) {
         // Add Audience Restrictions for SAML
         boolean enableAudienceRestriction =