users@jsonb-spec.java.net

[jsonb-spec users] Re: [jsr367-experts] Re: Re: [1-RuntimeAPI] Proposal

From: Martin Grebac <martin.grebac_at_oracle.com>
Date: Mon, 27 Apr 2015 18:08:31 +0200

On 22.03.15 15:11, Oleg Tsal-Tsalko wrote:
> Hi Martin,
>
> It is good that they are in queue)
> Could you comment on #4:
>
> Why decision has been made to throw NPEs upon retrieval of null
> values across API instead of IllegalArgumentExceptions? I don't
> remember it has been discussed in public?
>
Hi,
  this has not been proposed for discussion at EG yet as I was going
back and forth myself on this for some time. The original request came
from some other unrelated Java SE review where NPE was suggested as the
JDK way for this case. Though it has been made clear since that even JDK
is not consistent itself here and thus the current way to go is to
return this back to IAE to which nobody objected and I consider better
for this usecase, too.
  MartiNG