RFR: 1602: Fix labels handling in GitLabMergeRequest [v2]

Magnus Ihse Bursie ihse at openjdk.org
Tue Sep 20 17:26:19 UTC 2022


On Tue, 20 Sep 2022 17:14:33 GMT, Erik Joelsson <erikj at openjdk.org> wrote:

>> forge/src/main/java/org/openjdk/skara/forge/gitlab/GitLabMergeRequest.java line 666:
>> 
>>> 664:                 // Avoid throwing NPE for unknown labels
>>> 665:                 .filter(Objects::nonNull)
>>> 666:                 .toList();
>> 
>> You're losing `.sorted()`. Maybe it doesn't matter?
>
> Hm, probably shouldn't matter, but I retained the sorted property on the `labels` field in the constructor, so should probably make sure all assignments to that field are made with sorted lists for consistency. Then we don't need to sort here.

Sounds good. In general I think it’s best to keep things sorted, in order to minimize spurious changes in places that might end up being user visible.

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

PR: https://git.openjdk.org/skara/pull/1376


More information about the skara-dev mailing list