You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucene.apache.org by rm...@apache.org on 2012/05/16 05:26:34 UTC

svn commit: r1338985 - /lucene/dev/branches/lucene4055/lucene/core/src/java/org/apache/lucene/index/SegmentInfo.java

Author: rmuir
Date: Wed May 16 03:26:33 2012
New Revision: 1338985

URL: http://svn.apache.org/viewvc?rev=1338985&view=rev
Log:
LUCENE-4055: turn cache back on

Modified:
    lucene/dev/branches/lucene4055/lucene/core/src/java/org/apache/lucene/index/SegmentInfo.java

Modified: lucene/dev/branches/lucene4055/lucene/core/src/java/org/apache/lucene/index/SegmentInfo.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene4055/lucene/core/src/java/org/apache/lucene/index/SegmentInfo.java?rev=1338985&r1=1338984&r2=1338985&view=diff
==============================================================================
--- lucene/dev/branches/lucene4055/lucene/core/src/java/org/apache/lucene/index/SegmentInfo.java (original)
+++ lucene/dev/branches/lucene4055/lucene/core/src/java/org/apache/lucene/index/SegmentInfo.java Wed May 16 03:26:33 2012
@@ -383,8 +383,9 @@ public final class SegmentInfo implement
 
   public List<String> files() throws IOException {
     final long fisVersion = fieldInfosVersion;
-    // nocommit: fix this once we detangle
-    if (true /* fisVersion != (fieldInfosVersion = getFieldInfos().getVersion()) */) {
+    // nocommit
+    FieldInfos infos = getFieldInfos();
+    if (infos instanceof MutableFieldInfos && fisVersion != (fieldInfosVersion = ((MutableFieldInfos)infos).getVersion())) {
       clearFilesCache(); // FIS has modifications - need to recompute
     } else if (files != null) {
       // Already cached: