Polishing

This commit is contained in:
Juergen Hoeller
2018-02-25 00:48:00 +01:00
parent 57a9e8e6dd
commit 295df21f06
7 changed files with 30 additions and 37 deletions

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2002-2017 the original author or authors.
* Copyright 2002-2018 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.
@@ -355,7 +355,7 @@ public class ResolvableType implements Serializable {
if (this == NONE) {
return false;
}
return (((this.type instanceof Class && ((Class<?>) this.type).isArray())) ||
return ((this.type instanceof Class && ((Class<?>) this.type).isArray()) ||
this.type instanceof GenericArrayType || resolveType().isArray());
}
@@ -1427,8 +1427,9 @@ public class ResolvableType implements Serializable {
@Override
public ResolvableType resolveVariable(TypeVariable<?> variable) {
for (int i = 0; i < this.variables.length; i++) {
if (SerializableTypeWrapper.unwrap(this.variables[i]).equals(
SerializableTypeWrapper.unwrap(variable))) {
TypeVariable<?> v1 = SerializableTypeWrapper.unwrap(this.variables[i]);
TypeVariable<?> v2 = SerializableTypeWrapper.unwrap(variable);
if (ObjectUtils.nullSafeEquals(v1, v2)) {
return this.generics[i];
}
}