Maybe I'm starting to understand.
// attempt to load class in module defined to this loader
assert loadedModule.loader() == this;
return findClassInModuleOrNull(loadedModule, cn);
Precondition of calling findClassInModuleOrNull is that
loadedModule.loader() == this;
so perhaps move that assert into the body of findClassInModuleOrNull ?
---
// no class loading until VM is fully initialized
if (!VM.isModuleSystemInited())
Here the method call is so self-documenting that we should just delete the
comment?
"VM is fully initialized" is not the same as "module system is
initialized"?!