commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From joc...@apache.org
Subject svn commit: r544971 - /jakarta/commons/proper/io/branches/b1_3/src/java/org/apache/commons/io/FileCleaningTracker.java
Date Wed, 06 Jun 2007 21:58:44 GMT
Author: jochen
Date: Wed Jun  6 14:58:43 2007
New Revision: 544971

URL: http://svn.apache.org/viewvc?view=rev&rev=544971
Log:
Reverting the changes from revision 518770. Rahul Akolkar has convinced me that the FileCleaningTracker
should not be declared serializable, because it isn't.

Modified:
    jakarta/commons/proper/io/branches/b1_3/src/java/org/apache/commons/io/FileCleaningTracker.java

Modified: jakarta/commons/proper/io/branches/b1_3/src/java/org/apache/commons/io/FileCleaningTracker.java
URL: http://svn.apache.org/viewvc/jakarta/commons/proper/io/branches/b1_3/src/java/org/apache/commons/io/FileCleaningTracker.java?view=diff&rev=544971&r1=544970&r2=544971
==============================================================================
--- jakarta/commons/proper/io/branches/b1_3/src/java/org/apache/commons/io/FileCleaningTracker.java
(original)
+++ jakarta/commons/proper/io/branches/b1_3/src/java/org/apache/commons/io/FileCleaningTracker.java
Wed Jun  6 14:58:43 2007
@@ -17,8 +17,6 @@
 package org.apache.commons.io;
 
 import java.io.File;
-import java.io.ObjectStreamException;
-import java.io.Serializable;
 import java.lang.ref.PhantomReference;
 import java.lang.ref.ReferenceQueue;
 import java.util.Collection;
@@ -42,28 +40,23 @@
  * @author Martin Cooper
  * @version $Id: FileCleaner.java 490987 2006-12-29 12:11:48Z scolebourne $
  */
-public class FileCleaningTracker implements Serializable {
-    /**
-     * UID for serializing instances of this class.
-     */
-    private static final long serialVersionUID = -8153509976492548871L;
-
+public class FileCleaningTracker {
     /**
      * Queue of <code>Tracker</code> instances being watched.
      */
-    transient ReferenceQueue /* Tracker */ q = new ReferenceQueue();
+    ReferenceQueue /* Tracker */ q = new ReferenceQueue();
     /**
      * Collection of <code>Tracker</code> instances in existence.
      */
-    final transient Collection /* Tracker */ trackers = new Vector();  // synchronized
+    final Collection /* Tracker */ trackers = new Vector();  // synchronized
     /**
      * Whether to terminate the thread when the tracking is complete.
      */
-    transient volatile boolean exitWhenFinished = false;
+    volatile boolean exitWhenFinished = false;
     /**
      * The thread that will clean up registered files.
      */
-    transient Thread reaper;
+    Thread reaper;
 
     //-----------------------------------------------------------------------
     /**
@@ -262,14 +255,4 @@
         }
     }
 
-    /**
-     * This method is called when an instance is deserialized.
-     * It replaces the deserialized instance with a new, fresh
-     * instance.
-     * @return A new instance, which hasn't been in use so far.
-     * @throws ObjectStreamException Not actually thrown.
-     */
-    private Object readResolve() throws ObjectStreamException {
-        return new FileCleaningTracker();
-    }
 }



---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org


Mime
View raw message