Skip to content

Commit

Permalink
FELIX-6072 NPE fix
Browse files Browse the repository at this point in the history
git-svn-id: https://svn.apache.org/repos/asf/felix/trunk@1854490 13f79535-47bb-0310-9956-ffa450edef68
  • Loading branch information
ghenzler committed Feb 27, 2019
1 parent ad2aabb commit 99a2fe7
Showing 1 changed file with 5 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -110,13 +110,14 @@ private void registerFactories(Bundle bundle) {

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);
Expand Down

0 comments on commit 99a2fe7

Please sign in to comment.