[Rev 01] RFR: 279: Optionally only update project-specific issues

Robin Westberg rwestberg at openjdk.java.net
Mon Feb 17 08:15:06 UTC 2020


On Fri, 14 Feb 2020 14:56:36 GMT, Erik Helin <ehelin at openjdk.org> wrote:

>> The pull request has been updated with 1 additional commit.
> 
> bots/notify/src/main/java/org/openjdk/skara/bots/notify/IssueUpdater.java line 266:
> 
>> 265:                                             .filter(pr -> pr.targetRef().equals(branch.name()))
>> 266:                                             .collect(Collectors.toList());
>> 267:                     if (pullRequests.size() == 0) {
> 
> Use [Stream.count](https://docs.oracle.com/en/java/javase/13/docs/api/java.base/java/util/stream/Stream.html#count()) here instead of materializing the list? You would have to change the following `if` to `if (count == 0L) {`.

Good point, will fix!

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

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


More information about the skara-dev mailing list