minor defensive fix (use arg to method, not class private member); add comment

git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1092081 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Michael McCandless 2011-04-14 09:52:03 +00:00
parent ac87b66237
commit 80d8c628eb
1 changed files with 7 additions and 2 deletions

View File

@ -151,10 +151,10 @@ public class BlockTermsReader extends FieldsProducer {
} }
protected void readHeader(IndexInput input) throws IOException { protected void readHeader(IndexInput input) throws IOException {
CodecUtil.checkHeader(in, BlockTermsWriter.CODEC_NAME, CodecUtil.checkHeader(input, BlockTermsWriter.CODEC_NAME,
BlockTermsWriter.VERSION_START, BlockTermsWriter.VERSION_START,
BlockTermsWriter.VERSION_CURRENT); BlockTermsWriter.VERSION_CURRENT);
dirOffset = in.readLong(); dirOffset = input.readLong();
} }
protected void seekDir(IndexInput input, long dirOffset) protected void seekDir(IndexInput input, long dirOffset)
@ -842,6 +842,11 @@ public class BlockTermsReader extends FieldsProducer {
private void decodeMetaData() throws IOException { private void decodeMetaData() throws IOException {
//System.out.println("BTR.decodeMetadata mdUpto=" + metaDataUpto + " vs termCount=" + state.termCount + " state=" + state); //System.out.println("BTR.decodeMetadata mdUpto=" + metaDataUpto + " vs termCount=" + state.termCount + " state=" + state);
if (!seekPending) { if (!seekPending) {
// TODO: cutover to random-access API
// here.... really stupid that we have to decode N
// wasted term metadata just to get to the N+1th
// that we really need...
// lazily catch up on metadata decode: // lazily catch up on metadata decode:
final int limit = state.termCount; final int limit = state.termCount;
// We must set/incr state.termCount because // We must set/incr state.termCount because