lucene-java-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From o...@apache.org
Subject svn commit: r489183 - in /lucene/java/trunk: CHANGES.txt src/java/org/apache/lucene/index/SegmentReader.java src/java/org/apache/lucene/index/TermInfosReader.java
Date Wed, 20 Dec 2006 19:45:41 GMT
Author: otis
Date: Wed Dec 20 11:45:40 2006
New Revision: 489183

URL: http://svn.apache.org/viewvc?view=rev&rev=489183
Log:
- LUCENE-436: removed finalize() methods

Modified:
    lucene/java/trunk/CHANGES.txt
    lucene/java/trunk/src/java/org/apache/lucene/index/SegmentReader.java
    lucene/java/trunk/src/java/org/apache/lucene/index/TermInfosReader.java

Modified: lucene/java/trunk/CHANGES.txt
URL: http://svn.apache.org/viewvc/lucene/java/trunk/CHANGES.txt?view=diff&rev=489183&r1=489182&r2=489183
==============================================================================
--- lucene/java/trunk/CHANGES.txt (original)
+++ lucene/java/trunk/CHANGES.txt Wed Dec 20 11:45:40 2006
@@ -40,6 +40,12 @@
     Enumeration.
     (Michael Busch via Otis Gospodnetic)
 
+ 8. LUCENE-436: Removed finalize() in TermInfosReader and SegmentReader,
+    and added a call to enumerators.remove() in TermInfosReader.close().
+    The finalize() overrides were added to help with a pre-1.4.2 JVM bug
+    that has since been fixed, plus we no longer support pre-1.4.2 JVMs.
+    (Otis Gospodnetic)
+
 New features
 
  1. LUCENE-503: New ThaiAnalyzer and ThaiWordFilter in contrib/analyzers

Modified: lucene/java/trunk/src/java/org/apache/lucene/index/SegmentReader.java
URL: http://svn.apache.org/viewvc/lucene/java/trunk/src/java/org/apache/lucene/index/SegmentReader.java?view=diff&rev=489183&r1=489182&r2=489183
==============================================================================
--- lucene/java/trunk/src/java/org/apache/lucene/index/SegmentReader.java (original)
+++ lucene/java/trunk/src/java/org/apache/lucene/index/SegmentReader.java Wed Dec 20 11:45:40
2006
@@ -187,15 +187,6 @@
     }
   }
 
-  protected void finalize() throws Throwable {
-    try {
-      // patch for pre-1.4.2 JVMs, whose ThreadLocals leak
-      termVectorsLocal.set(null);
-    } finally {
-      super.finalize();
-    }
-  }
-
   protected void doCommit() throws IOException {
     if (deletedDocsDirty) {               // re-write deleted
       String oldDelFileName = si.getDelFileName();

Modified: lucene/java/trunk/src/java/org/apache/lucene/index/TermInfosReader.java
URL: http://svn.apache.org/viewvc/lucene/java/trunk/src/java/org/apache/lucene/index/TermInfosReader.java?view=diff&rev=489183&r1=489182&r2=489183
==============================================================================
--- lucene/java/trunk/src/java/org/apache/lucene/index/TermInfosReader.java (original)
+++ lucene/java/trunk/src/java/org/apache/lucene/index/TermInfosReader.java Wed Dec 20 11:45:40
2006
@@ -55,15 +55,6 @@
 			  fieldInfos, true);
   }
 
-  protected void finalize() throws Throwable {
-    try {
-      // patch for pre-1.4.2 JVMs, whose ThreadLocals leak
-      enumerators.set(null);
-    } finally {
-      super.finalize();
-    }
-  }
-
   public int getSkipInterval() {
     return origEnum.skipInterval;
   }
@@ -73,6 +64,7 @@
       origEnum.close();
     if (indexEnum != null)
       indexEnum.close();
+    enumerators.remove();
   }
 
   /** Returns the number of term/value pairs in the set. */



Mime
View raw message