Polish contribution

See gh-23237
This commit is contained in:
Sam Brannen
2019-07-07 16:24:30 +02:00
parent 6dcf390fa2
commit fae75cb238
4 changed files with 16 additions and 13 deletions

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2002-2018 the original author or authors.
* Copyright 2002-2019 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.
@@ -86,11 +86,11 @@ public class PropertyBatchUpdateException extends BeansException {
@Override
public String getMessage() {
StringJoiner sb = new StringJoiner("; ", "Failed properties: ", "");
StringJoiner stringJoiner = new StringJoiner("; ", "Failed properties: ", "");
for (PropertyAccessException exception : this.propertyAccessExceptions) {
sb.add(exception.getMessage());
stringJoiner.add(exception.getMessage());
}
return sb.toString();
return stringJoiner.toString();
}
@Override

View File

@@ -1521,11 +1521,11 @@ public class ResolvableType implements Serializable {
public String getTypeName() {
String typeName = this.rawType.getTypeName();
if (this.typeArguments.length > 0) {
StringJoiner result = new StringJoiner(", ", "<", ">");
StringJoiner stringJoiner = new StringJoiner(", ", "<", ">");
for (Type argument : this.typeArguments) {
result.add(argument.getTypeName());
stringJoiner.add(argument.getTypeName());
}
return typeName + result.toString();
return typeName + stringJoiner;
}
return typeName;
}

View File

@@ -657,11 +657,11 @@ public abstract class ClassUtils {
if (CollectionUtils.isEmpty(classes)) {
return "[]";
}
StringJoiner sj = new StringJoiner(", ", "[", "]");
StringJoiner stringJoiner = new StringJoiner(", ", "[", "]");
for (Class<?> clazz : classes) {
sj.add(clazz.getName());
stringJoiner.add(clazz.getName());
}
return sj.toString();
return stringJoiner.toString();
}
/**

View File

@@ -421,6 +421,7 @@ public class PathPattern implements Comparable<PathPattern> {
return this.parser.parse(file2 + (firstExtensionWild ? secondExtension : firstExtension));
}
@Override
public boolean equals(@Nullable Object other) {
if (!(other instanceof PathPattern)) {
return false;
@@ -431,10 +432,12 @@ public class PathPattern implements Comparable<PathPattern> {
this.caseSensitive == otherPattern.caseSensitive);
}
@Override
public int hashCode() {
return (this.patternString.hashCode() + this.separator) * 17 + (this.caseSensitive ? 1 : 0);
}
@Override
public String toString() {
return this.patternString;
}
@@ -466,13 +469,13 @@ public class PathPattern implements Comparable<PathPattern> {
}
String toChainString() {
StringJoiner buf = new StringJoiner(" ");
StringJoiner stringJoiner = new StringJoiner(" ");
PathElement pe = this.head;
while (pe != null) {
buf.add(pe.toString());
stringJoiner.add(pe.toString());
pe = pe.next;
}
return buf.toString();
return stringJoiner.toString();
}
/**