Skip to content

Commit

Permalink
Hoist constant result of SerializableTypeWrapper.unwrap() out of loop
Browse files Browse the repository at this point in the history
  • Loading branch information
stsypanov authored and jhoeller committed Dec 9, 2019
1 parent 0f41536 commit ebbb562
Showing 1 changed file with 1 addition and 1 deletion.
Expand Up @@ -1496,9 +1496,9 @@ public TypeVariablesVariableResolver(TypeVariable<?>[] variables, ResolvableType
@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];
}
Expand Down

0 comments on commit ebbb562

Please sign in to comment.