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

inner classes are dumped as enclosing$inner

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Won't Fix
    • Icon: P4 P4
    • None
    • 1.4.2
    • tools
    • sparc
    • solaris_9

      When inner classes are dissembled with Javap, the new tool writes them in this format,

      <EnclosingClassName>$<InnerClassName>

      It should be

      <EnclosingClassName>.<InnerClassName> (the older javap was right ).

      For the example
      ================
      class a
      {
              class inner
              {
                      int lInt = 2;
                      char lChar = 'c';
                      boolean lBool = true;
                      short lShort = 2;
                      long lLong = 2l;
                      double lDouble = 2.0d;
                      float lFloat = 2.0f;
              }
      }


      when inner is dissembled,
      =========================
      jtools-sqe:/vijayan/testbase/src/other_tools/javap/primitives_7 1176 % javap -J-version
      java version "1.4.2-beta"
      Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2-beta-b11)
      Java HotSpot(TM) Client VM (build 1.4.2-beta-b11, mixed mode)
      jtools-sqe:/vijayan/testbase/src/other_tools/javap/primitives_7 1177 % javap a.inner
      Compiled from "a.java"
      class a$inner extends java.lang.Object{
          int lInt;
          char lChar;
          boolean lBool;
          short lShort;
          long lLong;
          double lDouble;
          float lFloat;
          a$inner(a);
      }

      class "a.inner" is dumped as "a$inner"

            jjg Jonathan Gibbons
            rvijayansunw Ra Vijayan (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: