Created
May 24, 2013 16:24
-
-
Save bonifaido/5644680 to your computer and use it in GitHub Desktop.
Fix for javac 9003176: Class reference duplicates in constant pool
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/src/share/classes/com/sun/tools/javac/jvm/Pool.java b/src/share/classes/com/sun/tools/javac/jvm/Pool.java | |
--- a/src/share/classes/com/sun/tools/javac/jvm/Pool.java | |
+++ b/src/share/classes/com/sun/tools/javac/jvm/Pool.java | |
@@ -28,6 +28,7 @@ | |
import java.util.*; | |
import com.sun.tools.javac.code.Symbol.*; | |
+import com.sun.tools.javac.code.Type.ClassType; | |
/** An internal structure that corresponds to the constant pool of a classfile. | |
* | |
@@ -100,6 +101,10 @@ | |
value = new Method((MethodSymbol)value); | |
else if (value instanceof VarSymbol) | |
value = new Variable((VarSymbol)value); | |
+ else if (value instanceof ClassType) { | |
+ ClassType ct = (ClassType) value; | |
+ value = ct.tsym; | |
+ } | |
// assert !(value instanceof Type.TypeVar); | |
Integer index = indices.get(value); | |
if (index == null) { |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment