Skip to content

Commit

Permalink
Properly return loaded type even if identified as reloadable
Browse files Browse the repository at this point in the history
Closes gh-31668
  • Loading branch information
jhoeller committed Nov 24, 2023
1 parent 6ff75f1 commit 8921be1
Showing 1 changed file with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -120,9 +120,10 @@ public Class<?> findType(String typeName) throws EvaluationException {
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);
Expand Down

0 comments on commit 8921be1

Please sign in to comment.