[prev in list] [next in list] [prev in thread] [next in thread] 

List:       openjdk-compiler-dev
Subject:    Re: RFR: JDK-8210649: AssertionError @ jdk.compiler/com.sun.tools.javac.comp.Modules.enter(Modules.j
From:       Vicente Romero <vicente.romero () oracle ! com>
Date:       2020-05-25 19:24:24
Message-ID: 64580526-75bd-0005-2ce8-f245d4dc07b6 () oracle ! com
[Download RAW message or body]

looks good,
Vicente

On 5/25/20 10:35 AM, Jan Lahoda wrote:
> Hi,
>
> When tools call Diagnostics.getMessage after the compilation has 
> already been stopped, the invocation may fail with an error, due to 
> javac being in a wrong state. When javac is running annotation 
> processors, after running the processors last time, it will clear all 
> the internal structures. If an error has been reported and the 
> compilation will stop, it will not re-initialize the structures again 
> (it would re-initialize the structure if no error would be reported, 
> and the compilation would continue).
>
> In general javac does not support doing queries after compilation 
> finished. But, regarding handling Diagnostics in such cases, we've 
> adjusted the code to allow queries to Diagnostics in the past.
>
> The proposal in this patch is to not clear the internal state if we 
> know the compilation will not continue, keeping the last state. So 
> printing the Diagnostics would still work.
>
> Webrev: http://cr.openjdk.java.net/~jlahoda/8210649/webrev.00/
> JBS: https://bugs.openjdk.java.net/browse/JDK-8210649
>
> How does this look?
>
> Thanks,
>     Jan

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic