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

AttrContext's toString() method throws a NullPointerException when scope is null

XMLWordPrintable

    • generic
    • generic

      A DESCRIPTION OF THE PROBLEM :
      AttrContext's toString() method throws a NullPointerException when scope is null. Cannot invoke "Object.toString()" because "this.scope" is null

      STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
      1. Waiting for classes to be compiled: public class test{ }
      2. compiler parameter:String [] args ={"-d","F:/compile/test/out","F:/compile/test/Test.java","--release","17"} ;
      start calling: javac.main(String[] args)

      EXPECTED VERSUS ACTUAL BEHAVIOR :
      EXPECTED -
      No exception thrown
      ACTUAL -
      java.lang.NullPointerException: Cannot invoke "Object.toString()" because "this.scope" is null
      at jdk.compiler/com.sun.tools.javac.comp.AttrContext.toString(AttrContext.java:186)

      ---------- BEGIN SOURCE ----------
      Waiting for classes to be compiled: public class test{ }
      ---------- END SOURCE ----------

      FREQUENCY : always


            Unassigned Unassigned
            webbuggrp Webbug Group
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: