This is an automated email from the ASF dual-hosted git repository. ggregory pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/commons-logging.git
commit 21b3a91d2b67e4a0ed368c5308e86ed27bcfc4d2 Author: Gary Gregory <garydgreg...@gmail.com> AuthorDate: Sun Nov 19 11:58:52 2023 -0500 Fix compiler warning --- src/main/java/org/apache/commons/logging/LogSource.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/main/java/org/apache/commons/logging/LogSource.java b/src/main/java/org/apache/commons/logging/LogSource.java index e00a1c7..68f908c 100644 --- a/src/main/java/org/apache/commons/logging/LogSource.java +++ b/src/main/java/org/apache/commons/logging/LogSource.java @@ -57,7 +57,7 @@ public class LogSource { /** * Logs. */ - static protected Hashtable logs = new Hashtable(); + static protected Hashtable<String, Log> logs = new Hashtable<>(); /** Is log4j available (in the current classpath) */ static protected boolean log4jIsAvailable; @@ -148,7 +148,7 @@ public class LogSource { * @return a {@code Log} instance. */ 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. */ static public String[] getLogNames() { - return (String[]) logs.keySet().toArray(EMPTY_STRING_ARRAY); + return logs.keySet().toArray(EMPTY_STRING_ARRAY); } /**