if (name == null) {
classLoader = Module.class.getClassLoader();
className = (String) unmarshaller.readObject();
} else {
final String slot = (String) unmarshaller.readObject();
final ModuleIdentifier identifier = ModuleIdentifier.create(name, slot);
className = (String) unmarshaller.readObject();
try {
classLoader = moduleLoader.loadModule(identifier).getClassLoader();
} catch (ModuleLoadException e) {
final InvalidClassException ce = new InvalidClassException(className, "Module load failed");
ce.initCause(e);
throw ce;
}
}
return Class.forName(className, false, classLoader);
}
case 1: {
final String name = (String) unmarshaller.readObject();
final ClassLoader classLoader;
if (name == null) {
classLoader = Module.class.getClassLoader();
} else {
final String slot = (String) unmarshaller.readObject();
final ModuleIdentifier identifier = ModuleIdentifier.create(name, slot);
final Module module;
try {
module = moduleLoader.loadModule(identifier);
} catch (ModuleLoadException e) {
final InvalidClassException ce = new InvalidClassException("Module load failed");