Skip to content

Commit b1b4342

Browse files
committed
FileLocator#classPathRoutine(): assertion against null pointers
1 parent 100aad7 commit b1b4342

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

snaploader/src/main/java/electrostatic4j/snaploader/filesystem/FileLocator.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -162,6 +162,8 @@ protected void classPathRoutine() {
162162
// getClassLoader() is invoked on them, it will return "null" pointer
163163
// indicating the invalidity of active loaders
164164
this.fileInputStream = getClass().getClassLoader().getResourceAsStream(filePath);
165+
assert (this.fileInputStream != null):
166+
"Classpath Routine failed: the file is not in the classpath!";
165167
}
166168

167169
/**

0 commit comments

Comments
 (0)