RFR JDK-8131915: CompletionFailure during import listing crashes javac

Jan Lahoda jan.lahoda at oracle.com
Fri Jul 31 11:36:20 UTC 2015

Thanks for the comments.

Based on additional offline feedback, I tried to use 
"BiConsumer<JCImport, CompletionFailure>" instead of 
"Consumer<CompletionFailure>" - the advantage is that the lambda does 
not need to capture the JCImport. The FilterImportScope however needs to 
keep the JCImport, instead of the current "staticImport" boolean flag.

A webrev with these changes is here:

This new state seems reasonable to me. What do you think?

(I've also fixed the bug # in the new iteration and added a summary to 
the CompletionFailureDuringImport test.)


On 30.7.2015 13:41, Maurizio Cimadamore wrote:
> Whoops - hit send too soon.
> The new tests need the new bug id in the header.
> Maurizio
> On 30/07/15 12:38, Maurizio Cimadamore wrote:
>> Looks great.
>> Maurizio
>> On 24/07/15 15:03, Jan Lahoda wrote:
>>> Hello,
>>> This is a fix for:
>>> https://bugs.openjdk.java.net/browse/JDK-8131915
>>> which Liam reported recently. The problem is that if a
>>> CompletionFailure happens while listing import content (e.g. due to a
>>> missing supertype), it is not handled properly and causes a javac crash.
>>> The proposed fix is to catch the CompletionFailure and handle it
>>> properly (log an error).
>>> A webrev with the fix is here:
>>> http://cr.openjdk.java.net/~jlahoda/8131915/webrev.00/
>>> Any feedback is welcome,
>>> Thanks!
>>>     Jan

More information about the compiler-dev mailing list