Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

CeylonModuleLoader: no NPE when module is null, and turn "null" versi…

…on into null for the default module
  • Loading branch information...
commit ec2970a5f5aeefcabaf69e6668ff50fee18a4318 1 parent 169af46
@FroMage FroMage authored
View
8 impl/src/main/java/ceylon/modules/jboss/runtime/CeylonModuleLoader.java
@@ -183,8 +183,12 @@ private void relink(ModuleIdentifier mi, Set<ModuleIdentifier> visited) throws M
}
final Module module = super.preloadModule(mi);
- ArtifactResult result = artifacts.get(mi);
- com.redhat.ceylon.compiler.java.Util.loadModule(mi.getName(), mi.getSlot(), result, SecurityActions.getClassLoader(module));
+ if(module != null){
+ ArtifactResult result = artifacts.get(mi);
+ // transform "null" into null version for the default module
+ String version = mi.getName().equals(RepositoryManager.DEFAULT_MODULE) ? null : mi.getSlot();
+ com.redhat.ceylon.compiler.java.Util.loadModule(mi.getName(), version, result, SecurityActions.getClassLoader(module));
+ }
return module;
}
Please sign in to comment.
Something went wrong with that request. Please try again.