RFR (14): JDK-8233655: NPE at jdk.compiler/com.sun.tools.javac.comp.Flow$FlowAnalyzer.visitApply
Maurizio Cimadamore
maurizio.cimadamore at oracle.com
Tue Jan 14 16:06:17 UTC 2020
Looks good
Maurizio
On 14/01/2020 13:48, Jan Lahoda wrote:
> Hi,
>
> Under bug JDK-8177068, the speculative attribution was improved to
> better handle missing classes. Before that, errors reported outside of
> the speculative tree were propagated outside of the speculative
> attribution. This was removed, as it seemed unnecessary due to the new
> handling of missing classes. But it turns out it is still needed, as
> shown in this bug. A simple testcase is:
> ---
> public class JDK8233655 {
> public void t() {
> Class<?> c= test(test(JDK8233655Helper.class));
> }
> private <T> T test(Class<?> c) {
> return null;
> }
> }
> ---
> public class JDK8233655Helper extends Unknown {}
> ---
>
> $ javac JDK8233655.java
> ... the exception from Flow ...
>
> The proposed fix is to restore the error handling similarly to what
> existed before JDK-8177068.
>
> Webrev: http://cr.openjdk.java.net/~jlahoda/8233655/webrev.00/
> JBS: https://bugs.openjdk.java.net/browse/JDK-8233655
>
> How does this look?
>
> Thanks,
> Jan
More information about the compiler-dev
mailing list