Apache Solr open-source search software
LUCENE-5858: don't even register RW test codecs, impersonation is removed
Robert Muir67afcced6fd9
diff --git a/build.xml b/build.xmlindex e537ef1f192..22b908a52e8 100644--- a/build.xml+++ b/build.xml@@ -260,8 +260,8 @@</copy><pathconvert property="eclipse.fileset.sourcefolders" pathsep="|" dirsep="/">- <dirset dir="${basedir}/lucene" includes="**/src/java, **/src/resources, **/src/test, **/src/test-resources, **/src/test-files, **/src/examples" excludes="tools/**, build/**, backwards/**" />- <dirset dir="${basedir}/solr" includes="**/src/java, **/src/resources, **/src/test, **/src/test-resources, **/src/test-files, **/src/examples" excludes="build/**" />+ <dirset dir="${basedir}/lucene" includes="**/src/java, **/src/resources, **/src/test, **/src/test-files, **/src/examples" excludes="tools/**, build/**, backwards/**" />+ <dirset dir="${basedir}/solr" includes="**/src/java, **/src/resources, **/src/test, **/src/test-files, **/src/examples" excludes="build/**" /><map from="${basedir}/" to=""/></pathconvert><!-- TODO: find a better way to exclude duplicate JAR files & fix the servlet-api mess! -->diff --git a/lucene/backward-codecs/src/test-resources/META-INF/services/org.apache.lucene.codecs.Codec b/lucene/backward-codecs/src/test-resources/META-INF/services/org.apache.lucene.codecs.Codecdeleted file mode 100644index 4868c997056..00000000000--- a/lucene/backward-codecs/src/test-resources/META-INF/services/org.apache.lucene.codecs.Codec+++ /dev/null@@ -1,21 +0,0 @@-# Licensed to the Apache Software Foundation (ASF) under one or more-# contributor license agreements. See the NOTICE file distributed with-# this work for additional information regarding copyright ownership.-# The ASF licenses this file to You under the Apache License, Version 2.0-# (the "License"); you may not use this file except in compliance with-# the License. You may obtain a copy of the License at-#-# http://www.apache.org/licenses/LICENSE-2.0-#-# Unless required by applicable law or agreed to in writing, software-# distributed under the License is distributed on an "AS IS" BASIS,-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.-# See the License for the specific language governing permissions and-# limitations under the License.--org.apache.lucene.codecs.lucene40.Lucene40RWCodec-org.apache.lucene.codecs.lucene41.Lucene41RWCodec-org.apache.lucene.codecs.lucene42.Lucene42RWCodec-org.apache.lucene.codecs.lucene45.Lucene45RWCodec-org.apache.lucene.codecs.lucene46.Lucene46RWCodec-org.apache.lucene.codecs.lucene49.Lucene49RWCodecdiff --git a/lucene/backward-codecs/src/test-resources/META-INF/services/org.apache.lucene.codecs.DocValuesFormat b/lucene/backward-codecs/src/test-resources/META-INF/services/org.apache.lucene.codecs.DocValuesFormatdeleted file mode 100644index ef5b87ea244..00000000000--- a/lucene/backward-codecs/src/test-resources/META-INF/services/org.apache.lucene.codecs.DocValuesFormat+++ /dev/null@@ -1,16 +0,0 @@-# Licensed to the Apache Software Foundation (ASF) under one or more-# contributor license agreements. See the NOTICE file distributed with-# this work for additional information regarding copyright ownership.-# The ASF licenses this file to You under the Apache License, Version 2.0-# (the "License"); you may not use this file except in compliance with-# the License. You may obtain a copy of the License at-#-# http://www.apache.org/licenses/LICENSE-2.0-#-# Unless required by applicable law or agreed to in writing, software-# distributed under the License is distributed on an "AS IS" BASIS,-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.-# See the License for the specific language governing permissions and-# limitations under the License.--org.apache.lucene.codecs.lucene42.Lucene42RWDocValuesFormatdiff --git a/lucene/backward-codecs/src/test-resources/META-INF/services/org.apache.lucene.codecs.PostingsFormat b/lucene/backward-codecs/src/test-resources/META-INF/services/org.apache.lucene.codecs.PostingsFormatdeleted file mode 100644index c36d889e176..00000000000--- a/lucene/backward-codecs/src/test-resources/META-INF/services/org.apache.lucene.codecs.PostingsFormat+++ /dev/null@@ -1,16 +0,0 @@-# Licensed to the Apache Software Foundation (ASF) under one or more-# contributor license agreements. See the NOTICE file distributed with-# this work for additional information regarding copyright ownership.-# The ASF licenses this file to You under the Apache License, Version 2.0-# (the "License"); you may not use this file except in compliance with-# the License. You may obtain a copy of the License at-#-# http://www.apache.org/licenses/LICENSE-2.0-#-# Unless required by applicable law or agreed to in writing, software-# distributed under the License is distributed on an "AS IS" BASIS,-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.-# See the License for the specific language governing permissions and-# limitations under the License.--org.apache.lucene.codecs.lucene40.Lucene40RWPostingsFormatdiff --git a/lucene/backward-codecs/src/test/org/apache/lucene/codecs/lucene40/TestLucene40PostingsReader.java b/lucene/backward-codecs/src/test/org/apache/lucene/codecs/lucene40/TestLucene40PostingsReader.javaindex e8fa24159c9..3dc2c532b11 100644--- a/lucene/backward-codecs/src/test/org/apache/lucene/codecs/lucene40/TestLucene40PostingsReader.java+++ b/lucene/backward-codecs/src/test/org/apache/lucene/codecs/lucene40/TestLucene40PostingsReader.java@@ -21,7 +21,6 @@ import java.util.ArrayList;import java.util.Collections;import org.apache.lucene.analysis.MockAnalyzer;-import org.apache.lucene.codecs.Codec;import org.apache.lucene.document.Document;import org.apache.lucene.document.Field;import org.apache.lucene.document.FieldType;@@ -49,7 +48,7 @@ public class TestLucene40PostingsReader extends LuceneTestCase {public void testPostings() throws Exception {Directory dir = newFSDirectory(createTempDir("postings"));IndexWriterConfig iwc = newIndexWriterConfig(new MockAnalyzer(random()));- iwc.setCodec(Codec.forName("Lucene40"));+ iwc.setCodec(new Lucene40RWCodec());RandomIndexWriter iw = new RandomIndexWriter(random(), dir, iwc);Document doc = new Document();diff --git a/lucene/common-build.xml b/lucene/common-build.xmlindex acdb275f404..96666844ae1 100644--- a/lucene/common-build.xml+++ b/lucene/common-build.xml@@ -227,7 +227,6 @@<property name="src.dir" location="src/java"/><property name="resources.dir" location="${src.dir}/../resources"/><property name="tests.src.dir" location="src/test"/>- <property name="tests.resources.dir" location="${tests.src.dir}/../test-resources"/><available property="module.has.tests" type="dir" file="${tests.src.dir}"/><property name="build.dir" location="build"/><!-- Needed in case a module needs the original build, also for compile-tools to be called from a module -->@@ -796,11 +795,6 @@<target name="compile-test" depends="compile-core,compile-test-framework"><compile-test-macro srcdir="${tests.src.dir}" destdir="${build.dir}/classes/test" test.classpath="test.classpath"/>-- <!-- Copy the resources folder (if existent) -->- <copy todir="${build.dir}/classes/test">- <fileset dir="${tests.resources.dir}" erroronmissingdir="no"/>- </copy></target><macrodef name="compile-test-macro" description="Compiles junit tests.">@@ -1725,7 +1719,6 @@ ${ant.project.name}.test.dependencies=${test.classpath.list}<!-- TODO: Check all resource files. Currently not all stopword and similar files have no header! --><fileset dir="${resources.dir}" includes="META-INF/**" erroronmissingdir="false"/>- <fileset dir="${tests.resources.dir}" includes="META-INF/**" erroronmissingdir="false"/><!-- BSD 4-clause stuff (is disallowed below) --><rat:substringMatcher licenseFamilyCategory="BSD4 "