On Mon, 13 Nov 2023 07:24:24 GMT, Viktor Klang <vkl...@openjdk.org> wrote:

>> This Pull-Request implements [JEP-461](https://openjdk.org/jeps/461)
>
> Viktor Klang has updated the pull request incrementally with one additional 
> commit since the last revision:
> 
>   Addressing further review feedback

src/java.base/share/classes/java/util/stream/Gatherers.java line 117:

> 115: 
> 116:             void finish(Downstream<? super List<TR>> downstream) {
> 117:                 if(at > 0 && !downstream.isRejecting()) {

Suggestion:

                if (at > 0 && !downstream.isRejecting()) {

src/java.base/share/classes/java/util/stream/Gatherers.java line 211:

> 209: 
> 210:             void finish(Downstream<? super List<TR>> downstream) {
> 211:                 if(firstWindow && at > 0 && !downstream.isRejecting()) {

Suggestion:

                if (firstWindow && at > 0 && !downstream.isRejecting()) {

src/java.base/share/classes/java/util/stream/Gatherers.java line 392:

> 390:                 try {
> 391:                     Future<R> current;
> 392:                     while(proceed

Suggestion:

                    while (proceed

src/java.base/share/classes/java/util/stream/Gatherers.java line 410:

> 408:                     if (!proceed) {
> 409:                         Future<R> next;
> 410:                         while((next = window.pollFirst()) != null) {

Suggestion:

                        while ((next = window.pollFirst()) != null) {

src/java.base/share/classes/java/util/stream/Gatherers.java line 495:

> 493:     }
> 494: 
> 495:     final static class Composite<T, A, R, AA, RR> implements Gatherer<T, 
> Object, RR> {

Suggestion:

    static final class Composite<T, A, R, AA, RR> implements Gatherer<T, 
Object, RR> {

test/micro/org/openjdk/bench/java/util/stream/ops/ref/BenchmarkGathererImpls.java
 line 91:

> 89: 
> 90:             @Override public boolean integrate(Void state, T element, 
> Gatherer.Downstream<? super R> downstream) {
> 91:                 try(Stream<? extends R> s = mapper.apply(element)) {

Suggestion:

                try (Stream<? extends R> s = mapper.apply(element)) {

test/micro/org/openjdk/bench/java/util/stream/ops/ref/BenchmarkGathererImpls.java
 line 98:

> 96:                     }
> 97:                     return true;
> 98:                 } catch(RuntimeException e) {

Suggestion:

                } catch (RuntimeException e) {

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

PR Review Comment: https://git.openjdk.org/jdk/pull/16420#discussion_r1390809499
PR Review Comment: https://git.openjdk.org/jdk/pull/16420#discussion_r1390809768
PR Review Comment: https://git.openjdk.org/jdk/pull/16420#discussion_r1390810017
PR Review Comment: https://git.openjdk.org/jdk/pull/16420#discussion_r1390810201
PR Review Comment: https://git.openjdk.org/jdk/pull/16420#discussion_r1390810531
PR Review Comment: https://git.openjdk.org/jdk/pull/16420#discussion_r1390808681
PR Review Comment: https://git.openjdk.org/jdk/pull/16420#discussion_r1390809068

Reply via email to