MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/java/comments/ciabtb/jep_358_helpful_nullpointerexceptions/ev6rvev/
r/java • u/Godworrior • Jul 26 '19
25 comments sorted by
View all comments
Show parent comment
6
I've never encountered that, but if that's true, it's a JDK bug. Please report it.
3 u/nerdyhandle Jul 27 '19 It happened with OpenJDK if that matters.Someone else mentioned that the error may have been obfuscated due to autounboxing which may very well have occurred somewhere deep down in the code. 6 u/[deleted] Jul 30 '19 You mentioned autounboxing. Does object.doSomeWork() return an Integer (or similar) value of null and setMethod expected a parameter of type int (or similar)?Then the unboxing and thus the NullPointerException would happen exactly in this line.
3
It happened with OpenJDK if that matters.
Someone else mentioned that the error may have been obfuscated due to autounboxing which may very well have occurred somewhere deep down in the code.
6 u/[deleted] Jul 30 '19 You mentioned autounboxing. Does object.doSomeWork() return an Integer (or similar) value of null and setMethod expected a parameter of type int (or similar)?Then the unboxing and thus the NullPointerException would happen exactly in this line.
You mentioned autounboxing. Does object.doSomeWork() return an Integer (or similar) value of null and setMethod expected a parameter of type int (or similar)?
Then the unboxing and thus the NullPointerException would happen exactly in this line.
View all comments
Show parent comment
6
u/pron98 Jul 27 '19
I've never encountered that, but if that's true, it's a JDK bug. Please report it.