mirror of
https://github.com/honeymoose/OpenSearch.git
synced 2025-03-09 14:34:43 +00:00
Add assertion to not forget to replace reflection with the new FilterAtomicReader.unwrap.
This commit is contained in:
parent
f5306ef8c1
commit
a9592e5523
@ -21,6 +21,7 @@ package org.elasticsearch.common.lucene;
|
||||
import org.apache.lucene.index.AtomicReader;
|
||||
import org.apache.lucene.index.FilterAtomicReader;
|
||||
import org.apache.lucene.index.SegmentReader;
|
||||
import org.apache.lucene.util.Version;
|
||||
import org.elasticsearch.ElasticsearchIllegalStateException;
|
||||
import org.elasticsearch.common.Nullable;
|
||||
|
||||
@ -31,6 +32,8 @@ public class SegmentReaderUtils {
|
||||
private static final Field FILTER_ATOMIC_READER_IN;
|
||||
|
||||
static {
|
||||
assert Version.LUCENE_47.onOrAfter(Lucene.VERSION) : "Lucene 4.8 has FilterAtomicReader.unwrap";
|
||||
|
||||
Field in = null;
|
||||
try { // and another one bites the dust...
|
||||
in = FilterAtomicReader.class.getDeclaredField("in");
|
||||
|
Loading…
x
Reference in New Issue
Block a user