mirror of https://github.com/apache/lucene.git
remove unnecessary casts (covariant IndexInput.clone)
git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1375499 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
12167b5414
commit
48bd921374
|
@ -354,7 +354,7 @@ final class BlockPostingsReader extends PostingsReaderBase {
|
||||||
|
|
||||||
public BlockDocsEnum(FieldInfo fieldInfo) throws IOException {
|
public BlockDocsEnum(FieldInfo fieldInfo) throws IOException {
|
||||||
this.startDocIn = BlockPostingsReader.this.docIn;
|
this.startDocIn = BlockPostingsReader.this.docIn;
|
||||||
this.docIn = (IndexInput) startDocIn.clone();
|
this.docIn = startDocIn.clone();
|
||||||
indexHasFreq = fieldInfo.getIndexOptions().compareTo(IndexOptions.DOCS_AND_FREQS) >= 0;
|
indexHasFreq = fieldInfo.getIndexOptions().compareTo(IndexOptions.DOCS_AND_FREQS) >= 0;
|
||||||
indexHasPos = fieldInfo.getIndexOptions().compareTo(IndexOptions.DOCS_AND_FREQS_AND_POSITIONS) >= 0;
|
indexHasPos = fieldInfo.getIndexOptions().compareTo(IndexOptions.DOCS_AND_FREQS_AND_POSITIONS) >= 0;
|
||||||
indexHasOffsets = fieldInfo.getIndexOptions().compareTo(IndexOptions.DOCS_AND_FREQS_AND_POSITIONS_AND_OFFSETS) >= 0;
|
indexHasOffsets = fieldInfo.getIndexOptions().compareTo(IndexOptions.DOCS_AND_FREQS_AND_POSITIONS_AND_OFFSETS) >= 0;
|
||||||
|
@ -486,7 +486,7 @@ final class BlockPostingsReader extends PostingsReaderBase {
|
||||||
|
|
||||||
if (skipper == null) {
|
if (skipper == null) {
|
||||||
// Lazy init: first time this enum has ever been used for skipping
|
// Lazy init: first time this enum has ever been used for skipping
|
||||||
skipper = new BlockSkipReader((IndexInput) docIn.clone(),
|
skipper = new BlockSkipReader(docIn.clone(),
|
||||||
BlockPostingsWriter.maxSkipLevels,
|
BlockPostingsWriter.maxSkipLevels,
|
||||||
BLOCK_SIZE,
|
BLOCK_SIZE,
|
||||||
indexHasPos,
|
indexHasPos,
|
||||||
|
@ -629,8 +629,8 @@ final class BlockPostingsReader extends PostingsReaderBase {
|
||||||
|
|
||||||
public BlockDocsAndPositionsEnum(FieldInfo fieldInfo) throws IOException {
|
public BlockDocsAndPositionsEnum(FieldInfo fieldInfo) throws IOException {
|
||||||
this.startDocIn = BlockPostingsReader.this.docIn;
|
this.startDocIn = BlockPostingsReader.this.docIn;
|
||||||
this.docIn = (IndexInput) startDocIn.clone();
|
this.docIn = startDocIn.clone();
|
||||||
this.posIn = (IndexInput) BlockPostingsReader.this.posIn.clone();
|
this.posIn = BlockPostingsReader.this.posIn.clone();
|
||||||
encoded = new byte[MAX_ENCODED_SIZE];
|
encoded = new byte[MAX_ENCODED_SIZE];
|
||||||
indexHasOffsets = fieldInfo.getIndexOptions().compareTo(IndexOptions.DOCS_AND_FREQS_AND_POSITIONS_AND_OFFSETS) >= 0;
|
indexHasOffsets = fieldInfo.getIndexOptions().compareTo(IndexOptions.DOCS_AND_FREQS_AND_POSITIONS_AND_OFFSETS) >= 0;
|
||||||
indexHasPayloads = fieldInfo.hasPayloads();
|
indexHasPayloads = fieldInfo.hasPayloads();
|
||||||
|
@ -795,7 +795,7 @@ final class BlockPostingsReader extends PostingsReaderBase {
|
||||||
// if (DEBUG) {
|
// if (DEBUG) {
|
||||||
// System.out.println(" create skipper");
|
// System.out.println(" create skipper");
|
||||||
// }
|
// }
|
||||||
skipper = new BlockSkipReader((IndexInput) docIn.clone(),
|
skipper = new BlockSkipReader(docIn.clone(),
|
||||||
BlockPostingsWriter.maxSkipLevels,
|
BlockPostingsWriter.maxSkipLevels,
|
||||||
BLOCK_SIZE,
|
BLOCK_SIZE,
|
||||||
true,
|
true,
|
||||||
|
@ -1046,9 +1046,9 @@ final class BlockPostingsReader extends PostingsReaderBase {
|
||||||
|
|
||||||
public EverythingEnum(FieldInfo fieldInfo) throws IOException {
|
public EverythingEnum(FieldInfo fieldInfo) throws IOException {
|
||||||
this.startDocIn = BlockPostingsReader.this.docIn;
|
this.startDocIn = BlockPostingsReader.this.docIn;
|
||||||
this.docIn = (IndexInput) startDocIn.clone();
|
this.docIn = startDocIn.clone();
|
||||||
this.posIn = (IndexInput) BlockPostingsReader.this.posIn.clone();
|
this.posIn = BlockPostingsReader.this.posIn.clone();
|
||||||
this.payIn = (IndexInput) BlockPostingsReader.this.payIn.clone();
|
this.payIn = BlockPostingsReader.this.payIn.clone();
|
||||||
encoded = new byte[MAX_ENCODED_SIZE];
|
encoded = new byte[MAX_ENCODED_SIZE];
|
||||||
indexHasOffsets = fieldInfo.getIndexOptions().compareTo(IndexOptions.DOCS_AND_FREQS_AND_POSITIONS_AND_OFFSETS) >= 0;
|
indexHasOffsets = fieldInfo.getIndexOptions().compareTo(IndexOptions.DOCS_AND_FREQS_AND_POSITIONS_AND_OFFSETS) >= 0;
|
||||||
if (indexHasOffsets) {
|
if (indexHasOffsets) {
|
||||||
|
@ -1278,7 +1278,7 @@ final class BlockPostingsReader extends PostingsReaderBase {
|
||||||
// if (DEBUG) {
|
// if (DEBUG) {
|
||||||
// System.out.println(" create skipper");
|
// System.out.println(" create skipper");
|
||||||
// }
|
// }
|
||||||
skipper = new BlockSkipReader((IndexInput) docIn.clone(),
|
skipper = new BlockSkipReader(docIn.clone(),
|
||||||
BlockPostingsWriter.maxSkipLevels,
|
BlockPostingsWriter.maxSkipLevels,
|
||||||
BLOCK_SIZE,
|
BLOCK_SIZE,
|
||||||
true,
|
true,
|
||||||
|
|
Loading…
Reference in New Issue