aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--libraries/reflect/reflect.scala8
-rw-r--r--stage1/Stage1Lib.scala4
2 files changed, 6 insertions, 6 deletions
diff --git a/libraries/reflect/reflect.scala b/libraries/reflect/reflect.scala
index bd7c245..c2b05ed 100644
--- a/libraries/reflect/reflect.scala
+++ b/libraries/reflect/reflect.scala
@@ -65,7 +65,7 @@ package ops {
}
trait Module {
def getMain( cls: Class[_] ): StaticMethod[Seq[String], ExitCode] = {
- val f = findStaticExitMethodForced[Array[String]]( cls, "main" )
+ val f = findStaticExitMethodOrFail[Array[String]]( cls, "main" )
f.copy(
function = ( args: Seq[String] ) => f.function( args.to )
)
@@ -113,16 +113,16 @@ trait Module {
.replace( File.separator, "." )
}
- def findStaticExitMethodForced[Arg: ClassTag](
+ def findStaticExitMethodOrFail[Arg: ClassTag](
cls: Class[_], name: String
): StaticMethod[Arg, ExitCode] = {
- val f = findStaticMethodForced[Arg, Unit]( cls, name )
+ val f = findStaticMethodOrFail[Arg, Unit]( cls, name )
f.copy(
function = arg => trapExitCode { f.function( arg ); ExitCode.Success }
)
}
- def findStaticMethodForced[Arg, Result](
+ def findStaticMethodOrFail[Arg, Result](
cls: Class[_], name: String
)(
implicit
diff --git a/stage1/Stage1Lib.scala b/stage1/Stage1Lib.scala
index 392b885..6e2963e 100644
--- a/stage1/Stage1Lib.scala
+++ b/stage1/Stage1Lib.scala
@@ -80,7 +80,7 @@ class Stage1Lib( logger: Logger ) extends
}
def getCbtMain( cls: Class[_] ): cbt.reflect.StaticMethod[Context, ExitCode] =
- findStaticMethodForced[Context, ExitCode]( cls, "cbtMain" )
+ findStaticMethodOrFail[Context, ExitCode]( cls, "cbtMain" )
def findCbtMain( cls: Class[_] ): Option[cbt.reflect.StaticMethod[Context, ExitCode]] =
findStaticMethod[Context, ExitCode]( cls, "cbtMain" )
@@ -376,7 +376,7 @@ ${sourceFiles.sorted.mkString(" \\\n")}
case d => d
}
- def classLoaderRecursion( dependency: Dependency, latest: Map[(String,String),Dependency])(implicit transientCache: java.util.Map[AnyRef,AnyRef], cache: ClassLoaderCache): ClassLoader = {
+ def classLoaderRecursion( dependency: Dependency, latest: Map[(String,String),Dependency] )(implicit transientCache: java.util.Map[AnyRef,AnyRef], cache: ClassLoaderCache): ClassLoader = {
// FIXME: shouldn't we be using KeyLockedLazyCache instead of hashmap directly here?
val dependencies = dependency.dependencies.toVector
val dependencyClassLoader: ClassLoader = {