diff --git a/RELEASE-NOTES.txt b/RELEASE-NOTES.txt
index 5b155d3..a4bda93 100644
--- a/RELEASE-NOTES.txt
+++ b/RELEASE-NOTES.txt
@@ -16,7 +16,7 @@
-->
-$Id: RELEASE-NOTES.txt,v 1.7 2004/06/01 20:39:50 rdonkin Exp $
+$Id: RELEASE-NOTES.txt,v 1.8 2004/09/27 16:21:40 proyal Exp $
Commons Logging Package
Version 1.0.4
@@ -52,7 +52,7 @@ NEW FEATURES:
[AvalonLogger] Added AvalonLogger, which wraps the logger used by the
Avalon framework. As with other implementations, this
is compiled only if the appropriate dependencies are
- satisfied.
+ satisfied. This implementation is *NOT* Serializable
[Jdk13LumberjackLogger]
Added Jdk13LumberjackLogger, which wraps the implementation
@@ -104,6 +104,8 @@ BUG FIXES:
exceptions when looking up system properties that are
not accessible.
+[AvalonLogger] Fix NullPointerException when it when providing a
+ default logger.
DEPRECATIONS:
diff --git a/src/java/org/apache/commons/logging/impl/AvalonLogger.java b/src/java/org/apache/commons/logging/impl/AvalonLogger.java
index a2eed5f..52866cd 100644
--- a/src/java/org/apache/commons/logging/impl/AvalonLogger.java
+++ b/src/java/org/apache/commons/logging/impl/AvalonLogger.java
@@ -16,7 +16,6 @@
package org.apache.commons.logging.impl;
-import java.io.Serializable;
import org.apache.avalon.framework.logger.Logger;
import org.apache.commons.logging.Log;
@@ -41,16 +40,14 @@ import org.apache.commons.logging.Log;
*
*
* @author Neeme Praks
- * @version $Revision: 1.9 $ $Date: 2004/06/01 19:56:20 $
+ * @version $Revision: 1.10 $ $Date: 2004/09/27 16:21:40 $
*/
-public class AvalonLogger implements Log, Serializable {
+public class AvalonLogger implements Log {
/** Ancesteral avalon logger */
private static Logger defaultLogger = null;
/** Avalon logger used to perform log */
private transient Logger logger = null;
- /** The name of this logger */
- private String name = null;
/**
* Constructs an AvalonLogger that outputs to the given
@@ -58,7 +55,6 @@ public class AvalonLogger implements Log, Serializable {
* @param logger the avalon logger implementation to delegate to
*/
public AvalonLogger(Logger logger) {
- this.name = name;
this.logger = logger;
}
@@ -70,17 +66,14 @@ public class AvalonLogger implements Log, Serializable {
public AvalonLogger(String name) {
if (defaultLogger == null)
throw new NullPointerException("default logger has to be specified if this constructor is used!");
- this.logger = getLogger();
+ this.logger = defaultLogger.getChildLogger(name);
}
/**
* Gets the Avalon logger implementation used to perform logging.
* @return avalon logger implementation
*/
- public Logger getLogger() {
- if (logger == null) {
- logger = defaultLogger.getChildLogger(name);
- }
+ private final Logger getLogger() {
return logger;
}