Apache Lucene open-source search software
LUCENE-3990: Next time please ask for revert instead of just doing it, the commit was by somebody else and he/she had no chance to respond.
Uwe Schindlercf9eb6de970b
diff --git a/modules/analysis/common/src/test/org/apache/lucene/analysis/core/TestRandomChains.java b/modules/analysis/common/src/test/org/apache/lucene/analysis/core/TestRandomChains.javaindex 60b65235d34..cf65b72a8cd 100644--- a/modules/analysis/common/src/test/org/apache/lucene/analysis/core/TestRandomChains.java+++ b/modules/analysis/common/src/test/org/apache/lucene/analysis/core/TestRandomChains.java@@ -756,74 +756,29 @@ public class TestRandomChains extends BaseTokenStreamTestCase {}}- // wants charfilter to be a filterreader...- // do *NOT*, do *NOT* refactor me to be a charfilter: LUCENE-3990- static class CheckThatYouDidntReadAnythingReaderWrapper extends CharStream {- boolean readSomething;- CharStream in;+ static final class CheckThatYouDidntReadAnythingReaderWrapper extends CharFilter {+ boolean readSomething = false;CheckThatYouDidntReadAnythingReaderWrapper(Reader in) {- this.in = CharReader.get(in);- }-- @Override- public int correctOffset(int currentOff) {- return in.correctOffset(currentOff);- }-- @Override- public void close() throws IOException {- in.close();+ super(CharReader.get(in));}@Overridepublic int read(char[] cbuf, int off, int len) throws IOException {readSomething = true;- return in.read(cbuf, off, len);+ return input.read(cbuf, off, len);}@Overridepublic int read() throws IOException {readSomething = true;- return in.read();- }-- @Override- public int read(CharBuffer target) throws IOException {- readSomething = true;- return in.read(target);- }-- @Override- public void mark(int readAheadLimit) throws IOException {- in.mark(readAheadLimit);- }-- @Override- public boolean markSupported() {- return in.markSupported();- }-- @Override- public int read(char[] cbuf) throws IOException {- readSomething = true;- return in.read(cbuf);- }-- @Override- public boolean ready() throws IOException {- return in.ready();- }-- @Override- public void reset() throws IOException {- in.reset();+ return input.read();}@Overridepublic long skip(long n) throws IOException {readSomething = true;- return in.skip(n);+ return input.skip(n);}}