RFR: 8275242: Remove redundant stream() call before forEach in jdk.compiler
Andrey Turbanov
duke at openjdk.java.net
Wed Oct 13 19:03:10 UTC 2021
On Tue, 21 Sep 2021 01:27:44 GMT, Jonathan Gibbons <jjg at openjdk.org> wrote:
>> There are several places in the jdk.compiler, jdk.javadoc, jdk.jshell that use stream().forEach(...), these can be cleaned up.
>> Instead Collection.forEach or Map.forEach can be used directly.
>> This is continuation of
>> 1. [JDK-8273710](https://bugs.openjdk.java.net/browse/JDK-8273710) Remove redundant stream() call before forEach in jdk.jdeps
>> 2. [JDK-8273711](https://bugs.openjdk.java.net/browse/JDK-8273711) Remove redundant stream() call before forEach in jdk.jlink
>
> src/jdk.compiler/share/classes/com/sun/tools/javac/processing/JavacProcessingEnvironment.java line 1645:
>
>> 1643: for (RecordComponent rc : recordComponents) {
>> 1644: List<JCAnnotation> originalAnnos = rc.getOriginalAnnos();
>> 1645: originalAnnos.forEach(this::visitAnnotation);
>
> while not wrong, this is not covered in the description of the PR
Reverted
-------------
PR: https://git.openjdk.java.net/jdk/pull/5521
More information about the compiler-dev
mailing list