aboutsummaryrefslogtreecommitdiffstats
path: root/sonar-runner-impl/src/test
diff options
context:
space:
mode:
Diffstat (limited to 'sonar-runner-impl/src/test')
-rw-r--r--sonar-runner-impl/src/test/java/org/sonar/runner/impl/BatchLauncherTest.java4
-rw-r--r--sonar-runner-impl/src/test/java/org/sonar/runner/impl/IsolatedClassloaderTest.java6
2 files changed, 5 insertions, 5 deletions
diff --git a/sonar-runner-impl/src/test/java/org/sonar/runner/impl/BatchLauncherTest.java b/sonar-runner-impl/src/test/java/org/sonar/runner/impl/BatchLauncherTest.java
index b914a39..eceb8c9 100644
--- a/sonar-runner-impl/src/test/java/org/sonar/runner/impl/BatchLauncherTest.java
+++ b/sonar-runner-impl/src/test/java/org/sonar/runner/impl/BatchLauncherTest.java
@@ -48,7 +48,7 @@ public class BatchLauncherTest {
props.put("foo", "bar");
// Unmask the current classloader in order to access FakeIsolatedLauncher
- props.put(InternalProperties.RUNNER_UNMASKED_PACKAGES, "org.sonar.runner.impl");
+ props.put(InternalProperties.RUNNER_MASK_RULES, "UNMASK|org.sonar.runner.impl.");
List<Object> extensions = new ArrayList<Object>();
FakeIsolatedLauncher isolatedLauncher = (FakeIsolatedLauncher) launcher.doExecute(jarDownloader, props, extensions);
@@ -64,7 +64,7 @@ public class BatchLauncherTest {
Properties props = new Properties();
// The current classloader in not available -> fail to load FakeIsolatedLauncher
- props.put(InternalProperties.RUNNER_UNMASKED_PACKAGES, "");
+ props.put(InternalProperties.RUNNER_MASK_RULES, "");
try {
launcher.doExecute(jarDownloader, props, Collections.emptyList());
fail();
diff --git a/sonar-runner-impl/src/test/java/org/sonar/runner/impl/IsolatedClassloaderTest.java b/sonar-runner-impl/src/test/java/org/sonar/runner/impl/IsolatedClassloaderTest.java
index fb0d7f9..266208c 100644
--- a/sonar-runner-impl/src/test/java/org/sonar/runner/impl/IsolatedClassloaderTest.java
+++ b/sonar-runner-impl/src/test/java/org/sonar/runner/impl/IsolatedClassloaderTest.java
@@ -32,7 +32,7 @@ public class IsolatedClassloaderTest {
@Test
public void should_restrict_loading_from_parent() throws Exception {
ClassLoader parentClassloader = getClass().getClassLoader();
- IsolatedClassloader classLoader = new IsolatedClassloader(parentClassloader, "org.apache.ant");
+ IsolatedClassloader classLoader = new IsolatedClassloader(parentClassloader, new String[][] {new String[] {"UNMASK", "org.apache.ant."}});
assertThat(classLoader.canLoadFromParent("org.sonar.runner.Foo")).isFalse();
assertThat(classLoader.canLoadFromParent("org.objectweb.asm.ClassVisitor")).isFalse();
@@ -46,7 +46,7 @@ public class IsolatedClassloaderTest {
thrown.expect(ClassNotFoundException.class);
thrown.expectMessage("org.junit.Test");
ClassLoader parent = getClass().getClassLoader();
- IsolatedClassloader classLoader = new IsolatedClassloader(parent);
+ IsolatedClassloader classLoader = new IsolatedClassloader(parent, new String[0][]);
// JUnit is available in the parent classloader (classpath used to execute this test) but not in the core JVM
assertThat(classLoader.loadClass("java.lang.String", false)).isNotNull();
@@ -56,7 +56,7 @@ public class IsolatedClassloaderTest {
@Test
public void should_find_in_parent_when_matches_unmasked_packages() throws ClassNotFoundException {
ClassLoader parent = getClass().getClassLoader();
- IsolatedClassloader classLoader = new IsolatedClassloader(parent, "org.junit");
+ IsolatedClassloader classLoader = new IsolatedClassloader(parent, new String[][] {new String[] {"UNMASK", "org.junit."}});
// JUnit is available in the parent classloader (classpath used to execute this test) but not in the core JVM
assertThat(classLoader.loadClass("org.junit.Test", false)).isNotNull();