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 78C7A178C5 for ; Fri, 15 May 2015 09:27:12 +0000 (UTC) Received: (qmail 31996 invoked by uid 500); 15 May 2015 09:27:12 -0000 Delivered-To: apmail-cxf-commits-archive@cxf.apache.org Received: (qmail 31933 invoked by uid 500); 15 May 2015 09:27:12 -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 31924 invoked by uid 99); 15 May 2015 09:27:12 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 15 May 2015 09:27:12 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id 3BCCEE2F6F; Fri, 15 May 2015 09:27:12 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: sergeyb@apache.org To: commits@cxf.apache.org Message-Id: <1590b8b42f3e4bc6945346f8b773586b@git.apache.org> X-Mailer: ASF-Git Admin Mailer Subject: cxf git commit: [CXF-6402] preventing NPE in JettyHTTPServerEngine Date: Fri, 15 May 2015 09:27:12 +0000 (UTC) Repository: cxf Updated Branches: refs/heads/3.0.x-fixes fd2b13bf6 -> cf7637cad [CXF-6402] preventing NPE in JettyHTTPServerEngine Project: http://git-wip-us.apache.org/repos/asf/cxf/repo Commit: http://git-wip-us.apache.org/repos/asf/cxf/commit/cf7637ca Tree: http://git-wip-us.apache.org/repos/asf/cxf/tree/cf7637ca Diff: http://git-wip-us.apache.org/repos/asf/cxf/diff/cf7637ca Branch: refs/heads/3.0.x-fixes Commit: cf7637cad7090befb862d17f75068c577241ec50 Parents: fd2b13b Author: Sergey Beryozkin Authored: Fri May 15 10:25:23 2015 +0100 Committer: Sergey Beryozkin Committed: Fri May 15 10:26:09 2015 +0100 ---------------------------------------------------------------------- .../apache/cxf/transport/http_jetty/JettyHTTPServerEngine.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/cxf/blob/cf7637ca/rt/transports/http-jetty/src/main/java/org/apache/cxf/transport/http_jetty/JettyHTTPServerEngine.java ---------------------------------------------------------------------- diff --git a/rt/transports/http-jetty/src/main/java/org/apache/cxf/transport/http_jetty/JettyHTTPServerEngine.java b/rt/transports/http-jetty/src/main/java/org/apache/cxf/transport/http_jetty/JettyHTTPServerEngine.java index f95e4f3..531c43a 100644 --- a/rt/transports/http-jetty/src/main/java/org/apache/cxf/transport/http_jetty/JettyHTTPServerEngine.java +++ b/rt/transports/http-jetty/src/main/java/org/apache/cxf/transport/http_jetty/JettyHTTPServerEngine.java @@ -319,6 +319,9 @@ public class JettyHTTPServerEngine implements ServerEngine { if (shouldCheckUrl(handler.getBus())) { checkRegistedContext(url); } + if (contexts == null) { + contexts = new ContextHandlerCollection(); + } SecurityHandler securityHandler = null; if (server == null) { @@ -397,7 +400,6 @@ public class JettyHTTPServerEngine implements ServerEngine { } } } - contexts = new ContextHandlerCollection(); /* * handlerCollection may be null here if is only one handler to deal with. * Which in turn implies that there can't be a 'defaultHander' to deal with.