Looking at DrJava bug reports often makes me upset: Either because there is a bug in DrJava, or because there might be a bug in DrJava, but I can’t know for sure because the user neglected to provide crucial information about the system DrJava was running on and the source code that was edited.
Then there is a completely different category: Bug reports filed by users who are so unbelievably ignorant that they report a bug in a "Hello World"-level program of theirs as a bug in DrJava. That really makes me lose my cool.
In order to vent a little, I herewith present you the dumbest DrJava bug report yet: [ 1914390 ] Unhandled exception: java.lang.NullPointerException.
Check out this masterpiece of software engineering:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 | import java.io.*; import java.util.Scanner; public class ScanFajlli { public static void main(String arg[]) throws IOException { Scanner s = null; // String f = null; try { s.useDelimiter("\t"); s = new Scanner(new BufferedReader(new FileReader("test.txt"))); while (s.hasNext()) { System.out.println(s.next()); } } finally { if (s != null) { s.close(); } } } } |
It’s difficult to put the null
value and the method call any closer together. Truly stunning.
2 Responses to The Dumbest DrJava Bug Report Yet