Use computeIfAbsent in SpelCompiler and AdvisedSupport
See gh-26028
This commit is contained in:
@@ -233,11 +233,7 @@ public final class SpelCompiler implements Opcodes {
|
||||
if (compiler == null) {
|
||||
// Full lock now since we're creating a child ClassLoader
|
||||
synchronized (compilers) {
|
||||
compiler = compilers.get(clToUse);
|
||||
if (compiler == null) {
|
||||
compiler = new SpelCompiler(clToUse);
|
||||
compilers.put(clToUse, compiler);
|
||||
}
|
||||
return compilers.computeIfAbsent(clToUse, SpelCompiler::new);
|
||||
}
|
||||
}
|
||||
return compiler;
|
||||
|
||||
Reference in New Issue
Block a user