From d4e8daaedeb16a044bbb0e3680d7c47f9275a67b Mon Sep 17 00:00:00 2001 From: Juergen Hoeller Date: Thu, 15 Feb 2024 16:50:53 +0100 Subject: [PATCH] Add javadoc note on recursive resolution as of 6.2 See gh-30079 --- .../java/org/springframework/core/GenericTypeResolver.java | 3 ++- .../org/springframework/core/GenericTypeResolverTests.java | 2 -- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/spring-core/src/main/java/org/springframework/core/GenericTypeResolver.java b/spring-core/src/main/java/org/springframework/core/GenericTypeResolver.java index 4e4e1225ab6a..055b41dc0104 100644 --- a/spring-core/src/main/java/org/springframework/core/GenericTypeResolver.java +++ b/spring-core/src/main/java/org/springframework/core/GenericTypeResolver.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2023 the original author or authors. + * Copyright 2002-2024 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -147,6 +147,7 @@ public static Class[] resolveTypeArguments(Class clazz, Class genericTy /** * Resolve the given generic type against the given context class, * substituting type variables as far as possible. + *

As of 6.2, this method resolves type variables recursively. * @param genericType the (potentially) generic type * @param contextClass a context class for the target type, for example a class * in which the target type appears in a method signature (can be {@code null}) diff --git a/spring-core/src/test/java/org/springframework/core/GenericTypeResolverTests.java b/spring-core/src/test/java/org/springframework/core/GenericTypeResolverTests.java index 7d519cf3058f..6338bedea81b 100644 --- a/spring-core/src/test/java/org/springframework/core/GenericTypeResolverTests.java +++ b/spring-core/src/test/java/org/springframework/core/GenericTypeResolverTests.java @@ -393,11 +393,9 @@ public void nestedGenerics(List> input) { public interface ListOfListSupplier { List> get(); - } public interface StringListOfListSupplier extends ListOfListSupplier { - } }