RFR: JDK-8319123 : Implementation of JEP-461: Stream Gatherers (Preview) [v2]
    Per Minborg 
    pminborg at openjdk.org
       
    Thu Nov  9 08:37:08 UTC 2023
    
    
  
On Wed, 8 Nov 2023 21:08:03 GMT, Viktor Klang <vklang at openjdk.org> wrote:
>> This Pull-Request implements [JEP-461](https://openjdk.org/jeps/461)
>
> Viktor Klang has updated the pull request incrementally with two additional commits since the last revision:
> 
>  - Addressing review feedback
>  - Make Gatherer.andThen take a wildcard for the rhs Gatherer state type
src/java.base/share/classes/java/util/stream/Gatherer.java line 535:
> 533:          */
> 534:         @ForceInline
> 535:         static <A, T, R> Integrator<A, T, R> of(Integrator<A, T, R> integrator) {
While this idiom is very convenient, there are some trap doors in combinations with method references and compatibility which is why we backed out of https://github.com/openjdk/jdk/pull/16213
It is good that the text mentions "lambda" but maybe we should explicitly mention that method references might introduce said problems?
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/16420#discussion_r1387651384
    
    
More information about the core-libs-dev
mailing list