JDK-4834738 NullPointerException: Better info

Milan Mimica milan.mimica at infobip.com
Sat Apr 26 08:10:02 UTC 2014

Milan Mimica, Software Engineer / Team Leader
Milan Mimica, Software Engineer / Team Leader
On 04/15/2014 09:16 AM, Fedor Bobin wrote:

> java.lang.NullPointerException: can not invoke method
> java.lang.String.length()I on null object
>          at Test.testNPE(Test.java:14)
>          at Test.main(Test.java:8)
> This additional information can help to understand cause of NPE in case of
> call chains. For example, let we have java code

What does it say in this situation?

static void func(int i) {...}

     func((Integer) null);

More information about the hotspot-dev mailing list