On Tue, 31 Oct 2023 13:18:43 GMT, Viktor Klang <vkl...@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

Reply via email to