From ce9b80539d8b3c1558c08adba8206a4d0c168b25 Mon Sep 17 00:00:00 2001 From: Michael McCandless Date: Fri, 7 Dec 2007 10:13:11 +0000 Subject: [PATCH] LUCENE-1082: fix NPE in IndexReader.lastModified(*) methods git-svn-id: https://svn.apache.org/repos/asf/lucene/java/trunk@602055 13f79535-47bb-0310-9956-ffa450edef68 --- .../org/apache/lucene/index/SegmentInfos.java | 76 ++++++++++--------- .../apache/lucene/index/TestIndexReader.java | 65 +++++++++++----- 2 files changed, 87 insertions(+), 54 deletions(-) diff --git a/src/java/org/apache/lucene/index/SegmentInfos.java b/src/java/org/apache/lucene/index/SegmentInfos.java index 5469877c5bc..c5fade9dc29 100644 --- a/src/java/org/apache/lucene/index/SegmentInfos.java +++ b/src/java/org/apache/lucene/index/SegmentInfos.java @@ -528,40 +528,42 @@ final class SegmentInfos extends Vector { // a stale cache (NFS) we have a better chance of // getting the right generation. long genB = -1; - for(int i=0;i