Skip to content

Commit

Permalink
Remove workaround for GWT PrintStream.flush throwing IOException
Browse files Browse the repository at this point in the history
PiperOrigin-RevId: 707170606
  • Loading branch information
lauraharker committed Dec 20, 2024
1 parent 519a959 commit a7ab5a0
Showing 1 changed file with 1 addition and 10 deletions.
11 changes: 1 addition & 10 deletions src/com/google/javascript/jscomp/PerformanceTracker.java
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,6 @@
import com.google.javascript.jscomp.base.format.SimpleFormat;
import com.google.javascript.rhino.Node;
import com.google.javascript.rhino.Token;
import java.io.FilterOutputStream;
import java.io.IOException;
import java.io.PrintStream;
import java.util.ArrayDeque;
import java.util.ArrayList;
Expand Down Expand Up @@ -458,16 +456,9 @@ public void outputTracerReport(PrintStream output) {
}

output.println();

// this.output can be System.out, so don't close it to not lose subsequent
// error messages. Flush to ensure that you will see the tracer report.
try {
// TODO(johnlenz): Remove this cast and try/catch.
// This is here to workaround GWT http://b/30943295
((FilterOutputStream) output).flush();
} catch (IOException e) {
throw new RuntimeException("Unreachable.", e);
}
output.flush();
}

/**
Expand Down

0 comments on commit a7ab5a0

Please sign in to comment.