Closed
Description
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:
- GenericTypeResolver should be able to introspect generic arguments from lambdas [SPR-12525] #17130 GenericTypeResolver should be able to introspect generic arguments from lambdas ("is duplicated by")
- Add a functional way to register a bean [SPR-14832] #19398 Add a functional way to register a bean