Hmm, can we check before it is not a regression? I thought it was the first impl and I doubt we throw an exception there for fun (I hate to check the key exists before getting it to be honest). If not in jsonp 1.0 then +1 to fix it in both.
Romain Manni-Bucau @rmannibucau <https://twitter.com/rmannibucau> | Blog <https://blog-rmannibucau.rhcloud.com> | Old Blog <http://rmannibucau.wordpress.com> | Github <https://github.com/rmannibucau> | LinkedIn <https://www.linkedin.com/in/rmannibucau> | JavaEE Factory <https://javaeefactory-rmannibucau.rhcloud.com> 2016-11-24 10:47 GMT+01:00 Reinhard Sandtner <[email protected]>: > hey folks, > > while writing tests for JsonPatch in our JSONP-1.1 branch, it becomes > apparent that our behavior for the get*-methods in JsonObject differs with > the implementation in the unoffical RI. > > if a key does not exist, we throw a NPE while the spec says it should > return null (https://github.com/json-processing-inofficial/jsonp/ > blob/master/api/src/main/java/javax/json/JsonObject.java#L149 < > https://github.com/json-processing-inofficial/jsonp/ > blob/master/api/src/main/java/javax/json/JsonObject.java#L149>) > > > * @return the object value to which the specified name is mapped, or > * {@code null} if this object contains no mapping for the name > > > imo we should fix it - know the big question: > fix it only in jsonp-1.1 or also in jsonp-1.0? > > lg > reini
