6888367: classfile library parses signature attributes incorrectly

Reviewed-by: ksrini
This commit is contained in:
Jonathan Gibbons 2009-10-16 12:56:50 -07:00
parent 32b3e2c86a
commit e634c0ee8e
5 changed files with 701 additions and 105 deletions

View file

@ -179,10 +179,10 @@ public class ClassWriter extends BasicWriter {
// The signature parser cannot disambiguate between a
// FieldType and a ClassSignatureType that only contains a superclass type.
if (t instanceof Type.ClassSigType)
print(t);
print(getJavaName(t.toString()));
else {
print(" extends ");
print(t);
print(getJavaName(t.toString()));
}
} catch (ConstantPoolException e) {
print(report(e));
@ -310,7 +310,7 @@ public class ClassWriter extends BasicWriter {
writeModifiers(flags.getMethodModifiers());
if (methodType != null) {
writeListIfNotEmpty("<", methodType.typeArgTypes, "> ");
writeListIfNotEmpty("<", methodType.typeParamTypes, "> ");
}
if (getName(m).equals("<init>")) {
print(getJavaName(classFile));