[Approved] RFR: Fix NPE in GitLabHost::isMemberOf
Robin Westberg
rwestberg at openjdk.org
Fri Oct 4 06:09:18 UTC 2019
On Thu, 3 Oct 2019 14:15:49 GMT, Erik Helin <ehelin at openjdk.org> wrote:
> 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
Looks good!
----------------
Approved by rwestberg (Reviewer).
PR: https://git.openjdk.java.net/skara/pull/181
More information about the skara-dev
mailing list