JDK-6746955 : unused duplicate entries in constant pool
  • Type: Bug
  • Component: tools
  • Sub-Component: javac
  • Affected Version: 7
  • Priority: P3
  • Status: Closed
  • Resolution: Duplicate
  • OS: generic
  • CPU: generic
  • Submitted: 2008-09-10
  • Updated: 2024-04-02
  • Resolved: 2011-02-12
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 8
8Resolved
Related Reports
Duplicate :  
Relates :  
Description
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 ]

Comments
EVALUATION I thought the pack200 cycle removed duplication constant pool entries this must be investigated further.
10-06-2010