Skip to content

GenericTypeResolver does not resolve the correct parameter type when bound type is also ParameterizedType [SPR-10819] #15445

@spring-projects-issues

Description

@spring-projects-issues

Teddy Zhu opened SPR-10819 and commented

Follow is test code snap.

import org.springframework.core.GenericTypeResolver;

public class TestGeneric {

public static void main(String[] args) {
	Class[] types = GenericTypeResolver.resolveTypeArguments(Test.class, ITest.class);
	for (Class klass : types) {
		
		System.out.println(klass);//Issue: suppose should print B at least, but it print Object
	}
}

}

class A{}

class B<T>{}

class ITest<T>{}

class Test<I extends A, T extends B<I>> extends ITest<T>{

}


Affects: 3.1.3

Metadata

Metadata

Assignees

Labels

in: coreIssues in core modules (aop, beans, core, context, expression)type: bugA general bug

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions