RFR: JDK-8319123 : Implementation of JEP-461: Stream Gatherers (Preview)
Chen Liang
liach at openjdk.org
Wed Nov 8 15:41:28 UTC 2023
On Tue, 31 Oct 2023 13:18:43 GMT, Viktor Klang <vklang at openjdk.org> wrote:
>> This is a Draft PR for [JEP-461](https://openjdk.org/jeps/461)
>
> src/java.base/share/classes/java/util/stream/AbstractPipeline.java line 88:
>
>> 86: */
>> 87: @SuppressWarnings("rawtypes")
>> 88: protected final AbstractPipeline previousStage;
>
> Making this accessible in subclasses allows to avoid having to store this reference twice, and since this value is passed in during ctor it doesn't expose something previously hidden.
Since stream facilities are package-private, we can just use no access modifier and remove all new `protected` access modifier (on methods, fields, constructors) in this PR.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/16420#discussion_r1381730283
More information about the core-libs-dev
mailing list