cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dk...@apache.org
Subject [4/4] git commit: [CXF-6030] Add an NPE guard and remove "null" headers
Date Tue, 28 Oct 2014 18:26:58 GMT
[CXF-6030] Add an NPE guard and remove "null" headers


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

Branch: refs/heads/master
Commit: 77a6da2ceabc8a19cf423a33430ea5995ea811e3
Parents: b57976f
Author: Daniel Kulp <dkulp@apache.org>
Authored: Tue Oct 28 14:11:39 2014 -0400
Committer: Daniel Kulp <dkulp@apache.org>
Committed: Tue Oct 28 14:11:39 2014 -0400

----------------------------------------------------------------------
 .../binding/soap/interceptor/SoapHeaderOutFilterInterceptor.java  | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cxf/blob/77a6da2c/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/interceptor/SoapHeaderOutFilterInterceptor.java
----------------------------------------------------------------------
diff --git a/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/interceptor/SoapHeaderOutFilterInterceptor.java
b/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/interceptor/SoapHeaderOutFilterInterceptor.java
index 0a5a4e7..48e47a6 100644
--- a/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/interceptor/SoapHeaderOutFilterInterceptor.java
+++ b/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/interceptor/SoapHeaderOutFilterInterceptor.java
@@ -34,13 +34,12 @@ public class SoapHeaderOutFilterInterceptor extends AbstractSoapInterceptor
{
     }
 
     public void handleMessage(SoapMessage message) throws Fault {
-        // TODO Auto-generated method stub
         Iterator<Header> iter =  message.getHeaders().iterator();
         
         while (iter.hasNext()) {
             Header hdr  = iter.next();
             //Only remove inbound marked headers..
-            if (hdr.getDirection() == Header.Direction.DIRECTION_IN) {
+            if (hdr == null || hdr.getDirection() == Header.Direction.DIRECTION_IN) {
                 iter.remove(); 
             }
         }


Mime
View raw message