aboutsummaryrefslogtreecommitdiff
path: root/stage1/Stage1.scala
diff options
context:
space:
mode:
authorChristopher Vogt <oss.nsp@cvogt.org>2016-04-06 23:40:17 -0400
committerChristopher Vogt <oss.nsp@cvogt.org>2016-04-06 23:40:17 -0400
commit1e2063c934028bd765f761038c607b1c78e6d161 (patch)
tree5c4528b93c86bbb8e79849c104747a6b05e92a77 /stage1/Stage1.scala
parentf4068604a65f61a739c9f5b6be16c76bc93ecc65 (diff)
downloadcbt-1e2063c934028bd765f761038c607b1c78e6d161.tar.gz
cbt-1e2063c934028bd765f761038c607b1c78e6d161.tar.bz2
cbt-1e2063c934028bd765f761038c607b1c78e6d161.zip
Temporarily cache classloaders for potentially changing files
to avoid creating classloaders for the same files more than once, which leads to conflicts.
Diffstat (limited to 'stage1/Stage1.scala')
-rw-r--r--stage1/Stage1.scala4
1 files changed, 3 insertions, 1 deletions
diff --git a/stage1/Stage1.scala b/stage1/Stage1.scala
index 91f8ca7..b68387f 100644
--- a/stage1/Stage1.scala
+++ b/stage1/Stage1.scala
@@ -76,8 +76,10 @@ object Stage1{
}
logger.stage1(s"Run Stage2")
+ val cl = NailgunLauncher.stage2classLoader
val exitCode = (
- NailgunLauncher.stage2classLoader.loadClass(
+ cl
+ .loadClass(
if(args.admin) "cbt.AdminStage2" else "cbt.Stage2"
)
.getMethod( "run", classOf[Stage2Args] )