cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From serg...@apache.org
Subject cxf git commit: [CXF-6402] preventing NPE in JettyHTTPServerEngine
Date Fri, 15 May 2015 09:27:12 GMT
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 <sberyozkin@talend.com>
Authored: Fri May 15 10:25:23 2015 +0100
Committer: Sergey Beryozkin <sberyozkin@talend.com>
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.


Mime
View raw message