Apache Lucene open-source search software
Issue deprecation warnings when building test cases. Fixed deprecation warnings on TestKeywordAnalyzer
Erik Hatcher4e580e221e0f
diff --git a/contrib/analyzers/src/test/org/apache/lucene/analysis/TestKeywordAnalyzer.java b/contrib/analyzers/src/test/org/apache/lucene/analysis/TestKeywordAnalyzer.javaindex c20657caaa3..c9810422bcd 100644--- a/contrib/analyzers/src/test/org/apache/lucene/analysis/TestKeywordAnalyzer.java+++ b/contrib/analyzers/src/test/org/apache/lucene/analysis/TestKeywordAnalyzer.java@@ -37,8 +37,8 @@ public class TestKeywordAnalyzer extends TestCase {true);Document doc = new Document();- doc.add(Field.Keyword("partnum", "Q36"));- doc.add(Field.Text("description", "Illidium Space Modulator"));+ doc.add(new Field("partnum", "Q36", Field.Store.YES, Field.Index.UN_TOKENIZED));+ doc.add(new Field("description", "Illidium Space Modulator", Field.Store.YES, Field.Index.TOKENIZED));writer.addDocument(doc);writer.close();diff --git a/contrib/common.xml b/contrib/common.xmlindex ad344bfb68c..f0a5312b8fb 100644--- a/contrib/common.xml+++ b/contrib/common.xml@@ -113,6 +113,7 @@<target name="test-compile" depends="compile" if="has.tests"><javac destdir="${test.classes.dir}"debug="${build.debug}"+ deprecation="true"includeAntRuntime="yes"srcdir="src/test"classpathref="test.classpath"