The code is actually in ObjectSynchronizer::jni_enter:
if (obj->klass()->is_inline_klass()) {
ResourceMark rm(THREAD);
const char* desc = "Cannot synchronize on an instance of value class ";
const char* className = obj->klass()->external_name();
size_t msglen = strlen(desc) + strlen(className) + 1;
char* message = NEW_RESOURCE_ARRAY(char, msglen);
assert(message != nullptr, "NEW_RESOURCE_ARRAY should have called vm_exit_out_of_memory and not return nullptr");
THROW_MSG(vmSymbols::java_lang_IdentityException(), className);
}
The code omits copying the message text to the new array, and just uses the classname as the exception message.
if (obj->klass()->is_inline_klass()) {
ResourceMark rm(THREAD);
const char* desc = "Cannot synchronize on an instance of value class ";
const char* className = obj->klass()->external_name();
size_t msglen = strlen(desc) + strlen(className) + 1;
char* message = NEW_RESOURCE_ARRAY(char, msglen);
assert(message != nullptr, "NEW_RESOURCE_ARRAY should have called vm_exit_out_of_memory and not return nullptr");
THROW_MSG(vmSymbols::java_lang_IdentityException(), className);
}
The code omits copying the message text to the new array, and just uses the classname as the exception message.
- links to
-
Commit(lworld)
openjdk/valhalla/c5277c48
-
Review(lworld)
openjdk/valhalla/2191