Skip to content

GenericTypeResolver should be able to introspect generic arguments from lambdas [SPR-12525] #17130

Closed as not planned
@spring-projects-issues

Description

@spring-projects-issues

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:

0 votes, 8 watchers

Metadata

Metadata

Assignees

No one assigned

    Labels

    in: coreIssues in core modules (aop, beans, core, context, expression)status: declinedA suggestion or change that we don't feel we should currently applytype: enhancementA general enhancement

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions