Fix ParameterizedTypeReference nullness

This commit ensures that `ParameterizedTypeReference<T>` can accept
nullable types. This is especially useful for Kotlin extension functions
and assertion contracts.

Fixes gh-36477
This commit is contained in:
Brian Clozel
2026-03-16 11:12:06 +01:00
parent 5eb0e99d58
commit bc07a451dc
2 changed files with 6 additions and 6 deletions
@@ -42,7 +42,7 @@ import org.springframework.util.Assert;
* @param <T> the referenced type
* @see <a href="https://gafter.blogspot.nl/2006/12/super-type-tokens.html">Neal Gafter on Super Type Tokens</a>
*/
public abstract class ParameterizedTypeReference<T> {
public abstract class ParameterizedTypeReference<T extends @Nullable Object> {
private final Type type;