From: Decebal Suiu Date: Wed, 20 Feb 2013 08:47:14 +0000 (+0200) Subject: fix a issue with PluginClassLoader and javax. package X-Git-Tag: release-0.4~9 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=16ff4a3173f3373aae5a267346f5873ad35d7c1e;p=pf4j.git fix a issue with PluginClassLoader and javax. package --- diff --git a/pf4j/src/main/java/ro/fortsoft/pf4j/PluginClassLoader.java b/pf4j/src/main/java/ro/fortsoft/pf4j/PluginClassLoader.java index 80832bc..60c79ca 100644 --- a/pf4j/src/main/java/ro/fortsoft/pf4j/PluginClassLoader.java +++ b/pf4j/src/main/java/ro/fortsoft/pf4j/PluginClassLoader.java @@ -23,8 +23,8 @@ import java.util.List; */ public class PluginClassLoader extends URLClassLoader { - private static final String JAVA_PACKAGE_PREFIX = "java."; - private static final String JAVAX_PACKAGE_PREFIX = "javax."; +// private static final String JAVA_PACKAGE_PREFIX = "java."; +// private static final String JAVAX_PACKAGE_PREFIX = "javax."; private static final String PLUGIN_PACKAGE_PREFIX = "ro.fortsoft.pf4j."; private PluginManager pluginManager; @@ -46,10 +46,13 @@ public class PluginClassLoader extends URLClassLoader { public Class loadClass(String className) throws ClassNotFoundException { // System.out.println(">>>" + className); + /* + // javax.mail is not in JDK ?! // first check whether it's a system class, delegate to the system loader if (className.startsWith(JAVA_PACKAGE_PREFIX) || className.startsWith(JAVAX_PACKAGE_PREFIX)) { return findSystemClass(className); } + */ // second check whether it's already been loaded Class loadedClass = findLoadedClass(className);