RFR: Fix NPE in GitLabHost::isMemberOf

Erik Helin ehelin at openjdk.org
Thu Oct 3 14:15:49 UTC 2019


Hi all,

this small patch fixes an (embarrasing) NPE in `GitLabHost::isMemberOf`. Calling `.asObject()` will result in `details` being `null` in the `onError` is executed (since `JSON.of()` produces `JSONNull` whose `asObject` returns `null`). The fix is simply to not call `.asObject()`.

## Testing
- [x] `sh gradlew test` passes on Linux x86_64
- [x] `HostTests` passes `sh gradlew test` with credentials

Thanks,
Erik

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

Commits:
 - f5f2bb9f: Fix NPE in GitLabHost::isMemberOf

Changes: https://git.openjdk.java.net/skara/pull/181/files
 Webrev: https://webrevs.openjdk.java.net/skara/181/webrev.00
  Stats: 2 lines in 1 file changed: 0 ins; 1 del; 1 mod
  Patch: https://git.openjdk.java.net/skara/pull/181.diff
  Fetch: git fetch https://git.openjdk.java.net/skara pull/181/head:pull/181

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


More information about the skara-dev mailing list