lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Robert Muir <rcm...@gmail.com>
Subject Re: svn commit: r932773 - /lucene/dev/trunk/solr/src/test/org/apache/solr/analysis/TestLuceneMatchVersion.java
Date Sun, 11 Apr 2010 09:47:10 GMT
I agree we should do something better, I do not like the way the test looks
now (no offense) as it is prone to break...

On Sun, Apr 11, 2010 at 5:39 AM, Uwe Schindler <uwe@thetaphi.de> wrote:

> Robert,
>
> as the comment says, it’s a hack. How about simply adding a public getter
> method for the matchVersion  to the base class StopwordAwareAna?
>
> Uwe
>
> -----
> Uwe Schindler
> H.-H.-Meier-Allee 63, D-28213 Bremen
> http://www.thetaphi.de
> eMail: uwe@thetaphi.de
>
>
> > -----Original Message-----
> > From: rmuir@apache.org [mailto:rmuir@apache.org]
> > Sent: Saturday, April 10, 2010 7:52 PM
> > To: java-commits@lucene.apache.org
> > Subject: svn commit: r932773 -
> > /lucene/dev/trunk/solr/src/test/org/apache/solr/analysis/TestLuceneMatc
> > hVersion.java
> >
> > Author: rmuir
> > Date: Sat Apr 10 17:51:30 2010
> > New Revision: 932773
> >
> > URL: http://svn.apache.org/viewvc?rev=932773&view=rev
> > Log:
> > fix failing test, StdAnalyzer now stores this in its superclass
> >
> > Modified:
> >
> > lucene/dev/trunk/solr/src/test/org/apache/solr/analysis/TestLuceneMatch
> > Version.java
> >
> > Modified:
> > lucene/dev/trunk/solr/src/test/org/apache/solr/analysis/TestLuceneMatch
> > Version.java
> > URL:
> > http://svn.apache.org/viewvc/lucene/dev/trunk/solr/src/test/org/apache/
> > solr/analysis/TestLuceneMatchVersion.java?rev=932773&r1=932772&r2=93277
> > 3&view=diff
> > =======================================================================
> > =======
> > ---
> > lucene/dev/trunk/solr/src/test/org/apache/solr/analysis/TestLuceneMatch
> > Version.java (original)
> > +++
> > lucene/dev/trunk/solr/src/test/org/apache/solr/analysis/TestLuceneMatch
> > Version.java Sat Apr 10 17:51:30 2010
> > @@ -68,8 +68,8 @@ public class TestLuceneMatchVersion exte
> >      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");
> >
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: java-dev-unsubscribe@lucene.apache.org
> For additional commands, e-mail: java-dev-help@lucene.apache.org
>
>


-- 
Robert Muir
rcmuir@gmail.com

Mime
View raw message