Closed as not planned
Closed as not planned
Description
Artem Bilan opened SPR-12525 and commented
See the external linked discussion.
The original issue is here: http://stackoverflow.com/questions/23863716/java-how-to-resolve-generic-type-of-lambda-parameter and its related SO question.
I can confirm that using that typetools
in the Spring Integration Java DSL I can avoid an extra type parameter.
From this:
.handle(Integer.class, (p, h) -> p * 2)
to this:
.<Integer>handle((p, h) -> p * 2)
This fix allow us to fix other Lambda issues, e.g. #15303
Reference URL: jhalterman/typetools#4
Issue Links:
- ResolvableType should support resolving lambda types [SPR-13698] #18273 ResolvableType should support resolving lambda types ("duplicates")
- Inferring an ApplicationListener's event type from a lambda or method reference [SPR-10675] #15303 Inferring an ApplicationListener's event type from a lambda or method reference
- @Aspect aspect not correctly applied to Java 8 lambda-defined @Beans [SPR-11807] #16427
@Aspect
aspect not correctly applied to Java 8 lambda-defined@Beans
- Wrong detection of event type on ApplicationListener<> when using lambdas (ClassCast Exception) [SPR-14109] #18681 Wrong detection of event type on ApplicationListener<> when using lambdas (ClassCast Exception)
0 votes, 8 watchers