1
0

Fix compiler warning

This commit is contained in:
Gary Gregory
2023-11-19 11:58:52 -05:00
parent ab86436dbb
commit 21b3a91d2b

View File

@@ -57,7 +57,7 @@ public class LogSource {
/** /**
* Logs. * Logs.
*/ */
static protected Hashtable logs = new Hashtable(); static protected Hashtable<String, Log> logs = new Hashtable<>();
/** Is log4j available (in the current classpath) */ /** Is log4j available (in the current classpath) */
static protected boolean log4jIsAvailable; static protected boolean log4jIsAvailable;
@@ -148,7 +148,7 @@ public class LogSource {
* @return a {@code Log} instance. * @return a {@code Log} instance.
*/ */
static public Log getInstance(final String name) { static public Log getInstance(final String name) {
return (Log) logs.computeIfAbsent(name, k -> makeNewLogInstance(name)); return logs.computeIfAbsent(name, k -> makeNewLogInstance(name));
} }
/** /**
@@ -159,7 +159,7 @@ public class LogSource {
* all logs known to me. * all logs known to me.
*/ */
static public String[] getLogNames() { static public String[] getLogNames() {
return (String[]) logs.keySet().toArray(EMPTY_STRING_ARRAY); return logs.keySet().toArray(EMPTY_STRING_ARRAY);
} }
/** /**