Skip to content

Commit

Permalink
Merge pull request #651 from mP1/feature/TreeLogger-synchronize-metho…
Browse files Browse the repository at this point in the history
…ds-to-try-fix-StringBuilder-append-IOOBE

TreeLogger synchronize methods to try fix StringBuilder.append(String…
  • Loading branch information
mP1 authored Jun 19, 2023
2 parents 13462e7 + b9db0e6 commit 77e6cb9
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions src/main/java/walkingkooka/j2cl/maven/log/TreeLogger.java
Original file line number Diff line number Diff line change
Expand Up @@ -387,7 +387,7 @@ public void fileWatchEvents(final List<WatchEvent<?>> events) {
this.flush();
}

public void log(final CharSequence line) {
public synchronized void log(final CharSequence line) {
this.info.print(line);
}

Expand All @@ -398,7 +398,7 @@ public void debugLine(final CharSequence line) {
);
}

public void indentedLine(final CharSequence line) {
public synchronized void indentedLine(final CharSequence line) {
this.indent();
{
this.line(line);
Expand All @@ -415,25 +415,25 @@ static void line0(final CharSequence line, final IndentingPrinter printer) {
printer.print(line);
}

public void emptyLine() {
public synchronized void emptyLine() {
this.info.lineStart();
this.info.print(this.info.lineEnding());
}

public void lineStart() {
public synchronized void lineStart() {
this.info.lineStart();
}

public void endOfList() {
this.line("*** END ***");
}

public void outdent() {
public synchronized void outdent() {
this.debug.outdent();
this.info.outdent();
}

public void flush() {
public synchronized void flush() {
this.debug.flush();
this.info.flush();
}
Expand All @@ -443,13 +443,13 @@ public void flush() {
private final IndentingPrinter info;


public void debug(final CharSequence line) {
public synchronized void debug(final CharSequence line) {
this.debugConsumer.accept(line);
}

private final Consumer<CharSequence> debugConsumer;

public void info(final CharSequence line) {
public synchronized void info(final CharSequence line) {
this.infoConsumer.accept(line);
}

Expand Down

0 comments on commit 77e6cb9

Please sign in to comment.