lucene-java-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rm...@apache.org
Subject svn commit: r828298 - in /lucene/java/trunk/contrib: CHANGES.txt analyzers/common/src/java/org/apache/lucene/analysis/fr/FrenchAnalyzer.java analyzers/common/src/test/org/apache/lucene/analysis/fr/TestFrenchAnalyzer.java
Date Thu, 22 Oct 2009 04:03:13 GMT
Author: rmuir
Date: Thu Oct 22 04:03:12 2009
New Revision: 828298

URL: http://svn.apache.org/viewvc?rev=828298&view=rev
Log:
LUCENE-1359: FrenchAnalyzer tokenstream does not honor the contract of Analyzer

Modified:
    lucene/java/trunk/contrib/CHANGES.txt
    lucene/java/trunk/contrib/analyzers/common/src/java/org/apache/lucene/analysis/fr/FrenchAnalyzer.java
    lucene/java/trunk/contrib/analyzers/common/src/test/org/apache/lucene/analysis/fr/TestFrenchAnalyzer.java

Modified: lucene/java/trunk/contrib/CHANGES.txt
URL: http://svn.apache.org/viewvc/lucene/java/trunk/contrib/CHANGES.txt?rev=828298&r1=828297&r2=828298&view=diff
==============================================================================
--- lucene/java/trunk/contrib/CHANGES.txt (original)
+++ lucene/java/trunk/contrib/CHANGES.txt Thu Oct 22 04:03:12 2009
@@ -41,6 +41,9 @@
  * LUCENE-2001: Wordnet Syns2Index incorrectly parses synonyms that
    contain a single quote. (Parag H. Dave via Robert Muir)
 
+ * LUCENE-1359: French analyzer did not support null field names.
+   (Andrew Lynch via Robert Muir)
+
 New features
 
  * LUCENE-1924: Added BalancedSegmentMergePolicy to contrib/misc,

Modified: lucene/java/trunk/contrib/analyzers/common/src/java/org/apache/lucene/analysis/fr/FrenchAnalyzer.java
URL: http://svn.apache.org/viewvc/lucene/java/trunk/contrib/analyzers/common/src/java/org/apache/lucene/analysis/fr/FrenchAnalyzer.java?rev=828298&r1=828297&r2=828298&view=diff
==============================================================================
--- lucene/java/trunk/contrib/analyzers/common/src/java/org/apache/lucene/analysis/fr/FrenchAnalyzer.java
(original)
+++ lucene/java/trunk/contrib/analyzers/common/src/java/org/apache/lucene/analysis/fr/FrenchAnalyzer.java
Thu Oct 22 04:03:12 2009
@@ -138,10 +138,6 @@
    *         {@link FrenchStemFilter} and {@link LowerCaseFilter}
    */
   public final TokenStream tokenStream(String fieldName, Reader reader) {
-
-    if (fieldName == null) throw new IllegalArgumentException("fieldName must not be null");
-    if (reader == null) throw new IllegalArgumentException("reader must not be null");
-
     TokenStream result = new StandardTokenizer(reader);
     result = new StandardFilter(result);
     result = new StopFilter(false, result, stoptable);

Modified: lucene/java/trunk/contrib/analyzers/common/src/test/org/apache/lucene/analysis/fr/TestFrenchAnalyzer.java
URL: http://svn.apache.org/viewvc/lucene/java/trunk/contrib/analyzers/common/src/test/org/apache/lucene/analysis/fr/TestFrenchAnalyzer.java?rev=828298&r1=828297&r2=828298&view=diff
==============================================================================
--- lucene/java/trunk/contrib/analyzers/common/src/test/org/apache/lucene/analysis/fr/TestFrenchAnalyzer.java
(original)
+++ lucene/java/trunk/contrib/analyzers/common/src/test/org/apache/lucene/analysis/fr/TestFrenchAnalyzer.java
Thu Oct 22 04:03:12 2009
@@ -34,24 +34,6 @@
 	public void testAnalyzer() throws Exception {
 		FrenchAnalyzer fa = new FrenchAnalyzer();
 	
-		// test null reader
-		boolean iaeFlag = false;
-		try {
-			fa.tokenStream("dummy", null);
-		} catch (IllegalArgumentException iae) {
-			iaeFlag = true;
-		}
-		assertEquals(iaeFlag, true);
-
-		// test null fieldname
-		iaeFlag = false;
-		try {
-			fa.tokenStream(null, new StringReader("dummy"));
-		} catch (IllegalArgumentException iae) {
-			iaeFlag = true;
-		}
-		assertEquals(iaeFlag, true);
-
 		assertAnalyzesTo(fa, "", new String[] {
 		});
 



Mime
View raw message