NPE in FlowAnalyzer.visitApply (" because "tree.meth.type" is null)

Srikanth Adayapalam srikanth.adayapalam at
Fri Jun 11 10:59:54 UTC 2021

Thanks for the report, this seems to be a duplicate of

I will add a note to that ticket so this test case could be included in the verification process.

From: compiler-dev <compiler-dev-retn at> on behalf of Dawid Weiss <dawid.weiss at>
Sent: 11 June 2021 15:06
To: compiler-dev <compiler-dev at>
Cc: Uwe Schindler (SD DataSolutions GmbH) <uwe at>
Subject: NPE in FlowAnalyzer.visitApply (" because "tree.meth.type" is null)

I get this simple snippet to fail the compiler on JDK 14 all the way
up to 16.0.1/ 2021-04-20:


import java.lang.annotation.Retention;
import java.util.LinkedHashSet;

public class Repro {
  public static void main(String[] args) {
    LinkedHashSet<String> fieldSet =
        Guice.createInjector().getInstance(Key.get(new TypeLiteral<>()
{}, Retention.class));

Couldn't isolate it without using Guice JAR - it's probably trivial,
sorry. The full repro is at [1] and you can run it with:

javac -cp guice-5.0.1.jar

I see some NPE related issues marked as fixed in jira but this seems
to be unrelated (as it still causes the crash).

Hope this helps.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the compiler-dev mailing list