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] Fixing checkstyle issues
Date Tue, 19 May 2015 12:11:49 GMT
Repository: cxf
Updated Branches:
  refs/heads/master ab687c5ce -> 50b4ccf16


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

Branch: refs/heads/master
Commit: 50b4ccf167d73fc547a0567f49cdffe41e68cb9a
Parents: ab687c5
Author: Sergey Beryozkin <sberyozkin@talend.com>
Authored: Tue May 19 13:11:32 2015 +0100
Committer: Sergey Beryozkin <sberyozkin@talend.com>
Committed: Tue May 19 13:11:32 2015 +0100

----------------------------------------------------------------------
 .../http_jetty/JettyHTTPServerEngine.java       | 24 ++++++++++++--------
 1 file changed, 14 insertions(+), 10 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cxf/blob/50b4ccf1/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 5d518c7..1c99054 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,16 +385,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) {
@@ -541,6 +532,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);
+                }
+            }
+        }
+    }
+
     private void addServerMBean() {
         if (mBeanContainer == null) {
             return;


Mime
View raw message