Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
File System ClassLoader 1.0.8
-
None
Description
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:
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]
We should check if the BundleContext is null first.