diff -r cdffba164671 -r 3e5d28e6de32 src/hotspot/share/prims/jvmtiRedefineClasses.cpp --- a/src/hotspot/share/prims/jvmtiRedefineClasses.cpp Mon Aug 20 10:04:00 2018 +0200 +++ b/src/hotspot/share/prims/jvmtiRedefineClasses.cpp Mon Aug 20 08:25:57 2018 -0400 @@ -136,7 +136,7 @@ } oop mirror = JNIHandles::resolve_non_null(_class_defs[i].klass); - // classes for primitives and arrays and vm anonymous classes cannot be redefined + // classes for primitives and arrays and vm unsafe anonymous classes cannot be redefined // check here so following code can assume these classes are InstanceKlass if (!is_modifiable_class(mirror)) { _res = JVMTI_ERROR_UNMODIFIABLE_CLASS; @@ -278,8 +278,8 @@ return false; } - // Cannot redefine or retransform an anonymous class. - if (InstanceKlass::cast(k)->is_anonymous()) { + // Cannot redefine or retransform an unsafe anonymous class. + if (InstanceKlass::cast(k)->is_unsafe_anonymous()) { return false; } return true; @@ -2650,7 +2650,7 @@ case 0x10: // kind: type in extends clause of class or interface declaration - // (including the direct superclass of an anonymous class declaration), + // (including the direct superclass of an unsafe anonymous class declaration), // or in implements clause of interface declaration // location: ClassFile