Apache Solr open-source search software
LUCENE-3606: remove more SegmentReader cruft
Robert Muir249883a232f7
diff --git a/lucene/src/java/org/apache/lucene/index/SegmentReader.java b/lucene/src/java/org/apache/lucene/index/SegmentReader.javaindex aa9f0bc75cb..02e5d395676 100644--- a/lucene/src/java/org/apache/lucene/index/SegmentReader.java+++ b/lucene/src/java/org/apache/lucene/index/SegmentReader.java@@ -145,7 +145,7 @@ public class SegmentReader extends IndexReader implements Cloneable {private void loadLiveDocs(IOContext context) throws IOException {// NOTE: the bitvector is stored using the regular directory, not cfs- if (hasDeletions(si)) {+ if (si.hasDeletions()) {liveDocs = new BitVector(directory(), si.getDelFileName(), new IOContext(context, true));liveDocsRef = new AtomicInteger(1);assert checkLiveCounts();@@ -156,17 +156,6 @@ public class SegmentReader extends IndexReader implements Cloneable {assert si.getDelCount() == 0;}- /**- * Clones the norm bytes. May be overridden by subclasses. New and experimental.- * @param bytes Byte array to clone- * @return New BitVector- */- protected byte[] cloneNormBytes(byte[] bytes) {- byte[] cloneBytes = new byte[bytes.length];- System.arraycopy(bytes, 0, cloneBytes, 0, bytes.length);- return cloneBytes;- }-/*** Clones the deleteDocs BitVector. May be overridden by subclasses. New and experimental.* @param bv BitVector to clone@@ -352,25 +341,12 @@ public class SegmentReader extends IndexReader implements Cloneable {}}- static boolean hasDeletions(SegmentInfo si) throws IOException {- // Don't call ensureOpen() here (it could affect performance)- return si.hasDeletions();- }-@Overridepublic boolean hasDeletions() {// Don't call ensureOpen() here (it could affect performance)return liveDocs != null;}- static boolean usesCompoundFile(SegmentInfo si) throws IOException {- return si.getUseCompoundFile();- }-- static boolean hasSeparateNorms(SegmentInfo si) throws IOException {- return si.hasSeparateNorms();- }-// nocommit: remove deletions from SRsynchronized void deleteDocument(int docNum) throws IOException {ensureOpen();