LUCENE-1677: deprecate gcj specializations, and the system properties that let you specify which SegmentReader impl class to use

git-svn-id: https://svn.apache.org/repos/asf/lucene/java/trunk@784541 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Michael McCandless 2009-06-14 11:20:55 +00:00
parent 392424ec11
commit 419b065957
9 changed files with 39 additions and 18 deletions

View File

@ -201,6 +201,12 @@ API Changes
of Lucene's core into new contrib/remote package. Searchable no
longer extends java.rmi.Remote (Simon Willnauer via Mike
McCandless)
22. LUCENE-1677: The global property
org.apache.lucene.SegmentReader.class, and
ReadOnlySegmentReader.class, along with the src/gcj/*
specializations for GCJ, are now deprecated, to be removed in
3.0. (Earwin Burrfoot via Mike McCandless)
Bug fixes

View File

@ -110,10 +110,9 @@
</exec>
</sequential>
</target>
<target name="test-tag" depends="download-tag, compile-core, compile-demo, jar-core"
description="Runs tests of a previous Lucene version. Specify tag version like this: -Dtag=branches/lucene_2_4_back_compat_tests">
<sequential>
<target name="compile-tag" depends="download-tag, compile-core, compile-demo, jar-core">
<sequential>
<available property="tag.available" file="${tags.dir}/${tag}/src/test" />
<fail unless="tag.available">
@ -135,12 +134,15 @@
<!-- compile tag tests against tag jar -->
<compile-test-macro srcdir="${tags.dir}/${tag}/src/test" destdir="${build.dir}/${tag}/classes/test"
test.classpath="tag.test.classpath"/>
<!-- run tag tests against trunk jar -->
<test-macro dataDir="${tags.dir}/${tag}/src/test"
tempDir="${build.dir}/${tag}"
junit.classpath="tag.junit.classpath"/>
</sequential>
</sequential>
</target>
<target name="test-tag"
description="Runs tests of a previous Lucene version. Specify tag version like this: -Dtag=branches/lucene_2_4_back_compat_tests">
<!-- run tag tests against trunk jar -->
<test-macro dataDir="${tags.dir}/${tag}/src/test"
tempDir="${build.dir}/${tag}"
junit.classpath="tag.junit.classpath"/>
</target>
@ -613,7 +615,7 @@
<contrib-crawl target="build-artifacts-and-tests"/>
</target>
<target name="test-contrib" depends="build-contrib">
<target name="test-contrib">
<!-- Don't fail on error, instead check for flag file so we run
all the tests possible and can "ant generate-test-reports"
for all of them.

View File

@ -378,6 +378,8 @@
<not><or>
<isset property="testcase" />
<isset property="testpackage" />
<isset property="testpackagea" />
<isset property="testpackageb" />
<isset property="testpackageroot" />
</or></not>
</condition>
@ -405,9 +407,15 @@
<batchtest fork="yes" todir="@{junit.output.dir}" if="runall">
<fileset dir="@{dataDir}" includes="${junit.includes}" excludes="${junit.excludes}"/>
</batchtest>
<batchtest fork="yes" todir="@{junit.output.dir}" if="testpackage">
<fileset dir="@{dataDir}" includes="**/${testpackage}/**/Test*.java,**/${testpackage}/**/*Test.java" excludes="${junit.excludes}"/>
</batchtest>
<batchtest fork="yes" todir="@{junit.output.dir}" if="testpackage">
<fileset dir="@{dataDir}" includes="**/${testpackage}/**/Test*.java,**/${testpackage}/**/*Test.java" excludes="${junit.excludes}"/>
</batchtest>
<batchtest fork="yes" todir="@{junit.output.dir}" if="testpackagea">
<fileset dir="@{dataDir}" includes=" **/${testpackagea}/**/TestA*.java **/${testpackagea}/**/A*Test.java **/${testpackagea}/**/TestB*.java **/${testpackagea}/**/B*Test.java **/${testpackagea}/**/TestC*.java **/${testpackagea}/**/C*Test.java **/${testpackagea}/**/TestD*.java **/${testpackagea}/**/D*Test.java **/${testpackagea}/**/TestE*.java **/${testpackagea}/**/E*Test.java **/${testpackagea}/**/TestF*.java **/${testpackagea}/**/F*Test.java **/${testpackagea}/**/TestG*.java **/${testpackagea}/**/G*Test.java **/${testpackagea}/**/TestH*.java **/${testpackagea}/**/H*Test.java **/${testpackagea}/**/TestI*.java **/${testpackagea}/**/I*Test.java **/${testpackagea}/**/TestJ*.java **/${testpackagea}/**/J*Test.java **/${testpackagea}/**/TestK*.java **/${testpackagea}/**/K*Test.java **/${testpackagea}/**/TestL*.java **/${testpackagea}/**/L*Test.java" excludes="${junit.excludes}"/>
</batchtest>
<batchtest fork="yes" todir="@{junit.output.dir}" if="testpackageb">
<fileset dir="@{dataDir}" includes=" **/${testpackageb}/**/TestM*.java **/${testpackageb}/**/M*Test.java **/${testpackageb}/**/TestN*.java **/${testpackageb}/**/N*Test.java **/${testpackageb}/**/TestO*.java **/${testpackageb}/**/O*Test.java **/${testpackageb}/**/TestP*.java **/${testpackageb}/**/P*Test.java **/${testpackageb}/**/TestQ*.java **/${testpackageb}/**/Q*Test.java **/${testpackageb}/**/TestR*.java **/${testpackageb}/**/R*Test.java **/${testpackageb}/**/TestS*.java **/${testpackageb}/**/S*Test.java **/${testpackageb}/**/TestT*.java **/${testpackageb}/**/T*Test.java **/${testpackageb}/**/TestU*.java **/${testpackageb}/**/U*Test.java **/${testpackageb}/**/TestV*.java **/${testpackageb}/**/V*Test.java **/${testpackageb}/**/TestW*.java **/${testpackageb}/**/W*Test.java **/${testpackageb}/**/TestX*.java **/${testpackageb}/**/X*Test.java **/${testpackageb}/**/TestY*.java **/${testpackageb}/**/Y*Test.java **/${testpackageb}/**/TestZ*.java **/${testpackageb}/**/Z*Test.java" excludes="${junit.excludes}"/>
</batchtest>
<batchtest fork="yes" todir="@{junit.output.dir}" if="testpackageroot">
<fileset dir="@{dataDir}" includes="**/${testpackageroot}/Test*.java,**/${testpackageroot}/*Test.java" excludes="${junit.excludes}"/>
</batchtest>
@ -424,7 +432,7 @@
</sequential>
</macrodef>
<target name="test" depends="compile-test" description="Runs unit tests">
<target name="test" description="Runs unit tests">
<test-macro dataDir="src/test" tempDir="${build.dir}/test">
<contrib-settings>
<!-- set as a system property so contrib tests can have a fixed root

View File

@ -61,7 +61,8 @@
</target>
<target name="init" depends="common.init,build-lucene,build-lucene-tests"/>
<!--<target name="init" depends="common.init,build-lucene,build-lucene-tests"/>-->
<target name="init"/>
<target name="compile-test" depends="init" if="contrib.has.tests">
<antcall target="common.compile-test" inheritRefs="true" />
</target>

View File

@ -21,6 +21,7 @@ import java.io.IOException;
import org.apache.lucene.store.GCJIndexInput;
// @deprecated This will be removed in 3.0.
class GCJSegmentReader extends SegmentReader {
/** Try to use an optimized native implementation of TermDocs. The optimized

View File

@ -19,6 +19,7 @@ package org.apache.lucene.index;
import java.io.IOException;
// @deprecated This will be removed in 3.0.
class GCJTermDocs extends SegmentTermDocs {
public GCJTermDocs(SegmentReader parent) {
super(parent);

View File

@ -21,7 +21,7 @@ import java.io.IOException;
import java.io.File;
/** Native file-based {@link Directory} implementation, using GCJ.
*
* @deprecated This will be removed in 3.0.
*/
public class GCJDirectory extends FSDirectory {

View File

@ -21,7 +21,7 @@ import java.io.IOException;
import gnu.gcj.RawData;
/** Native file-based {@link IndexInput} implementation, using GCJ.
*
* @deprecated This will be removed in 3.0.
*/
public class GCJIndexInput extends IndexInput {

View File

@ -338,6 +338,7 @@ class SegmentReader extends IndexReader implements Cloneable {
Map norms = new HashMap();
/** The class which implements SegmentReader. */
// @deprecated (LUCENE-1677)
private static Class IMPL;
static {
try {
@ -356,6 +357,7 @@ class SegmentReader extends IndexReader implements Cloneable {
}
}
// @deprecated (LUCENE-1677)
private static Class READONLY_IMPL;
static {
try {