RFR JDK-8209173: javac fails with completion exception while reporting an error

Maurizio Cimadamore maurizio.cimadamore at oracle.com
Fri Aug 24 20:31:21 UTC 2018

the fix looks good. If I understand correctly, the issue was that, since 
the diagnostic generation ended up with an exception, the diagnostic 
never really arrived at the speculative attribution handler, which meant 
it was not reported. Correct?


On 24/08/18 20:52, Vicente Romero wrote:
> Hi,
> Please review patch for [1] at [2]. The original issue was reported 
> for a combination of a Scala class and a client class written in Java. 
> When the Java class was compiled with javac, it couldn't find in the 
> class path a class imported by the Scala class, the missing class 
> belongs to the Scala standard library. The root issue was that the 
> symbol corresponding to the missing Scala class could not be completed 
> and a completion exception was thrown. The exception was fired while 
> javac was producing the corresponding diagnostic error message. Later 
> on the compiler was swallowing the exception, but the AST ended up 
> having null fields. This provoked a NPE during a later compilation 
> phase. The provided test reproduces the issue using Java classes only.
> Thanks
> [1] https://bugs.openjdk.java.net/browse/JDK-8209173
> [2] http://cr.openjdk.java.net/~vromero/8209173/webrev.00/

More information about the compiler-dev mailing list