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 E327E185AC for ; Tue, 19 May 2015 12:15:29 +0000 (UTC) Received: (qmail 50163 invoked by uid 500); 19 May 2015 12:15:29 -0000 Delivered-To: apmail-cxf-commits-archive@cxf.apache.org Received: (qmail 50099 invoked by uid 500); 19 May 2015 12:15:29 -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 50090 invoked by uid 99); 19 May 2015 12:15:29 -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; Tue, 19 May 2015 12:15:29 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id 84D91E17CB; Tue, 19 May 2015 12:15:29 +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: X-Mailer: ASF-Git Admin Mailer Subject: cxf git commit: [CXF-6402] Fixing checkstyle issues Date: Tue, 19 May 2015 12:15:29 +0000 (UTC) Repository: cxf Updated Branches: refs/heads/3.0.x-fixes 5c919818b -> c6db5cc0a [CXF-6402] Fixing checkstyle issues Project: http://git-wip-us.apache.org/repos/asf/cxf/repo Commit: http://git-wip-us.apache.org/repos/asf/cxf/commit/c6db5cc0 Tree: http://git-wip-us.apache.org/repos/asf/cxf/tree/c6db5cc0 Diff: http://git-wip-us.apache.org/repos/asf/cxf/diff/c6db5cc0 Branch: refs/heads/3.0.x-fixes Commit: c6db5cc0a5abdf8f59739bde6139830717936ac1 Parents: 5c91981 Author: Sergey Beryozkin Authored: Tue May 19 13:15:09 2015 +0100 Committer: Sergey Beryozkin Committed: Tue May 19 13:15:09 2015 +0100 ---------------------------------------------------------------------- .../http_jetty/JettyHTTPServerEngine.java | 24 ++++++++++++-------- 1 file changed, 14 insertions(+), 10 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/cxf/blob/c6db5cc0/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 b478396..87f313d 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,16 +319,7 @@ public class JettyHTTPServerEngine implements ServerEngine { if (shouldCheckUrl(handler.getBus())) { checkRegistedContext(url); } - if (contexts == null) { - contexts = new ContextHandlerCollection(); - if (server != null) { - if (server.getHandler() instanceof ContextHandlerCollection) { - contexts = (ContextHandlerCollection) server.getHandler(); - } else { - server.setHandler(contexts); - } - } - } + initializeContexts(); SecurityHandler securityHandler = null; if (server == null) { @@ -486,6 +477,19 @@ public class JettyHTTPServerEngine implements ServerEngine { ++servantCount; } + private void initializeContexts() { + if (contexts == null) { + contexts = new ContextHandlerCollection(); + if (server != null) { + if (server.getHandler() instanceof ContextHandlerCollection) { + contexts = (ContextHandlerCollection) server.getHandler(); + } else { + server.setHandler(contexts); + } + } + } + } + protected void setupThreadPool() { AbstractConnector aconn = (AbstractConnector) connector; if (isSetThreadingParameters()) {