felix-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ghenz...@apache.org
Subject svn commit: r1854490 - /felix/trunk/healthcheck/generalchecks/src/main/java/org/apache/felix/hc/generalchecks/util/ScriptEnginesTracker.java
Date Wed, 27 Feb 2019 23:42:22 GMT
Author: ghenzler
Date: Wed Feb 27 23:42:22 2019
New Revision: 1854490

URL: http://svn.apache.org/viewvc?rev=1854490&view=rev
Log:
FELIX-6072 NPE fix

Modified:
    felix/trunk/healthcheck/generalchecks/src/main/java/org/apache/felix/hc/generalchecks/util/ScriptEnginesTracker.java

Modified: felix/trunk/healthcheck/generalchecks/src/main/java/org/apache/felix/hc/generalchecks/util/ScriptEnginesTracker.java
URL: http://svn.apache.org/viewvc/felix/trunk/healthcheck/generalchecks/src/main/java/org/apache/felix/hc/generalchecks/util/ScriptEnginesTracker.java?rev=1854490&r1=1854489&r2=1854490&view=diff
==============================================================================
--- felix/trunk/healthcheck/generalchecks/src/main/java/org/apache/felix/hc/generalchecks/util/ScriptEnginesTracker.java
(original)
+++ felix/trunk/healthcheck/generalchecks/src/main/java/org/apache/felix/hc/generalchecks/util/ScriptEnginesTracker.java
Wed Feb 27 23:42:22 2019
@@ -110,13 +110,14 @@ public class ScriptEnginesTracker implem
 
     private void unregisterFactories(Bundle bundle) {
         List<String> languagesForBundle = languagesByBundle.get(bundle);
-        for (String lang : languagesForBundle) {
-            ScriptEngineFactory removed = enginesByLanguage.remove(lang);
-            LOG.info("Removing ScriptEngine {} for language {}", removed, lang);
+        if(languagesForBundle != null) {
+            for (String lang : languagesForBundle) {
+                ScriptEngineFactory removed = enginesByLanguage.remove(lang);
+                LOG.info("Removing ScriptEngine {} for language {}", removed, lang);
+            }
         }
     }
 
-    
     @SuppressWarnings("unchecked")
     private List<ScriptEngineFactory> getScriptEngineFactoriesForBundle(final Bundle
bundle) {
         URL url = bundle.getEntry(ENGINE_FACTORY_SERVICE);



Mime
View raw message