`ClassLoaderReflectionToolkit._findClass` was ignoring `getClassLoadingLock` on `AntClassLoader`
@@ -103,14 +103,14 @@ public class ClassLoaderReflectionToolkit {
* @since 1.553
*/
public static @NonNull Class<?> _findClass(ClassLoader cl, String name) throws ClassNotFoundException {
+ synchronized (getClassLoadingLock(cl, name)) {
if (cl instanceof AntClassLoader) {
return ((AntClassLoader) cl).findClass(name);
- }
-
- synchronized (getClassLoadingLock(cl, name)) {
+ } else {
return (Class) invoke(FindClass.FIND_CLASS, ClassNotFoundException.class, cl, name);
}
}
+ }
private static class FindClass {
private static final Method FIND_CLASS;
