File tree Expand file tree Collapse file tree 2 files changed +19
-3
lines changed 
main/java/org/springframework/core 
test/java/org/springframework/core Expand file tree Collapse file tree 2 files changed +19
-3
lines changed Original file line number Diff line number Diff line change 11/* 
2-  * Copyright 2002-2024  the original author or authors. 
2+  * Copyright 2002-2025  the original author or authors. 
33 * 
44 * Licensed under the Apache License, Version 2.0 (the "License"); 
55 * you may not use this file except in compliance with the License. 
@@ -177,7 +177,7 @@ else if (genericType instanceof ParameterizedType parameterizedType) {
177177								generics [i ] = resolvedTypeArgument ;
178178							}
179179							else  {
180- 								generics [i ] = ResolvableType .forType (typeArgument );
180+ 								generics [i ] = ResolvableType .forType (typeArgument ). resolveType () ;
181181							}
182182						}
183183						else  if  (typeArgument  instanceof  ParameterizedType ) {
Original file line number Diff line number Diff line change 11/* 
2-  * Copyright 2002-2024  the original author or authors. 
2+  * Copyright 2002-2025  the original author or authors. 
33 * 
44 * Licensed under the Apache License, Version 2.0 (the "License"); 
55 * you may not use this file except in compliance with the License. 
@@ -211,6 +211,14 @@ void resolveNestedTypeVariable() throws Exception {
211211		assertThat (ResolvableType .forType (resolved ).getGeneric (0 ).getGeneric (0 ).resolve ()).isEqualTo (String .class );
212212	}
213213
214+ 	@ Test 
215+ 	void  resolvedTypeWithBase () {
216+ 		Type  type  = method (WithBaseTypes .class , "get" ).getGenericReturnType ();
217+ 		Type  resolvedType  = resolveType (type , WithBaseTypes .class );
218+ 		ParameterizedTypeReference <List <A >> reference  = new  ParameterizedTypeReference <>() {};
219+ 		assertThat (resolvedType ).isEqualTo (reference .getType ());
220+ 	}
221+ 
214222	private  static  Method  method (Class <?> target , String  methodName , Class <?>... parameterTypes ) {
215223		Method  method  = findMethod (target , methodName , parameterTypes );
216224		assertThat (method ).describedAs (target .getName () + "#"  + methodName ).isNotNull ();
@@ -398,4 +406,12 @@ public interface ListOfListSupplier<T> {
398406	public  interface  StringListOfListSupplier  extends  ListOfListSupplier <String > {
399407	}
400408
409+ 	static  class  WithBaseTypes  {
410+ 
411+ 		<T  extends  A > List <T > get () {
412+ 			return  List .of ();
413+ 		}
414+ 
415+ 	}
416+ 
401417}
 
 
   
 
     
   
   
          
    
    
     
    
      
     
     
    You can’t perform that action at this time.
  
 
    
  
    
      
        
     
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments