Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8337745

How to fix 'Cannot invoke com.sun.tools.javac.code.Symbol$MethodSymbol.flags()'

XMLWordPrintable

    • generic
    • generic

      A DESCRIPTION OF THE PROBLEM :
      I'm working on a Java annotation processor and encountered a NullPointerException with the following error message:

      java.lang.NullPointerException: Cannot invoke "com.sun.tools.javac.code.Symbol$MethodSymbol.flags()" because "rc.accessor" is null
          at jdk.compiler/com.sun.tools.javac.comp.Lower.lambda$generateMandatedAccessors$5(Lower.java:2390)

      STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :


      EXPECTED VERSUS ACTUAL BEHAVIOR :
      EXPECTED -
      The code works as the Java Annotation Processor.
      ACTUAL -
      it returns:

      java.lang.NullPointerException: Cannot invoke "com.sun.tools.javac.code.Symbol$MethodSymbol.flags()" because "rc.accessor" is null
          at jdk.compiler/com.sun.tools.javac.comp.Lower.lambda$generateMandatedAccessors$5(Lower.java:2390)

      ---------- BEGIN SOURCE ----------

      ---------- END SOURCE ----------

      FREQUENCY : always


            asajeev Anjana Sajeev
            webbuggrp Webbug Group
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: