Use modern Map API
This commit is contained in:
@@ -169,12 +169,7 @@ public class LogSource {
|
|||||||
|
|
||||||
/** Get a {@code Log} instance by class name. */
|
/** Get a {@code Log} instance by class name. */
|
||||||
static public Log getInstance(final String name) {
|
static public Log getInstance(final String name) {
|
||||||
Log log = (Log) logs.get(name);
|
return (Log) logs.computeIfAbsent(name, k -> makeNewLogInstance(name));
|
||||||
if (null == log) {
|
|
||||||
log = makeNewLogInstance(name);
|
|
||||||
logs.put(name, log);
|
|
||||||
}
|
|
||||||
return log;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Get a {@code Log} instance by class. */
|
/** Get a {@code Log} instance by class. */
|
||||||
|
|||||||
Reference in New Issue
Block a user