felix-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cziege...@apache.org
Subject svn commit: r1766584 - /felix/trunk/webconsole/src/main/java/org/apache/felix/webconsole/internal/servlet/OsgiManager.java
Date Tue, 25 Oct 2016 19:12:43 GMT
Author: cziegeler
Date: Tue Oct 25 19:12:43 2016
New Revision: 1766584

URL: http://svn.apache.org/viewvc?rev=1766584&view=rev
Log:
FELIX-5387 : NPE for requests missing 'felix-webconsole-locale' cookie

Modified:
    felix/trunk/webconsole/src/main/java/org/apache/felix/webconsole/internal/servlet/OsgiManager.java

Modified: felix/trunk/webconsole/src/main/java/org/apache/felix/webconsole/internal/servlet/OsgiManager.java
URL: http://svn.apache.org/viewvc/felix/trunk/webconsole/src/main/java/org/apache/felix/webconsole/internal/servlet/OsgiManager.java?rev=1766584&r1=1766583&r2=1766584&view=diff
==============================================================================
--- felix/trunk/webconsole/src/main/java/org/apache/felix/webconsole/internal/servlet/OsgiManager.java
(original)
+++ felix/trunk/webconsole/src/main/java/org/apache/felix/webconsole/internal/servlet/OsgiManager.java
Tue Oct 25 19:12:43 2016
@@ -677,6 +677,10 @@ public class OsgiManager extends Generic
             locale = configuredLocale;
         if (locale == null)
             locale = request.getLocale();
+        // this should never happen as request.getLocale()
+        // must return a locale (and not null). But just as a sanity check.
+        if (locale == null)
+            locale = Locale.ENGLISH;
 
         return locale;
     }



Mime
View raw message