diff --git a/lucene/contrib/instantiated/src/java/org/apache/lucene/store/instantiated/InstantiatedDocsAndPositionsEnum.java b/lucene/contrib/instantiated/src/java/org/apache/lucene/store/instantiated/InstantiatedDocsAndPositionsEnum.java
index 816e454673e..e4eea034bd1 100644
--- a/lucene/contrib/instantiated/src/java/org/apache/lucene/store/instantiated/InstantiatedDocsAndPositionsEnum.java
+++ b/lucene/contrib/instantiated/src/java/org/apache/lucene/store/instantiated/InstantiatedDocsAndPositionsEnum.java
@@ -82,14 +82,17 @@ public class InstantiatedDocsAndPositionsEnum extends DocsAndPositionsEnum {
return currentDoc.getTermPositions().length;
}
+ @Override
public int nextPosition() {
return currentDoc.getTermPositions()[++posUpto];
}
+ @Override
public boolean hasPayload() {
return currentDoc.getPayloads()[posUpto] != null;
}
+ @Override
public BytesRef getPayload() {
payload.bytes = currentDoc.getPayloads()[posUpto];
payload.length = payload.bytes.length;
diff --git a/lucene/contrib/misc/src/java/org/apache/lucene/store/WindowsDirectory.java b/lucene/contrib/misc/src/java/org/apache/lucene/store/WindowsDirectory.java
index 870ebfade1e..f1c3f74a117 100644
--- a/lucene/contrib/misc/src/java/org/apache/lucene/store/WindowsDirectory.java
+++ b/lucene/contrib/misc/src/java/org/apache/lucene/store/WindowsDirectory.java
@@ -64,6 +64,7 @@ public class WindowsDirectory extends FSDirectory {
super(path, null);
}
+ @Override
public IndexInput openInput(String name, int bufferSize) throws IOException {
ensureOpen();
return new WindowsIndexInput(new File(getDirectory(), name), Math.max(bufferSize, DEFAULT_BUFFERSIZE));
@@ -82,14 +83,17 @@ public class WindowsDirectory extends FSDirectory {
isOpen = true;
}
+ @Override
protected void readInternal(byte[] b, int offset, int length) throws IOException {
if (WindowsDirectory.read(fd, b, offset, length, getFilePointer()) != length)
throw new IOException("Read past EOF");
}
+ @Override
protected void seekInternal(long pos) throws IOException {
}
+ @Override
public synchronized void close() throws IOException {
// NOTE: we synchronize and track "isOpen" because Lucene sometimes closes IIs twice!
if (!isClone && isOpen) {
@@ -98,6 +102,7 @@ public class WindowsDirectory extends FSDirectory {
}
}
+ @Override
public long length() {
return length;
}
diff --git a/lucene/contrib/queryparser/src/test/org/apache/lucene/queryParser/precedence/TestPrecedenceQueryParser.java b/lucene/contrib/queryparser/src/test/org/apache/lucene/queryParser/precedence/TestPrecedenceQueryParser.java
index 5d044b9ad4c..5cba05b3111 100644
--- a/lucene/contrib/queryparser/src/test/org/apache/lucene/queryParser/precedence/TestPrecedenceQueryParser.java
+++ b/lucene/contrib/queryparser/src/test/org/apache/lucene/queryParser/precedence/TestPrecedenceQueryParser.java
@@ -84,6 +84,7 @@ public class TestPrecedenceQueryParser extends LuceneTestCase {
OffsetAttribute offsetAtt = addAttribute(OffsetAttribute.class);
+ @Override
public boolean incrementToken() throws IOException {
if (inPhrase) {
inPhrase = false;
@@ -108,6 +109,7 @@ public class TestPrecedenceQueryParser extends LuceneTestCase {
public static final class QPTestAnalyzer extends Analyzer {
/** Filters MockTokenizer with StopFilter. */
+ @Override
public final TokenStream tokenStream(String fieldName, Reader reader) {
return new QPTestFilter(new MockTokenizer(reader, MockTokenizer.SIMPLE, true));
}
@@ -115,6 +117,7 @@ public class TestPrecedenceQueryParser extends LuceneTestCase {
private int originalMaxClauses;
+ @Override
public void setUp() throws Exception {
super.setUp();
originalMaxClauses = BooleanQuery.getMaxClauseCount();
@@ -627,6 +630,7 @@ public class TestPrecedenceQueryParser extends LuceneTestCase {
}
+ @Override
public void tearDown() {
BooleanQuery.setMaxClauseCount(originalMaxClauses);
}
diff --git a/lucene/src/java/org/apache/lucene/index/FreqProxTermsWriterPerField.java b/lucene/src/java/org/apache/lucene/index/FreqProxTermsWriterPerField.java
index f47d2a71bc0..b504f1557b9 100644
--- a/lucene/src/java/org/apache/lucene/index/FreqProxTermsWriterPerField.java
+++ b/lucene/src/java/org/apache/lucene/index/FreqProxTermsWriterPerField.java
@@ -194,6 +194,7 @@ final class FreqProxTermsWriterPerField extends TermsHashConsumerPerField implem
return new FreqProxPostingsArray(size);
}
+ @Override
void copyTo(ParallelPostingsArray toArray, int numToCopy) {
assert toArray instanceof FreqProxPostingsArray;
FreqProxPostingsArray to = (FreqProxPostingsArray) toArray;
diff --git a/lucene/src/java/org/apache/lucene/index/MultiReader.java b/lucene/src/java/org/apache/lucene/index/MultiReader.java
index 0d3a082567b..c2682e40231 100644
--- a/lucene/src/java/org/apache/lucene/index/MultiReader.java
+++ b/lucene/src/java/org/apache/lucene/index/MultiReader.java
@@ -383,6 +383,7 @@ public class MultiReader extends IndexReader implements Cloneable {
return subReaders;
}
+ @Override
public ReaderContext getTopReaderContext() {
return topLevelContext;
}
diff --git a/lucene/src/java/org/apache/lucene/index/PerFieldCodecWrapper.java b/lucene/src/java/org/apache/lucene/index/PerFieldCodecWrapper.java
index f7d4a1885d4..51c92321f54 100644
--- a/lucene/src/java/org/apache/lucene/index/PerFieldCodecWrapper.java
+++ b/lucene/src/java/org/apache/lucene/index/PerFieldCodecWrapper.java
@@ -204,6 +204,7 @@ final class PerFieldCodecWrapper extends Codec {
}
}
+ @Override
public FieldsProducer fieldsProducer(SegmentReadState state)
throws IOException {
return new FieldsReader(state.dir, state.fieldInfos, state.segmentInfo,
diff --git a/lucene/src/java/org/apache/lucene/index/TermVectorsTermsWriterPerField.java b/lucene/src/java/org/apache/lucene/index/TermVectorsTermsWriterPerField.java
index 4938538d054..2b4e35e09cd 100644
--- a/lucene/src/java/org/apache/lucene/index/TermVectorsTermsWriterPerField.java
+++ b/lucene/src/java/org/apache/lucene/index/TermVectorsTermsWriterPerField.java
@@ -281,6 +281,7 @@ final class TermVectorsTermsWriterPerField extends TermsHashConsumerPerField {
int[] lastOffsets; // Last offset we saw
int[] lastPositions; // Last position where this term occurred
+ @Override
ParallelPostingsArray newInstance(int size) {
return new TermVectorsPostingsArray(size);
}
diff --git a/lucene/src/java/org/apache/lucene/index/codecs/BlockTermsReader.java b/lucene/src/java/org/apache/lucene/index/codecs/BlockTermsReader.java
index d4a6ac1bce7..e25364c33a3 100644
--- a/lucene/src/java/org/apache/lucene/index/codecs/BlockTermsReader.java
+++ b/lucene/src/java/org/apache/lucene/index/codecs/BlockTermsReader.java
@@ -646,6 +646,7 @@ public class BlockTermsReader extends FieldsProducer {
return SeekStatus.FOUND;
}
+ @Override
public long ord() {
if (!doOrd) {
throw new UnsupportedOperationException();
diff --git a/lucene/src/java/org/apache/lucene/index/codecs/preflex/SegmentTermPositions.java b/lucene/src/java/org/apache/lucene/index/codecs/preflex/SegmentTermPositions.java
index f50d226741c..c642f6b1aaa 100644
--- a/lucene/src/java/org/apache/lucene/index/codecs/preflex/SegmentTermPositions.java
+++ b/lucene/src/java/org/apache/lucene/index/codecs/preflex/SegmentTermPositions.java
@@ -58,6 +58,7 @@ extends SegmentTermDocs {
this.proxStreamOrig = proxStream; // the proxStream will be cloned lazily when nextPosition() is called for the first time
}
+ @Override
final void seek(TermInfo ti, Term term) throws IOException {
super.seek(ti, term);
if (ti != null)
@@ -69,6 +70,7 @@ extends SegmentTermDocs {
needToLoadPayload = false;
}
+ @Override
public final void close() throws IOException {
super.close();
if (proxStream != null) proxStream.close();
@@ -100,11 +102,13 @@ extends SegmentTermDocs {
return delta;
}
+ @Override
protected final void skippingDoc() throws IOException {
// we remember to skip a document lazily
lazySkipProxCount += freq;
}
+ @Override
public final boolean next() throws IOException {
// we remember to skip the remaining positions of the current
// document lazily
@@ -118,12 +122,14 @@ extends SegmentTermDocs {
return false;
}
+ @Override
public final int read(final int[] docs, final int[] freqs) {
throw new UnsupportedOperationException("TermPositions does not support processing multiple documents in one call. Use TermDocs instead.");
}
/** Called by super.skipTo(). */
+ @Override
protected void skipProx(long proxPointer, int payloadLength) throws IOException {
// we save the pointer, we might have to skip there lazily
lazySkipPointer = proxPointer;
diff --git a/lucene/src/java/org/apache/lucene/index/codecs/preflex/TermInfosReader.java b/lucene/src/java/org/apache/lucene/index/codecs/preflex/TermInfosReader.java
index adf0535390d..8205e73b972 100644
--- a/lucene/src/java/org/apache/lucene/index/codecs/preflex/TermInfosReader.java
+++ b/lucene/src/java/org/apache/lucene/index/codecs/preflex/TermInfosReader.java
@@ -67,15 +67,18 @@ public final class TermInfosReader {
this.term = t;
}
+ @Override
public boolean equals(Object other) {
CloneableTerm t = (CloneableTerm) other;
return this.term.equals(t.term);
}
+ @Override
public int hashCode() {
return term.hashCode();
}
+ @Override
public Object clone() {
return new CloneableTerm(term);
}
diff --git a/lucene/src/java/org/apache/lucene/index/codecs/sep/IntIndexInput.java b/lucene/src/java/org/apache/lucene/index/codecs/sep/IntIndexInput.java
index 741272a329a..631476df0ba 100644
--- a/lucene/src/java/org/apache/lucene/index/codecs/sep/IntIndexInput.java
+++ b/lucene/src/java/org/apache/lucene/index/codecs/sep/IntIndexInput.java
@@ -48,6 +48,7 @@ public abstract class IntIndexInput implements Closeable {
public abstract void set(Index other);
+ @Override
public abstract Object clone();
}
diff --git a/lucene/src/java/org/apache/lucene/index/codecs/sep/SepPostingsReaderImpl.java b/lucene/src/java/org/apache/lucene/index/codecs/sep/SepPostingsReaderImpl.java
index 08e2781732c..b693db361c9 100644
--- a/lucene/src/java/org/apache/lucene/index/codecs/sep/SepPostingsReaderImpl.java
+++ b/lucene/src/java/org/apache/lucene/index/codecs/sep/SepPostingsReaderImpl.java
@@ -160,6 +160,7 @@ public class SepPostingsReaderImpl extends PostingsReaderBase {
return other;
}
+ @Override
public void copyFrom(TermState _other) {
super.copyFrom(_other);
SepTermState other = (SepTermState) _other;
diff --git a/lucene/src/java/org/apache/lucene/index/codecs/simpletext/SimpleTextFieldsReader.java b/lucene/src/java/org/apache/lucene/index/codecs/simpletext/SimpleTextFieldsReader.java
index e40fba2f44e..ea74a6b6627 100644
--- a/lucene/src/java/org/apache/lucene/index/codecs/simpletext/SimpleTextFieldsReader.java
+++ b/lucene/src/java/org/apache/lucene/index/codecs/simpletext/SimpleTextFieldsReader.java
@@ -129,6 +129,7 @@ class SimpleTextFieldsReader extends FieldsProducer {
fstEnum = new BytesRefFSTEnum>>(fst);
}
+ @Override
public SeekStatus seek(BytesRef text, boolean useCache /* ignored */) throws IOException {
//System.out.println("seek to text=" + text.utf8ToString());
diff --git a/lucene/src/java/org/apache/lucene/index/codecs/standard/StandardPostingsReader.java b/lucene/src/java/org/apache/lucene/index/codecs/standard/StandardPostingsReader.java
index 0e53a99d536..0c9dd4f5c86 100644
--- a/lucene/src/java/org/apache/lucene/index/codecs/standard/StandardPostingsReader.java
+++ b/lucene/src/java/org/apache/lucene/index/codecs/standard/StandardPostingsReader.java
@@ -99,12 +99,14 @@ public class StandardPostingsReader extends PostingsReaderBase {
ByteArrayDataInput bytesReader;
byte[] bytes;
+ @Override
public Object clone() {
StandardTermState other = new StandardTermState();
other.copyFrom(this);
return other;
}
+ @Override
public void copyFrom(TermState _other) {
super.copyFrom(_other);
StandardTermState other = (StandardTermState) _other;
@@ -118,6 +120,7 @@ public class StandardPostingsReader extends PostingsReaderBase {
// (rare!), they will be re-read from disk.
}
+ @Override
public String toString() {
return super.toString() + " freqFP=" + freqOffset + " proxFP=" + proxOffset + " skipOffset=" + skipOffset;
}
@@ -569,6 +572,7 @@ public class StandardPostingsReader extends PostingsReaderBase {
return doc;
}
+ @Override
public int nextPosition() throws IOException {
if (lazyProxPointer != -1) {
@@ -597,10 +601,12 @@ public class StandardPostingsReader extends PostingsReaderBase {
/** Returns the payload at this position, or null if no
* payload was indexed. */
+ @Override
public BytesRef getPayload() throws IOException {
throw new IOException("No payloads exist for this field!");
}
+ @Override
public boolean hasPayload() {
return false;
}
@@ -765,6 +771,7 @@ public class StandardPostingsReader extends PostingsReaderBase {
return doc;
}
+ @Override
public int nextPosition() throws IOException {
if (lazyProxPointer != -1) {
@@ -825,6 +832,7 @@ public class StandardPostingsReader extends PostingsReaderBase {
/** Returns the payload at this position, or null if no
* payload was indexed. */
+ @Override
public BytesRef getPayload() throws IOException {
assert lazyProxPointer == -1;
assert posPendingCount < freq;
@@ -842,6 +850,7 @@ public class StandardPostingsReader extends PostingsReaderBase {
return payload;
}
+ @Override
public boolean hasPayload() {
return payloadPending && payloadLength > 0;
}
diff --git a/lucene/src/java/org/apache/lucene/search/FuzzyTermsEnum.java b/lucene/src/java/org/apache/lucene/search/FuzzyTermsEnum.java
index 40795000c82..ee5e274ffaf 100644
--- a/lucene/src/java/org/apache/lucene/search/FuzzyTermsEnum.java
+++ b/lucene/src/java/org/apache/lucene/search/FuzzyTermsEnum.java
@@ -261,6 +261,7 @@ public final class FuzzyTermsEnum extends TermsEnum {
return actualEnum.docsAndPositions(skipDocs, reuse);
}
+ @Override
public void seek(BytesRef term, TermState state) throws IOException {
actualEnum.seek(term, state);
}
diff --git a/lucene/src/java/org/apache/lucene/search/TotalHitCountCollector.java b/lucene/src/java/org/apache/lucene/search/TotalHitCountCollector.java
index 533d69c65d3..b154091e27d 100644
--- a/lucene/src/java/org/apache/lucene/search/TotalHitCountCollector.java
+++ b/lucene/src/java/org/apache/lucene/search/TotalHitCountCollector.java
@@ -31,16 +31,20 @@ public class TotalHitCountCollector extends Collector {
return totalHits;
}
+ @Override
public void setScorer(Scorer scorer) {
}
+ @Override
public void collect(int doc) {
totalHits++;
}
+ @Override
public void setNextReader(AtomicReaderContext context) {
}
+ @Override
public boolean acceptsDocsOutOfOrder() {
return true;
}
diff --git a/lucene/src/java/org/apache/lucene/search/cache/EntryCreator.java b/lucene/src/java/org/apache/lucene/search/cache/EntryCreator.java
index 0e0daff40cd..362cc83a71e 100644
--- a/lucene/src/java/org/apache/lucene/search/cache/EntryCreator.java
+++ b/lucene/src/java/org/apache/lucene/search/cache/EntryCreator.java
@@ -58,6 +58,7 @@ public abstract class EntryCreator implements Serializable
// This can be removed
//------------------------------------------------------------------------
+ @Override
public boolean equals(Object obj) {
if( obj instanceof EntryCreator ) {
return getCacheKey().equals( ((EntryCreator)obj).getCacheKey() );
diff --git a/lucene/src/java/org/apache/lucene/search/function/MultiValueSource.java b/lucene/src/java/org/apache/lucene/search/function/MultiValueSource.java
index 7dbccb25a69..b3ec7681ad1 100644
--- a/lucene/src/java/org/apache/lucene/search/function/MultiValueSource.java
+++ b/lucene/src/java/org/apache/lucene/search/function/MultiValueSource.java
@@ -52,6 +52,7 @@ public final class MultiValueSource extends ValueSource {
return other.getValues(context);
}
+ @Override
public DocValues getValues(ReaderContext context) throws IOException {
if (context.isAtomic) {
return getValues((AtomicReaderContext) context);
diff --git a/lucene/src/java/org/apache/lucene/search/payloads/PayloadNearQuery.java b/lucene/src/java/org/apache/lucene/search/payloads/PayloadNearQuery.java
index 19a771213ba..35356f30f7d 100644
--- a/lucene/src/java/org/apache/lucene/search/payloads/PayloadNearQuery.java
+++ b/lucene/src/java/org/apache/lucene/search/payloads/PayloadNearQuery.java
@@ -219,6 +219,7 @@ public class PayloadNearQuery extends SpanNearQuery {
return true;
}
+ @Override
public float score() throws IOException {
return super.score()
diff --git a/lucene/src/java/org/apache/lucene/search/spans/SpanNearPayloadCheckQuery.java b/lucene/src/java/org/apache/lucene/search/spans/SpanNearPayloadCheckQuery.java
index 5fce135941b..2b17f627327 100644
--- a/lucene/src/java/org/apache/lucene/search/spans/SpanNearPayloadCheckQuery.java
+++ b/lucene/src/java/org/apache/lucene/search/spans/SpanNearPayloadCheckQuery.java
@@ -72,6 +72,7 @@ public class SpanNearPayloadCheckQuery extends SpanPositionCheckQuery {
return AcceptStatus.NO;
}
+ @Override
public String toString(String field) {
StringBuilder buffer = new StringBuilder();
buffer.append("spanPayCheck(");
diff --git a/lucene/src/java/org/apache/lucene/search/spans/SpanPayloadCheckQuery.java b/lucene/src/java/org/apache/lucene/search/spans/SpanPayloadCheckQuery.java
index 69dbc306f19..086dad2f929 100644
--- a/lucene/src/java/org/apache/lucene/search/spans/SpanPayloadCheckQuery.java
+++ b/lucene/src/java/org/apache/lucene/search/spans/SpanPayloadCheckQuery.java
@@ -74,6 +74,7 @@ public class SpanPayloadCheckQuery extends SpanPositionCheckQuery{
return AcceptStatus.YES;
}
+ @Override
public String toString(String field) {
StringBuilder buffer = new StringBuilder();
buffer.append("spanPayCheck(");
diff --git a/lucene/src/java/org/apache/lucene/util/BytesRef.java b/lucene/src/java/org/apache/lucene/util/BytesRef.java
index 1ec291a5c65..a90b6fb682d 100644
--- a/lucene/src/java/org/apache/lucene/util/BytesRef.java
+++ b/lucene/src/java/org/apache/lucene/util/BytesRef.java
@@ -209,6 +209,7 @@ public final class BytesRef implements Comparable, Externalizable {
}
/** Returns hex encoded bytes, eg [0x6c 0x75 0x63 0x65 0x6e 0x65] */
+ @Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append('[');
diff --git a/lucene/src/java/org/apache/lucene/util/DoubleBarrelLRUCache.java b/lucene/src/java/org/apache/lucene/util/DoubleBarrelLRUCache.java
index a0dd7c19f08..cdb958ef252 100644
--- a/lucene/src/java/org/apache/lucene/util/DoubleBarrelLRUCache.java
+++ b/lucene/src/java/org/apache/lucene/util/DoubleBarrelLRUCache.java
@@ -45,6 +45,7 @@ import java.util.Map;
final public class DoubleBarrelLRUCache {
public static abstract class CloneableKey {
+ @Override
abstract public Object clone();
}
diff --git a/lucene/src/java/org/apache/lucene/util/IntsRef.java b/lucene/src/java/org/apache/lucene/util/IntsRef.java
index 1f284b5ea51..ee1bd2ed69c 100644
--- a/lucene/src/java/org/apache/lucene/util/IntsRef.java
+++ b/lucene/src/java/org/apache/lucene/util/IntsRef.java
@@ -123,6 +123,7 @@ public final class IntsRef implements Comparable {
}
}
+ @Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append('[');
diff --git a/lucene/src/java/org/apache/lucene/util/ReaderUtil.java b/lucene/src/java/org/apache/lucene/util/ReaderUtil.java
index 772b5ebf751..8d772880d0b 100644
--- a/lucene/src/java/org/apache/lucene/util/ReaderUtil.java
+++ b/lucene/src/java/org/apache/lucene/util/ReaderUtil.java
@@ -47,6 +47,7 @@ public final class ReaderUtil {
this.readerIndex = readerIndex;
}
+ @Override
public String toString() {
return "slice start=" + start + " length=" + length + " readerIndex=" + readerIndex;
}
diff --git a/lucene/src/java/org/apache/lucene/util/automaton/BasicOperations.java b/lucene/src/java/org/apache/lucene/util/automaton/BasicOperations.java
index ce1c19001b2..e7e9b301482 100644
--- a/lucene/src/java/org/apache/lucene/util/automaton/BasicOperations.java
+++ b/lucene/src/java/org/apache/lucene/util/automaton/BasicOperations.java
@@ -483,10 +483,12 @@ final public class BasicOperations {
starts.count = 0;
}
+ @Override
public boolean equals(Object other) {
return ((PointTransitions) other).point == point;
}
+ @Override
public int hashCode() {
return point;
}
@@ -563,6 +565,7 @@ final public class BasicOperations {
find(1+t.max).ends.add(t);
}
+ @Override
public String toString() {
StringBuilder s = new StringBuilder();
for(int i=0;i extends Outputs> {
}
}
+ @Override
public int hashCode() {
return output1.hashCode() + output2.hashCode();
}
diff --git a/lucene/src/java/org/apache/lucene/util/packed/Packed32.java b/lucene/src/java/org/apache/lucene/util/packed/Packed32.java
index c8bb011c209..ff22ad7ef48 100644
--- a/lucene/src/java/org/apache/lucene/util/packed/Packed32.java
+++ b/lucene/src/java/org/apache/lucene/util/packed/Packed32.java
@@ -214,6 +214,7 @@ class Packed32 extends PackedInts.ReaderImpl implements PackedInts.Mutable {
Arrays.fill(blocks, 0);
}
+ @Override
public String toString() {
return "Packed32(bitsPerValue=" + bitsPerValue + ", maxPos=" + maxPos
+ ", elements.length=" + blocks.length + ")";
diff --git a/lucene/src/java/org/apache/lucene/util/packed/Packed64.java b/lucene/src/java/org/apache/lucene/util/packed/Packed64.java
index b3826676503..62e77934ef3 100644
--- a/lucene/src/java/org/apache/lucene/util/packed/Packed64.java
+++ b/lucene/src/java/org/apache/lucene/util/packed/Packed64.java
@@ -199,6 +199,7 @@ class Packed64 extends PackedInts.ReaderImpl implements PackedInts.Mutable {
| ((value << shifts[base + 2]) & writeMasks[base+2]);
}
+ @Override
public String toString() {
return "Packed64(bitsPerValue=" + bitsPerValue + ", size="
+ size() + ", maxPos=" + maxPos
diff --git a/lucene/src/java/org/apache/lucene/util/packed/PackedWriter.java b/lucene/src/java/org/apache/lucene/util/packed/PackedWriter.java
index 0cf054991ba..b2c86dd799f 100644
--- a/lucene/src/java/org/apache/lucene/util/packed/PackedWriter.java
+++ b/lucene/src/java/org/apache/lucene/util/packed/PackedWriter.java
@@ -106,6 +106,7 @@ class PackedWriter extends PackedInts.Writer {
}
}
+ @Override
public String toString() {
return "PackedWriter(written " + written + "/" + valueCount + " with "
+ bitsPerValue + " bits/value)";
diff --git a/lucene/src/test/org/apache/lucene/TestAssertions.java b/lucene/src/test/org/apache/lucene/TestAssertions.java
index 373fd3db271..ce51fd34484 100644
--- a/lucene/src/test/org/apache/lucene/TestAssertions.java
+++ b/lucene/src/test/org/apache/lucene/TestAssertions.java
@@ -35,34 +35,45 @@ public class TestAssertions extends LuceneTestCase {
}
static class TestAnalyzer1 extends Analyzer {
+ @Override
public final TokenStream tokenStream(String s, Reader r) { return null; }
+ @Override
public final TokenStream reusableTokenStream(String s, Reader r) { return null; }
}
static final class TestAnalyzer2 extends Analyzer {
+ @Override
public TokenStream tokenStream(String s, Reader r) { return null; }
+ @Override
public TokenStream reusableTokenStream(String s, Reader r) { return null; }
}
static class TestAnalyzer3 extends Analyzer {
+ @Override
public TokenStream tokenStream(String s, Reader r) { return null; }
+ @Override
public TokenStream reusableTokenStream(String s, Reader r) { return null; }
}
static class TestAnalyzer4 extends Analyzer {
+ @Override
public final TokenStream tokenStream(String s, Reader r) { return null; }
+ @Override
public TokenStream reusableTokenStream(String s, Reader r) { return null; }
}
static class TestTokenStream1 extends TokenStream {
+ @Override
public final boolean incrementToken() { return false; }
}
static final class TestTokenStream2 extends TokenStream {
+ @Override
public boolean incrementToken() { return false; }
}
static class TestTokenStream3 extends TokenStream {
+ @Override
public boolean incrementToken() { return false; }
}
diff --git a/lucene/src/test/org/apache/lucene/TestExternalCodecs.java b/lucene/src/test/org/apache/lucene/TestExternalCodecs.java
index 4252f752488..e7ff3954542 100644
--- a/lucene/src/test/org/apache/lucene/TestExternalCodecs.java
+++ b/lucene/src/test/org/apache/lucene/TestExternalCodecs.java
@@ -63,6 +63,7 @@ public class TestExternalCodecs extends LuceneTestCase {
return t2.length-t1.length;
}
+ @Override
public boolean equals(Object other) {
return this == other;
}
@@ -344,6 +345,7 @@ public class TestExternalCodecs extends LuceneTestCase {
return ramField.termToDocs.get(current).totalTermFreq;
}
+ @Override
public DocsEnum docs(Bits skipDocs, DocsEnum reuse) {
return new RAMDocsEnum(ramField.termToDocs.get(current), skipDocs);
}
diff --git a/lucene/src/test/org/apache/lucene/analysis/tokenattributes/TestCharTermAttributeImpl.java b/lucene/src/test/org/apache/lucene/analysis/tokenattributes/TestCharTermAttributeImpl.java
index bac72b5951d..1d2ab4371b7 100644
--- a/lucene/src/test/org/apache/lucene/analysis/tokenattributes/TestCharTermAttributeImpl.java
+++ b/lucene/src/test/org/apache/lucene/analysis/tokenattributes/TestCharTermAttributeImpl.java
@@ -227,6 +227,7 @@ public class TestCharTermAttributeImpl extends LuceneTestCase {
public char charAt(int i) { return longTestString.charAt(i); }
public int length() { return longTestString.length(); }
public CharSequence subSequence(int start, int end) { return longTestString.subSequence(start, end); }
+ @Override
public String toString() { return longTestString; }
});
assertEquals("4567890123456"+longTestString, t.toString());
diff --git a/lucene/src/test/org/apache/lucene/index/TestDocsAndPositions.java b/lucene/src/test/org/apache/lucene/index/TestDocsAndPositions.java
index 7929a4519b5..a3f02482b93 100644
--- a/lucene/src/test/org/apache/lucene/index/TestDocsAndPositions.java
+++ b/lucene/src/test/org/apache/lucene/index/TestDocsAndPositions.java
@@ -36,6 +36,7 @@ public class TestDocsAndPositions extends LuceneTestCase {
private String fieldName;
private boolean usePayload;
+ @Override
public void setUp() throws Exception {
super.setUp();
fieldName = "field" + random.nextInt();
diff --git a/lucene/src/test/org/apache/lucene/index/TestFilterIndexReader.java b/lucene/src/test/org/apache/lucene/index/TestFilterIndexReader.java
index 5f4dfd36e80..c17dc38b9aa 100644
--- a/lucene/src/test/org/apache/lucene/index/TestFilterIndexReader.java
+++ b/lucene/src/test/org/apache/lucene/index/TestFilterIndexReader.java
@@ -38,9 +38,11 @@ public class TestFilterIndexReader extends LuceneTestCase {
TestFields(Fields in) {
super(in);
}
+ @Override
public FieldsEnum iterator() throws IOException {
return new TestFieldsEnum(super.iterator());
}
+ @Override
public Terms terms(String field) throws IOException {
return new TestTerms(super.terms(field));
}
@@ -51,6 +53,7 @@ public class TestFilterIndexReader extends LuceneTestCase {
super(in);
}
+ @Override
public TermsEnum iterator() throws IOException {
return new TestTermsEnum(super.iterator());
}
@@ -61,6 +64,7 @@ public class TestFilterIndexReader extends LuceneTestCase {
super(in);
}
+ @Override
public TermsEnum terms() throws IOException {
return new TestTermsEnum(super.terms());
}
diff --git a/lucene/src/test/org/apache/lucene/index/TestIndexWriterReader.java b/lucene/src/test/org/apache/lucene/index/TestIndexWriterReader.java
index 60f5e49fbb0..8607d8fed1b 100644
--- a/lucene/src/test/org/apache/lucene/index/TestIndexWriterReader.java
+++ b/lucene/src/test/org/apache/lucene/index/TestIndexWriterReader.java
@@ -971,6 +971,7 @@ public class TestIndexWriterReader extends LuceneTestCase {
setMaxBufferedDocs(2).
setReaderPooling(true).
setMergedSegmentWarmer(new IndexWriter.IndexReaderWarmer() {
+ @Override
public void warm(IndexReader r) throws IOException {
IndexSearcher s = new IndexSearcher(r);
TopDocs hits = s.search(new TermQuery(new Term("foo", "bar")), 10);
diff --git a/lucene/src/test/org/apache/lucene/index/TestMultiLevelSkipList.java b/lucene/src/test/org/apache/lucene/index/TestMultiLevelSkipList.java
index 425e790784d..92c3689612a 100644
--- a/lucene/src/test/org/apache/lucene/index/TestMultiLevelSkipList.java
+++ b/lucene/src/test/org/apache/lucene/index/TestMultiLevelSkipList.java
@@ -53,6 +53,7 @@ public class TestMultiLevelSkipList extends LuceneTestCase {
super(random, delegate);
}
+ @Override
public IndexInput openInput(String fileName) throws IOException {
IndexInput in = super.openInput(fileName);
if (fileName.endsWith(".frq"))
@@ -61,6 +62,7 @@ public class TestMultiLevelSkipList extends LuceneTestCase {
}
}
+ @Override
@Before
public void setUp() throws Exception {
super.setUp();
diff --git a/lucene/src/test/org/apache/lucene/index/TestPerSegmentDeletes.java b/lucene/src/test/org/apache/lucene/index/TestPerSegmentDeletes.java
index a18e2eaee48..c7312b45ab8 100644
--- a/lucene/src/test/org/apache/lucene/index/TestPerSegmentDeletes.java
+++ b/lucene/src/test/org/apache/lucene/index/TestPerSegmentDeletes.java
@@ -257,6 +257,7 @@ public class TestPerSegmentDeletes extends LuceneTestCase {
@Override
public void close() {}
+ @Override
public MergeSpecification findMerges(SegmentInfos segmentInfos)
throws CorruptIndexException, IOException {
MergeSpecification ms = new MergeSpecification();
diff --git a/lucene/src/test/org/apache/lucene/search/TestAutomatonQuery.java b/lucene/src/test/org/apache/lucene/search/TestAutomatonQuery.java
index 58e4e4d5b03..f5809dd1931 100644
--- a/lucene/src/test/org/apache/lucene/search/TestAutomatonQuery.java
+++ b/lucene/src/test/org/apache/lucene/search/TestAutomatonQuery.java
@@ -40,6 +40,7 @@ public class TestAutomatonQuery extends LuceneTestCase {
private final String FN = "field";
+ @Override
public void setUp() throws Exception {
super.setUp();
directory = newDirectory();
@@ -65,6 +66,7 @@ public class TestAutomatonQuery extends LuceneTestCase {
writer.close();
}
+ @Override
public void tearDown() throws Exception {
searcher.close();
reader.close();
diff --git a/lucene/src/test/org/apache/lucene/search/TestAutomatonQueryUnicode.java b/lucene/src/test/org/apache/lucene/search/TestAutomatonQueryUnicode.java
index 29bec6c066a..b764dc0fc4f 100644
--- a/lucene/src/test/org/apache/lucene/search/TestAutomatonQueryUnicode.java
+++ b/lucene/src/test/org/apache/lucene/search/TestAutomatonQueryUnicode.java
@@ -41,6 +41,7 @@ public class TestAutomatonQueryUnicode extends LuceneTestCase {
private final String FN = "field";
+ @Override
public void setUp() throws Exception {
super.setUp();
directory = newDirectory();
@@ -85,6 +86,7 @@ public class TestAutomatonQueryUnicode extends LuceneTestCase {
writer.close();
}
+ @Override
public void tearDown() throws Exception {
searcher.close();
reader.close();
diff --git a/lucene/src/test/org/apache/lucene/search/TestRegexpQuery.java b/lucene/src/test/org/apache/lucene/search/TestRegexpQuery.java
index 254246bf210..65552c46f1f 100644
--- a/lucene/src/test/org/apache/lucene/search/TestRegexpQuery.java
+++ b/lucene/src/test/org/apache/lucene/search/TestRegexpQuery.java
@@ -42,6 +42,7 @@ public class TestRegexpQuery extends LuceneTestCase {
private Directory directory;
private final String FN = "field";
+ @Override
public void setUp() throws Exception {
super.setUp();
directory = newDirectory();
@@ -56,6 +57,7 @@ public class TestRegexpQuery extends LuceneTestCase {
searcher = new IndexSearcher(reader);
}
+ @Override
public void tearDown() throws Exception {
searcher.close();
reader.close();
diff --git a/lucene/src/test/org/apache/lucene/search/cache/TestEntryCreators.java b/lucene/src/test/org/apache/lucene/search/cache/TestEntryCreators.java
index 4485adb82dc..fad6f63c3f2 100644
--- a/lucene/src/test/org/apache/lucene/search/cache/TestEntryCreators.java
+++ b/lucene/src/test/org/apache/lucene/search/cache/TestEntryCreators.java
@@ -54,6 +54,7 @@ public class TestEntryCreators extends LuceneTestCase {
this.parser = parser;
values = new Number[NUM_DOCS];
}
+ @Override
public String toString()
{
return field;
diff --git a/lucene/src/test/org/apache/lucene/util/LuceneJUnitDividingSelector.java b/lucene/src/test/org/apache/lucene/util/LuceneJUnitDividingSelector.java
index cf27a7267fc..5a9509c5a82 100644
--- a/lucene/src/test/org/apache/lucene/util/LuceneJUnitDividingSelector.java
+++ b/lucene/src/test/org/apache/lucene/util/LuceneJUnitDividingSelector.java
@@ -30,6 +30,7 @@ public class LuceneJUnitDividingSelector extends BaseExtendSelector {
/** Current part to accept. */
private int part;
+ @Override
public void setParameters(Parameter[] pParameters) {
super.setParameters(pParameters);
for (int j = 0; j < pParameters.length; j++) {
@@ -46,6 +47,7 @@ public class LuceneJUnitDividingSelector extends BaseExtendSelector {
}
}
+ @Override
public void verifySettings() {
super.verifySettings();
if (divisor <= 0 || part <= 0) {
@@ -56,6 +58,7 @@ public class LuceneJUnitDividingSelector extends BaseExtendSelector {
}
}
+ @Override
public boolean isSelected(File dir, String name, File path) {
counter = counter % divisor + 1;
return counter == part;
diff --git a/lucene/src/test/org/apache/lucene/util/TestBytesRefHash.java b/lucene/src/test/org/apache/lucene/util/TestBytesRefHash.java
index 553898a8a8c..2c82aea6ff3 100644
--- a/lucene/src/test/org/apache/lucene/util/TestBytesRefHash.java
+++ b/lucene/src/test/org/apache/lucene/util/TestBytesRefHash.java
@@ -40,6 +40,7 @@ public class TestBytesRefHash extends LuceneTestCase {
/**
*/
+ @Override
@Before
public void setUp() throws Exception {
super.setUp();
diff --git a/lucene/src/test/org/apache/lucene/util/TestDoubleBarrelLRUCache.java b/lucene/src/test/org/apache/lucene/util/TestDoubleBarrelLRUCache.java
index 03a935a6fef..952c218de3f 100644
--- a/lucene/src/test/org/apache/lucene/util/TestDoubleBarrelLRUCache.java
+++ b/lucene/src/test/org/apache/lucene/util/TestDoubleBarrelLRUCache.java
@@ -145,14 +145,17 @@ public class TestDoubleBarrelLRUCache extends LuceneTestCase {
this.value = value;
}
+ @Override
public boolean equals(Object other) {
return this.value.equals(((CloneableObject) other).value);
}
+ @Override
public int hashCode() {
return value.hashCode();
}
+ @Override
public Object clone() {
return new CloneableObject(value);
}
@@ -165,14 +168,17 @@ public class TestDoubleBarrelLRUCache extends LuceneTestCase {
this.value = value;
}
+ @Override
public boolean equals(Object other) {
return this.value.equals(((CloneableInteger) other).value);
}
+ @Override
public int hashCode() {
return value.hashCode();
}
+ @Override
public Object clone() {
return new CloneableInteger(value);
}
diff --git a/lucene/src/test/org/apache/lucene/util/TestRecyclingByteBlockAllocator.java b/lucene/src/test/org/apache/lucene/util/TestRecyclingByteBlockAllocator.java
index beac79df7c9..b6c1c4d4f9c 100644
--- a/lucene/src/test/org/apache/lucene/util/TestRecyclingByteBlockAllocator.java
+++ b/lucene/src/test/org/apache/lucene/util/TestRecyclingByteBlockAllocator.java
@@ -31,6 +31,7 @@ public class TestRecyclingByteBlockAllocator extends LuceneTestCase {
/**
*/
+ @Override
@Before
public void setUp() throws Exception {
super.setUp();
diff --git a/lucene/src/test/org/apache/lucene/util/automaton/fst/TestFSTs.java b/lucene/src/test/org/apache/lucene/util/automaton/fst/TestFSTs.java
index 4922a1e0d64..f7d54753271 100644
--- a/lucene/src/test/org/apache/lucene/util/automaton/fst/TestFSTs.java
+++ b/lucene/src/test/org/apache/lucene/util/automaton/fst/TestFSTs.java
@@ -59,11 +59,13 @@ public class TestFSTs extends LuceneTestCase {
private MockDirectoryWrapper dir;
+ @Override
public void setUp() throws IOException {
dir = newDirectory();
dir.setPreventDoubleWrite(false);
}
+ @Override
public void tearDown() throws IOException {
dir.close();
}
diff --git a/modules/analysis/common/src/java/org/apache/lucene/analysis/charfilter/HTMLStripCharFilter.java b/modules/analysis/common/src/java/org/apache/lucene/analysis/charfilter/HTMLStripCharFilter.java
index 87591992e1f..ff3f20fb8a1 100644
--- a/modules/analysis/common/src/java/org/apache/lucene/analysis/charfilter/HTMLStripCharFilter.java
+++ b/modules/analysis/common/src/java/org/apache/lucene/analysis/charfilter/HTMLStripCharFilter.java
@@ -673,6 +673,7 @@ public class HTMLStripCharFilter extends BaseCharFilter {
+ @Override
public int read() throws IOException {
// TODO: Do we ever want to preserve CDATA sections?
// where do we have to worry about them?
@@ -741,6 +742,7 @@ public class HTMLStripCharFilter extends BaseCharFilter {
}
+ @Override
public int read(char cbuf[], int off, int len) throws IOException {
int i=0;
for (i=0; ioutput:"the-rain", "rain-in" ,"in-spain", "falls", "mainly"
*
*/
+ @Override
public boolean incrementToken() throws IOException {
while (input.incrementToken()) {
State current = captureState();
diff --git a/modules/analysis/common/src/java/org/apache/lucene/analysis/fa/PersianCharFilter.java b/modules/analysis/common/src/java/org/apache/lucene/analysis/fa/PersianCharFilter.java
index c1ed38acfa5..962f839d45c 100644
--- a/modules/analysis/common/src/java/org/apache/lucene/analysis/fa/PersianCharFilter.java
+++ b/modules/analysis/common/src/java/org/apache/lucene/analysis/fa/PersianCharFilter.java
@@ -32,6 +32,7 @@ public class PersianCharFilter extends CharFilter {
super(in);
}
+ @Override
public int read(char[] cbuf, int off, int len) throws IOException {
final int charsRead = super.read(cbuf, off, len);
if (charsRead > 0) {
diff --git a/modules/analysis/common/src/java/org/apache/lucene/analysis/pattern/PatternReplaceCharFilter.java b/modules/analysis/common/src/java/org/apache/lucene/analysis/pattern/PatternReplaceCharFilter.java
index 0ccbb85b074..77f5c95475f 100644
--- a/modules/analysis/common/src/java/org/apache/lucene/analysis/pattern/PatternReplaceCharFilter.java
+++ b/modules/analysis/common/src/java/org/apache/lucene/analysis/pattern/PatternReplaceCharFilter.java
@@ -113,6 +113,7 @@ public class PatternReplaceCharFilter extends BaseCharFilter {
}
}
+ @Override
public int read() throws IOException {
while( prepareReplaceBlock() ){
return replaceBlockBuffer.charAt( replaceBlockBufferOffset++ );
@@ -120,6 +121,7 @@ public class PatternReplaceCharFilter extends BaseCharFilter {
return -1;
}
+ @Override
public int read(char[] cbuf, int off, int len) throws IOException {
char[] tmp = new char[len];
int l = input.read(tmp, 0, len);
diff --git a/modules/analysis/common/src/java/org/apache/lucene/analysis/synonym/SynonymMap.java b/modules/analysis/common/src/java/org/apache/lucene/analysis/synonym/SynonymMap.java
index ea8ba38c996..a74b3f8e9e7 100644
--- a/modules/analysis/common/src/java/org/apache/lucene/analysis/synonym/SynonymMap.java
+++ b/modules/analysis/common/src/java/org/apache/lucene/analysis/synonym/SynonymMap.java
@@ -78,6 +78,7 @@ public class SynonymMap {
}
+ @Override
public String toString() {
StringBuilder sb = new StringBuilder("<");
if (synonyms!=null) {
diff --git a/modules/analysis/common/src/test/org/apache/lucene/analysis/miscellaneous/TestRemoveDuplicatesTokenFilter.java b/modules/analysis/common/src/test/org/apache/lucene/analysis/miscellaneous/TestRemoveDuplicatesTokenFilter.java
index 946f9787c4c..9f3a28ad638 100644
--- a/modules/analysis/common/src/test/org/apache/lucene/analysis/miscellaneous/TestRemoveDuplicatesTokenFilter.java
+++ b/modules/analysis/common/src/test/org/apache/lucene/analysis/miscellaneous/TestRemoveDuplicatesTokenFilter.java
@@ -47,6 +47,7 @@ public class TestRemoveDuplicatesTokenFilter extends BaseTokenStreamTestCase {
CharTermAttribute termAtt = addAttribute(CharTermAttribute.class);
OffsetAttribute offsetAtt = addAttribute(OffsetAttribute.class);
PositionIncrementAttribute posIncAtt = addAttribute(PositionIncrementAttribute.class);
+ @Override
public boolean incrementToken() {
if (toks.hasNext()) {
clearAttributes();
diff --git a/modules/analysis/common/src/test/org/apache/lucene/analysis/miscellaneous/TestTrimFilter.java b/modules/analysis/common/src/test/org/apache/lucene/analysis/miscellaneous/TestTrimFilter.java
index 4e65f9b11a4..256cbacd1ca 100644
--- a/modules/analysis/common/src/test/org/apache/lucene/analysis/miscellaneous/TestTrimFilter.java
+++ b/modules/analysis/common/src/test/org/apache/lucene/analysis/miscellaneous/TestTrimFilter.java
@@ -87,6 +87,7 @@ public class TestTrimFilter extends BaseTokenStreamTestCase {
this(tokens.toArray(new Token[tokens.size()]));
}
+ @Override
public boolean incrementToken() throws IOException {
if (index >= tokens.length)
return false;
diff --git a/modules/analysis/common/src/test/org/apache/lucene/analysis/miscellaneous/TestWordDelimiterFilter.java b/modules/analysis/common/src/test/org/apache/lucene/analysis/miscellaneous/TestWordDelimiterFilter.java
index c784130d439..3d081184e58 100644
--- a/modules/analysis/common/src/test/org/apache/lucene/analysis/miscellaneous/TestWordDelimiterFilter.java
+++ b/modules/analysis/common/src/test/org/apache/lucene/analysis/miscellaneous/TestWordDelimiterFilter.java
@@ -213,6 +213,7 @@ public class TestWordDelimiterFilter extends BaseTokenStreamTestCase {
/* analyzer that uses whitespace + wdf */
Analyzer a = new Analyzer() {
+ @Override
public TokenStream tokenStream(String field, Reader reader) {
return new WordDelimiterFilter(
new WhitespaceTokenizer(TEST_VERSION_CURRENT, reader),
@@ -239,6 +240,7 @@ public class TestWordDelimiterFilter extends BaseTokenStreamTestCase {
/* analyzer that will consume tokens with large position increments */
Analyzer a2 = new Analyzer() {
+ @Override
public TokenStream tokenStream(String field, Reader reader) {
return new WordDelimiterFilter(
new LargePosIncTokenFilter(
@@ -271,6 +273,7 @@ public class TestWordDelimiterFilter extends BaseTokenStreamTestCase {
new int[] { 1, 11, 1 });
Analyzer a3 = new Analyzer() {
+ @Override
public TokenStream tokenStream(String field, Reader reader) {
StopFilter filter = new StopFilter(TEST_VERSION_CURRENT,
new WhitespaceTokenizer(TEST_VERSION_CURRENT, reader), StandardAnalyzer.STOP_WORDS_SET);
diff --git a/modules/analysis/common/src/test/org/apache/lucene/analysis/synonym/TestSynonymFilter.java b/modules/analysis/common/src/test/org/apache/lucene/analysis/synonym/TestSynonymFilter.java
index 2c68e047abf..29c26d6ff2b 100644
--- a/modules/analysis/common/src/test/org/apache/lucene/analysis/synonym/TestSynonymFilter.java
+++ b/modules/analysis/common/src/test/org/apache/lucene/analysis/synonym/TestSynonymFilter.java
@@ -395,6 +395,7 @@ public class TestSynonymFilter extends BaseTokenStreamTestCase {
this(tokens.toArray(new Token[tokens.size()]));
}
+ @Override
public boolean incrementToken() throws IOException {
if (index >= tokens.length)
return false;
diff --git a/solr/contrib/clustering/src/main/java/org/apache/solr/handler/clustering/carrot2/CarrotClusteringEngine.java b/solr/contrib/clustering/src/main/java/org/apache/solr/handler/clustering/carrot2/CarrotClusteringEngine.java
index 126ea09c744..b0cb1981d89 100644
--- a/solr/contrib/clustering/src/main/java/org/apache/solr/handler/clustering/carrot2/CarrotClusteringEngine.java
+++ b/solr/contrib/clustering/src/main/java/org/apache/solr/handler/clustering/carrot2/CarrotClusteringEngine.java
@@ -77,6 +77,7 @@ public class CarrotClusteringEngine extends SearchClusteringEngine {
private String idFieldName;
+ @Override
@Deprecated
public Object cluster(Query query, DocList docList, SolrQueryRequest sreq) {
SolrIndexSearcher searcher = sreq.getSearcher();
@@ -90,6 +91,7 @@ public class CarrotClusteringEngine extends SearchClusteringEngine {
}
}
+ @Override
public Object cluster(Query query, SolrDocumentList solrDocList,
Map docIds, SolrQueryRequest sreq) {
try {
diff --git a/solr/contrib/clustering/src/main/java/org/apache/solr/handler/clustering/carrot2/LuceneLanguageModelFactory.java b/solr/contrib/clustering/src/main/java/org/apache/solr/handler/clustering/carrot2/LuceneLanguageModelFactory.java
index 8efd3ab1be6..857fccf48f3 100644
--- a/solr/contrib/clustering/src/main/java/org/apache/solr/handler/clustering/carrot2/LuceneLanguageModelFactory.java
+++ b/solr/contrib/clustering/src/main/java/org/apache/solr/handler/clustering/carrot2/LuceneLanguageModelFactory.java
@@ -69,7 +69,8 @@ public class LuceneLanguageModelFactory extends DefaultLanguageModelFactory {
/**
* Provide an {@link IStemmer} implementation for a given language.
*/
- protected IStemmer createStemmer(LanguageCode language) {
+ @Override
+ protected IStemmer createStemmer(LanguageCode language) {
switch (language) {
case ARABIC:
return ArabicStemmerFactory.createStemmer();
diff --git a/solr/contrib/clustering/src/test/java/org/apache/solr/handler/clustering/MockDocumentClusteringEngine.java b/solr/contrib/clustering/src/test/java/org/apache/solr/handler/clustering/MockDocumentClusteringEngine.java
index 90f0ab73e5a..77b3fcfba06 100644
--- a/solr/contrib/clustering/src/test/java/org/apache/solr/handler/clustering/MockDocumentClusteringEngine.java
+++ b/solr/contrib/clustering/src/test/java/org/apache/solr/handler/clustering/MockDocumentClusteringEngine.java
@@ -25,11 +25,13 @@ import org.apache.solr.search.DocSet;
*
**/
public class MockDocumentClusteringEngine extends DocumentClusteringEngine {
+ @Override
public NamedList cluster(DocSet docs, SolrParams solrParams) {
NamedList result = new NamedList();
return result;
}
+ @Override
public NamedList cluster(SolrParams solrParams) {
NamedList result = new NamedList();
return result;
diff --git a/solr/contrib/dataimporthandler/src/extras/main/java/org/apache/solr/handler/dataimport/MailEntityProcessor.java b/solr/contrib/dataimporthandler/src/extras/main/java/org/apache/solr/handler/dataimport/MailEntityProcessor.java
index 5b9374c744a..0231d1ec7e3 100644
--- a/solr/contrib/dataimporthandler/src/extras/main/java/org/apache/solr/handler/dataimport/MailEntityProcessor.java
+++ b/solr/contrib/dataimporthandler/src/extras/main/java/org/apache/solr/handler/dataimport/MailEntityProcessor.java
@@ -51,6 +51,7 @@ public class MailEntityProcessor extends EntityProcessorBase {
public SearchTerm getCustomSearch(Folder folder);
}
+ @Override
public void init(Context context) {
super.init(context);
// set attributes using XXX getXXXFromContext(attribute, defualtValue);
@@ -95,6 +96,7 @@ public class MailEntityProcessor extends EntityProcessorBase {
logConfig();
}
+ @Override
public Map nextRow() {
Message mail;
Map row = null;
diff --git a/solr/contrib/dataimporthandler/src/extras/main/java/org/apache/solr/handler/dataimport/TikaEntityProcessor.java b/solr/contrib/dataimporthandler/src/extras/main/java/org/apache/solr/handler/dataimport/TikaEntityProcessor.java
index 4e4ad41afbe..b7b31ab5abb 100644
--- a/solr/contrib/dataimporthandler/src/extras/main/java/org/apache/solr/handler/dataimport/TikaEntityProcessor.java
+++ b/solr/contrib/dataimporthandler/src/extras/main/java/org/apache/solr/handler/dataimport/TikaEntityProcessor.java
@@ -92,6 +92,7 @@ public class TikaEntityProcessor extends EntityProcessorBase {
done = false;
}
+ @Override
public Map nextRow() {
if(done) return null;
Map row = new HashMap();
diff --git a/solr/contrib/dataimporthandler/src/extras/test/java/org/apache/solr/handler/dataimport/TestMailEntityProcessor.java b/solr/contrib/dataimporthandler/src/extras/test/java/org/apache/solr/handler/dataimport/TestMailEntityProcessor.java
index 8a1f1083d4e..2ac19b32192 100644
--- a/solr/contrib/dataimporthandler/src/extras/test/java/org/apache/solr/handler/dataimport/TestMailEntityProcessor.java
+++ b/solr/contrib/dataimporthandler/src/extras/test/java/org/apache/solr/handler/dataimport/TestMailEntityProcessor.java
@@ -191,18 +191,22 @@ public class TestMailEntityProcessor extends AbstractDataImportHandlerTestCase {
super(null, ".", null);
}
+ @Override
public boolean upload(SolrInputDocument doc) {
return docs.add(doc);
}
+ @Override
public void log(int event, String name, Object row) {
// Do nothing
}
+ @Override
public void doDeleteAll() {
deleteAllCalled = Boolean.TRUE;
}
+ @Override
public void commit(boolean b) {
commitCalled = Boolean.TRUE;
}
diff --git a/solr/contrib/dataimporthandler/src/main/java/org/apache/solr/handler/dataimport/BinContentStreamDataSource.java b/solr/contrib/dataimporthandler/src/main/java/org/apache/solr/handler/dataimport/BinContentStreamDataSource.java
index 221d8eacbc7..1187f65e92d 100644
--- a/solr/contrib/dataimporthandler/src/main/java/org/apache/solr/handler/dataimport/BinContentStreamDataSource.java
+++ b/solr/contrib/dataimporthandler/src/main/java/org/apache/solr/handler/dataimport/BinContentStreamDataSource.java
@@ -39,10 +39,12 @@ public class BinContentStreamDataSource extends DataSource {
private InputStream in;
+ @Override
public void init(Context context, Properties initProps) {
this.context = (ContextImpl) context;
}
+ @Override
public InputStream getData(String query) {
contentStream = context.getDocBuilder().requestParameters.contentStream;
if (contentStream == null)
@@ -55,6 +57,7 @@ public class BinContentStreamDataSource extends DataSource {
}
}
+ @Override
public void close() {
if (contentStream != null) {
try {
diff --git a/solr/contrib/dataimporthandler/src/main/java/org/apache/solr/handler/dataimport/BinFileDataSource.java b/solr/contrib/dataimporthandler/src/main/java/org/apache/solr/handler/dataimport/BinFileDataSource.java
index 4d4cdebc62b..e473ab8da32 100644
--- a/solr/contrib/dataimporthandler/src/main/java/org/apache/solr/handler/dataimport/BinFileDataSource.java
+++ b/solr/contrib/dataimporthandler/src/main/java/org/apache/solr/handler/dataimport/BinFileDataSource.java
@@ -43,10 +43,12 @@ import java.util.Properties;
public class BinFileDataSource extends DataSource{
protected String basePath;
+ @Override
public void init(Context context, Properties initProps) {
basePath = initProps.getProperty(FileDataSource.BASE_PATH);
}
+ @Override
public InputStream getData(String query) {
File f = FileDataSource.getFile(basePath,query);
try {
@@ -57,6 +59,7 @@ public class BinFileDataSource extends DataSource{
}
}
+ @Override
public void close() {
}
diff --git a/solr/contrib/dataimporthandler/src/main/java/org/apache/solr/handler/dataimport/BinURLDataSource.java b/solr/contrib/dataimporthandler/src/main/java/org/apache/solr/handler/dataimport/BinURLDataSource.java
index 9d4d879c2ce..045d6fa3bd0 100644
--- a/solr/contrib/dataimporthandler/src/main/java/org/apache/solr/handler/dataimport/BinURLDataSource.java
+++ b/solr/contrib/dataimporthandler/src/main/java/org/apache/solr/handler/dataimport/BinURLDataSource.java
@@ -49,6 +49,7 @@ public class BinURLDataSource extends DataSource{
public BinURLDataSource() { }
+ @Override
public void init(Context context, Properties initProps) {
this.context = context;
this.initProps = initProps;
@@ -72,6 +73,7 @@ public class BinURLDataSource extends DataSource{
}
}
+ @Override
public InputStream getData(String query) {
URL url = null;
try {
@@ -89,6 +91,7 @@ public class BinURLDataSource extends DataSource{
}
}
+ @Override
public void close() { }
private String getInitPropWithReplacements(String propertyName) {
diff --git a/solr/contrib/dataimporthandler/src/main/java/org/apache/solr/handler/dataimport/CachedSqlEntityProcessor.java b/solr/contrib/dataimporthandler/src/main/java/org/apache/solr/handler/dataimport/CachedSqlEntityProcessor.java
index 69b7b2b6f18..864e772288e 100644
--- a/solr/contrib/dataimporthandler/src/main/java/org/apache/solr/handler/dataimport/CachedSqlEntityProcessor.java
+++ b/solr/contrib/dataimporthandler/src/main/java/org/apache/solr/handler/dataimport/CachedSqlEntityProcessor.java
@@ -38,6 +38,7 @@ import java.util.Map;
public class CachedSqlEntityProcessor extends SqlEntityProcessor {
private boolean isFirst;
+ @Override
@SuppressWarnings("unchecked")
public void init(Context context) {
super.init(context);
@@ -45,6 +46,7 @@ public class CachedSqlEntityProcessor extends SqlEntityProcessor {
isFirst = true;
}
+ @Override
public Map nextRow() {
if (dataSourceRowCache != null)
return getFromRowCacheTransformed();
@@ -60,6 +62,7 @@ public class CachedSqlEntityProcessor extends SqlEntityProcessor {
}
+ @Override
protected List
*/
+ @Override
public Reader getData(String query) {
File f = getFile(basePath,query);
try {
@@ -130,6 +132,7 @@ public class FileDataSource extends DataSource {
}
}
+ @Override
public void close() {
}
diff --git a/solr/contrib/dataimporthandler/src/main/java/org/apache/solr/handler/dataimport/FileListEntityProcessor.java b/solr/contrib/dataimporthandler/src/main/java/org/apache/solr/handler/dataimport/FileListEntityProcessor.java
index 72924176731..7549af7dfbd 100644
--- a/solr/contrib/dataimporthandler/src/main/java/org/apache/solr/handler/dataimport/FileListEntityProcessor.java
+++ b/solr/contrib/dataimporthandler/src/main/java/org/apache/solr/handler/dataimport/FileListEntityProcessor.java
@@ -106,6 +106,7 @@ public class FileListEntityProcessor extends EntityProcessorBase {
private Pattern fileNamePattern, excludesPattern;
+ @Override
public void init(Context context) {
super.init(context);
fileName = context.getEntityAttribute(FILE_NAME);
@@ -195,6 +196,7 @@ public class FileListEntityProcessor extends EntityProcessorBase {
return Long.parseLong(sizeStr);
}
+ @Override
public Map nextRow() {
if (rowIterator != null)
return getNext();
diff --git a/solr/contrib/dataimporthandler/src/main/java/org/apache/solr/handler/dataimport/JdbcDataSource.java b/solr/contrib/dataimporthandler/src/main/java/org/apache/solr/handler/dataimport/JdbcDataSource.java
index cb38e480bf0..f48ca2cda86 100644
--- a/solr/contrib/dataimporthandler/src/main/java/org/apache/solr/handler/dataimport/JdbcDataSource.java
+++ b/solr/contrib/dataimporthandler/src/main/java/org/apache/solr/handler/dataimport/JdbcDataSource.java
@@ -54,6 +54,7 @@ public class JdbcDataSource extends
private int maxRows = 0;
+ @Override
public void init(Context context, Properties initProps) {
Object o = initProps.get(CONVERT_TYPE);
if (o != null)
@@ -204,6 +205,7 @@ public class JdbcDataSource extends
}
}
+ @Override
public Iterator> getData(String query) {
ResultSetIterator r = new ResultSetIterator(query);
return r.getIterator();
@@ -370,6 +372,7 @@ public class JdbcDataSource extends
}
}
+ @Override
protected void finalize() throws Throwable {
try {
if(!isClosed){
@@ -383,6 +386,7 @@ public class JdbcDataSource extends
private boolean isClosed = false;
+ @Override
public void close() {
try {
closeConnection();
diff --git a/solr/contrib/dataimporthandler/src/main/java/org/apache/solr/handler/dataimport/LineEntityProcessor.java b/solr/contrib/dataimporthandler/src/main/java/org/apache/solr/handler/dataimport/LineEntityProcessor.java
index 0a8b201ab42..30e366316f7 100644
--- a/solr/contrib/dataimporthandler/src/main/java/org/apache/solr/handler/dataimport/LineEntityProcessor.java
+++ b/solr/contrib/dataimporthandler/src/main/java/org/apache/solr/handler/dataimport/LineEntityProcessor.java
@@ -64,6 +64,7 @@ public class LineEntityProcessor extends EntityProcessorBase {
/**
* Parses each of the entity attributes.
*/
+ @Override
public void init(Context context) {
super.init(context);
String s;
@@ -97,6 +98,7 @@ public class LineEntityProcessor extends EntityProcessorBase {
* from the url. However transformers can be used to create as
* many other fields as required.
*/
+ @Override
public Map nextRow() {
if (reader == null) {
reader = new BufferedReader((Reader) context.getDataSource().getData(url));
diff --git a/solr/contrib/dataimporthandler/src/main/java/org/apache/solr/handler/dataimport/LogTransformer.java b/solr/contrib/dataimporthandler/src/main/java/org/apache/solr/handler/dataimport/LogTransformer.java
index d9d2f115d24..5a603a74049 100644
--- a/solr/contrib/dataimporthandler/src/main/java/org/apache/solr/handler/dataimport/LogTransformer.java
+++ b/solr/contrib/dataimporthandler/src/main/java/org/apache/solr/handler/dataimport/LogTransformer.java
@@ -35,6 +35,7 @@ import java.util.Map;
public class LogTransformer extends Transformer {
Logger LOG = LoggerFactory.getLogger(LogTransformer.class);
+ @Override
public Object transformRow(Map row, Context ctx) {
String expr = ctx.getEntityAttribute(LOG_TEMPLATE);
String level = ctx.replaceTokens(ctx.getEntityAttribute(LOG_LEVEL));
diff --git a/solr/contrib/dataimporthandler/src/main/java/org/apache/solr/handler/dataimport/MockDataSource.java b/solr/contrib/dataimporthandler/src/main/java/org/apache/solr/handler/dataimport/MockDataSource.java
index 7b747d72a56..6fd7213b5a7 100644
--- a/solr/contrib/dataimporthandler/src/main/java/org/apache/solr/handler/dataimport/MockDataSource.java
+++ b/solr/contrib/dataimporthandler/src/main/java/org/apache/solr/handler/dataimport/MockDataSource.java
@@ -45,13 +45,16 @@ public class MockDataSource extends
cache.clear();
}
+ @Override
public void init(Context context, Properties initProps) {
}
+ @Override
public Iterator> getData(String query) {
return cache.get(query);
}
+ @Override
public void close() {
cache.clear();
diff --git a/solr/contrib/dataimporthandler/src/main/java/org/apache/solr/handler/dataimport/NumberFormatTransformer.java b/solr/contrib/dataimporthandler/src/main/java/org/apache/solr/handler/dataimport/NumberFormatTransformer.java
index d38ab75fcb0..36efecf5320 100644
--- a/solr/contrib/dataimporthandler/src/main/java/org/apache/solr/handler/dataimport/NumberFormatTransformer.java
+++ b/solr/contrib/dataimporthandler/src/main/java/org/apache/solr/handler/dataimport/NumberFormatTransformer.java
@@ -49,6 +49,7 @@ public class NumberFormatTransformer extends Transformer {
private static final Pattern localeRegex = Pattern.compile("^([a-z]{2})-([A-Z]{2})$");
+ @Override
@SuppressWarnings("unchecked")
public Object transformRow(Map row, Context context) {
for (Map fld : context.getAllEntityFields()) {
diff --git a/solr/contrib/dataimporthandler/src/main/java/org/apache/solr/handler/dataimport/PlainTextEntityProcessor.java b/solr/contrib/dataimporthandler/src/main/java/org/apache/solr/handler/dataimport/PlainTextEntityProcessor.java
index 79a981875bc..2d32eee0122 100644
--- a/solr/contrib/dataimporthandler/src/main/java/org/apache/solr/handler/dataimport/PlainTextEntityProcessor.java
+++ b/solr/contrib/dataimporthandler/src/main/java/org/apache/solr/handler/dataimport/PlainTextEntityProcessor.java
@@ -40,11 +40,13 @@ public class PlainTextEntityProcessor extends EntityProcessorBase {
private static final Logger LOG = LoggerFactory.getLogger(PlainTextEntityProcessor.class);
private boolean ended = false;
+ @Override
public void init(Context context) {
super.init(context);
ended = false;
}
+ @Override
public Map nextRow() {
if (ended) return null;
DataSource ds = context.getDataSource();
diff --git a/solr/contrib/dataimporthandler/src/main/java/org/apache/solr/handler/dataimport/RegexTransformer.java b/solr/contrib/dataimporthandler/src/main/java/org/apache/solr/handler/dataimport/RegexTransformer.java
index e5910093e73..429bb0cf2f3 100644
--- a/solr/contrib/dataimporthandler/src/main/java/org/apache/solr/handler/dataimport/RegexTransformer.java
+++ b/solr/contrib/dataimporthandler/src/main/java/org/apache/solr/handler/dataimport/RegexTransformer.java
@@ -43,6 +43,7 @@ import java.util.regex.Pattern;
public class RegexTransformer extends Transformer {
private static final Logger LOG = LoggerFactory.getLogger(RegexTransformer.class);
+ @Override
@SuppressWarnings("unchecked")
public Map transformRow(Map row,
Context ctx) {
diff --git a/solr/contrib/dataimporthandler/src/main/java/org/apache/solr/handler/dataimport/ScriptTransformer.java b/solr/contrib/dataimporthandler/src/main/java/org/apache/solr/handler/dataimport/ScriptTransformer.java
index ba06f49b91d..547fc66cf2a 100644
--- a/solr/contrib/dataimporthandler/src/main/java/org/apache/solr/handler/dataimport/ScriptTransformer.java
+++ b/solr/contrib/dataimporthandler/src/main/java/org/apache/solr/handler/dataimport/ScriptTransformer.java
@@ -47,6 +47,7 @@ public class ScriptTransformer extends Transformer {
private String functionName;
+ @Override
public Object transformRow(Map row, Context context) {
try {
if (engine == null)
diff --git a/solr/contrib/dataimporthandler/src/main/java/org/apache/solr/handler/dataimport/SqlEntityProcessor.java b/solr/contrib/dataimporthandler/src/main/java/org/apache/solr/handler/dataimport/SqlEntityProcessor.java
index 925a9569bf2..1748998720b 100644
--- a/solr/contrib/dataimporthandler/src/main/java/org/apache/solr/handler/dataimport/SqlEntityProcessor.java
+++ b/solr/contrib/dataimporthandler/src/main/java/org/apache/solr/handler/dataimport/SqlEntityProcessor.java
@@ -46,6 +46,7 @@ public class SqlEntityProcessor extends EntityProcessorBase {
protected DataSource>> dataSource;
+ @Override
@SuppressWarnings("unchecked")
public void init(Context context) {
super.init(context);
@@ -65,6 +66,7 @@ public class SqlEntityProcessor extends EntityProcessorBase {
}
}
+ @Override
public Map nextRow() {
if (rowIterator == null) {
String q = getQuery();
@@ -73,6 +75,7 @@ public class SqlEntityProcessor extends EntityProcessorBase {
return getNext();
}
+ @Override
public Map nextModifiedRowKey() {
if (rowIterator == null) {
String deltaQuery = context.getEntityAttribute(DELTA_QUERY);
@@ -83,6 +86,7 @@ public class SqlEntityProcessor extends EntityProcessorBase {
return getNext();
}
+ @Override
public Map nextDeletedRowKey() {
if (rowIterator == null) {
String deletedPkQuery = context.getEntityAttribute(DEL_PK_QUERY);
@@ -93,6 +97,7 @@ public class SqlEntityProcessor extends EntityProcessorBase {
return getNext();
}
+ @Override
public Map nextModifiedParentRowKey() {
if (rowIterator == null) {
String parentDeltaQuery = context.getEntityAttribute(PARENT_DELTA_QUERY);
diff --git a/solr/contrib/dataimporthandler/src/main/java/org/apache/solr/handler/dataimport/TemplateTransformer.java b/solr/contrib/dataimporthandler/src/main/java/org/apache/solr/handler/dataimport/TemplateTransformer.java
index 8c5527983ff..6fd0665c700 100644
--- a/solr/contrib/dataimporthandler/src/main/java/org/apache/solr/handler/dataimport/TemplateTransformer.java
+++ b/solr/contrib/dataimporthandler/src/main/java/org/apache/solr/handler/dataimport/TemplateTransformer.java
@@ -51,6 +51,7 @@ public class TemplateTransformer extends Transformer {
private static final Logger LOG = LoggerFactory.getLogger(TemplateTransformer.class);
private Map> templateVsVars = new HashMap>();
+ @Override
@SuppressWarnings("unchecked")
public Object transformRow(Map row, Context context) {
diff --git a/solr/contrib/dataimporthandler/src/main/java/org/apache/solr/handler/dataimport/URLDataSource.java b/solr/contrib/dataimporthandler/src/main/java/org/apache/solr/handler/dataimport/URLDataSource.java
index 274c120b270..234fb56f264 100644
--- a/solr/contrib/dataimporthandler/src/main/java/org/apache/solr/handler/dataimport/URLDataSource.java
+++ b/solr/contrib/dataimporthandler/src/main/java/org/apache/solr/handler/dataimport/URLDataSource.java
@@ -56,6 +56,7 @@ public class URLDataSource extends DataSource {
public URLDataSource() {
}
+ @Override
public void init(Context context, Properties initProps) {
this.context = context;
this.initProps = initProps;
@@ -81,6 +82,7 @@ public class URLDataSource extends DataSource {
}
}
+ @Override
public Reader getData(String query) {
URL url = null;
try {
@@ -114,6 +116,7 @@ public class URLDataSource extends DataSource {
}
}
+ @Override
public void close() {
}
diff --git a/solr/contrib/dataimporthandler/src/main/java/org/apache/solr/handler/dataimport/VariableResolverImpl.java b/solr/contrib/dataimporthandler/src/main/java/org/apache/solr/handler/dataimport/VariableResolverImpl.java
index b0675cc4627..8d39dd13bde 100644
--- a/solr/contrib/dataimporthandler/src/main/java/org/apache/solr/handler/dataimport/VariableResolverImpl.java
+++ b/solr/contrib/dataimporthandler/src/main/java/org/apache/solr/handler/dataimport/VariableResolverImpl.java
@@ -91,10 +91,12 @@ public class VariableResolverImpl extends VariableResolver {
container.remove(name);
}
+ @Override
public String replaceTokens(String template) {
return templateString.replaceTokens(template, this);
}
+ @Override
@SuppressWarnings("unchecked")
public Object resolve(String name) {
if (name == null)
diff --git a/solr/contrib/dataimporthandler/src/main/java/org/apache/solr/handler/dataimport/XPathEntityProcessor.java b/solr/contrib/dataimporthandler/src/main/java/org/apache/solr/handler/dataimport/XPathEntityProcessor.java
index 26196788dfe..e995fab3442 100644
--- a/solr/contrib/dataimporthandler/src/main/java/org/apache/solr/handler/dataimport/XPathEntityProcessor.java
+++ b/solr/contrib/dataimporthandler/src/main/java/org/apache/solr/handler/dataimport/XPathEntityProcessor.java
@@ -80,6 +80,7 @@ public class XPathEntityProcessor extends EntityProcessorBase {
protected Thread publisherThread;
+ @Override
@SuppressWarnings("unchecked")
public void init(Context context) {
super.init(context);
@@ -171,6 +172,7 @@ public class XPathEntityProcessor extends EntityProcessorBase {
}
+ @Override
public Map nextRow() {
Map result;
@@ -398,6 +400,7 @@ public class XPathEntityProcessor extends EntityProcessorBase {
final AtomicBoolean isEnd = new AtomicBoolean(false);
final AtomicBoolean throwExp = new AtomicBoolean(true);
publisherThread = new Thread() {
+ @Override
public void run() {
try {
xpathReader.streamRecords(data, new XPathRecordReader.Handler() {
diff --git a/solr/contrib/dataimporthandler/src/test/java/org/apache/solr/handler/dataimport/AbstractDataImportHandlerTestCase.java b/solr/contrib/dataimporthandler/src/test/java/org/apache/solr/handler/dataimport/AbstractDataImportHandlerTestCase.java
index 07f78d0b412..8c3791f224a 100644
--- a/solr/contrib/dataimporthandler/src/test/java/org/apache/solr/handler/dataimport/AbstractDataImportHandlerTestCase.java
+++ b/solr/contrib/dataimporthandler/src/test/java/org/apache/solr/handler/dataimport/AbstractDataImportHandlerTestCase.java
@@ -197,89 +197,110 @@ public abstract class AbstractDataImportHandlerTestCase extends
this.root = root;
}
+ @Override
public String getEntityAttribute(String name) {
return entityAttrs == null ? delegate.getEntityAttribute(name) : entityAttrs.get(name);
}
+ @Override
public String getResolvedEntityAttribute(String name) {
return entityAttrs == null ? delegate.getResolvedEntityAttribute(name) :
delegate.getVariableResolver().replaceTokens(entityAttrs.get(name));
}
+ @Override
public List> getAllEntityFields() {
return entityFields == null ? delegate.getAllEntityFields()
: entityFields;
}
+ @Override
public VariableResolver getVariableResolver() {
return delegate.getVariableResolver();
}
+ @Override
public DataSource getDataSource() {
return delegate.getDataSource();
}
+ @Override
public boolean isRootEntity() {
return root;
}
+ @Override
public String currentProcess() {
return delegate.currentProcess();
}
+ @Override
public Map getRequestParameters() {
return delegate.getRequestParameters();
}
+ @Override
public EntityProcessor getEntityProcessor() {
return null;
}
+ @Override
public void setSessionAttribute(String name, Object val, String scope) {
delegate.setSessionAttribute(name, val, scope);
}
+ @Override
public Object getSessionAttribute(String name, String scope) {
return delegate.getSessionAttribute(name, scope);
}
+ @Override
public Context getParentContext() {
return delegate.getParentContext();
}
+ @Override
public DataSource getDataSource(String name) {
return delegate.getDataSource(name);
}
+ @Override
public SolrCore getSolrCore() {
return delegate.getSolrCore();
}
+ @Override
public Map getStats() {
return delegate.getStats();
}
+ @Override
public String getScript() {
return script == null ? delegate.getScript() : script;
}
+ @Override
public String getScriptLanguage() {
return scriptlang == null ? delegate.getScriptLanguage() : scriptlang;
}
+ @Override
public void deleteDoc(String id) {
}
+ @Override
public void deleteDocByQuery(String query) {
}
+ @Override
public Object resolve(String var) {
return delegate.resolve(var);
}
+ @Override
public String replaceTokens(String template) {
return delegate.replaceTokens(template);
}
@@ -318,31 +339,37 @@ public abstract class AbstractDataImportHandlerTestCase extends
reset();
}
+ @Override
public void finish() throws IOException {
finishCalled = true;
super.finish();
}
+ @Override
public void processAdd(AddUpdateCommand cmd) throws IOException {
processAddCalled = true;
super.processAdd(cmd);
}
+ @Override
public void processCommit(CommitUpdateCommand cmd) throws IOException {
processCommitCalled = true;
super.processCommit(cmd);
}
+ @Override
public void processDelete(DeleteUpdateCommand cmd) throws IOException {
processDeleteCalled = true;
super.processDelete(cmd);
}
+ @Override
public void processMergeIndexes(MergeIndexesCommand cmd) throws IOException {
mergeIndexesCalled = true;
super.processMergeIndexes(cmd);
}
+ @Override
public void processRollback(RollbackUpdateCommand cmd) throws IOException {
rollbackCalled = true;
super.processRollback(cmd);
diff --git a/solr/contrib/dataimporthandler/src/test/java/org/apache/solr/handler/dataimport/TestCachedSqlEntityProcessor.java b/solr/contrib/dataimporthandler/src/test/java/org/apache/solr/handler/dataimport/TestCachedSqlEntityProcessor.java
index ceda6edd3ec..0037d6796ca 100644
--- a/solr/contrib/dataimporthandler/src/test/java/org/apache/solr/handler/dataimport/TestCachedSqlEntityProcessor.java
+++ b/solr/contrib/dataimporthandler/src/test/java/org/apache/solr/handler/dataimport/TestCachedSqlEntityProcessor.java
@@ -158,6 +158,7 @@ public class TestCachedSqlEntityProcessor extends AbstractDataImportHandlerTestC
public static class DoubleTransformer extends Transformer {
+ @Override
public Object transformRow(Map row, Context context) {
List> rows = new ArrayList>();
rows.add(row);
@@ -169,6 +170,7 @@ public class TestCachedSqlEntityProcessor extends AbstractDataImportHandlerTestC
public static class UppercaseTransformer extends Transformer {
+ @Override
public Object transformRow(Map row, Context context) {
for (Map.Entry entry : row.entrySet()) {
Object val = entry.getValue();
diff --git a/solr/contrib/dataimporthandler/src/test/java/org/apache/solr/handler/dataimport/TestContentStreamDataSource.java b/solr/contrib/dataimporthandler/src/test/java/org/apache/solr/handler/dataimport/TestContentStreamDataSource.java
index c49be006377..692272d4e04 100644
--- a/solr/contrib/dataimporthandler/src/test/java/org/apache/solr/handler/dataimport/TestContentStreamDataSource.java
+++ b/solr/contrib/dataimporthandler/src/test/java/org/apache/solr/handler/dataimport/TestContentStreamDataSource.java
@@ -43,6 +43,7 @@ public class TestContentStreamDataSource extends AbstractDataImportHandlerTestCa
SolrInstance instance = null;
JettySolrRunner jetty;
+ @Override
@Before
public void setUp() throws Exception {
super.setUp();
@@ -51,6 +52,7 @@ public class TestContentStreamDataSource extends AbstractDataImportHandlerTestCa
jetty = createJetty(instance);
}
+ @Override
@After
public void tearDown() throws Exception {
jetty.stop();
diff --git a/solr/contrib/dataimporthandler/src/test/java/org/apache/solr/handler/dataimport/TestDocBuilder.java b/solr/contrib/dataimporthandler/src/test/java/org/apache/solr/handler/dataimport/TestDocBuilder.java
index e9947e52e76..a16b7017ab4 100644
--- a/solr/contrib/dataimporthandler/src/test/java/org/apache/solr/handler/dataimport/TestDocBuilder.java
+++ b/solr/contrib/dataimporthandler/src/test/java/org/apache/solr/handler/dataimport/TestDocBuilder.java
@@ -33,6 +33,7 @@ import java.util.*;
*/
public class TestDocBuilder extends AbstractDataImportHandlerTestCase {
+ @Override
@After
public void tearDown() throws Exception {
MockDataSource.clearCache();
@@ -200,22 +201,27 @@ public class TestDocBuilder extends AbstractDataImportHandlerTestCase {
super(null, ".",null);
}
+ @Override
public boolean upload(SolrInputDocument doc) {
return docs.add(doc);
}
+ @Override
public void log(int event, String name, Object row) {
// Do nothing
}
+ @Override
public void doDeleteAll() {
deleteAllCalled = Boolean.TRUE;
}
+ @Override
public void commit(boolean b) {
commitCalled = Boolean.TRUE;
}
+ @Override
public void finish() {
finishCalled = Boolean.TRUE;
}
diff --git a/solr/contrib/dataimporthandler/src/test/java/org/apache/solr/handler/dataimport/TestDocBuilder2.java b/solr/contrib/dataimporthandler/src/test/java/org/apache/solr/handler/dataimport/TestDocBuilder2.java
index f361eb20a43..4632318fa17 100644
--- a/solr/contrib/dataimporthandler/src/test/java/org/apache/solr/handler/dataimport/TestDocBuilder2.java
+++ b/solr/contrib/dataimporthandler/src/test/java/org/apache/solr/handler/dataimport/TestDocBuilder2.java
@@ -252,6 +252,7 @@ public class TestDocBuilder2 extends AbstractDataImportHandlerTestCase {
}
public static class MockTransformer extends Transformer {
+ @Override
public Object transformRow(Map row, Context context) {
assertTrue("Context gave incorrect data source", context.getDataSource("mockDs") instanceof MockDataSource2);
return row;
@@ -259,6 +260,7 @@ public class TestDocBuilder2 extends AbstractDataImportHandlerTestCase {
}
public static class AddDynamicFieldTransformer extends Transformer {
+ @Override
public Object transformRow(Map row, Context context) {
// Add a dynamic field
row.put("dynamic_s", "test");
diff --git a/solr/contrib/dataimporthandler/src/test/java/org/apache/solr/handler/dataimport/TestEntityProcessorBase.java b/solr/contrib/dataimporthandler/src/test/java/org/apache/solr/handler/dataimport/TestEntityProcessorBase.java
index 2b7d3578e96..42b29610666 100644
--- a/solr/contrib/dataimporthandler/src/test/java/org/apache/solr/handler/dataimport/TestEntityProcessorBase.java
+++ b/solr/contrib/dataimporthandler/src/test/java/org/apache/solr/handler/dataimport/TestEntityProcessorBase.java
@@ -57,6 +57,7 @@ public class TestEntityProcessorBase extends AbstractDataImportHandlerTestCase {
static class T1 extends Transformer {
+ @Override
public Object transformRow(Map aRow, Context context) {
aRow.put("T1", "T1 called");
return aRow;
@@ -66,6 +67,7 @@ public class TestEntityProcessorBase extends AbstractDataImportHandlerTestCase {
static class T2 extends Transformer {
+ @Override
public Object transformRow(Map aRow, Context context) {
aRow.put("T2", "T2 called");
return aRow;
diff --git a/solr/contrib/dataimporthandler/src/test/java/org/apache/solr/handler/dataimport/TestErrorHandling.java b/solr/contrib/dataimporthandler/src/test/java/org/apache/solr/handler/dataimport/TestErrorHandling.java
index 0f703815bae..b8e285dffe1 100644
--- a/solr/contrib/dataimporthandler/src/test/java/org/apache/solr/handler/dataimport/TestErrorHandling.java
+++ b/solr/contrib/dataimporthandler/src/test/java/org/apache/solr/handler/dataimport/TestErrorHandling.java
@@ -78,19 +78,23 @@ public class TestErrorHandling extends AbstractDataImportHandlerTestCase {
public static class StringDataSource extends DataSource {
public static String xml = "";
+ @Override
public void init(Context context, Properties initProps) {
}
+ @Override
public Reader getData(String query) {
return new StringReader(xml);
}
+ @Override
public void close() {
}
}
public static class ExceptionTransformer extends Transformer {
+ @Override
public Object transformRow(Map row, Context context) {
throw new RuntimeException("Test exception");
}
diff --git a/solr/contrib/dataimporthandler/src/test/java/org/apache/solr/handler/dataimport/TestEvaluatorBag.java b/solr/contrib/dataimporthandler/src/test/java/org/apache/solr/handler/dataimport/TestEvaluatorBag.java
index 18b30a36d7b..41ac1dc5d15 100644
--- a/solr/contrib/dataimporthandler/src/test/java/org/apache/solr/handler/dataimport/TestEvaluatorBag.java
+++ b/solr/contrib/dataimporthandler/src/test/java/org/apache/solr/handler/dataimport/TestEvaluatorBag.java
@@ -39,6 +39,7 @@ public class TestEvaluatorBag extends AbstractDataImportHandlerTestCase {
Map urlTests;
+ @Override
@Before
public void setUp() throws Exception {
super.setUp();
diff --git a/solr/contrib/dataimporthandler/src/test/java/org/apache/solr/handler/dataimport/TestJdbcDataSource.java b/solr/contrib/dataimporthandler/src/test/java/org/apache/solr/handler/dataimport/TestJdbcDataSource.java
index 68cc9ccc9ff..ac6626462ee 100644
--- a/solr/contrib/dataimporthandler/src/test/java/org/apache/solr/handler/dataimport/TestJdbcDataSource.java
+++ b/solr/contrib/dataimporthandler/src/test/java/org/apache/solr/handler/dataimport/TestJdbcDataSource.java
@@ -57,6 +57,7 @@ public class TestJdbcDataSource extends AbstractDataImportHandlerTestCase {
String sysProp = System.getProperty("java.naming.factory.initial");
+ @Override
@Before
public void setUp() throws Exception {
super.setUp();
@@ -69,6 +70,7 @@ public class TestJdbcDataSource extends AbstractDataImportHandlerTestCase {
connection = mockControl.createMock(Connection.class);
}
+ @Override
@After
public void tearDown() throws Exception {
if (sysProp == null) {
diff --git a/solr/contrib/dataimporthandler/src/test/java/org/apache/solr/handler/dataimport/TestLineEntityProcessor.java b/solr/contrib/dataimporthandler/src/test/java/org/apache/solr/handler/dataimport/TestLineEntityProcessor.java
index c24fced0bbf..91f8d034cda 100644
--- a/solr/contrib/dataimporthandler/src/test/java/org/apache/solr/handler/dataimport/TestLineEntityProcessor.java
+++ b/solr/contrib/dataimporthandler/src/test/java/org/apache/solr/handler/dataimport/TestLineEntityProcessor.java
@@ -207,12 +207,15 @@ public class TestLineEntityProcessor extends AbstractDataImportHandlerTestCase {
private DataSource getDataSource(final String xml) {
return new DataSource() {
+ @Override
public void init(Context context, Properties initProps) {
}
+ @Override
public void close() {
}
+ @Override
public Reader getData(String query) {
return new StringReader(xml);
}
diff --git a/solr/contrib/dataimporthandler/src/test/java/org/apache/solr/handler/dataimport/TestPlainTextEntityProcessor.java b/solr/contrib/dataimporthandler/src/test/java/org/apache/solr/handler/dataimport/TestPlainTextEntityProcessor.java
index 48a0b1b4214..e0a5b8bf39c 100644
--- a/solr/contrib/dataimporthandler/src/test/java/org/apache/solr/handler/dataimport/TestPlainTextEntityProcessor.java
+++ b/solr/contrib/dataimporthandler/src/test/java/org/apache/solr/handler/dataimport/TestPlainTextEntityProcessor.java
@@ -42,15 +42,18 @@ public class TestPlainTextEntityProcessor extends AbstractDataImportHandlerTestC
public static class DS extends DataSource {
static String s = "hello world";
+ @Override
public void init(Context context, Properties initProps) {
}
+ @Override
public Object getData(String query) {
return new StringReader(s);
}
+ @Override
public void close() {
}
diff --git a/solr/contrib/dataimporthandler/src/test/java/org/apache/solr/handler/dataimport/TestSqlEntityProcessor.java b/solr/contrib/dataimporthandler/src/test/java/org/apache/solr/handler/dataimport/TestSqlEntityProcessor.java
index 7fc50fa11cd..0fbfb846eae 100644
--- a/solr/contrib/dataimporthandler/src/test/java/org/apache/solr/handler/dataimport/TestSqlEntityProcessor.java
+++ b/solr/contrib/dataimporthandler/src/test/java/org/apache/solr/handler/dataimport/TestSqlEntityProcessor.java
@@ -135,19 +135,23 @@ public class TestSqlEntityProcessor extends AbstractDataImportHandlerTestCase {
private static DataSource>> getDs(
final List> rows) {
return new DataSource>>() {
+ @Override
public Iterator> getData(String query) {
return rows.iterator();
}
+ @Override
public void init(Context context, Properties initProps) {
}
+ @Override
public void close() {
}
};
}
public static class T extends Transformer {
+ @Override
public Object transformRow(Map aRow, Context context) {
aRow.put("T", "Class T");
return aRow;
@@ -162,6 +166,7 @@ public class TestSqlEntityProcessor extends AbstractDataImportHandlerTestCase {
}
public static class T2 extends Transformer {
+ @Override
public Object transformRow(Map aRow, Context context) {
Integer count = local.get();
local.set(count + 1);
diff --git a/solr/contrib/dataimporthandler/src/test/java/org/apache/solr/handler/dataimport/TestSqlEntityProcessor2.java b/solr/contrib/dataimporthandler/src/test/java/org/apache/solr/handler/dataimport/TestSqlEntityProcessor2.java
index 966818b4ef5..6c0627e3e07 100644
--- a/solr/contrib/dataimporthandler/src/test/java/org/apache/solr/handler/dataimport/TestSqlEntityProcessor2.java
+++ b/solr/contrib/dataimporthandler/src/test/java/org/apache/solr/handler/dataimport/TestSqlEntityProcessor2.java
@@ -214,6 +214,7 @@ public class TestSqlEntityProcessor2 extends AbstractDataImportHandlerTestCase {
}
static class DateFormatValidatingEvaluator extends Evaluator {
+ @Override
public String evaluate(String expression, Context context) {
List l = EvaluatorBag.parseParams(expression, context.getVariableResolver());
Object o = l.get(0);
diff --git a/solr/contrib/dataimporthandler/src/test/java/org/apache/solr/handler/dataimport/TestVariableResolver.java b/solr/contrib/dataimporthandler/src/test/java/org/apache/solr/handler/dataimport/TestVariableResolver.java
index 2befb0bdaa0..55c4b91ee34 100644
--- a/solr/contrib/dataimporthandler/src/test/java/org/apache/solr/handler/dataimport/TestVariableResolver.java
+++ b/solr/contrib/dataimporthandler/src/test/java/org/apache/solr/handler/dataimport/TestVariableResolver.java
@@ -169,6 +169,7 @@ public class TestVariableResolver extends AbstractDataImportHandlerTestCase {
}
public static class E extends Evaluator{
+ @Override
public String evaluate(String expression, Context context) {
return "Hello World";
}
diff --git a/solr/contrib/dataimporthandler/src/test/java/org/apache/solr/handler/dataimport/TestXPathEntityProcessor.java b/solr/contrib/dataimporthandler/src/test/java/org/apache/solr/handler/dataimport/TestXPathEntityProcessor.java
index 29672e5b258..6f6fd817fa6 100644
--- a/solr/contrib/dataimporthandler/src/test/java/org/apache/solr/handler/dataimport/TestXPathEntityProcessor.java
+++ b/solr/contrib/dataimporthandler/src/test/java/org/apache/solr/handler/dataimport/TestXPathEntityProcessor.java
@@ -236,12 +236,15 @@ public class TestXPathEntityProcessor extends AbstractDataImportHandlerTestCase
private DataSource getDataSource(final String xml) {
return new DataSource() {
+ @Override
public void init(Context context, Properties initProps) {
}
+ @Override
public void close() {
}
+ @Override
public Reader getData(String query) {
return new StringReader(xml);
}
diff --git a/solr/contrib/extraction/src/main/java/org/apache/solr/handler/extraction/ExtractingDocumentLoader.java b/solr/contrib/extraction/src/main/java/org/apache/solr/handler/extraction/ExtractingDocumentLoader.java
index a08967dfcc6..e7d03b9bb7c 100644
--- a/solr/contrib/extraction/src/main/java/org/apache/solr/handler/extraction/ExtractingDocumentLoader.java
+++ b/solr/contrib/extraction/src/main/java/org/apache/solr/handler/extraction/ExtractingDocumentLoader.java
@@ -120,6 +120,7 @@ public class ExtractingDocumentLoader extends ContentStreamLoader {
* @param stream
* @throws java.io.IOException
*/
+ @Override
public void load(SolrQueryRequest req, SolrQueryResponse rsp, ContentStream stream) throws IOException {
errHeader = "ExtractingDocumentLoader: " + stream.getSourceInfo();
Parser parser = null;
diff --git a/solr/contrib/extraction/src/main/java/org/apache/solr/handler/extraction/ExtractingRequestHandler.java b/solr/contrib/extraction/src/main/java/org/apache/solr/handler/extraction/ExtractingRequestHandler.java
index 943f0d849dc..d77a81491fd 100644
--- a/solr/contrib/extraction/src/main/java/org/apache/solr/handler/extraction/ExtractingRequestHandler.java
+++ b/solr/contrib/extraction/src/main/java/org/apache/solr/handler/extraction/ExtractingRequestHandler.java
@@ -111,6 +111,7 @@ public class ExtractingRequestHandler extends ContentStreamHandlerBase implement
}
+ @Override
protected ContentStreamLoader newLoader(SolrQueryRequest req, UpdateRequestProcessor processor) {
return new ExtractingDocumentLoader(req, processor, config, factory);
}
diff --git a/solr/contrib/extraction/src/test/java/org/apache/solr/handler/ExtractingRequestHandlerTest.java b/solr/contrib/extraction/src/test/java/org/apache/solr/handler/ExtractingRequestHandlerTest.java
index 1eac099acf0..441f6d3ce1a 100644
--- a/solr/contrib/extraction/src/test/java/org/apache/solr/handler/ExtractingRequestHandlerTest.java
+++ b/solr/contrib/extraction/src/test/java/org/apache/solr/handler/ExtractingRequestHandlerTest.java
@@ -46,6 +46,7 @@ public class ExtractingRequestHandlerTest extends SolrTestCaseJ4 {
initCore("solrconfig.xml", "schema.xml", "solr-extraction");
}
+ @Override
@Before
public void setUp() throws Exception {
super.setUp();
diff --git a/solr/contrib/uima/src/main/java/org/apache/solr/uima/processor/UIMAUpdateRequestProcessor.java b/solr/contrib/uima/src/main/java/org/apache/solr/uima/processor/UIMAUpdateRequestProcessor.java
index f042f2a3531..4f7e004666c 100644
--- a/solr/contrib/uima/src/main/java/org/apache/solr/uima/processor/UIMAUpdateRequestProcessor.java
+++ b/solr/contrib/uima/src/main/java/org/apache/solr/uima/processor/UIMAUpdateRequestProcessor.java
@@ -56,6 +56,7 @@ public class UIMAUpdateRequestProcessor extends UpdateRequestProcessor {
solrUIMAConfiguration.getAePath(), solrUIMAConfiguration.getRuntimeParameters());
}
+ @Override
public void processAdd(AddUpdateCommand cmd) throws IOException {
try {
/* get Solr document */
diff --git a/solr/contrib/uima/src/main/java/org/apache/solr/uima/processor/UIMAUpdateRequestProcessorFactory.java b/solr/contrib/uima/src/main/java/org/apache/solr/uima/processor/UIMAUpdateRequestProcessorFactory.java
index 5078f9d3a19..b8167572195 100644
--- a/solr/contrib/uima/src/main/java/org/apache/solr/uima/processor/UIMAUpdateRequestProcessorFactory.java
+++ b/solr/contrib/uima/src/main/java/org/apache/solr/uima/processor/UIMAUpdateRequestProcessorFactory.java
@@ -29,6 +29,7 @@ import org.apache.solr.update.processor.UpdateRequestProcessorFactory;
*/
public class UIMAUpdateRequestProcessorFactory extends UpdateRequestProcessorFactory {
+ @Override
public UpdateRequestProcessor getInstance(SolrQueryRequest req, SolrQueryResponse rsp,
UpdateRequestProcessor next) {
return new UIMAUpdateRequestProcessor(next, req.getCore());
diff --git a/solr/contrib/uima/src/test/java/org/apache/solr/uima/processor/UIMAUpdateRequestProcessorTest.java b/solr/contrib/uima/src/test/java/org/apache/solr/uima/processor/UIMAUpdateRequestProcessorTest.java
index 3d2058bae6b..b0499538d6e 100644
--- a/solr/contrib/uima/src/test/java/org/apache/solr/uima/processor/UIMAUpdateRequestProcessorTest.java
+++ b/solr/contrib/uima/src/test/java/org/apache/solr/uima/processor/UIMAUpdateRequestProcessorTest.java
@@ -50,6 +50,7 @@ public class UIMAUpdateRequestProcessorTest extends SolrTestCaseJ4 {
initCore("solrconfig.xml", "schema.xml", "solr-uima");
}
+ @Override
@Before
public void setUp() throws Exception {
super.setUp();
diff --git a/solr/src/common/org/apache/solr/common/SolrDocument.java b/solr/src/common/org/apache/solr/common/SolrDocument.java
index 48d66878ca5..813326e40f9 100644
--- a/solr/src/common/org/apache/solr/common/SolrDocument.java
+++ b/solr/src/common/org/apache/solr/common/SolrDocument.java
@@ -220,6 +220,7 @@ public class SolrDocument implements Map, Iterable> values() {throw new UnsupportedOperationException();}
public Collection