mirror of https://github.com/apache/lucene.git
fix failing test, StdAnalyzer now stores this in its superclass
git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@932773 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
8804fc542d
commit
2e2ec5c920
|
@ -68,8 +68,8 @@ public class TestLuceneMatchVersion extends AbstractSolrTestCase {
|
|||
tok = (StandardTokenizer) tsi.getTokenizer();
|
||||
assertFalse(tok.isReplaceInvalidAcronym());
|
||||
|
||||
// this is a hack to get the private matchVersion field in StandardAnalyzer, may break in later lucene versions - we have no getter :(
|
||||
final Field matchVersionField = StandardAnalyzer.class.getDeclaredField("matchVersion");
|
||||
// this is a hack to get the private matchVersion field in StandardAnalyzer's superclass, may break in later lucene versions - we have no getter :(
|
||||
final Field matchVersionField = StandardAnalyzer.class.getSuperclass().getDeclaredField("matchVersion");
|
||||
matchVersionField.setAccessible(true);
|
||||
|
||||
type = schema.getFieldType("textStandardAnalyzerDefault");
|
||||
|
|
Loading…
Reference in New Issue