Guess it is not well defined
RI seems to fail in npe (string) or writing wrong content (String.valueOf
for big numbers).

I think a NPE is ok (illegal argument sounding better to me) but we should
pass tck short term + maybe refine it with a spec PR IMHO.


Le lun. 19 août 2019 à 08:09, Mark Struberg <[email protected]> a
écrit :

> hi folks!
>
> What happens if you pass a null to the various JsonGenerator#write
> methods, e.g
>
> https://docs.oracle.com/javaee/7/api/javax/json/stream/JsonGenerator.html#write-java.math.BigInteger-
> ?
>
> Should they blow up with a NullPointerException?
> Or should they write a Json.NULL value?
>
> I didn't find much in the official API docs.
> Does anyone remember how it should behave?
>
> Right now we do complicated Xxxx.valueOf(value) but later we blow up in
> #justWrite because we do a value.length();
>
> LieGrue,
> strub
>
>
>

Reply via email to