NullPointerException….
August 24th, 2003 by HenWhy oh why can’t the NPException message tell me which variable the NPE was called upon?
That one simple change would be worthy of all of JDK1.5 for me.
Why oh why can’t the NPException message tell me which variable the NPE was called upon?
That one simple change would be worthy of all of JDK1.5 for me.
August 25th, 2003 at 12:43 am
It may be not a variable. Just an expression. And you can find it out already in 1.4
August 25th, 2003 at 5:32 am
That’s what stack traces are for.
August 25th, 2003 at 6:36 am
Bob: if you have multiple method calls on one line, you often need more than the stack trace:
x.y(z.a(), b.c(), d.e());
August 27th, 2003 at 5:54 am
I’d imagine it’s just hard to do so Sun took the easy route. I generally think NPE is an Error anyway. Further still, all RuntimeExceptions need to become either Errors or checked Exceptions. If it’s an exceptional termination of a method then that’s known and should be checked. Otherwise it’s a full-blown error. Anyway, even tho’ this is not a troll, FLAME-ON!
August 28th, 2003 at 3:34 am
That’s what debuggers, breakpoints and watches are for…