[PATCH] [JAVA] Double.parseDouble(null) throw NullPointerException

Tom Tromey tromey@redhat.com
Mon Aug 8 14:16:00 GMT 2011


>>>>> "Jie" == Jie Liu <lj8175@gmail.com> writes:

Jie> +  if(str == NULL)
Jie> +      throw new NullPointerException();
Jie> +
Jie>    int length = str->length();

Why doesn't 'str->length()' throw the NPE?

Tom



More information about the Java-patches mailing list