[GR-59103] Fix indentation in option help text spanning multiple lines in util.args

PullRequest: graal/19209
This commit is contained in:
Carlo Refice 2024-11-06 04:10:04 +00:00 committed by Tom Rodriguez
commit 4356cb0575
1 changed files with 6 additions and 2 deletions

View File

@ -163,11 +163,15 @@ public abstract class OptionValue<T> {
static final String INDENT = " ";
static void printIndented(PrintWriter writer, String string, int indentLevel) {
private static void printIndentedLine(PrintWriter writer, String line, int indentLevel) {
for (int i = 0; i <= indentLevel; ++i) {
writer.append(INDENT);
}
writer.println(string);
writer.println(line);
}
static void printIndented(PrintWriter writer, String string, int indentLevel) {
string.lines().forEach(line -> printIndentedLine(writer, line, indentLevel));
}
public void printHelp(PrintWriter writer, int indentLevel) {