RFR: 260: CSR command should handle null resolution

Robin Westberg rwestberg at openjdk.java.net
Wed Feb 5 09:34:55 UTC 2020


On Wed, 5 Feb 2020 09:28:05 GMT, Erik Helin <ehelin at openjdk.org> wrote:

> Hi all,
> 
> please review this patch that fixes an issue with the `/csr` command. Issues in
> JBS of "CSR" type can have `null` as the value for the `"resolution"` field,
> something that the `CSRCommand` did not anticipate. This patch makes the
> `CSRCommand` much more defensive when interpreting JSON.
> 
> I also added a number of methods to `JSONValue` for querying the type of a
> `JSONValue` to allow code to safely use the `as*` methods.
> 
> Testing:
> - `make test` passes on Linux x64
> - added a unit test that showcase the issue
> - added unit tests for new `JSONValue` methods
> 
> Thanks,
> Erik

Looks good, thanks for fixing!

-------------

Marked as reviewed by rwestberg (Reviewer).

PR: https://git.openjdk.java.net/skara/pull/396


More information about the skara-dev mailing list