diff --git a/src/main/java/org/apache/commons/logging/LogConfigurationException.java b/src/main/java/org/apache/commons/logging/LogConfigurationException.java index 9bf174c..b2dd465 100644 --- a/src/main/java/org/apache/commons/logging/LogConfigurationException.java +++ b/src/main/java/org/apache/commons/logging/LogConfigurationException.java @@ -69,7 +69,7 @@ public class LogConfigurationException extends RuntimeException { /** * The underlying cause of this exception. */ - protected Throwable cause = null; + protected Throwable cause; /** * Return the underlying cause of this exception (if any). diff --git a/src/main/java/org/apache/commons/logging/LogFactory.java b/src/main/java/org/apache/commons/logging/LogFactory.java index f3e0d24..1aa28bc 100644 --- a/src/main/java/org/apache/commons/logging/LogFactory.java +++ b/src/main/java/org/apache/commons/logging/LogFactory.java @@ -133,7 +133,7 @@ public abstract class LogFactory { * generated by LogFactory or LogFactoryImpl. When non-null, * interesting events will be written to the specified object. */ - private static PrintStream diagnosticsStream = null; + private static PrintStream diagnosticsStream; /** * A string that gets prefixed to every message output by the @@ -279,7 +279,7 @@ public abstract class LogFactory { * The previously constructed LogFactory instances, keyed by * the ClassLoader with which it was created. */ - protected static Hashtable factories = null; + protected static Hashtable factories; /** * Previously constructed LogFactory instance as in the @@ -296,7 +296,7 @@ public abstract class LogFactory { * and hashtables don't allow null as a key. * @deprecated since 1.1.2 */ - protected static volatile LogFactory nullClassLoaderFactory = null; + protected static volatile LogFactory nullClassLoaderFactory; /** * Create the hashtable which will be used to store a map of diff --git a/src/main/java/org/apache/commons/logging/LogSource.java b/src/main/java/org/apache/commons/logging/LogSource.java index a091891..eb4fff4 100644 --- a/src/main/java/org/apache/commons/logging/LogSource.java +++ b/src/main/java/org/apache/commons/logging/LogSource.java @@ -59,13 +59,13 @@ public class LogSource { static protected Hashtable logs = new Hashtable(); /** Is log4j available (in the current classpath) */ - static protected boolean log4jIsAvailable = false; + static protected boolean log4jIsAvailable; /** Is JDK 1.4 logging available */ - static protected boolean jdk14IsAvailable = false; + static protected boolean jdk14IsAvailable; /** Constructor for current log class */ - static protected Constructor logImplctor = null; + static protected Constructor logImplctor; // ----------------------------------------------------- Class Initializers diff --git a/src/main/java/org/apache/commons/logging/impl/AvalonLogger.java b/src/main/java/org/apache/commons/logging/impl/AvalonLogger.java index 90e666c..77bf13d 100644 --- a/src/main/java/org/apache/commons/logging/impl/AvalonLogger.java +++ b/src/main/java/org/apache/commons/logging/impl/AvalonLogger.java @@ -52,7 +52,8 @@ import org.apache.commons.logging.Log; public class AvalonLogger implements Log { /** Ancestral Avalon logger. */ - private static volatile Logger defaultLogger = null; + private static volatile Logger defaultLogger; + /** Avalon logger used to perform log. */ private final transient Logger logger; diff --git a/src/main/java/org/apache/commons/logging/impl/Jdk13LumberjackLogger.java b/src/main/java/org/apache/commons/logging/impl/Jdk13LumberjackLogger.java index bce5364..c7b73de 100644 --- a/src/main/java/org/apache/commons/logging/impl/Jdk13LumberjackLogger.java +++ b/src/main/java/org/apache/commons/logging/impl/Jdk13LumberjackLogger.java @@ -45,11 +45,11 @@ public class Jdk13LumberjackLogger implements Log, Serializable { /** * The underlying Logger implementation we are using. */ - protected transient Logger logger = null; - protected String name = null; + protected transient Logger logger; + protected String name; private String sourceClassName = "unknown"; private String sourceMethodName = "unknown"; - private boolean classAndMethodFound = false; + private boolean classAndMethodFound; /** * This member variable simply ensures that any attempt to initialise diff --git a/src/main/java/org/apache/commons/logging/impl/Jdk14Logger.java b/src/main/java/org/apache/commons/logging/impl/Jdk14Logger.java index 18e6b40..8b0791a 100644 --- a/src/main/java/org/apache/commons/logging/impl/Jdk14Logger.java +++ b/src/main/java/org/apache/commons/logging/impl/Jdk14Logger.java @@ -60,12 +60,12 @@ public class Jdk14Logger implements Log, Serializable { /** * The underlying Logger implementation we are using. */ - protected transient Logger logger = null; + protected transient Logger logger; /** * The name of the logger we are wrapping. */ - protected String name = null; + protected String name; // --------------------------------------------------------- Protected Methods diff --git a/src/main/java/org/apache/commons/logging/impl/Log4JLogger.java b/src/main/java/org/apache/commons/logging/impl/Log4JLogger.java index d193df8..ae46536 100644 --- a/src/main/java/org/apache/commons/logging/impl/Log4JLogger.java +++ b/src/main/java/org/apache/commons/logging/impl/Log4JLogger.java @@ -53,7 +53,7 @@ public class Log4JLogger implements Log, Serializable { private static final String FQCN = Log4JLogger.class.getName(); /** Log to this logger */ - private transient volatile Logger logger = null; + private transient volatile Logger logger; /** Logger name */ private final String name; diff --git a/src/main/java/org/apache/commons/logging/impl/LogFactoryImpl.java b/src/main/java/org/apache/commons/logging/impl/LogFactoryImpl.java index 0d0adb6..c4ccbe7 100644 --- a/src/main/java/org/apache/commons/logging/impl/LogFactoryImpl.java +++ b/src/main/java/org/apache/commons/logging/impl/LogFactoryImpl.java @@ -202,7 +202,7 @@ public class LogFactoryImpl extends LogFactory { * This value is initialized by getLogConstructor(), * and then returned repeatedly. */ - protected Constructor logConstructor = null; + protected Constructor logConstructor; /** * The signature of the Constructor to be used. @@ -213,7 +213,7 @@ public class LogFactoryImpl extends LogFactory { * The one-argument setLogFactory method of the selected * {@link org.apache.commons.logging.Log} method, if it exists. */ - protected Method logMethod = null; + protected Method logMethod; /** * The signature of the setLogFactory method to be used. diff --git a/src/main/java/org/apache/commons/logging/impl/LogKitLogger.java b/src/main/java/org/apache/commons/logging/impl/LogKitLogger.java index 01c49ca..b0c13b4 100644 --- a/src/main/java/org/apache/commons/logging/impl/LogKitLogger.java +++ b/src/main/java/org/apache/commons/logging/impl/LogKitLogger.java @@ -41,10 +41,10 @@ public class LogKitLogger implements Log, Serializable { // ------------------------------------------------------------- Attributes /** Logging goes to this LogKit logger */ - protected transient volatile Logger logger = null; + protected transient volatile Logger logger; /** Name of this logger */ - protected String name = null; + protected String name; // ------------------------------------------------------------ Constructor diff --git a/src/main/java/org/apache/commons/logging/impl/SimpleLog.java b/src/main/java/org/apache/commons/logging/impl/SimpleLog.java index 43146ef..53f0643 100644 --- a/src/main/java/org/apache/commons/logging/impl/SimpleLog.java +++ b/src/main/java/org/apache/commons/logging/impl/SimpleLog.java @@ -108,7 +108,7 @@ public class SimpleLog implements Log, Serializable { * in 1.1.1 to fix an existing thread safety bug (SimpleDateFormat.format * is not thread-safe). */ - static protected DateFormat dateFormatter = null; + static protected DateFormat dateFormatter; // ---------------------------------------------------- Log Level Constants