]> source.dussan.org Git - pf4j.git/commitdiff
fix a issue with PluginClassLoader and javax. package
authorDecebal Suiu <decebal.suiu@gmail.com>
Wed, 20 Feb 2013 08:47:14 +0000 (10:47 +0200)
committerDecebal Suiu <decebal.suiu@gmail.com>
Wed, 20 Feb 2013 08:47:14 +0000 (10:47 +0200)
pf4j/src/main/java/ro/fortsoft/pf4j/PluginClassLoader.java

index 80832bcc147b43e01fc1de0595d7cf4953403b37..60c79caccc84e7f8185d30d6645fd06c1648f8dd 100644 (file)
@@ -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);