Use String.repeat instead of explicit cycle
See gh-31802
This commit is contained in:
committed by
Stéphane Nicoll
parent
1ff683b259
commit
63b2787da6
@@ -68,9 +68,7 @@ public class PatternParseException extends IllegalArgumentException {
|
||||
public String toDetailedString() {
|
||||
StringBuilder sb = new StringBuilder();
|
||||
sb.append(this.pattern).append('\n');
|
||||
for (int i = 0; i < this.position; i++) {
|
||||
sb.append(' ');
|
||||
}
|
||||
sb.append(" ".repeat(Math.max(0, this.position)));
|
||||
sb.append("^\n");
|
||||
sb.append(getMessage());
|
||||
return sb.toString();
|
||||
|
||||
Reference in New Issue
Block a user