Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'bundles/org.eclipse.osgi.tests/bundles_src/classloader.hooks.a/org/eclipse/osgi/tests/classloader/hooks/a/TestHookConfigurator.java')
-rw-r--r--bundles/org.eclipse.osgi.tests/bundles_src/classloader.hooks.a/org/eclipse/osgi/tests/classloader/hooks/a/TestHookConfigurator.java10
1 files changed, 9 insertions, 1 deletions
diff --git a/bundles/org.eclipse.osgi.tests/bundles_src/classloader.hooks.a/org/eclipse/osgi/tests/classloader/hooks/a/TestHookConfigurator.java b/bundles/org.eclipse.osgi.tests/bundles_src/classloader.hooks.a/org/eclipse/osgi/tests/classloader/hooks/a/TestHookConfigurator.java
index 75bf704d5..61e86e9a0 100644
--- a/bundles/org.eclipse.osgi.tests/bundles_src/classloader.hooks.a/org/eclipse/osgi/tests/classloader/hooks/a/TestHookConfigurator.java
+++ b/bundles/org.eclipse.osgi.tests/bundles_src/classloader.hooks.a/org/eclipse/osgi/tests/classloader/hooks/a/TestHookConfigurator.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2013, 2017 IBM Corporation and others.
+ * Copyright (c) 2013, 2018 IBM Corporation and others.
*
* This program and the accompanying materials
* are made available under the terms of the Eclipse Public License 2.0
@@ -26,6 +26,7 @@ public class TestHookConfigurator implements HookConfigurator {
private static final String BAD_TRANSFORM_PROP = "classloader.hooks.a.bad.transform";
private static final String RECURSION_LOAD = "classloader.hooks.a.recursion.load";
private static final String RECURSION_LOAD_SUPPORTED = "classloader.hooks.a.recursion.load.supported";
+ private static final String FILTER_CLASS_PATHS = "classloader.hooks.a.filter.class.paths";
final ThreadLocal<Boolean> doingRecursionLoad = new ThreadLocal<Boolean>() {
protected Boolean initialValue() {
return false;
@@ -73,6 +74,13 @@ public class TestHookConfigurator implements HookConfigurator {
return Boolean.getBoolean(RECURSION_LOAD_SUPPORTED);
}
+ @Override
+ public ClasspathEntry[] getClassPathEntries(String name, ClasspathManager manager) {
+ if (Boolean.getBoolean(FILTER_CLASS_PATHS)) {
+ return new ClasspathEntry[0];
+ }
+ return super.getClassPathEntries(name, manager);
+ }
});
}
}

Back to the top