You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@sling.apache.org by "Karl Pauls (JIRA)" <ji...@apache.org> on 2019/01/25 13:22:00 UTC
[jira] [Created] (SLING-8241) NPE in FSClassLoaderProvider
deactivate
Karl Pauls created SLING-8241:
---------------------------------
Summary: NPE in FSClassLoaderProvider deactivate
Key: SLING-8241
URL: https://issues.apache.org/jira/browse/SLING-8241
Project: Sling
Issue Type: Bug
Components: Commons
Affects Versions: File System ClassLoader 1.0.8
Reporter: Karl Pauls
Assignee: Karl Pauls
Fix For: File System ClassLoader 1.0.10
The FSClassLoaderProvider deactivate()->destroyClassLoader() does assume that the callingBundle.getBundleContext() isn't null. That is not the case if the calling bundle has been stopped. In that case, we run into an NPE:
{noformat}
java.lang.NullPointerException: null
at org.apache.sling.commons.fsclassloader.impl.FSClassLoaderProvider.destroyClassLoader(FSClassLoaderProvider.java:178) [org.apache.sling.commons.fsclassloader:1.0.8]
at org.apache.sling.commons.fsclassloader.impl.FSClassLoaderProvider.deactivate(FSClassLoaderProvider.java:160) [org.apache.sling.commons.fsclassloader:1.0.8]
{noformat}
We should check if the BundleContext is null first.
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)