1.1 --- a/src/share/vm/oops/instanceKlass.cpp Thu Jul 09 11:10:19 2015 -0700 1.2 +++ b/src/share/vm/oops/instanceKlass.cpp Wed May 28 07:36:32 2014 -0700 1.3 @@ -1572,6 +1572,21 @@ 1.4 return NULL; 1.5 } 1.6 1.7 +#ifdef ASSERT 1.8 +// search through class hierarchy and return true if this class or 1.9 +// one of the superclasses was redefined 1.10 +bool InstanceKlass::has_redefined_this_or_super() const { 1.11 + const InstanceKlass* klass = this; 1.12 + while (klass != NULL) { 1.13 + if (klass->has_been_redefined()) { 1.14 + return true; 1.15 + } 1.16 + klass = InstanceKlass::cast(klass->super()); 1.17 + } 1.18 + return false; 1.19 +} 1.20 +#endif 1.21 + 1.22 // lookup a method in the default methods list then in all transitive interfaces 1.23 // Do NOT return private or static methods 1.24 Method* InstanceKlass::lookup_method_in_ordered_interfaces(Symbol* name,