diff --git a/src/main/java/org/apache/lucene/analysis/SimpleAnalyzerWrapper.java b/src/main/java/org/apache/lucene/analysis/SimpleAnalyzerWrapper.java index a68d903e30a..1ac59078aed 100644 --- a/src/main/java/org/apache/lucene/analysis/SimpleAnalyzerWrapper.java +++ b/src/main/java/org/apache/lucene/analysis/SimpleAnalyzerWrapper.java @@ -32,6 +32,10 @@ import java.io.Reader; */ public abstract class SimpleAnalyzerWrapper extends AnalyzerWrapper { + static { + assert org.elasticsearch.Version.CURRENT.luceneVersion == org.apache.lucene.util.Version.LUCENE_4_9: "Remove this code once we upgrade to Lucene 4.10 (LUCENE-5803)"; + } + public SimpleAnalyzerWrapper() { super(new DelegatingReuseStrategy()); ((DelegatingReuseStrategy) getReuseStrategy()).wrapper = this;