Skip to content

Commit

Permalink
AbstractRuntime: handle run default method for default module
Browse files Browse the repository at this point in the history
  • Loading branch information
FroMage committed Dec 19, 2011
1 parent d893639 commit f16c639
Showing 1 changed file with 8 additions and 3 deletions.
Expand Up @@ -34,7 +34,7 @@
public abstract class AbstractRuntime implements ceylon.modules.spi.runtime.Runtime {

public static final String MODULE_INFO_CLASS = ".module";
public static final String RUN_INFO_CLASS = ".run";
public static final String RUN_INFO_CLASS = "run";

/**
* Load module instance.
Expand Down Expand Up @@ -98,8 +98,13 @@ public void execute(Configuration conf) throws Exception {
}

String runClassName = conf.run;
if (runClassName == null || runClassName.isEmpty())
runClassName = name + RUN_INFO_CLASS;
if (runClassName == null || runClassName.isEmpty()){
// "default" is not a package name
if(name.equals(Constants.DEFAULT.toString()))
runClassName = RUN_INFO_CLASS;
else
runClassName = name + "." + RUN_INFO_CLASS;
}
invokeRun(cl, runClassName, conf.arguments);
}
}

0 comments on commit f16c639

Please sign in to comment.