felix-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cziege...@apache.org
Subject svn commit: r1825458 - /felix/trunk/osgi-r7/http/jetty/src/main/java/org/apache/felix/http/jetty/internal/JettyService.java
Date Tue, 27 Feb 2018 14:37:58 GMT
Author: cziegeler
Date: Tue Feb 27 14:37:57 2018
New Revision: 1825458

URL: http://svn.apache.org/viewvc?rev=1825458&view=rev
Log:
FELIX-5793 : Update to Jetty 9.4.x

Modified:
    felix/trunk/osgi-r7/http/jetty/src/main/java/org/apache/felix/http/jetty/internal/JettyService.java

Modified: felix/trunk/osgi-r7/http/jetty/src/main/java/org/apache/felix/http/jetty/internal/JettyService.java
URL: http://svn.apache.org/viewvc/felix/trunk/osgi-r7/http/jetty/src/main/java/org/apache/felix/http/jetty/internal/JettyService.java?rev=1825458&r1=1825457&r2=1825458&view=diff
==============================================================================
--- felix/trunk/osgi-r7/http/jetty/src/main/java/org/apache/felix/http/jetty/internal/JettyService.java
(original)
+++ felix/trunk/osgi-r7/http/jetty/src/main/java/org/apache/felix/http/jetty/internal/JettyService.java
Tue Feb 27 14:37:57 2018
@@ -108,10 +108,13 @@ public final class JettyService extends
     private volatile CustomizerWrapper customizerWrapper;
     private boolean registerManagedService = true;
     private volatile Object eventAdmin;
+    private final String jettyVersion;
 
     public JettyService(final BundleContext context,
             final HttpServiceController controller)
     {
+        this.jettyVersion = fixJettyVersion(context);
+
         this.context = context;
         this.config = new JettyConfig(this.context);
         this.controller = controller;
@@ -363,7 +366,6 @@ public final class JettyService extends
     {
         if (this.config.isUseHttp() || this.config.isUseHttps())
         {
-            final String version = fixJettyVersion();
 
             final int threadPoolMax = this.config.getThreadPoolMax();
             if (threadPoolMax >= 0) {
@@ -413,7 +415,7 @@ public final class JettyService extends
                 this.loadBalancerCustomizerTracker.open();
             }
 
-            final StringBuilder message = new StringBuilder("Started Jetty ").append(version).append("
at port(s)");
+            final StringBuilder message = new StringBuilder("Started Jetty ").append(this.jettyVersion).append("
at port(s)");
             if (this.config.isUseHttp() && initializeHttp())
             {
                 message.append(" HTTP:").append(this.config.getHttpPort());
@@ -482,10 +484,10 @@ public final class JettyService extends
         }
     }
 
-    private String fixJettyVersion()
+    private static String fixJettyVersion(final BundleContext ctx)
     {
         // FELIX-4311: report the real version of Jetty...
-        Dictionary<String, String> headers = this.context.getBundle().getHeaders();
+        final Dictionary<String, String> headers = ctx.getBundle().getHeaders();
         String version = headers.get("X-Jetty-Version");
         if (version != null)
         {



Mime
View raw message