On Fri, 3 Nov 2023 14:04:23 GMT, Chen Liang <li...@openjdk.org> wrote:
>> 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. @liach We could do that, yet I'm not sure that is strictly an improvement. What would be the benefit in doing so specifically for this PR? ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/16420#discussion_r1381975631