Please See the following code snippet of method org.springframework.core.ResolvableType#forType(Type, TypeProvider, VariableResolver)

ResolvableType resultType = new ResolvableType(type, typeProvider, variableResolver);
ResolvableType cachedType = cache.get(resultType);
if (cachedType == null) {
    cachedType = new ResolvableType(type, typeProvider, variableResolver, resultType.hash);
    cache.put(cachedType, cachedType);
}

Currently, this variable of cachedType is always null, because the property componentType of resultType is always null, which causes the equals() method to always return false and cache.get() always returns null.

The purpose of PR is to fix this problem.

Comment From: chenqimiao

@sbrannen I wrote a unit test and found that I understood it wrong. Sorry!

Comment From: sbrannen

@sbrannen I wrote a unit test and found that I understood it wrong. Sorry!

No problem.

Thanks for the feedback.