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:26:28 UTC

cxf git commit: NPE fix

Repository: cxf
Updated Branches:
  refs/heads/master 1f7241ba6 -> 0b7b18333


NPE fix


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

Branch: refs/heads/master
Commit: 0b7b18333591d6bb8e0bfcf324bbdefaa8cce21d
Parents: 1f7241b
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:24 2017 +0100

----------------------------------------------------------------------
 .../apache/cxf/ws/security/wss4j/WSS4JInInterceptor.java  | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cxf/blob/0b7b1833/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 686a66d..74227b4 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
@@ -161,7 +161,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;
         }
 
@@ -293,7 +293,7 @@ public class WSS4JInInterceptor extends AbstractWSS4JInterceptor {
                 }
 
                 checkActions(msg, reqData, wsResult.getResults(), actions, SAAJUtils.getBody(doc));
-                                       
+
                 doResults(
                     msg, actor,
                     header,
@@ -370,16 +370,16 @@ public class WSS4JInInterceptor extends AbstractWSS4JInterceptor {
                             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
                 }
-                
+
             }
-            
+
         }
     }