7145358: SA throws ClassCastException for partially loaded ConstantPool
In printValueOn() in ConstantPool.java check if the poolHolder is a valid Klass and only then print it. Reviewed-by: sla, sspitsyn
This commit is contained in:
parent
d856a7745c
commit
41f7f6302b
@ -648,7 +648,12 @@ public class ConstantPool extends Oop implements ClassConstants {
|
||||
}
|
||||
|
||||
public void printValueOn(PrintStream tty) {
|
||||
tty.print("ConstantPool for " + getPoolHolder().getName().asString());
|
||||
Oop holder = poolHolder.getValue(this);
|
||||
if (holder instanceof Klass) {
|
||||
tty.print("ConstantPool for " + ((Klass)holder).getName().asString());
|
||||
} else {
|
||||
tty.print("ConstantPool for partially loaded class");
|
||||
}
|
||||
}
|
||||
|
||||
public long getObjectSize() {
|
||||
|
Loading…
Reference in New Issue
Block a user