You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-commits@lucene.apache.org by mi...@apache.org on 2009/06/14 13:20:56 UTC

svn commit: r784541 - in /lucene/java/trunk: ./ contrib/ src/gcj/org/apache/lucene/index/ src/gcj/org/apache/lucene/store/ src/java/org/apache/lucene/index/

Author: mikemccand
Date: Sun Jun 14 11:20:55 2009
New Revision: 784541

URL: http://svn.apache.org/viewvc?rev=784541&view=rev
Log:
LUCENE-1677: deprecate gcj specializations, and the system properties that let you specify which SegmentReader impl class to use

Modified:
    lucene/java/trunk/CHANGES.txt
    lucene/java/trunk/build.xml
    lucene/java/trunk/common-build.xml
    lucene/java/trunk/contrib/contrib-build.xml
    lucene/java/trunk/src/gcj/org/apache/lucene/index/GCJSegmentReader.java
    lucene/java/trunk/src/gcj/org/apache/lucene/index/GCJTermDocs.java
    lucene/java/trunk/src/gcj/org/apache/lucene/store/GCJDirectory.java
    lucene/java/trunk/src/gcj/org/apache/lucene/store/GCJIndexInput.java
    lucene/java/trunk/src/java/org/apache/lucene/index/SegmentReader.java

Modified: lucene/java/trunk/CHANGES.txt
URL: http://svn.apache.org/viewvc/lucene/java/trunk/CHANGES.txt?rev=784541&r1=784540&r2=784541&view=diff
==============================================================================
--- lucene/java/trunk/CHANGES.txt (original)
+++ lucene/java/trunk/CHANGES.txt Sun Jun 14 11:20:55 2009
@@ -201,6 +201,12 @@
     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
 

Modified: lucene/java/trunk/build.xml
URL: http://svn.apache.org/viewvc/lucene/java/trunk/build.xml?rev=784541&r1=784540&r2=784541&view=diff
==============================================================================
--- lucene/java/trunk/build.xml (original)
+++ lucene/java/trunk/build.xml Sun Jun 14 11:20:55 2009
@@ -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.

Modified: lucene/java/trunk/common-build.xml
URL: http://svn.apache.org/viewvc/lucene/java/trunk/common-build.xml?rev=784541&r1=784540&r2=784541&view=diff
==============================================================================
--- lucene/java/trunk/common-build.xml (original)
+++ lucene/java/trunk/common-build.xml Sun Jun 14 11:20:55 2009
@@ -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*T
 est.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

Modified: lucene/java/trunk/contrib/contrib-build.xml
URL: http://svn.apache.org/viewvc/lucene/java/trunk/contrib/contrib-build.xml?rev=784541&r1=784540&r2=784541&view=diff
==============================================================================
--- lucene/java/trunk/contrib/contrib-build.xml (original)
+++ lucene/java/trunk/contrib/contrib-build.xml Sun Jun 14 11:20:55 2009
@@ -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>

Modified: lucene/java/trunk/src/gcj/org/apache/lucene/index/GCJSegmentReader.java
URL: http://svn.apache.org/viewvc/lucene/java/trunk/src/gcj/org/apache/lucene/index/GCJSegmentReader.java?rev=784541&r1=784540&r2=784541&view=diff
==============================================================================
--- lucene/java/trunk/src/gcj/org/apache/lucene/index/GCJSegmentReader.java (original)
+++ lucene/java/trunk/src/gcj/org/apache/lucene/index/GCJSegmentReader.java Sun Jun 14 11:20:55 2009
@@ -21,6 +21,7 @@
 
 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

Modified: lucene/java/trunk/src/gcj/org/apache/lucene/index/GCJTermDocs.java
URL: http://svn.apache.org/viewvc/lucene/java/trunk/src/gcj/org/apache/lucene/index/GCJTermDocs.java?rev=784541&r1=784540&r2=784541&view=diff
==============================================================================
--- lucene/java/trunk/src/gcj/org/apache/lucene/index/GCJTermDocs.java (original)
+++ lucene/java/trunk/src/gcj/org/apache/lucene/index/GCJTermDocs.java Sun Jun 14 11:20:55 2009
@@ -19,6 +19,7 @@
 
 import java.io.IOException;
 
+// @deprecated This will be removed in 3.0.
 class GCJTermDocs extends SegmentTermDocs {
   public GCJTermDocs(SegmentReader parent) {
     super(parent);

Modified: lucene/java/trunk/src/gcj/org/apache/lucene/store/GCJDirectory.java
URL: http://svn.apache.org/viewvc/lucene/java/trunk/src/gcj/org/apache/lucene/store/GCJDirectory.java?rev=784541&r1=784540&r2=784541&view=diff
==============================================================================
--- lucene/java/trunk/src/gcj/org/apache/lucene/store/GCJDirectory.java (original)
+++ lucene/java/trunk/src/gcj/org/apache/lucene/store/GCJDirectory.java Sun Jun 14 11:20:55 2009
@@ -21,7 +21,7 @@
 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 {
 

Modified: lucene/java/trunk/src/gcj/org/apache/lucene/store/GCJIndexInput.java
URL: http://svn.apache.org/viewvc/lucene/java/trunk/src/gcj/org/apache/lucene/store/GCJIndexInput.java?rev=784541&r1=784540&r2=784541&view=diff
==============================================================================
--- lucene/java/trunk/src/gcj/org/apache/lucene/store/GCJIndexInput.java (original)
+++ lucene/java/trunk/src/gcj/org/apache/lucene/store/GCJIndexInput.java Sun Jun 14 11:20:55 2009
@@ -21,7 +21,7 @@
 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 {
 

Modified: lucene/java/trunk/src/java/org/apache/lucene/index/SegmentReader.java
URL: http://svn.apache.org/viewvc/lucene/java/trunk/src/java/org/apache/lucene/index/SegmentReader.java?rev=784541&r1=784540&r2=784541&view=diff
==============================================================================
--- lucene/java/trunk/src/java/org/apache/lucene/index/SegmentReader.java (original)
+++ lucene/java/trunk/src/java/org/apache/lucene/index/SegmentReader.java Sun Jun 14 11:20:55 2009
@@ -338,6 +338,7 @@
   Map norms = new HashMap();
   
   /** The class which implements SegmentReader. */
+  // @deprecated (LUCENE-1677)
   private static Class IMPL;
   static {
     try {
@@ -356,6 +357,7 @@
     }
   }
 
+  // @deprecated (LUCENE-1677)
   private static Class READONLY_IMPL;
   static {
     try {