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

Qualified new of static classes allowed in contradiction of the spec

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P4 P4
    • 1.4.0
    • 1.1.6, 1.2.0, 1.2.1, 1.2.2, 1.3.0
    • tools
    • merlin
    • generic, x86, sparc
    • generic, solaris_2.5.1, solaris_2.6, windows_95, windows_nt
    • Verified

      The compiler accepts the following:


      package p1;
      import p2.X;

      class D extends X {

       X.M m2 = new X().new M();

      }

      package p2;

      public class X {

        static public class M {
          public M(){}
        }

      }

      this contradicts the specification, which requires that the class being
      instantiated via a qualified class instance creation expression be an
      inner class.



      gilad.bracha@eng 1999-11-30

            busersunw Btplusnull User (Inactive)
            gbrachasunw Gilad Bracha (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: