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:55 GMT
Repository: cxf
Updated Branches:
  refs/heads/2.7.x-fixes ba8f158d5 -> 90b54f115


[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/90b54f11
Tree: http://git-wip-us.apache.org/repos/asf/cxf/tree/90b54f11
Diff: http://git-wip-us.apache.org/repos/asf/cxf/diff/90b54f11

Branch: refs/heads/2.7.x-fixes
Commit: 90b54f1154c45e132f69feff67d65ad2311ceb9b
Parents: ba8f158
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:27:38 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/90b54f11/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 77e27a9..f926889 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
@@ -316,6 +316,9 @@ public class JettyHTTPServerEngine implements ServerEngine {
         if (shouldCheckUrl(handler.getBus())) {
             checkRegistedContext(url);
         }
+        if (contexts == null) {
+            contexts = new ContextHandlerCollection();
+        }
         
         SecurityHandler securityHandler = null;
         if (server == null) {
@@ -394,7 +397,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