--- a/hotspot/src/share/vm/memory/metaspaceShared.cpp Fri Oct 23 14:33:19 2015 +0300
+++ b/hotspot/src/share/vm/memory/metaspaceShared.cpp Mon Oct 26 13:11:36 2015 -0400
@@ -680,7 +680,7 @@
void MetaspaceShared::link_one_shared_class(Klass* obj, TRAPS) {
Klass* k = obj;
if (k->oop_is_instance()) {
- InstanceKlass* ik = (InstanceKlass*) k;
+ InstanceKlass* ik = InstanceKlass::cast(k);
// Link the class to cause the bytecodes to be rewritten and the
// cpcache to be created. Class verification is done according
// to -Xverify setting.