Skip to content

ResolvableType should support resolving lambda types [SPR-13698] #18273

Closed
@spring-projects-issues

Description

@spring-projects-issues

Oliver Drotbohm opened SPR-13698 and commented

This test case currently fails:

Function<Long, String> toString = value -> value.toString();

ResolvableType type = ResolvableType.forClass(Function.class, toString.getClass());

assertThat(type.getGeneric(0).getRawClass(), is(typeCompatibleWith(Long.class)));
assertThat(type.getGeneric(1).getRawClass(), is(typeCompatibleWith(String.class)));

This helper library (itself inspired by Spring's GenericTypeResolver) seems to use an additional code path to use API introduced in Java 8 to resolve lambdas in a special way.


Issue Links:

Metadata

Metadata

Assignees

No one assigned

    Labels

    in: coreIssues in core modules (aop, beans, core, context, expression)status: bulk-closedAn outdated, unresolved issue that's closed in bulk as part of a cleaning process

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions