Hoist constant result of SerializableTypeWrapper.unwrap() out of loop

This commit is contained in:
stsypanov 2019-12-08 23:39:38 +02:00 committed by Juergen Hoeller
parent 0f41536820
commit ebbb562cb9
1 changed files with 1 additions and 1 deletions

View File

@ -1496,9 +1496,9 @@ public class ResolvableType implements Serializable {
@Override
@Nullable
public ResolvableType resolveVariable(TypeVariable<?> variable) {
TypeVariable<?> v2 = SerializableTypeWrapper.unwrap(variable);
for (int i = 0; i < this.variables.length; i++) {
TypeVariable<?> v1 = SerializableTypeWrapper.unwrap(this.variables[i]);
TypeVariable<?> v2 = SerializableTypeWrapper.unwrap(variable);
if (ObjectUtils.nullSafeEquals(v1, v2)) {
return this.generics[i];
}