Return-Path: X-Original-To: apmail-cxf-commits-archive@www.apache.org Delivered-To: apmail-cxf-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id C94E1172A4 for ; Tue, 28 Oct 2014 18:27:56 +0000 (UTC) Received: (qmail 25535 invoked by uid 500); 28 Oct 2014 18:27:56 -0000 Delivered-To: apmail-cxf-commits-archive@cxf.apache.org Received: (qmail 25404 invoked by uid 500); 28 Oct 2014 18:27:56 -0000 Mailing-List: contact commits-help@cxf.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@cxf.apache.org Delivered-To: mailing list commits@cxf.apache.org Received: (qmail 25088 invoked by uid 99); 28 Oct 2014 18:27:56 -0000 Received: from tyr.zones.apache.org (HELO tyr.zones.apache.org) (140.211.11.114) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 28 Oct 2014 18:27:56 +0000 Received: by tyr.zones.apache.org (Postfix, from userid 65534) id 38D009968E0; Tue, 28 Oct 2014 18:27:56 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: dkulp@apache.org To: commits@cxf.apache.org Date: Tue, 28 Oct 2014 18:27:59 -0000 Message-Id: <32f7df4f4bd5466da9cd02e95d437bc8@git.apache.org> In-Reply-To: <3e1d7b62240d497cac793258b2015176@git.apache.org> References: <3e1d7b62240d497cac793258b2015176@git.apache.org> X-Mailer: ASF-Git Admin Mailer Subject: [4/4] git commit: [CXF-6030] Add an NPE guard and remove "null" headers [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/6806f9f8 Tree: http://git-wip-us.apache.org/repos/asf/cxf/tree/6806f9f8 Diff: http://git-wip-us.apache.org/repos/asf/cxf/diff/6806f9f8 Branch: refs/heads/3.0.x-fixes Commit: 6806f9f8f01779811d50f1db8f191d3247d0cc93 Parents: 5e49272 Author: Daniel Kulp Authored: Tue Oct 28 14:11:39 2014 -0400 Committer: Daniel Kulp Committed: Tue Oct 28 14:27:40 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/6806f9f8/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
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(); } }