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

Viktor Klang vklang at openjdk.org
Wed Nov 8 15:41:33 UTC 2023


On Wed, 1 Nov 2023 17:22:09 GMT, Viktor Klang <vklang at openjdk.org> wrote:

>> Since you validate that previous^2.next == previous, you might just omit the `previousStage` parameter and derive it in the body.
>
>>Since you validate that previous^2.next == previous, you might just omit the previousStage parameter and derive it in the body.
> 
> @briangoetz It was a bit of additional safety to make sure that the caller gets what they want. If the prev-prev was omitted here then this ctor would have the same signature as the other ctor.
> (Note that this is internal API.)

>The constraint of "not linked or consumed" should be stated in the spec here, and probably documented with an @throws tag.

I can definitely do that. I'll amend the original ctor as well then since it also does not have that.

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

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


More information about the core-libs-dev mailing list