Simplify String concatenation
Closes gh-23470
This commit is contained in:
committed by
Sam Brannen
parent
aef67ea6bd
commit
6ef75d76cd
@@ -109,14 +109,12 @@ public class FixedBackOff implements BackOff {
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
final StringBuilder sb = new StringBuilder("FixedBackOff{");
|
||||
sb.append("interval=").append(FixedBackOff.this.interval);
|
||||
String attemptValue = (FixedBackOff.this.maxAttempts == Long.MAX_VALUE ?
|
||||
"unlimited" : String.valueOf(FixedBackOff.this.maxAttempts));
|
||||
sb.append(", currentAttempts=").append(this.currentAttempts);
|
||||
sb.append(", maxAttempts=").append(attemptValue);
|
||||
sb.append('}');
|
||||
return sb.toString();
|
||||
return "FixedBackOff{interval=" + FixedBackOff.this.interval +
|
||||
", currentAttempts=" + this.currentAttempts +
|
||||
", maxAttempts=" + attemptValue +
|
||||
'}';
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user