RFR: 1145: NPE in GitHubPullRequest::reviews [v2]

Erik Joelsson erikj at openjdk.java.net
Tue Aug 31 12:48:13 UTC 2021

> The core of this change is to fix an NPE in GitHubPullRequest::reviews, which happens when a commit that a review refers to no longer exists (presumably because of a rebase or forced update of the review branch). The introduction of a possible null value in Review::hash has some ripple effects however, so this gets a bit more complicated.
> I've opted to wrap the return value of Review::hash and ReviewComment::hash with Optional to properly force every caller to handle the situation. I haven't seen this happen for ReviewComment, but I would be surprised if the same thing didn't apply there from the GitHub side.

Erik Joelsson has updated the pull request incrementally with one additional commit since the last revision:

  Corrected comment


  - all: https://git.openjdk.java.net/skara/pull/1211/files
  - new: https://git.openjdk.java.net/skara/pull/1211/files/dcbc4f1c..785376c2

 - full: https://webrevs.openjdk.java.net/?repo=skara&pr=1211&range=01
 - incr: https://webrevs.openjdk.java.net/?repo=skara&pr=1211&range=00-01

  Stats: 2 lines in 2 files changed: 0 ins; 0 del; 2 mod
  Patch: https://git.openjdk.java.net/skara/pull/1211.diff
  Fetch: git fetch https://git.openjdk.java.net/skara pull/1211/head:pull/1211

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

More information about the skara-dev mailing list