This is the mail archive of the java-patches@gcc.gnu.org mailing list for the Java project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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


>>>>> "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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]