File tree Expand file tree Collapse file tree 1 file changed +5
-1
lines changed
snaploader/src/main/java/electrostatic4j/snaploader/filesystem Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Original file line number Diff line number Diff line change @@ -152,11 +152,15 @@ public void initialize(int size) throws IOException {
152152 protected void classPathRoutine () {
153153 SnapLoaderLogger .log (Level .INFO , getClass ().getName (), "initialize(int)" ,
154154 "File locator initialized using classpath routine with hash key #" + getHashKey ());
155- // use the AppClassLoader, a BuiltinClassLoader to get the resources from the classpath
155+ // Use the AppClassLoader, a BuiltinClassLoader to get the resources from the classpath
156156 // notice that the JVM Classloaders are arranged in a tree-like structure
157157 // 1) The BootStrap ClassLoader is the most ancestor
158158 // 2) The Java Platform ClassLoader is the next in the tree.
159159 // 3) The AppClassLoader is the last in the tree.
160+ // So, each one backs up to its ancestor!
161+ // However, all those classloaders are loaded by the BootStrap, so if
162+ // getClassLoader() is invoked on them, it will return "null" pointer
163+ // indicating the invalidity of active loaders
160164 this .fileInputStream = getClass ().getClassLoader ().getResourceAsStream (filePath );
161165 }
162166
You can’t perform that action at this time.
0 commit comments