Apache Lucene open-source search software
LUCENE-5945: Changes to forbidden, as discussed on issue.
Uwe Schindler6a4bce5e17f1
diff --git a/lucene/common-build.xml b/lucene/common-build.xmlindex 25a385c7573..3ece97750a6 100644--- a/lucene/common-build.xml+++ b/lucene/common-build.xml@@ -2356,7 +2356,7 @@ ${ant.project.name}.test.dependencies=${test.classpath.list}</path></target>- <condition property="islucene" value="true" else="false">+ <condition property="forbidden-isLucene"><not><or><matches pattern="^(solr)\b" string="${name}"/>@@ -2365,27 +2365,22 @@ ${ant.project.name}.test.dependencies=${test.classpath.list}</not></condition>- <target name="check-forbidden-apis" depends="-check-forbidden-all,-check-forbidden-core,-check-forbidden-tests,-check-forbidden-lucene" description="Check forbidden API calls in compiled class files"/>+ <target name="check-forbidden-apis" depends="-check-forbidden-all,-check-forbidden-core,-check-forbidden-tests" description="Check forbidden API calls in compiled class files"/><!-- applies to both source and test code --><target name="-check-forbidden-all" depends="-init-forbidden-apis,compile-core,compile-test"><forbidden-apis internalRuntimeForbidden="true" classpathref="forbidden-apis.allclasses.classpath"><bundledSignatures name="jdk-unsafe-${javac.target}"/><bundledSignatures name="jdk-deprecated-${javac.target}"/>- <signaturesFileSet file="${common.dir}/tools/forbiddenApis/base.txt"/>+ <signaturesFileSet dir="${common.dir}/tools/forbiddenApis">+ <include name="base.txt"/>+ <include name="lucene.txt" if="forbidden-isLucene"/>+ </signaturesFileSet><fileset dir="${build.dir}/classes/java" excludes="${forbidden-base-excludes}"/><fileset dir="${build.dir}/classes/test" excludes="${forbidden-tests-excludes}" erroronmissingdir="false"/></forbidden-apis></target>- <!-- applies to only lucene API -->- <target name="-check-forbidden-lucene" depends="-init-forbidden-apis,compile-core,compile-test" if="${islucene}">- <forbidden-apis signaturesFile="${common.dir}/tools/forbiddenApis/lucene.txt" classpathref="forbidden-apis.allclasses.classpath">- <fileset dir="${build.dir}/classes/java" excludes="${forbidden-base-excludes}"/>- <fileset dir="${build.dir}/classes/test" excludes="${forbidden-tests-excludes}" erroronmissingdir="false"/>- </forbidden-apis>- </target>-<!-- applies to only test code --><target name="-check-forbidden-tests" depends="-init-forbidden-apis,compile-test"><forbidden-apis signaturesFile="${common.dir}/tools/forbiddenApis/tests.txt" classpathref="forbidden-apis.allclasses.classpath">