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:25:40 GMT
Repository: cxf
Updated Branches:
  refs/heads/master 88a7cd850 -> da963ab6e


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

Branch: refs/heads/master
Commit: da963ab6e038f28d5d8bdfcf8371774a4365f904
Parents: 88a7cd8
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:25:23 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/da963ab6/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 acc2ecc..df0e23a 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
@@ -385,6 +385,9 @@ public class JettyHTTPServerEngine implements ServerEngine {
         if (shouldCheckUrl(handler.getBus())) {
             checkRegistedContext(url);
         }
+        if (contexts == null) {
+            contexts = new ContextHandlerCollection();
+        }
         
         SecurityHandler securityHandler = null;
         if (server == null) {
@@ -454,7 +457,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