On Tue, 17 Jan 2023 10:18:42 GMT, Claes Redestad <redes...@openjdk.org> wrote:

>> Using lambdas inside MethodHandles is quite dangerous given that lambdas are 
>> initialized using method handles. It may work now because 
>> longuestParameterList() is not called when initializing a lambda but it may 
>> make any changes in the implementation of lambdas painfull in the future.
>
> Precious little method handle use in lambda bootstrap since JDK 11. Though I 
> agree with the sentiment - having fixed a number of bootstrap issues in the 
> past - `MethodHandles` is a small step up the abstraction ladder and the code 
> in particular already uses a number of method refs and lambdas.

ok, two small changes,
-  formatting: usually the method call in a stream are aligned with the '.' at 
the beginning
    ```
     stream
       .filter(...)
      .map(...)
   ```
   instead of at the end.

- the reduce is a max(),
  `max(Comparator.comparingInt(List::size))`

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

PR: https://git.openjdk.org/jdk/pull/12025

Reply via email to