--- a/hotspot/src/share/vm/prims/jvmtiEnv.cpp Fri Aug 19 18:20:22 2016 +0200
+++ b/hotspot/src/share/vm/prims/jvmtiEnv.cpp Fri Aug 19 14:54:31 2016 -0400
@@ -283,7 +283,7 @@
return JVMTI_ERROR_INVALID_CLASS;
}
- if (java_lang_Class::is_primitive(k_mirror)) {
+ if (!VM_RedefineClasses::is_modifiable_class(k_mirror)) {
return JVMTI_ERROR_UNMODIFIABLE_CLASS;
}
@@ -294,9 +294,6 @@
if (status & (JVMTI_CLASS_STATUS_ERROR)) {
return JVMTI_ERROR_INVALID_CLASS;
}
- if (status & (JVMTI_CLASS_STATUS_ARRAY)) {
- return JVMTI_ERROR_UNMODIFIABLE_CLASS;
- }
instanceKlassHandle ikh(current_thread, k_oop);
if (ikh->get_cached_class_file_bytes() == NULL) {