RFR: checkout: sort marks before converting

Jorn Vernee jvernee at openjdk.java.net
Fri Jan 29 14:17:54 UTC 2021


On Fri, 29 Jan 2021 13:13:33 GMT, Erik Helin <ehelin at openjdk.org> wrote:

> Hi all,
> 
> please review this small patch that ensures that we sort the existing marks before passing them to the converter.
> 
> Thanks,
> Erik

One comment, but up to you whether to address

bots/checkout/src/main/java/org/openjdk/skara/bots/checkout/CheckoutBot.java line 138:

> 136:                         new IllegalStateException("Repository vanished from " + to));
> 137:                     var existing = new ArrayList<>(marks.current());
> 138:                     Collections.sort(existing);

If the `convert` method relies on the marks being sorted, maybe it would be more robust to move the call to sort into there?

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

Marked as reviewed by jvernee (Reviewer).

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


More information about the skara-dev mailing list