Skip to content

Refine ResolvableType type variable resolution #33887

Description

@sdeleuze

While exploring using ResolvableType in Spring AI with @tzolov and Spring Cloud Function with @olegz, we figured out that the type variable algorithm is not working as expected in all use cases.

This gist illustrates various use cases where either:

  • Type resolution does not happen despite the information provided beeing enough to resolve them
  • GenericTypeResolver#resolveType(Type, Class<?>) is required for the getGeneric(0) use case, and most users miss GenericTypeResolver that is not easily discoverable.

The purpose of this issue is to refine the type resolver to cover the broken use cases, and to explore if that would make sense or not to provide GenericTypeResolver#resolveType(Type, Class<?>) capabilities as part of ResolvableType.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

in: coreIssues in core modules (aop, beans, core, context, expression)type: enhancementA general enhancement

Type

No type

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions