diff --git a/agent/src/share/classes/sun/jvm/hotspot/oops/ConstantPool.java b/agent/src/share/classes/sun/jvm/hotspot/oops/ConstantPool.java index 5752eaed39a1e3bd01bbc7fe96cbb8a575dd8ce5..874512fdc778a58018a003200b079695ab613ed5 100644 --- a/agent/src/share/classes/sun/jvm/hotspot/oops/ConstantPool.java +++ b/agent/src/share/classes/sun/jvm/hotspot/oops/ConstantPool.java @@ -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() {