} else {
ClasspathEntry selfEntry = new ClasspathEntry(new FileArtifactRef(moduleSource.getClassPathEntry()), ArtifactSharingMode.PROHIBITED, moduleSource);
classLoadingConfig = new ClassLoadingConfigImpl(Collections.singletonList(selfEntry), runtime.getArtifactRepository());
}
return new ModuleConfigImpl(moduleDefinition, classLoadingConfig, moduleSource);
} catch (Throwable e) {
if (moduleSource != null) {
try {
moduleSource.dispose();