RFR: 8255729: com.sun.tools.javac.processing.JavacFiler.FilerOutputStream is inefficient

Guoxiong Li github.com+13688759+lgxbslgx at openjdk.java.net
Sun Dec 20 17:39:02 UTC 2020


Hi all,

`FilerOutputStream` extends `FilterOutputStream` without overwriting the method `write(byte b[], int off, int len)` which would suffer from the performance problem.
This patch fixes it and adds some `@Override` to polish the code. But I can't find a good way to write a corresponding test case. Maybe it doesn't need a test case. And all existing tests in `test/langtools/tools/javac` passed locally.

Thank you for taking the time to review.

Best Regards.

-------------

Commit messages:
 - Modify copyright.
 - 8255729: com.sun.tools.javac.processing.JavacFiler.FilerOutputStream is inefficient

Changes: https://git.openjdk.java.net/jdk/pull/1854/files
 Webrev: https://webrevs.openjdk.java.net/?repo=jdk&pr=1854&range=00
  Issue: https://bugs.openjdk.java.net/browse/JDK-8255729
  Stats: 10 lines in 1 file changed: 9 ins; 0 del; 1 mod
  Patch: https://git.openjdk.java.net/jdk/pull/1854.diff
  Fetch: git fetch https://git.openjdk.java.net/jdk pull/1854/head:pull/1854

PR: https://git.openjdk.java.net/jdk/pull/1854


More information about the compiler-dev mailing list