1
0

Use modern Map API

This commit is contained in:
Gary Gregory
2023-07-07 00:20:09 -04:00
parent 5452259cab
commit ecce923148

View File

@@ -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. */