Skip to content

Commit fae75cb

Browse files
committed
Polish contribution
See gh-23237
1 parent 6dcf390 commit fae75cb

File tree

4 files changed

+16
-13
lines changed

4 files changed

+16
-13
lines changed

spring-beans/src/main/java/org/springframework/beans/PropertyBatchUpdateException.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2002-2018 the original author or authors.
2+
* Copyright 2002-2019 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -86,11 +86,11 @@ public PropertyAccessException getPropertyAccessException(String propertyName) {
8686

8787
@Override
8888
public String getMessage() {
89-
StringJoiner sb = new StringJoiner("; ", "Failed properties: ", "");
89+
StringJoiner stringJoiner = new StringJoiner("; ", "Failed properties: ", "");
9090
for (PropertyAccessException exception : this.propertyAccessExceptions) {
91-
sb.add(exception.getMessage());
91+
stringJoiner.add(exception.getMessage());
9292
}
93-
return sb.toString();
93+
return stringJoiner.toString();
9494
}
9595

9696
@Override

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1521,11 +1521,11 @@ public SyntheticParameterizedType(Type rawType, Type[] typeArguments) {
15211521
public String getTypeName() {
15221522
String typeName = this.rawType.getTypeName();
15231523
if (this.typeArguments.length > 0) {
1524-
StringJoiner result = new StringJoiner(", ", "<", ">");
1524+
StringJoiner stringJoiner = new StringJoiner(", ", "<", ">");
15251525
for (Type argument : this.typeArguments) {
1526-
result.add(argument.getTypeName());
1526+
stringJoiner.add(argument.getTypeName());
15271527
}
1528-
return typeName + result.toString();
1528+
return typeName + stringJoiner;
15291529
}
15301530
return typeName;
15311531
}

spring-core/src/main/java/org/springframework/util/ClassUtils.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -657,11 +657,11 @@ public static String classNamesToString(@Nullable Collection<Class<?>> classes)
657657
if (CollectionUtils.isEmpty(classes)) {
658658
return "[]";
659659
}
660-
StringJoiner sj = new StringJoiner(", ", "[", "]");
660+
StringJoiner stringJoiner = new StringJoiner(", ", "[", "]");
661661
for (Class<?> clazz : classes) {
662-
sj.add(clazz.getName());
662+
stringJoiner.add(clazz.getName());
663663
}
664-
return sj.toString();
664+
return stringJoiner.toString();
665665
}
666666

667667
/**

spring-web/src/main/java/org/springframework/web/util/pattern/PathPattern.java

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -421,6 +421,7 @@ else if (!StringUtils.hasLength(pattern2string.patternString)) {
421421
return this.parser.parse(file2 + (firstExtensionWild ? secondExtension : firstExtension));
422422
}
423423

424+
@Override
424425
public boolean equals(@Nullable Object other) {
425426
if (!(other instanceof PathPattern)) {
426427
return false;
@@ -431,10 +432,12 @@ public boolean equals(@Nullable Object other) {
431432
this.caseSensitive == otherPattern.caseSensitive);
432433
}
433434

435+
@Override
434436
public int hashCode() {
435437
return (this.patternString.hashCode() + this.separator) * 17 + (this.caseSensitive ? 1 : 0);
436438
}
437439

440+
@Override
438441
public String toString() {
439442
return this.patternString;
440443
}
@@ -466,13 +469,13 @@ int getCapturedVariableCount() {
466469
}
467470

468471
String toChainString() {
469-
StringJoiner buf = new StringJoiner(" ");
472+
StringJoiner stringJoiner = new StringJoiner(" ");
470473
PathElement pe = this.head;
471474
while (pe != null) {
472-
buf.add(pe.toString());
475+
stringJoiner.add(pe.toString());
473476
pe = pe.next;
474477
}
475-
return buf.toString();
478+
return stringJoiner.toString();
476479
}
477480

478481
/**

0 commit comments

Comments
 (0)