RFR: JDK-8177068: incomplete classpath causes NPE in Flow

Jan Lahoda jan.lahoda at oracle.com
Wed Aug 28 14:12:35 UTC 2019


If a class cannot be load during speculative attribution due to a 
CompletionFailure, the CompletionFailure may not be happening again 
during the ordinary attribution, which may lead to errors not being 
reported (as the error is a consequence of the CompletionFailure). 
Producing the error only on CompletionFailures helps with error recovery 
by not producing unnecessary errors. A similar problem with completion 
in user code was solved by restoring the ClassSymbol for which the 
completion failed to the original state when the user code finishes. 
Something similar could be done for speculative attribution, undoing 
the completion for ClassSymbols which fail to complete during 
speculative attribution, so that their completion will fail again during 
ordinary attribution and the error is reported properly.

Proposed webrev: http://cr.openjdk.java.net/~jlahoda/8177068/webrev.00
JBS: https://bugs.openjdk.java.net/browse/JDK-8177068

How does this look?


More information about the compiler-dev mailing list