mirror of
https://github.com/spring-projects/spring-boot.git
synced 2026-09-24 02:09:05 +00:00
Use putIfAbsent() instead of containsKey
See gh-17913
This commit is contained in:
committed by
Stephane Nicoll
parent
bac63cf79e
commit
2b29bea55c
+2
-6
@@ -194,12 +194,8 @@ public abstract class AbstractLoggingSystem extends LoggingSystem {
|
||||
}
|
||||
|
||||
public void map(LogLevel system, T nativeLevel) {
|
||||
if (!this.systemToNative.containsKey(system)) {
|
||||
this.systemToNative.put(system, nativeLevel);
|
||||
}
|
||||
if (!this.nativeToSystem.containsKey(nativeLevel)) {
|
||||
this.nativeToSystem.put(nativeLevel, system);
|
||||
}
|
||||
this.systemToNative.putIfAbsent(system, nativeLevel);
|
||||
this.nativeToSystem.putIfAbsent(nativeLevel, system);
|
||||
}
|
||||
|
||||
public LogLevel convertNativeToSystem(T level) {
|
||||
|
||||
Reference in New Issue
Block a user