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

javac - Class files of inner classes are given incorrect name

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Not an Issue
    • Icon: P3 P3
    • None
    • 1.4.2_02
    • tools
    • sparc
    • generic

      ###@###.### 2003-04-30-----------
      The following java code:

      class Test {
        public static void main(String[] args) {
          class Inner {
            void doSomething() {
              System.out.println("inner");
            }
          }
        }
      }

      when compiled on java previous to 1.4.2beta, creates the following class files:
      Test$1$Inner.class Test.class

      when compiled on java 1.4.2beta, creates the following class files:
      Test$1Inner.class Test.class

      The change of the inner class' name breaks packaging scripts which expect to find the file with the old name.

      java -fullversion
      java full version "1.4.2-beta-b19"
      ---------------------------------------------------------

            gafter Neal Gafter (Inactive)
            duke J. Duke
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: