changeset 3293:34140d95412b

Enhancement: TypeVariableMap should emit structural entries for bounds if -XDgenericClassFile is enabled
author mcimadamore
date Mon, 25 Jan 2016 18:36:44 +0000
parents 9e83e2551f52
children d1015b6cf7f4
files src/jdk.compiler/share/classes/com/sun/tools/javac/jvm/ClassWriter.java
diffstat 1 files changed, 5 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/src/jdk.compiler/share/classes/com/sun/tools/javac/jvm/ClassWriter.java	Mon Jan 25 18:28:25 2016 +0000
+++ b/src/jdk.compiler/share/classes/com/sun/tools/javac/jvm/ClassWriter.java	Mon Jan 25 18:36:44 2016 +0000
@@ -967,7 +967,11 @@
             for (Type t : vars) {
                 databuf.appendByte((byte)t.tsym.flags() & 0xFF);
                 databuf.appendChar((short)poolwriter.putConstant(t.tsym.name));
-                databuf.appendChar((short)poolwriter.putConstant(typeSig(types.getBounds((TypeVar)t).head)));
+                if (genericClassFile) {
+                    databuf.appendChar((short)poolwriter.putType(types.getBounds((TypeVar)t).head));
+                } else {
+                    databuf.appendChar((short)poolwriter.putConstant(typeSig(types.getBounds((TypeVar)t).head)));
+                }
             }
         }
         endAttr(alenIdx);