< prev index next >

src/hotspot/share/classfile/moduleEntry.cpp

Print this page
@@ -282,11 +282,11 @@
  
  // When creating an unnamed module, this is called without holding the Module_lock.
  // This is okay because the unnamed module gets created before the ClassLoaderData
  // is available to other threads.
  ModuleEntry* ModuleEntry::new_unnamed_module_entry(Handle module_handle, ClassLoaderData* cld) {
-   ModuleEntry* entry = (ModuleEntry*) NEW_C_HEAP_ARRAY(char, sizeof(ModuleEntry), mtModule);
+   ModuleEntry* entry = NEW_C_HEAP_OBJ(ModuleEntry, mtModule);
  
    // Initialize everything BasicHashtable would
    entry->set_next(NULL);
    entry->set_hash(0);
    entry->set_literal(NULL);
< prev index next >