Skip to content

armgit / solr

Public Imported from GitHub
0

Apache Solr open-source search software

fix failing test, StdAnalyzer now stores this in its superclass

Robert Muir2e2ec5c920fc
diff --git a/solr/src/test/org/apache/solr/analysis/TestLuceneMatchVersion.java b/solr/src/test/org/apache/solr/analysis/TestLuceneMatchVersion.java
index f21a9295eff..2c4649fed54 100644
--- a/solr/src/test/org/apache/solr/analysis/TestLuceneMatchVersion.java
+++ b/solr/src/test/org/apache/solr/analysis/TestLuceneMatchVersion.java
@@ -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");