6715767: javap on java.lang.ClassLoader crashes

Reviewed-by: ksrini
This commit is contained in:
Jonathan Gibbons 2008-06-18 16:53:08 -07:00
parent dc6f119d59
commit 2e420d4001
5 changed files with 64 additions and 4 deletions

View file

@ -291,7 +291,7 @@ public class ClassWriter extends BasicWriter {
for (int i = 0; i < exceptions.number_of_exceptions; i++) {
if (i > 0)
print(", ");
print(attrWriter.getJavaException(exceptions, i));
print(getJavaException(exceptions, i));
}
}
} else {
@ -441,6 +441,14 @@ public class ClassWriter extends BasicWriter {
}
}
String getJavaException(Exceptions_attribute attr, int index) {
try {
return getJavaName(attr.getException(index, constant_pool));
} catch (ConstantPoolException e) {
return report(e);
}
}
String getValue(Descriptor d) {
try {
return d.getValue(constant_pool);