Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThomas Watson2016-10-26 16:11:55 +0000
committerThomas Watson2016-10-27 15:52:31 +0000
commite13ed4ada2d35b760bce681b6b7887279d0e6416 (patch)
tree6aca19607f84ad83417a0f70351e4e8a9863392a /bundles/org.eclipse.osgi/container
parent26c5e36835d9075be96a535db146f05d6982be14 (diff)
downloadrt.equinox.framework-e13ed4ada2d35b760bce681b6b7887279d0e6416.tar.gz
rt.equinox.framework-e13ed4ada2d35b760bce681b6b7887279d0e6416.tar.xz
rt.equinox.framework-e13ed4ada2d35b760bce681b6b7887279d0e6416.zip
Bug 506578 - Custom class loaders mapped to Java 9 modules must override
new findResource and findClass methods Change-Id: I25ab9c6a154314216e9c6ff492b4062f3f4bba42 Signed-off-by: Thomas Watson <tjwatson@us.ibm.com>
Diffstat (limited to 'bundles/org.eclipse.osgi/container')
-rw-r--r--bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/loader/ModuleClassLoader.java14
1 files changed, 14 insertions, 0 deletions
diff --git a/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/loader/ModuleClassLoader.java b/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/loader/ModuleClassLoader.java
index 85c0585cc..f195161ef 100644
--- a/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/loader/ModuleClassLoader.java
+++ b/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/loader/ModuleClassLoader.java
@@ -169,6 +169,15 @@ public abstract class ModuleClassLoader extends ClassLoader implements BundleRef
}
}
+ // preparing for Java 9
+ protected Class<?> findClass(String moduleName, String name) {
+ try {
+ return findLocalClass(name);
+ } catch (ClassNotFoundException e) {
+ return null;
+ }
+ }
+
@Override
protected Class<?> findClass(String name) throws ClassNotFoundException {
return findLocalClass(name);
@@ -199,6 +208,11 @@ public abstract class ModuleClassLoader extends ClassLoader implements BundleRef
return (null);
}
+ // preparing for Java 9
+ protected URL findResource(String moduleName, String name) {
+ return findLocalResource(name);
+ }
+
@Override
protected URL findResource(String name) {
return findLocalResource(name);

Back to the top