changeset 60234:e6336e3c5984

8235225: Replace CHECK_0 with CHECK_NULL for non-integer returning methods Summary: Change CHECK_0 to CHECK_NULL and CHECK_false where appropriate Reviewed-by: mikael, dholmes, coleenp
author hseigel
date Thu, 27 Feb 2020 13:00:05 +0000
parents c87cb2daad04
children b5745158500a
files src/hotspot/share/classfile/classFileParser.cpp src/hotspot/share/classfile/classListParser.cpp src/hotspot/share/classfile/javaClasses.cpp src/hotspot/share/classfile/systemDictionary.cpp src/hotspot/share/classfile/systemDictionaryShared.cpp src/hotspot/share/jvmci/jvmciCompilerToVM.cpp src/hotspot/share/oops/arrayKlass.cpp src/hotspot/share/oops/objArrayKlass.cpp src/hotspot/share/prims/jni.cpp src/hotspot/share/prims/jvm.cpp src/hotspot/share/prims/jvmtiRedefineClasses.cpp src/hotspot/share/services/management.cpp src/hotspot/share/services/memoryManager.cpp
diffstat 13 files changed, 57 insertions(+), 57 deletions(-) [+]
line wrap: on
line diff
--- a/src/hotspot/share/classfile/classFileParser.cpp	Thu Feb 27 13:11:06 2020 +0100
+++ b/src/hotspot/share/classfile/classFileParser.cpp	Thu Feb 27 13:00:05 2020 +0000
@@ -5274,7 +5274,7 @@
           if (!legal) {
             classfile_parse_error("Class name is empty or contains illegal character "
                                   "in descriptor in class file %s",
-                                  CHECK_0);
+                                  CHECK_NULL);
             return NULL;
           }
           return signature + newlen + 1;
@@ -5286,7 +5286,7 @@
       array_dim++;
       if (array_dim > 255) {
         // 4277370: array descriptor is valid only if it represents 255 or fewer dimensions.
-        classfile_parse_error("Array type descriptor has more than 255 dimensions in class file %s", CHECK_0);
+        classfile_parse_error("Array type descriptor has more than 255 dimensions in class file %s", CHECK_NULL);
       }
       // The rest of what's there better be a legal signature
       signature++;
--- a/src/hotspot/share/classfile/classListParser.cpp	Thu Feb 27 13:11:06 2020 +0100
+++ b/src/hotspot/share/classfile/classListParser.cpp	Thu Feb 27 13:00:05 2020 +0000
@@ -349,9 +349,9 @@
       // delegate to the correct loader (boot, platform or app) depending on
       // the class name.
 
-      Handle s = java_lang_String::create_from_symbol(class_name_symbol, CHECK_0);
+      Handle s = java_lang_String::create_from_symbol(class_name_symbol, CHECK_NULL);
       // ClassLoader.loadClass() wants external class name format, i.e., convert '/' chars to '.'
-      Handle ext_class_name = java_lang_String::externalize_classname(s, CHECK_0);
+      Handle ext_class_name = java_lang_String::externalize_classname(s, CHECK_NULL);
       Handle loader = Handle(THREAD, SystemDictionary::java_system_loader());
 
       JavaCalls::call_virtual(&result,
--- a/src/hotspot/share/classfile/javaClasses.cpp	Thu Feb 27 13:11:06 2020 +0100
+++ b/src/hotspot/share/classfile/javaClasses.cpp	Thu Feb 27 13:00:05 2020 +0000
@@ -296,7 +296,7 @@
 }
 
 oop java_lang_String::create_oop_from_unicode(const jchar* unicode, int length, TRAPS) {
-  Handle h_obj = create_from_unicode(unicode, length, CHECK_0);
+  Handle h_obj = create_from_unicode(unicode, length, CHECK_NULL);
   return h_obj();
 }
 
@@ -343,7 +343,7 @@
 }
 
 oop java_lang_String::create_oop_from_str(const char* utf8_str, TRAPS) {
-  Handle h_obj = create_from_str(utf8_str, CHECK_0);
+  Handle h_obj = create_from_str(utf8_str, CHECK_NULL);
   return h_obj();
 }
 
@@ -1441,7 +1441,7 @@
 oop java_lang_Class::create_basic_type_mirror(const char* basic_type_name, BasicType type, TRAPS) {
   // This should be improved by adding a field at the Java level or by
   // introducing a new VM klass (see comment in ClassFileParser)
-  oop java_class = InstanceMirrorKlass::cast(SystemDictionary::Class_klass())->allocate_instance(NULL, CHECK_0);
+  oop java_class = InstanceMirrorKlass::cast(SystemDictionary::Class_klass())->allocate_instance(NULL, CHECK_NULL);
   if (type != T_VOID) {
     Klass* aklass = Universe::typeArrayKlassObj(type);
     assert(aklass != NULL, "correct bootstrap");
@@ -2647,13 +2647,13 @@
   InstanceKlass* k = SystemDictionary::StackTraceElement_klass();
   assert(k != NULL, "must be loaded in 1.4+");
   if (k->should_be_initialized()) {
-    k->initialize(CHECK_0);
+    k->initialize(CHECK_NULL);
   }
 
-  Handle element = k->allocate_instance_handle(CHECK_0);
+  Handle element = k->allocate_instance_handle(CHECK_NULL);
 
   int version = method->constants()->version();
-  fill_in(element, method->method_holder(), method, version, bci, method->name(), CHECK_0);
+  fill_in(element, method->method_holder(), method, version, bci, method->name(), CHECK_NULL);
   return element();
 }
 
@@ -3399,13 +3399,13 @@
   Klass* k = SystemDictionary::box_klass(type);
   if (k == NULL)  return NULL;
   InstanceKlass* ik = InstanceKlass::cast(k);
-  if (!ik->is_initialized())  ik->initialize(CHECK_0);
+  if (!ik->is_initialized())  ik->initialize(CHECK_NULL);
   return ik->allocate_instance(THREAD);
 }
 
 
 oop java_lang_boxing_object::create(BasicType type, jvalue* value, TRAPS) {
-  oop box = initialize_and_allocate(type, CHECK_0);
+  oop box = initialize_and_allocate(type, CHECK_NULL);
   if (box == NULL)  return NULL;
   switch (type) {
     case T_BOOLEAN:
@@ -4036,9 +4036,9 @@
   assert(_isPrivileged_offset != 0, "offsets should have been initialized");
   assert(_isAuthorized_offset != -1, "offsets should have been initialized");
   // Ensure klass is initialized
-  SystemDictionary::AccessControlContext_klass()->initialize(CHECK_0);
+  SystemDictionary::AccessControlContext_klass()->initialize(CHECK_NULL);
   // Allocate result
-  oop result = SystemDictionary::AccessControlContext_klass()->allocate_instance(CHECK_0);
+  oop result = SystemDictionary::AccessControlContext_klass()->allocate_instance(CHECK_NULL);
   // Fill in values
   result->obj_field_put(_context_offset, context());
   result->obj_field_put(_privilegedContext_offset, privileged_context());
--- a/src/hotspot/share/classfile/systemDictionary.cpp	Thu Feb 27 13:11:06 2020 +0100
+++ b/src/hotspot/share/classfile/systemDictionary.cpp	Thu Feb 27 13:00:05 2020 +0000
@@ -1918,7 +1918,7 @@
   InstanceKlass** klassp = &_well_known_klasses[id];
 
   if ((*klassp) == NULL) {
-    Klass* k = resolve_or_fail(symbol, true, CHECK_0);
+    Klass* k = resolve_or_fail(symbol, true, CHECK_false);
     (*klassp) = InstanceKlass::cast(k);
   }
   return ((*klassp) != NULL);
--- a/src/hotspot/share/classfile/systemDictionaryShared.cpp	Thu Feb 27 13:11:06 2020 +0100
+++ b/src/hotspot/share/classfile/systemDictionaryShared.cpp	Thu Feb 27 13:00:05 2020 +0000
@@ -979,7 +979,7 @@
     bool isnew = _loaded_unregistered_classes.put(name, true);
     assert(isnew, "sanity");
     MutexLocker mu_r(THREAD, Compile_lock); // add_to_hierarchy asserts this.
-    SystemDictionary::add_to_hierarchy(k, CHECK_0);
+    SystemDictionary::add_to_hierarchy(k, CHECK_false);
     return true;
   }
 }
--- a/src/hotspot/share/jvmci/jvmciCompilerToVM.cpp	Thu Feb 27 13:11:06 2020 +0100
+++ b/src/hotspot/share/jvmci/jvmciCompilerToVM.cpp	Thu Feb 27 13:00:05 2020 +0000
@@ -534,7 +534,7 @@
   }
 
   if (resolve) {
-    resolved_klass = SystemDictionary::resolve_or_null(class_name, class_loader, protection_domain, CHECK_0);
+    resolved_klass = SystemDictionary::resolve_or_null(class_name, class_loader, protection_domain, CHECK_NULL);
     if (resolved_klass == NULL) {
       JVMCI_THROW_MSG_NULL(ClassNotFoundException, str);
     }
@@ -543,7 +543,7 @@
       // This is a name from a signature.  Strip off the trimmings.
       // Call recursive to keep scope of strippedsym.
       TempNewSymbol strippedsym = Signature::strip_envelope(class_name);
-      resolved_klass = SystemDictionary::find(strippedsym, class_loader, protection_domain, CHECK_0);
+      resolved_klass = SystemDictionary::find(strippedsym, class_loader, protection_domain, CHECK_NULL);
     } else if (Signature::is_array(class_name)) {
       SignatureStream ss(class_name, false);
       int ndim = ss.skip_array_prefix();
@@ -552,15 +552,15 @@
         resolved_klass = SystemDictionary::find(strippedsym,
                                                 class_loader,
                                                 protection_domain,
-                                                CHECK_0);
+                                                CHECK_NULL);
         if (!resolved_klass.is_null()) {
-          resolved_klass = resolved_klass->array_klass(ndim, CHECK_0);
+          resolved_klass = resolved_klass->array_klass(ndim, CHECK_NULL);
         }
       } else {
-        resolved_klass = TypeArrayKlass::cast(Universe::typeArrayKlassObj(ss.type()))->array_klass(ndim, CHECK_0);
+        resolved_klass = TypeArrayKlass::cast(Universe::typeArrayKlassObj(ss.type()))->array_klass(ndim, CHECK_NULL);
       }
     } else {
-      resolved_klass = SystemDictionary::find(class_name, class_loader, protection_domain, CHECK_0);
+      resolved_klass = SystemDictionary::find(class_name, class_loader, protection_domain, CHECK_NULL);
     }
   }
   JVMCIObject result = JVMCIENV->get_jvmci_type(resolved_klass, JVMCI_CHECK_NULL);
@@ -704,8 +704,8 @@
   Bytecodes::Code code = (Bytecodes::Code)(((int) opcode) & 0xFF);
   fieldDescriptor fd;
   methodHandle mh(THREAD, (jvmci_method != NULL) ? JVMCIENV->asMethod(jvmci_method) : NULL);
-  LinkInfo link_info(cp, index, mh, CHECK_0);
-  LinkResolver::resolve_field(fd, link_info, Bytecodes::java_code(code), false, CHECK_0);
+  LinkInfo link_info(cp, index, mh, CHECK_NULL);
+  LinkResolver::resolve_field(fd, link_info, Bytecodes::java_code(code), false, CHECK_NULL);
   JVMCIPrimitiveArray info = JVMCIENV->wrap(info_handle);
   if (info.is_null() || JVMCIENV->get_length(info) != 3) {
     JVMCI_ERROR_NULL("info must not be null and have a length of 3");
@@ -1825,7 +1825,7 @@
     return false;
   }
   int len;
-  jchar* name = java_lang_String::as_unicode_string(str(), len, CHECK_0);
+  jchar* name = java_lang_String::as_unicode_string(str(), len, CHECK_false);
   return (StringTable::lookup(name, len) != NULL);
 C2V_END
 
--- a/src/hotspot/share/oops/arrayKlass.cpp	Thu Feb 27 13:11:06 2020 +0100
+++ b/src/hotspot/share/oops/arrayKlass.cpp	Thu Feb 27 13:00:05 2020 +0000
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2019, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2020, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -124,12 +124,12 @@
 }
 
 objArrayOop ArrayKlass::allocate_arrayArray(int n, int length, TRAPS) {
-  check_array_allocation_length(length, arrayOopDesc::max_array_length(T_ARRAY), CHECK_0);
+  check_array_allocation_length(length, arrayOopDesc::max_array_length(T_ARRAY), CHECK_NULL);
   int size = objArrayOopDesc::object_size(length);
-  Klass* k = array_klass(n+dimension(), CHECK_0);
+  Klass* k = array_klass(n+dimension(), CHECK_NULL);
   ArrayKlass* ak = ArrayKlass::cast(k);
   objArrayOop o = (objArrayOop)Universe::heap()->array_allocate(ak, size, length,
-                                                                /* do_zero */ true, CHECK_0);
+                                                                /* do_zero */ true, CHECK_NULL);
   // initialization to NULL not necessary, area already cleared
   return o;
 }
--- a/src/hotspot/share/oops/objArrayKlass.cpp	Thu Feb 27 13:11:06 2020 +0100
+++ b/src/hotspot/share/oops/objArrayKlass.cpp	Thu Feb 27 13:00:05 2020 +0000
@@ -80,13 +80,13 @@
         Klass* ek = NULL;
         {
           MutexUnlocker mu(MultiArray_lock);
-          super_klass = element_super->array_klass(CHECK_0);
+          super_klass = element_super->array_klass(CHECK_NULL);
           for( int i = element_supers->length()-1; i >= 0; i-- ) {
             Klass* elem_super = element_supers->at(i);
-            elem_super->array_klass(CHECK_0);
+            elem_super->array_klass(CHECK_NULL);
           }
           // Now retry from the beginning
-          ek = element_klass->array_klass(n, CHECK_0);
+          ek = element_klass->array_klass(n, CHECK_NULL);
         }  // re-lock
         return ek;
       }
@@ -124,13 +124,13 @@
   }
 
   // Initialize instance variables
-  ObjArrayKlass* oak = ObjArrayKlass::allocate(loader_data, n, element_klass, name, CHECK_0);
+  ObjArrayKlass* oak = ObjArrayKlass::allocate(loader_data, n, element_klass, name, CHECK_NULL);
 
   ModuleEntry* module = oak->module();
   assert(module != NULL, "No module entry for array");
 
   // Call complete_create_array_klass after all instance variables has been initialized.
-  ArrayKlass::complete_create_array_klass(oak, super_klass, module, CHECK_0);
+  ArrayKlass::complete_create_array_klass(oak, super_klass, module, CHECK_NULL);
 
   // Add all classes to our internal class loader list here,
   // including classes in the bootstrap (NULL) class loader.
@@ -171,7 +171,7 @@
 }
 
 objArrayOop ObjArrayKlass::allocate(int length, TRAPS) {
-  check_array_allocation_length(length, arrayOopDesc::max_array_length(T_OBJECT), CHECK_0);
+  check_array_allocation_length(length, arrayOopDesc::max_array_length(T_OBJECT), CHECK_NULL);
   int size = objArrayOopDesc::object_size(length);
   return (objArrayOop)Universe::heap()->array_allocate(this, size, length,
                                                        /* do_zero */ true, THREAD);
--- a/src/hotspot/share/prims/jni.cpp	Thu Feb 27 13:11:06 2020 +0100
+++ b/src/hotspot/share/prims/jni.cpp	Thu Feb 27 13:00:05 2020 +0000
@@ -2540,7 +2540,7 @@
   Return ret = NULL;\
   DT_RETURN_MARK(New##Result##Array, Return, (const Return&)ret);\
 \
-  oop obj= oopFactory::Allocator(len, CHECK_0); \
+  oop obj= oopFactory::Allocator(len, CHECK_NULL); \
   ret = (Return) JNIHandles::make_local(env, obj); \
   return ret;\
 JNI_END
--- a/src/hotspot/share/prims/jvm.cpp	Thu Feb 27 13:11:06 2020 +0100
+++ b/src/hotspot/share/prims/jvm.cpp	Thu Feb 27 13:00:05 2020 +0000
@@ -558,7 +558,7 @@
   stringStream ss;
   bool ok = BytecodeUtils::get_NPE_message_at(&ss, method, bci);
   if (ok) {
-    oop result = java_lang_String::create_oop_from_str(ss.base(), CHECK_0);
+    oop result = java_lang_String::create_oop_from_str(ss.base(), CHECK_NULL);
     return (jstring) JNIHandles::make_local(env, result);
   } else {
     return NULL;
--- a/src/hotspot/share/prims/jvmtiRedefineClasses.cpp	Thu Feb 27 13:11:06 2020 +0100
+++ b/src/hotspot/share/prims/jvmtiRedefineClasses.cpp	Thu Feb 27 13:00:05 2020 +0000
@@ -1482,19 +1482,19 @@
       case JVM_CONSTANT_Long:
         // just copy the entry to *merge_cp_p, but double and long take
         // two constant pool entries
-        ConstantPool::copy_entry_to(old_cp, old_i, *merge_cp_p, old_i, CHECK_0);
+        ConstantPool::copy_entry_to(old_cp, old_i, *merge_cp_p, old_i, CHECK_false);
         old_i++;
         break;
 
       default:
         // just copy the entry to *merge_cp_p
-        ConstantPool::copy_entry_to(old_cp, old_i, *merge_cp_p, old_i, CHECK_0);
+        ConstantPool::copy_entry_to(old_cp, old_i, *merge_cp_p, old_i, CHECK_false);
         break;
       }
     } // end for each old_cp entry
 
-    ConstantPool::copy_operands(old_cp, *merge_cp_p, CHECK_0);
-    (*merge_cp_p)->extend_operands(scratch_cp, CHECK_0);
+    ConstantPool::copy_operands(old_cp, *merge_cp_p, CHECK_false);
+    (*merge_cp_p)->extend_operands(scratch_cp, CHECK_false);
 
     // We don't need to sanity check that *merge_cp_length_p is within
     // *merge_cp_p bounds since we have the minimum on-entry check above.
@@ -1528,7 +1528,7 @@
       }
 
       bool match = scratch_cp->compare_entry_to(scratch_i, *merge_cp_p,
-        scratch_i, CHECK_0);
+        scratch_i, CHECK_false);
       if (match) {
         // found a match at the same index so nothing more to do
         continue;
@@ -1543,7 +1543,7 @@
       }
 
       int found_i = scratch_cp->find_matching_entry(scratch_i, *merge_cp_p,
-        CHECK_0);
+        CHECK_false);
       if (found_i != 0) {
         guarantee(found_i != scratch_i,
           "compare_entry_to() and find_matching_entry() do not agree");
@@ -1564,7 +1564,7 @@
       // No match found so we have to append this entry and any unique
       // referenced entries to *merge_cp_p.
       append_entry(scratch_cp, scratch_i, merge_cp_p, merge_cp_length_p,
-        CHECK_0);
+        CHECK_false);
     }
   }
 
@@ -1592,7 +1592,7 @@
       }
 
       int found_i =
-        scratch_cp->find_matching_entry(scratch_i, *merge_cp_p, CHECK_0);
+        scratch_cp->find_matching_entry(scratch_i, *merge_cp_p, CHECK_false);
       if (found_i != 0) {
         // Found a matching entry somewhere else in *merge_cp_p so
         // just need a mapping entry.
@@ -1603,7 +1603,7 @@
       // No match found so we have to append this entry and any unique
       // referenced entries to *merge_cp_p.
       append_entry(scratch_cp, scratch_i, merge_cp_p, merge_cp_length_p,
-        CHECK_0);
+        CHECK_false);
     }
 
     log_debug(redefine, class, constantpool)
--- a/src/hotspot/share/services/management.cpp	Thu Feb 27 13:11:06 2020 +0100
+++ b/src/hotspot/share/services/management.cpp	Thu Feb 27 13:00:05 2020 +0000
@@ -1356,7 +1356,7 @@
         THROW_(vmSymbols::java_lang_NullPointerException(), JNI_FALSE);
       }
 
-      GCMemoryManager* mgr = get_gc_memory_manager_from_jobject(o, CHECK_0);
+      GCMemoryManager* mgr = get_gc_memory_manager_from_jobject(o, CHECK_false);
       if (mgr != NULL) {
         mgr->reset_gc_stat();
         return true;
@@ -1402,7 +1402,7 @@
   int nFlags = (int) JVMFlag::numFlags - 1;
   // allocate a temp array
   objArrayOop r = oopFactory::new_objArray(SystemDictionary::String_klass(),
-                                           nFlags, CHECK_0);
+                                           nFlags, CHECK_NULL);
   objArrayHandle flags_ah(THREAD, r);
   int num_entries = 0;
   for (int i = 0; i < nFlags; i++) {
@@ -1413,7 +1413,7 @@
     }
     // Exclude the locked (experimental, diagnostic) flags
     if (flag->is_unlocked() || flag->is_unlocker()) {
-      Handle s = java_lang_String::create_from_str(flag->_name, CHECK_0);
+      Handle s = java_lang_String::create_from_str(flag->_name, CHECK_NULL);
       flags_ah->obj_at_put(num_entries, s());
       num_entries++;
     }
@@ -1421,7 +1421,7 @@
 
   if (num_entries < nFlags) {
     // Return array of right length
-    objArrayOop res = oopFactory::new_objArray(SystemDictionary::String_klass(), num_entries, CHECK_0);
+    objArrayOop res = oopFactory::new_objArray(SystemDictionary::String_klass(), num_entries, CHECK_NULL);
     for(int i = 0; i < num_entries; i++) {
       res->obj_at_put(i, flags_ah->obj_at(i));
     }
@@ -1754,7 +1754,7 @@
 //    object_monitors_only - if true, only check object monitors
 //
 JVM_ENTRY(jobjectArray, jmm_FindDeadlockedThreads(JNIEnv *env, jboolean object_monitors_only))
-  Handle result = find_deadlocks(object_monitors_only != 0, CHECK_0);
+  Handle result = find_deadlocks(object_monitors_only != 0, CHECK_NULL);
   return (jobjectArray) JNIHandles::make_local(env, result());
 JVM_END
 
@@ -1762,7 +1762,7 @@
 // Returns an array of Thread objects which are in deadlock, if any.
 // Otherwise, returns NULL.
 JVM_ENTRY(jobjectArray, jmm_FindMonitorDeadlockedThreads(JNIEnv *env))
-  Handle result = find_deadlocks(true, CHECK_0);
+  Handle result = find_deadlocks(true, CHECK_NULL);
   return (jobjectArray) JNIHandles::make_local(env, result());
 JVM_END
 
@@ -1810,7 +1810,7 @@
   }
 
   // check if the element of array is of type MemoryUsage class
-  Klass* usage_klass = Management::java_lang_management_MemoryUsage_klass(CHECK_0);
+  Klass* usage_klass = Management::java_lang_management_MemoryUsage_klass(CHECK_NULL);
   Klass* element_klass = ObjArrayKlass::cast(array_h->klass())->element_klass();
   if (element_klass != usage_klass) {
     THROW_MSG_(vmSymbols::java_lang_IllegalArgumentException(),
--- a/src/hotspot/share/services/memoryManager.cpp	Thu Feb 27 13:11:06 2020 +0100
+++ b/src/hotspot/share/services/memoryManager.cpp	Thu Feb 27 13:00:05 2020 +0000
@@ -69,9 +69,9 @@
   if (mgr_obj == NULL) {
     // It's ok for more than one thread to execute the code up to the locked region.
     // Extra manager instances will just be gc'ed.
-    Klass* k = Management::sun_management_ManagementFactoryHelper_klass(CHECK_0);
+    Klass* k = Management::sun_management_ManagementFactoryHelper_klass(CHECK_NULL);
 
-    Handle mgr_name = java_lang_String::create_from_str(name(), CHECK_0);
+    Handle mgr_name = java_lang_String::create_from_str(name(), CHECK_NULL);
 
     JavaValue result(T_OBJECT);
     JavaCallArguments args;
@@ -80,7 +80,7 @@
     Symbol* method_name = NULL;
     Symbol* signature = NULL;
     if (is_gc_memory_manager()) {
-      Klass* extKlass = Management::com_sun_management_internal_GarbageCollectorExtImpl_klass(CHECK_0);
+      Klass* extKlass = Management::com_sun_management_internal_GarbageCollectorExtImpl_klass(CHECK_NULL);
       // com.sun.management.GarbageCollectorMXBean is in jdk.management module which may not be present.
       if (extKlass != NULL) {
         k = extKlass;
@@ -102,7 +102,7 @@
                            method_name,
                            signature,
                            &args,
-                           CHECK_0);
+                           CHECK_NULL);
 
     instanceOop m = (instanceOop) result.get_jobject();
     instanceHandle mgr(THREAD, m);