diff --git a/core/src/main/java/lucee/commons/lang/PhysicalClassLoader.java b/core/src/main/java/lucee/commons/lang/PhysicalClassLoader.java index 57ba70d279..40dd78fbcb 100644 --- a/core/src/main/java/lucee/commons/lang/PhysicalClassLoader.java +++ b/core/src/main/java/lucee/commons/lang/PhysicalClassLoader.java @@ -237,15 +237,10 @@ private Class loadClass(String name, boolean resolve, boolean loadFromFS) thr @Override public Class loadClass(String name, byte[] barr) throws UnmodifiableClassException { - Class clazz = null; + // Class clazz = null; + Class clazz = findLoadedClass(name); synchronized (SystemUtil.createToken("PhysicalClassLoader:load", name)) { - try { - clazz = loadClass(name, false, false); // we do not load existing class from disk - } - catch (ClassNotFoundException cnf) { - LogUtil.warn("physical-classloader", cnf); - } if (clazz == null) return _loadClass(name, barr, false); return rename(clazz, barr); } @@ -253,13 +248,14 @@ public Class loadClass(String name, byte[] barr) throws UnmodifiableClassExce @Override protected Class findClass(String name) throws ClassNotFoundException { - ClassNotFoundException cnfe = null; - try { + /* + * ClassNotFoundException cnfe = null; try { return super.findClass(name); } catch + * (ClassNotFoundException e) { cnfe = e; } + */ + + if (super.findResource(name.replace('.', '/').concat(".class")) != null) { return super.findClass(name); } - catch (ClassNotFoundException e) { - cnfe = e; - } if (addionalClassLoader != null) { try { @@ -273,7 +269,7 @@ protected Class findClass(String name) throws ClassNotFoundException { synchronized (SystemUtil.createToken("PhysicalClassLoader:load", name)) { Resource res = directory.getRealResource(name.replace('.', '/').concat(".class")); if (!res.isFile()) { - if (cnfe != null) throw cnfe; + // if (cnfe != null) throw cnfe; throw new ClassNotFoundException("Class [" + name + "] is invalid or doesn't exist"); } diff --git a/loader/build.xml b/loader/build.xml index 70584f8e4f..05efdad760 100644 --- a/loader/build.xml +++ b/loader/build.xml @@ -2,7 +2,7 @@ - + diff --git a/loader/pom.xml b/loader/pom.xml index 5d31cc3670..a16fc0ba9f 100644 --- a/loader/pom.xml +++ b/loader/pom.xml @@ -3,7 +3,7 @@ org.lucee lucee - 6.2.0.246-SNAPSHOT + 6.2.0.247-SNAPSHOT jar Lucee Loader Build