You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by gg...@apache.org on 2023/11/25 17:20:47 UTC

(commons-logging) branch master updated: Fix compiler warnings

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


The following commit(s) were added to refs/heads/master by this push:
     new 409ff88  Fix compiler warnings
409ff88 is described below

commit 409ff88dd7b08687d2342965f0b89f11e0310741
Author: Gary Gregory <ga...@gmail.com>
AuthorDate: Sat Nov 25 12:20:42 2023 -0500

    Fix compiler warnings
---
 src/main/java/org/apache/commons/logging/LogFactory.java | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/src/main/java/org/apache/commons/logging/LogFactory.java b/src/main/java/org/apache/commons/logging/LogFactory.java
index f527086..7b447d8 100644
--- a/src/main/java/org/apache/commons/logging/LogFactory.java
+++ b/src/main/java/org/apache/commons/logging/LogFactory.java
@@ -297,7 +297,7 @@ public abstract class LogFactory {
     protected static Object createFactory(final String factoryClassName, final ClassLoader classLoader) {
         // This will be used to diagnose bad configurations
         // and allow a useful message to be sent to the user
-        Class logFactoryClass = null;
+        Class<?> logFactoryClass = null;
         try {
             if (classLoader != null) {
                 try {
@@ -1125,7 +1125,7 @@ public abstract class LogFactory {
      * {@code LogFactory} when that class is loaded via the same
      * classloader that loaded the {@code logFactoryClass}.
      */
-    private static boolean implementsLogFactory(final Class logFactoryClass) {
+    private static boolean implementsLogFactory(final Class<?> logFactoryClass) {
         boolean implementsLogFactory = false;
         if (logFactoryClass != null) {
             try {
@@ -1134,7 +1134,7 @@ public abstract class LogFactory {
                     logDiagnostic("[CUSTOM LOG FACTORY] was loaded by the boot classloader");
                 } else {
                     logHierarchy("[CUSTOM LOG FACTORY] ", logFactoryClassLoader);
-                    final Class factoryFromCustomLoader = Class.forName("org.apache.commons.logging.LogFactory", false, logFactoryClassLoader);
+                    final Class<?> factoryFromCustomLoader = Class.forName("org.apache.commons.logging.LogFactory", false, logFactoryClassLoader);
                     implementsLogFactory = factoryFromCustomLoader.isAssignableFrom(logFactoryClass);
                     final String logFactoryClassName = logFactoryClass.getName();
                     if (implementsLogFactory) {