RFR: JDK-8319123 : Implementation of JEP-461: Stream Gatherers (Preview)

Rémi Forax forax at openjdk.org
Wed Nov 8 17:08:03 UTC 2023


On Fri, 3 Nov 2023 16:51:34 GMT, Viktor Klang <vklang at openjdk.org> wrote:

>> 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?

It is an improvement, it reduces the visibility and `protected` is rarely used in modern code because inheriting from a class from a package you do not control means that the API of the subclass is not stable.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/16420#discussion_r1386943330


More information about the core-libs-dev mailing list