commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From scolebou...@apache.org
Subject svn commit: r383220 - /jakarta/commons/proper/io/trunk/src/java/org/apache/commons/io/LineIterator.java
Date Sat, 04 Mar 2006 23:18:48 GMT
Author: scolebourne
Date: Sat Mar  4 15:18:46 2006
New Revision: 383220

URL: http://svn.apache.org/viewcvs?rev=383220&view=rev
Log:
Add finalize method

Modified:
    jakarta/commons/proper/io/trunk/src/java/org/apache/commons/io/LineIterator.java

Modified: jakarta/commons/proper/io/trunk/src/java/org/apache/commons/io/LineIterator.java
URL: http://svn.apache.org/viewcvs/jakarta/commons/proper/io/trunk/src/java/org/apache/commons/io/LineIterator.java?rev=383220&r1=383219&r2=383220&view=diff
==============================================================================
--- jakarta/commons/proper/io/trunk/src/java/org/apache/commons/io/LineIterator.java (original)
+++ jakarta/commons/proper/io/trunk/src/java/org/apache/commons/io/LineIterator.java Sat Mar
 4 15:18:46 2006
@@ -150,6 +150,14 @@
         throw new UnsupportedOperationException("Remove unsupported on LineIterator");
     }
 
+    /**
+     * Finalize which closes the underlying reader.
+     * Do not rely on this method to handle cleanup - call closeQuietly yourself.
+     */
+    protected void finalize() throws Throwable {
+        close();
+    }
+
     //-----------------------------------------------------------------------
     /**
      * Closes the iterator, handling null and ignoring exceptions.



---------------------------------------------------------------------
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