From c546bc7f8c2452086d1b3825daa3a1331950b535 Mon Sep 17 00:00:00 2001 From: lharker Date: Fri, 20 Dec 2024 16:18:07 -0800 Subject: [PATCH] [Rollback] Add StringBuilder.repeat from Java 21 https://docs.oracle.com/en/java/javase/21/docs/api/java.base/java/lang/StringBuilder.html#repeat(int,int) PiperOrigin-RevId: 708454194 --- .../google/javascript/jscomp/LightweightMessageFormatter.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/com/google/javascript/jscomp/LightweightMessageFormatter.java b/src/com/google/javascript/jscomp/LightweightMessageFormatter.java index 6ae55482ef3..0d3ed426dad 100644 --- a/src/com/google/javascript/jscomp/LightweightMessageFormatter.java +++ b/src/com/google/javascript/jscomp/LightweightMessageFormatter.java @@ -339,7 +339,7 @@ public String formatLine(String line, int lineNumber) { // nice spaces for the line number int spaces = numberLength - Integer.toString(lineNumber).length(); - builder.repeat(" ", spaces); + builder.append(" ".repeat(spaces)); builder.append(lineNumber); builder.append("| ");