mirror of https://github.com/apache/lucene.git
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:
parent
392424ec11
commit
419b065957
|
@ -201,6 +201,12 @@ API Changes
|
||||||
of Lucene's core into new contrib/remote package. Searchable no
|
of Lucene's core into new contrib/remote package. Searchable no
|
||||||
longer extends java.rmi.Remote (Simon Willnauer via Mike
|
longer extends java.rmi.Remote (Simon Willnauer via Mike
|
||||||
McCandless)
|
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
|
Bug fixes
|
||||||
|
|
||||||
|
|
24
build.xml
24
build.xml
|
@ -110,10 +110,9 @@
|
||||||
</exec>
|
</exec>
|
||||||
</sequential>
|
</sequential>
|
||||||
</target>
|
</target>
|
||||||
|
|
||||||
<target name="test-tag" depends="download-tag, compile-core, compile-demo, jar-core"
|
<target name="compile-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>
|
||||||
<sequential>
|
|
||||||
<available property="tag.available" file="${tags.dir}/${tag}/src/test" />
|
<available property="tag.available" file="${tags.dir}/${tag}/src/test" />
|
||||||
|
|
||||||
<fail unless="tag.available">
|
<fail unless="tag.available">
|
||||||
|
@ -135,12 +134,15 @@
|
||||||
<!-- compile tag tests against tag jar -->
|
<!-- compile tag tests against tag jar -->
|
||||||
<compile-test-macro srcdir="${tags.dir}/${tag}/src/test" destdir="${build.dir}/${tag}/classes/test"
|
<compile-test-macro srcdir="${tags.dir}/${tag}/src/test" destdir="${build.dir}/${tag}/classes/test"
|
||||||
test.classpath="tag.test.classpath"/>
|
test.classpath="tag.test.classpath"/>
|
||||||
|
</sequential>
|
||||||
<!-- run tag tests against trunk jar -->
|
</target>
|
||||||
<test-macro dataDir="${tags.dir}/${tag}/src/test"
|
|
||||||
tempDir="${build.dir}/${tag}"
|
<target name="test-tag"
|
||||||
junit.classpath="tag.junit.classpath"/>
|
description="Runs tests of a previous Lucene version. Specify tag version like this: -Dtag=branches/lucene_2_4_back_compat_tests">
|
||||||
</sequential>
|
<!-- run tag tests against trunk jar -->
|
||||||
|
<test-macro dataDir="${tags.dir}/${tag}/src/test"
|
||||||
|
tempDir="${build.dir}/${tag}"
|
||||||
|
junit.classpath="tag.junit.classpath"/>
|
||||||
</target>
|
</target>
|
||||||
|
|
||||||
|
|
||||||
|
@ -613,7 +615,7 @@
|
||||||
<contrib-crawl target="build-artifacts-and-tests"/>
|
<contrib-crawl target="build-artifacts-and-tests"/>
|
||||||
</target>
|
</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
|
<!-- Don't fail on error, instead check for flag file so we run
|
||||||
all the tests possible and can "ant generate-test-reports"
|
all the tests possible and can "ant generate-test-reports"
|
||||||
for all of them.
|
for all of them.
|
||||||
|
|
|
@ -378,6 +378,8 @@
|
||||||
<not><or>
|
<not><or>
|
||||||
<isset property="testcase" />
|
<isset property="testcase" />
|
||||||
<isset property="testpackage" />
|
<isset property="testpackage" />
|
||||||
|
<isset property="testpackagea" />
|
||||||
|
<isset property="testpackageb" />
|
||||||
<isset property="testpackageroot" />
|
<isset property="testpackageroot" />
|
||||||
</or></not>
|
</or></not>
|
||||||
</condition>
|
</condition>
|
||||||
|
@ -405,9 +407,15 @@
|
||||||
<batchtest fork="yes" todir="@{junit.output.dir}" if="runall">
|
<batchtest fork="yes" todir="@{junit.output.dir}" if="runall">
|
||||||
<fileset dir="@{dataDir}" includes="${junit.includes}" excludes="${junit.excludes}"/>
|
<fileset dir="@{dataDir}" includes="${junit.includes}" excludes="${junit.excludes}"/>
|
||||||
</batchtest>
|
</batchtest>
|
||||||
<batchtest fork="yes" todir="@{junit.output.dir}" if="testpackage">
|
<batchtest fork="yes" todir="@{junit.output.dir}" if="testpackage">
|
||||||
<fileset dir="@{dataDir}" includes="**/${testpackage}/**/Test*.java,**/${testpackage}/**/*Test.java" excludes="${junit.excludes}"/>
|
<fileset dir="@{dataDir}" includes="**/${testpackage}/**/Test*.java,**/${testpackage}/**/*Test.java" excludes="${junit.excludes}"/>
|
||||||
</batchtest>
|
</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">
|
<batchtest fork="yes" todir="@{junit.output.dir}" if="testpackageroot">
|
||||||
<fileset dir="@{dataDir}" includes="**/${testpackageroot}/Test*.java,**/${testpackageroot}/*Test.java" excludes="${junit.excludes}"/>
|
<fileset dir="@{dataDir}" includes="**/${testpackageroot}/Test*.java,**/${testpackageroot}/*Test.java" excludes="${junit.excludes}"/>
|
||||||
</batchtest>
|
</batchtest>
|
||||||
|
@ -424,7 +432,7 @@
|
||||||
</sequential>
|
</sequential>
|
||||||
</macrodef>
|
</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">
|
<test-macro dataDir="src/test" tempDir="${build.dir}/test">
|
||||||
<contrib-settings>
|
<contrib-settings>
|
||||||
<!-- set as a system property so contrib tests can have a fixed root
|
<!-- set as a system property so contrib tests can have a fixed root
|
||||||
|
|
|
@ -61,7 +61,8 @@
|
||||||
</target>
|
</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">
|
<target name="compile-test" depends="init" if="contrib.has.tests">
|
||||||
<antcall target="common.compile-test" inheritRefs="true" />
|
<antcall target="common.compile-test" inheritRefs="true" />
|
||||||
</target>
|
</target>
|
||||||
|
|
|
@ -21,6 +21,7 @@ import java.io.IOException;
|
||||||
|
|
||||||
import org.apache.lucene.store.GCJIndexInput;
|
import org.apache.lucene.store.GCJIndexInput;
|
||||||
|
|
||||||
|
// @deprecated This will be removed in 3.0.
|
||||||
class GCJSegmentReader extends SegmentReader {
|
class GCJSegmentReader extends SegmentReader {
|
||||||
|
|
||||||
/** Try to use an optimized native implementation of TermDocs. The optimized
|
/** Try to use an optimized native implementation of TermDocs. The optimized
|
||||||
|
|
|
@ -19,6 +19,7 @@ package org.apache.lucene.index;
|
||||||
|
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
|
|
||||||
|
// @deprecated This will be removed in 3.0.
|
||||||
class GCJTermDocs extends SegmentTermDocs {
|
class GCJTermDocs extends SegmentTermDocs {
|
||||||
public GCJTermDocs(SegmentReader parent) {
|
public GCJTermDocs(SegmentReader parent) {
|
||||||
super(parent);
|
super(parent);
|
||||||
|
|
|
@ -21,7 +21,7 @@ import java.io.IOException;
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
|
|
||||||
/** Native file-based {@link Directory} implementation, using GCJ.
|
/** Native file-based {@link Directory} implementation, using GCJ.
|
||||||
*
|
* @deprecated This will be removed in 3.0.
|
||||||
*/
|
*/
|
||||||
public class GCJDirectory extends FSDirectory {
|
public class GCJDirectory extends FSDirectory {
|
||||||
|
|
||||||
|
|
|
@ -21,7 +21,7 @@ import java.io.IOException;
|
||||||
import gnu.gcj.RawData;
|
import gnu.gcj.RawData;
|
||||||
|
|
||||||
/** Native file-based {@link IndexInput} implementation, using GCJ.
|
/** Native file-based {@link IndexInput} implementation, using GCJ.
|
||||||
*
|
* @deprecated This will be removed in 3.0.
|
||||||
*/
|
*/
|
||||||
public class GCJIndexInput extends IndexInput {
|
public class GCJIndexInput extends IndexInput {
|
||||||
|
|
||||||
|
|
|
@ -338,6 +338,7 @@ class SegmentReader extends IndexReader implements Cloneable {
|
||||||
Map norms = new HashMap();
|
Map norms = new HashMap();
|
||||||
|
|
||||||
/** The class which implements SegmentReader. */
|
/** The class which implements SegmentReader. */
|
||||||
|
// @deprecated (LUCENE-1677)
|
||||||
private static Class IMPL;
|
private static Class IMPL;
|
||||||
static {
|
static {
|
||||||
try {
|
try {
|
||||||
|
@ -356,6 +357,7 @@ class SegmentReader extends IndexReader implements Cloneable {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// @deprecated (LUCENE-1677)
|
||||||
private static Class READONLY_IMPL;
|
private static Class READONLY_IMPL;
|
||||||
static {
|
static {
|
||||||
try {
|
try {
|
||||||
|
|
Loading…
Reference in New Issue