Properly return loaded type even if identified as reloadable
Closes gh-31668
This commit is contained in:
@@ -120,9 +120,10 @@ public class StandardTypeLocator implements TypeLocator {
|
||||
return cachedType;
|
||||
}
|
||||
Class<?> loadedType = loadType(typeName);
|
||||
if (loadedType != null &&
|
||||
!(this.classLoader instanceof SmartClassLoader scl && scl.isClassReloadable(loadedType))) {
|
||||
this.typeCache.put(typeName, loadedType);
|
||||
if (loadedType != null) {
|
||||
if (!(this.classLoader instanceof SmartClassLoader scl && scl.isClassReloadable(loadedType))) {
|
||||
this.typeCache.put(typeName, loadedType);
|
||||
}
|
||||
return loadedType;
|
||||
}
|
||||
throw new SpelEvaluationException(SpelMessage.TYPE_NOT_FOUND, typeName);
|
||||
|
||||
Reference in New Issue
Block a user