Skip to content

Commit e18968c

Browse files
committed
Fix: Checkstyle
Signed-off-by: anaconda875 <hflbtmax@gmail.com>
1 parent 6b053af commit e18968c

1 file changed

Lines changed: 15 additions & 13 deletions

File tree

spring-core/src/main/java/org/springframework/core/ResolvableType.java

Lines changed: 15 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -688,7 +688,7 @@ private boolean isWildcardWithoutBounds() {
688688

689689
/**
690690
* Determine whether the underlying type represents a wildcard
691-
* has unresolvable upper bound or lower bound
691+
* has unresolvable upper bound or lower bound.
692692
*/
693693
private boolean isUnresolvableWildcard(Set<Type> alreadySeen) {
694694
if (this.type instanceof WildcardType wildcardType) {
@@ -1221,10 +1221,10 @@ public static ResolvableType forWildCardTypeWithUpperBound(WildcardType wildcard
12211221
() -> "The WildcardType has lower bound while upper bound provided " + wildcardType);
12221222

12231223
Type upperBoundType = upperBound.getType();
1224-
VariableResolver variableResolver = upperBoundType instanceof TypeVariable<?> typeVariable
1225-
? new TypeVariablesVariableResolver(
1226-
new TypeVariable<?>[]{typeVariable}, new ResolvableType[]{upperBound})
1227-
: null;
1224+
VariableResolver variableResolver = upperBoundType instanceof TypeVariable<?> typeVariable ?
1225+
new TypeVariablesVariableResolver(
1226+
new TypeVariable<?>[]{typeVariable}, new ResolvableType[]{upperBound}) :
1227+
null;
12281228

12291229
return forType(new WildcardTypeImpl(new Type[]{upperBoundType}, EMPTY_TYPE_ARRAY), variableResolver);
12301230
}
@@ -1244,10 +1244,10 @@ public static ResolvableType forWildCardTypeWithLowerBound(WildcardType wildcard
12441244
.formatted(originalUpperBound[0], wildcardType));
12451245

12461246
Type lowerBoundType = lowerBound.getType();
1247-
VariableResolver variableResolver = lowerBoundType instanceof TypeVariable<?> typeVariable
1248-
? new TypeVariablesVariableResolver(
1249-
new TypeVariable<?>[]{typeVariable}, new ResolvableType[]{lowerBound})
1250-
: null;
1247+
VariableResolver variableResolver = lowerBoundType instanceof TypeVariable<?> typeVariable ?
1248+
new TypeVariablesVariableResolver(
1249+
new TypeVariable<?>[]{typeVariable}, new ResolvableType[]{lowerBound}) :
1250+
null;
12511251

12521252
return forType(new WildcardTypeImpl(new Type[]{Object.class}, new Type[]{lowerBoundType}), variableResolver);
12531253
}
@@ -1695,9 +1695,10 @@ public Object getSource() {
16951695
}
16961696

16971697

1698-
private static final class WildcardTypeImpl implements WildcardType, Serializable {
1698+
private static final class WildcardTypeImpl implements WildcardType, Serializable {
16991699

17001700
private final Type[] upperBound;
1701+
17011702
private final Type[] lowerBound;
17021703

17031704
private WildcardTypeImpl(Type[] upperBound, Type[] lowerBound) {
@@ -1707,20 +1708,21 @@ private WildcardTypeImpl(Type[] upperBound, Type[] lowerBound) {
17071708

17081709
@Override
17091710
public Type[] getUpperBounds() {
1710-
return upperBound.clone();
1711+
return this.upperBound.clone();
17111712
}
17121713

17131714
@Override
17141715
public Type[] getLowerBounds() {
1715-
return lowerBound.clone();
1716+
return this.lowerBound.clone();
17161717
}
17171718

17181719
@Override
17191720
public boolean equals(Object o) {
17201721
if (!(o instanceof WildcardType that)) {
17211722
return false;
17221723
}
1723-
return Arrays.equals(upperBound, that.getUpperBounds()) && Arrays.equals(lowerBound, that.getLowerBounds());
1724+
return Arrays.equals(this.upperBound, that.getUpperBounds()) &&
1725+
Arrays.equals(this.lowerBound, that.getLowerBounds());
17241726
}
17251727

17261728
@Override

0 commit comments

Comments
 (0)