From 44a976ff39a9a137939877b79ff5540c7f587045 Mon Sep 17 00:00:00 2001 From: Robert Muir Date: Wed, 22 Feb 2012 14:39:32 +0000 Subject: [PATCH] LUCENE-3818: add assertion git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1292319 13f79535-47bb-0310-9956-ffa450edef68 --- lucene/core/src/java/org/apache/lucene/index/IndexWriter.java | 1 + 1 file changed, 1 insertion(+) diff --git a/lucene/core/src/java/org/apache/lucene/index/IndexWriter.java b/lucene/core/src/java/org/apache/lucene/index/IndexWriter.java index 4dc4f508872..3ca23f9881f 100644 --- a/lucene/core/src/java/org/apache/lucene/index/IndexWriter.java +++ b/lucene/core/src/java/org/apache/lucene/index/IndexWriter.java @@ -577,6 +577,7 @@ public class IndexWriter implements Closeable, TwoPhaseCommit { public synchronized void initWritableLiveDocs() throws IOException { assert Thread.holdsLock(IndexWriter.this); + assert info.docCount > 0; //System.out.println("initWritableLivedocs seg=" + info + " liveDocs=" + liveDocs + " shared=" + shared); if (shared) { // Copy on write: this means we've cloned a