diff --git a/src/hotspot/share/jfr/jni/jfrJavaSupport.cpp b/src/hotspot/share/jfr/jni/jfrJavaSupport.cpp index 59a9d8a9090..a6e97ab227a 100644 --- a/src/hotspot/share/jfr/jni/jfrJavaSupport.cpp +++ b/src/hotspot/share/jfr/jni/jfrJavaSupport.cpp @@ -228,7 +228,7 @@ void JfrJavaSupport::new_object_global_ref(JfrJavaArguments* args, TRAPS) { jstring JfrJavaSupport::new_string(const char* c_str, TRAPS) { assert(c_str != nullptr, "invariant"); DEBUG_ONLY(check_java_thread_in_vm(THREAD)); - const oop result = java_lang_String::create_oop_from_str(c_str, THREAD); + const oop result = java_lang_String::create_oop_from_str(c_str, CHECK_NULL); return (jstring)local_jni_handle(result, THREAD); }