--- old/src/hotspot/share/classfile/moduleEntry.cpp 2020-08-31 08:10:34.454444922 -0700 +++ new/src/hotspot/share/classfile/moduleEntry.cpp 2020-08-31 08:10:34.234436640 -0700 @@ -487,6 +487,7 @@ } static int compare_module_by_name(ModuleEntry* a, ModuleEntry* b) { + assert(a == b || a->name() != b->name(), "no duplicated names"); return a->name()->fast_compare(b->name()); }