If the getResourceAsStream method cannot find a file, it returns a null. On the other hand, the BufferedInputStream throws a FileNotFound exception.
The null return ends up throwing a NullPointer exception when we go to read the file, which is a RunTimeExcpetion and is passed up the stack, causing the robot code to crash, which is sub-optimal. Make sure both conditions are handled gracefully.
If the getResourceAsStream method cannot find a file, it returns a null. On the other hand, the BufferedInputStream throws a FileNotFound exception. The null return ends up throwing a NullPointer exception when we go to read the file, which is a RunTimeExcpetion and is passed up the stack, causing the robot code to crash, which is sub-optimal. Make sure both conditions are handled gracefully.