Fixing JDK-8130493

Schaef, Martin schaef at
Tue Jan 9 17:52:53 UTC 2018


We have some users suffering from JDK-8130493<> (their builds succeed, but the compiler actually failed). I did some digging and the following sequence happens:

A ClassNotFoundException is thrown in<> and re-thrown as an Abort.

This Abort reaches JavaCompiler.processAnnotations()<> and is finally caught in JavaCompiler.compile()<> by the following snippet:
        try {
            // These method calls must be chained to avoid memory leaks
            delegateCompiler =
                processAnnotations( //<<<<<< ABORT COMES OUT HERE
                    enterTrees(stopIfError(CompileState.PARSE, parseFiles(sourceFileObjects))),
        } catch (Abort ex) {
            if (devVerbose)
        } finally {
and swallowed ... but it's printed if XDev is set.
What is a proper way to fix this? Is it correct to wrap all exceptions in JavaProcessingEnvironmentServiceIterator into aborts? Or would it be better to distinguish different Aborts in

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the compiler-dev mailing list