RFR: 8250217: com.sun.tools.javac.api.JavacTaskImpl swallows compiler exceptions potentially producing false positive test results

Jan Lahoda jlahoda at openjdk.java.net
Wed Sep 9 12:18:53 UTC 2020


On Tue, 8 Sep 2020 23:53:36 GMT, Vicente Romero <vromero at openjdk.org> wrote:

> 8250217: com.sun.tools.javac.api.JavacTaskImpl swallows compiler exceptions potentially producing false positive test
> results

To me, looks reasonable.

src/jdk.compiler/share/classes/com/sun/tools/javac/api/JavacTaskImpl.java line 110:

> 108:                 return result.fst;
> 109:             } else {
> 110:                 return (result.snd instanceof FatalError) ? Main.Result.SYSERR : Main.Result.ABNORMAL;

It would be nicer if we didn't have to use an instanceof here, although I see it is somewhat difficult, so does not
seem necessary.

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

Marked as reviewed by jlahoda (Reviewer).

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


More information about the compiler-dev mailing list