- A Concurrent Affair - https://www.concurrentaffair.org -

The Dumbest DrJava Bug Report Yet

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 [1].

Check out this masterpiece of software engineering:

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] [3]Share [4]