RFR: 260: CSR command should handle null resolution

Erik Helin ehelin at openjdk.java.net
Wed Feb 5 09:34:44 UTC 2020

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.

- `make test` passes on Linux x64
- added a unit test that showcase the issue
- added unit tests for new `JSONValue` methods



 - 520471ee: Ensure CSR command can handle null resolution

Changes: https://git.openjdk.java.net/skara/pull/396/files
 Webrev: https://webrevs.openjdk.java.net/skara/396/webrev.00
  Issue: https://bugs.openjdk.java.net/browse/SKARA-260
  Stats: 228 lines in 10 files changed: 226 ins; 0 del; 2 mod
  Patch: https://git.openjdk.java.net/skara/pull/396.diff
  Fetch: git fetch https://git.openjdk.java.net/skara pull/396/head:pull/396

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

More information about the skara-dev mailing list