aboutsummaryrefslogtreecommitdiff
path: root/nailgun_launcher
diff options
context:
space:
mode:
authorChristopher Vogt <oss.nsp@cvogt.org>2016-03-14 23:29:09 -0400
committerChristopher Vogt <oss.nsp@cvogt.org>2016-03-19 21:13:49 -0400
commita5f4db210aa2878eb8e15a6d9fe5235199d4aee6 (patch)
tree62ee3ddd75578f340a6c36f99188fae413585b4e /nailgun_launcher
parent35a96fea9336dfcac8aac75824450cbf7dc4ae1a (diff)
downloadcbt-a5f4db210aa2878eb8e15a6d9fe5235199d4aee6.tar.gz
cbt-a5f4db210aa2878eb8e15a6d9fe5235199d4aee6.tar.bz2
cbt-a5f4db210aa2878eb8e15a6d9fe5235199d4aee6.zip
replace two level classloader with hierarchy
replace two level classloader (one for non-cachable dependencies with a cached parent one for cachable ones) with a hierachy of classloaders corresponding this should eventually allow re-using CBT's classloader between stage1 and stage2 this change breaks the ScalaTest support for now
Diffstat (limited to 'nailgun_launcher')
-rw-r--r--nailgun_launcher/NailgunLauncher.java11
1 files changed, 7 insertions, 4 deletions
diff --git a/nailgun_launcher/NailgunLauncher.java b/nailgun_launcher/NailgunLauncher.java
index 2278764..a0b6361 100644
--- a/nailgun_launcher/NailgunLauncher.java
+++ b/nailgun_launcher/NailgunLauncher.java
@@ -21,8 +21,8 @@ public class NailgunLauncher{
* Persistent cache for caching classloaders for the JVM life time. Can be used as needed by user
* code to improve startup time.
*/
- public static ConcurrentHashMap classLoaderCache =
- new ConcurrentHashMap();
+ public static ConcurrentHashMap classLoaderCacheKeys = new ConcurrentHashMap();
+ public static ConcurrentHashMap classLoaderCacheValues = new ConcurrentHashMap();
public static SecurityManager defaultSecurityManager = System.getSecurityManager();
@@ -47,8 +47,11 @@ public class NailgunLauncher{
newArgs[i] = args[i+2];
}
- new URLClassLoader( urls )
- .loadClass(args[0])
+ new URLClassLoader( urls ){
+ public String toString(){
+ return super.toString() + "(\n " + Arrays.toString(urls) + "\n)";
+ }
+ }.loadClass(args[0])
.getMethod("main", String[].class)
.invoke( null/* _cls.newInstance()*/, (Object) newArgs );
}