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

Vicente Romero vicente.romero at oracle.com
Fri Aug 24 19:52:27 UTC 2018


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