Apache Solr open-source search software
LUCENE-3661: remove unnecessary method
Robert Muir7c04dc5ed17e
diff --git a/lucene/src/java/org/apache/lucene/codecs/simpletext/SimpleTextLiveDocsFormat.java b/lucene/src/java/org/apache/lucene/codecs/simpletext/SimpleTextLiveDocsFormat.javaindex 52aa471c5bf..7f4b28b9c55 100644--- a/lucene/src/java/org/apache/lucene/codecs/simpletext/SimpleTextLiveDocsFormat.java+++ b/lucene/src/java/org/apache/lucene/codecs/simpletext/SimpleTextLiveDocsFormat.java@@ -173,13 +173,6 @@ public class SimpleTextLiveDocsFormat extends LiveDocsFormat {return bits.cardinality();}- @Override- public boolean getAndClear(int bit) {- boolean v = bits.get(bit);- bits.clear(bit);- return v;- }-@Overridepublic SimpleTextBits clone() {BitSet clonedBits = (BitSet) bits.clone();diff --git a/lucene/src/java/org/apache/lucene/index/IndexWriter.java b/lucene/src/java/org/apache/lucene/index/IndexWriter.javaindex 2479fb04c0f..37d34582d1f 100644--- a/lucene/src/java/org/apache/lucene/index/IndexWriter.java+++ b/lucene/src/java/org/apache/lucene/index/IndexWriter.java@@ -527,8 +527,9 @@ public class IndexWriter implements Closeable, TwoPhaseCommit {public synchronized boolean delete(int docID) {assert liveDocs != null;assert docID >= 0 && docID < liveDocs.length();- final boolean didDelete = liveDocs.getAndClear(docID);+ final boolean didDelete = liveDocs.get(docID);if (didDelete) {+ liveDocs.clear(docID);pendingDeleteCount++;//System.out.println(" new del seg=" + info + " docID=" + docID + " pendingDelCount=" + pendingDeleteCount + " totDelCount=" + (info.docCount-liveDocs.count()));}diff --git a/lucene/src/java/org/apache/lucene/util/MutableBits.java b/lucene/src/java/org/apache/lucene/util/MutableBits.javaindex e32e639e802..80bac229787 100644--- a/lucene/src/java/org/apache/lucene/util/MutableBits.java+++ b/lucene/src/java/org/apache/lucene/util/MutableBits.java@@ -22,7 +22,5 @@ public interface MutableBits extends Bits,Cloneable {// nocommit: remove this from this interface somehow? (used by DWPT infostream at least)public int count();- // nocommit: are these truly necessary?- public boolean getAndClear(int bit);public MutableBits clone();}