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

unused duplicate entries in constant pool

XMLWordPrintable

    • generic
    • generic

      In the following output, constant pool entry #34 is both unused and a duplicate (of #2). This is not uncommon, at least in the javadoc classes in the same package. This should be fixed.

      $ /opt/jdk/1.7.0/bin/javap -v build/classes/com/sun/tools/javadoc/SourcePositionImpl.class | grep java/io/File
      const #2 = class #47; // java/io/File
      const #3 = Method #2.#48; // java/io/File."<init>":(Ljava/lang/String;)V
      const #30 = Asciz ()Ljava/io/File;;
      const #34 = class #47; // java/io/File
      const #47 = Asciz java/io/File;
         11: new #2; //class java/io/File
         19: invokespecial #3; //Method java/io/File."<init>":(Ljava/lang/String;)V
           stack = [ class java/io/File ]

            ksrini Kumar Srinivasan
            jjg Jonathan Gibbons
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: