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 dd2c1599b2ec0a6cf8745d70e9651e95e07f4c33 Author: Gary Gregory <garydgreg...@gmail.com> AuthorDate: Sun Nov 19 16:06:48 2023 -0500 Fix compiler warning --- src/main/java/org/apache/commons/logging/LogFactory.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/main/java/org/apache/commons/logging/LogFactory.java b/src/main/java/org/apache/commons/logging/LogFactory.java index c7fb36f..1acef03 100644 --- a/src/main/java/org/apache/commons/logging/LogFactory.java +++ b/src/main/java/org/apache/commons/logging/LogFactory.java @@ -430,8 +430,9 @@ public abstract class LogFactory { storeImplementationClass = WEAK_HASHTABLE_CLASSNAME; } try { - final Class implementationClass = Class.forName(storeImplementationClass); - result = (Hashtable) implementationClass.getConstructor().newInstance(); + final Class<Hashtable<ClassLoader, LogFactory>> implementationClass = (Class<Hashtable<ClassLoader, LogFactory>>) Class + .forName(storeImplementationClass); + result = implementationClass.getConstructor().newInstance(); } catch (final Throwable t) { handleThrowable(t); // may re-throw t