RFR: 1051: JCheck complains about issue already used

Kevin Rushforth kcr at openjdk.java.net
Wed Jun 2 20:35:58 UTC 2021

On Fri, 28 May 2021 23:16:12 GMT, Erik Joelsson <erikj at openjdk.org> wrote:

> The DuplicateIssuesCheck can sometimes report false positives when the same issueId has been used in separate branches. This patch fixes the check so that only commits that are ancestors of the commit being checked are considered.

Looks good with one minor suggestion.

jcheck/src/main/java/org/openjdk/skara/jcheck/DuplicateIssuesCheck.java line 77:

> 75:         for (var issue : message.issues()) {
> 76:             var hashes = issuesToHashes.get(issue.id());
> 77:             if (hashes != null) {

You can save the additional process if `hashes.size()` is 1, so I recommend leaving this test as it was before:

if (hashes != null && hashes.size() > 1) {


Marked as reviewed by kcr (Reviewer).

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

More information about the skara-dev mailing list