Author: skitching
Date: Tue Feb 21 20:53:08 2006
New Revision: 379680

URL: http://svn.apache.org/viewcvs?rev=379680&view=rev
Log:
Removed Serializable marker interface as it is not possible to implement this
correctly in all cases. AvalonLogger was introduced in 1.0.4, and was marked
Serializable. However serialization for this class was *completely* broken in
all cases in that release, so removing the Serializable marker is not considered
a binary-incompatible change.

Modified:
    
jakarta/commons/proper/logging/trunk/src/java/org/apache/commons/logging/impl/AvalonLogger.java

Modified: 
jakarta/commons/proper/logging/trunk/src/java/org/apache/commons/logging/impl/AvalonLogger.java
URL: 
http://svn.apache.org/viewcvs/jakarta/commons/proper/logging/trunk/src/java/org/apache/commons/logging/impl/AvalonLogger.java?rev=379680&r1=379679&r2=379680&view=diff
==============================================================================
--- 
jakarta/commons/proper/logging/trunk/src/java/org/apache/commons/logging/impl/AvalonLogger.java
 (original)
+++ 
jakarta/commons/proper/logging/trunk/src/java/org/apache/commons/logging/impl/AvalonLogger.java
 Tue Feb 21 20:53:08 2006
@@ -1,5 +1,5 @@
 /*
- * Copyright 2001-2004 The Apache Software Foundation.
+ * Copyright 2001-2004,2006 The Apache Software Foundation.
  * 
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -16,8 +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,14 +39,19 @@
  * </li>
  * </ul>
  * <p>
- * <strong>Note:</strong> <code>AvalonLogger</code> implements
- * <code>Serializable</code> for reasons of consistency and backwards 
compatibility. 
- * However, serializable is not recommended.
+ * <strong>Note:</strong> <code>AvalonLogger</code> does not implement 
Serializable
+ * because the constructors available for it make this impossible to achieve 
in all
+ * circumstances; there is no way to "reconnect" to an underlying Logger 
object on
+ * deserialization if one was just passed in to the constructor of the original
+ * object. This class <i>was</i> marked Serializable in the 1.0.4 release of
+ * commons-logging, but this never actually worked (a NullPointerException 
would 
+ * be thrown as soon as the deserialized object was used), so removing this 
marker
+ * is not considered to be an incompatible change.
  * </p>
  * @author <a href="mailto:[EMAIL PROTECTED]">Neeme Praks</a>
  * @version $Revision$ $Date$
  */
-public class AvalonLogger implements Log, Serializable {
+public class AvalonLogger implements Log {
 
     /** Ancesteral avalon logger  */ 
     private static Logger defaultLogger = null;



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to