--- a/hotspot/src/share/vm/prims/jvmtiRedefineClasses.cpp Mon Mar 02 13:57:17 2009 -0700
+++ b/hotspot/src/share/vm/prims/jvmtiRedefineClasses.cpp Mon Mar 02 14:00:23 2009 -0700
@@ -831,6 +831,9 @@
ResourceMark rm(THREAD);
JvmtiThreadState *state = JvmtiThreadState::state_for(JavaThread::current());
+ // state can only be NULL if the current thread is exiting which
+ // should not happen since we're trying to do a RedefineClasses
+ guarantee(state != NULL, "exiting thread calling load_new_class_versions");
for (int i = 0; i < _class_count; i++) {
oop mirror = JNIHandles::resolve_non_null(_class_defs[i].klass);
// classes for primitives cannot be redefined