RFR: 1256: Use stream api to simplify the csr issue lookup

Guoxiong Li gli at openjdk.java.net
Wed Dec 1 20:28:55 UTC 2021


On Tue, 30 Nov 2021 23:03:54 GMT, Erik Joelsson <erikj at openjdk.org> wrote:

>>> I'm not sure there will ever be a need to filter links with multiple different relationships. Do you know of any such case that you are planning to convert?
>> 
>> It can be used in the method `Backports#findMainIssue`:
>> 
>> 
>> // method Backports#findMainIssue
>> var links = issue.linksWithRelationships(List.of("backported by", "backport of"));
>> 
>> 
>> But If we use the stream api, it is not needed now.
>
>> > I'm not sure there will ever be a need to filter links with multiple different relationships. Do you know of any such case that you are planning to convert?
>> 
>> It can be used in the method `Backports#findMainIssue`:
>> 
>> ```
>> // method Backports#findMainIssue
>> var links = issue.linksWithRelationships(List.of("backported by", "backport of"));
>> ```
>> 
>> But If we use the stream api, it is not needed now.
> 
> Ah, right good point. I forgot about the two variants for every link type in JBS.

@erikj79 thanks for the review.

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

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


More information about the skara-dev mailing list