Refactor forbidden-apis a bit to make it easier to add new signatures, no need to have so many files slowing down the build; add Properties file rules

git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1502493 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Uwe Schindler 2013-07-12 09:35:40 +00:00
parent 50ae2f9d8a
commit fbee7ef942
19 changed files with 27 additions and 60 deletions

View File

@ -95,8 +95,7 @@
<bundledSignature>jdk-deprecated</bundledSignature>
</bundledSignatures>
<signaturesFiles>
<signaturesFile>${top-level}/lucene/tools/forbiddenApis/executors.txt</signaturesFile>
<signaturesFile>${top-level}/lucene/tools/forbiddenApis/chars.txt</signaturesFile>
<signaturesFile>${top-level}/lucene/tools/forbiddenApis/base.txt</signaturesFile>
</signaturesFiles>
</configuration>
<goals>

View File

@ -141,8 +141,7 @@
<!-- <bundledSignature>jdk-system-out</bundledSignature> -->
</bundledSignatures>
<signaturesFiles>
<signaturesFile>${top-level}/lucene/tools/forbiddenApis/executors.txt</signaturesFile>
<signaturesFile>${top-level}/lucene/tools/forbiddenApis/chars.txt</signaturesFile>
<signaturesFile>${top-level}/lucene/tools/forbiddenApis/base.txt</signaturesFile>
</signaturesFiles>
</configuration>
<goals>

View File

@ -86,8 +86,7 @@
<bundledSignature>jdk-deprecated</bundledSignature>
</bundledSignatures>
<signaturesFiles>
<signaturesFile>${top-level}/lucene/tools/forbiddenApis/executors.txt</signaturesFile>
<signaturesFile>${top-level}/lucene/tools/forbiddenApis/chars.txt</signaturesFile>
<signaturesFile>${top-level}/lucene/tools/forbiddenApis/base.txt</signaturesFile>
</signaturesFiles>
</configuration>
<goals>

View File

@ -112,8 +112,7 @@
<!-- <bundledSignature>jdk-system-out</bundledSignature> -->
</bundledSignatures>
<signaturesFiles>
<signaturesFile>${top-level}/lucene/tools/forbiddenApis/executors.txt</signaturesFile>
<signaturesFile>${top-level}/lucene/tools/forbiddenApis/chars.txt</signaturesFile>
<signaturesFile>${top-level}/lucene/tools/forbiddenApis/base.txt</signaturesFile>
</signaturesFiles>
</configuration>
<goals>

View File

@ -97,8 +97,7 @@
<bundledSignature>jdk-deprecated</bundledSignature>
</bundledSignatures>
<signaturesFiles>
<signaturesFile>${top-level}/lucene/tools/forbiddenApis/executors.txt</signaturesFile>
<signaturesFile>${top-level}/lucene/tools/forbiddenApis/chars.txt</signaturesFile>
<signaturesFile>${top-level}/lucene/tools/forbiddenApis/base.txt</signaturesFile>
</signaturesFiles>
</configuration>
<goals>

View File

@ -85,8 +85,7 @@
<bundledSignature>jdk-deprecated</bundledSignature>
</bundledSignatures>
<signaturesFiles>
<signaturesFile>${top-level}/lucene/tools/forbiddenApis/executors.txt</signaturesFile>
<signaturesFile>${top-level}/lucene/tools/forbiddenApis/chars.txt</signaturesFile>
<signaturesFile>${top-level}/lucene/tools/forbiddenApis/base.txt</signaturesFile>
</signaturesFiles>
</configuration>
<goals>

View File

@ -77,8 +77,7 @@
<bundledSignature>jdk-system-out</bundledSignature>
</bundledSignatures>
<signaturesFiles>
<signaturesFile>${top-level}/lucene/tools/forbiddenApis/executors.txt</signaturesFile>
<signaturesFile>${top-level}/lucene/tools/forbiddenApis/chars.txt</signaturesFile>
<signaturesFile>${top-level}/lucene/tools/forbiddenApis/base.txt</signaturesFile>
</signaturesFiles>
</configuration>
<goals>
@ -96,8 +95,7 @@
</bundledSignatures>
<signaturesFiles>
<signaturesFile>${top-level}/lucene/tools/forbiddenApis/tests.txt</signaturesFile>
<signaturesFile>${top-level}/lucene/tools/forbiddenApis/executors.txt</signaturesFile>
<signaturesFile>${top-level}/lucene/tools/forbiddenApis/chars.txt</signaturesFile>
<signaturesFile>${top-level}/lucene/tools/forbiddenApis/base.txt</signaturesFile>
</signaturesFiles>
</configuration>
<goals>

View File

@ -100,8 +100,7 @@
<bundledSignature>jdk-deprecated</bundledSignature>
</bundledSignatures>
<signaturesFiles>
<signaturesFile>${top-level}/lucene/tools/forbiddenApis/executors.txt</signaturesFile>
<signaturesFile>${top-level}/lucene/tools/forbiddenApis/chars.txt</signaturesFile>
<signaturesFile>${top-level}/lucene/tools/forbiddenApis/base.txt</signaturesFile>
</signaturesFiles>
</configuration>
<goals>

View File

@ -104,9 +104,8 @@
<bundledSignature>jdk-deprecated</bundledSignature>
</bundledSignatures>
<signaturesFiles>
<signaturesFile>${top-level}/lucene/tools/forbiddenApis/base.txt</signaturesFile>
<signaturesFile>${top-level}/lucene/tools/forbiddenApis/tests.txt</signaturesFile>
<signaturesFile>${top-level}/lucene/tools/forbiddenApis/executors.txt</signaturesFile>
<signaturesFile>${top-level}/lucene/tools/forbiddenApis/chars.txt</signaturesFile>
</signaturesFiles>
</configuration>
<goals>

View File

@ -391,9 +391,8 @@
<bundledSignature>commons-io-unsafe-${commons-io.version}</bundledSignature>
</bundledSignatures>
<signaturesFiles>
<signaturesFile>${top-level}/lucene/tools/forbiddenApis/executors.txt</signaturesFile>
<signaturesFile>${top-level}/lucene/tools/forbiddenApis/base.txt</signaturesFile>
<signaturesFile>${top-level}/lucene/tools/forbiddenApis/servlet-api.txt</signaturesFile>
<signaturesFile>${top-level}/lucene/tools/forbiddenApis/chars.txt</signaturesFile>
</signaturesFiles>
</configuration>
<goals>

View File

@ -278,9 +278,8 @@
<bundledSignature>commons-io-unsafe-${commons-io.version}</bundledSignature>
</bundledSignatures>
<signaturesFiles>
<signaturesFile>${top-level}/lucene/tools/forbiddenApis/base.txt</signaturesFile>
<signaturesFile>${top-level}/lucene/tools/forbiddenApis/servlet-api.txt</signaturesFile>
<signaturesFile>${top-level}/lucene/tools/forbiddenApis/executors.txt</signaturesFile>
<signaturesFile>${top-level}/lucene/tools/forbiddenApis/chars.txt</signaturesFile>
</signaturesFiles>
</configuration>
<goals>

View File

@ -148,8 +148,7 @@
<bundledSignature>jdk-deprecated</bundledSignature>
</bundledSignatures>
<signaturesFiles>
<signaturesFile>${top-level}/lucene/tools/forbiddenApis/executors.txt</signaturesFile>
<signaturesFile>${top-level}/lucene/tools/forbiddenApis/chars.txt</signaturesFile>
<signaturesFile>${top-level}/lucene/tools/forbiddenApis/base.txt</signaturesFile>
</signaturesFiles>
</configuration>
<goals>
@ -169,8 +168,7 @@
</bundledSignatures>
<signaturesFiles>
<signaturesFile>${top-level}/lucene/tools/forbiddenApis/tests.txt</signaturesFile>
<signaturesFile>${top-level}/lucene/tools/forbiddenApis/executors.txt</signaturesFile>
<signaturesFile>${top-level}/lucene/tools/forbiddenApis/chars.txt</signaturesFile>
<signaturesFile>${top-level}/lucene/tools/forbiddenApis/base.txt</signaturesFile>
</signaturesFiles>
</configuration>
<goals>

View File

@ -154,8 +154,7 @@
<bundledSignature>commons-io-unsafe-${commons-io.version}</bundledSignature>
</bundledSignatures>
<signaturesFiles>
<signaturesFile>${top-level}/lucene/tools/forbiddenApis/executors.txt</signaturesFile>
<signaturesFile>${top-level}/lucene/tools/forbiddenApis/chars.txt</signaturesFile>
<signaturesFile>${top-level}/lucene/tools/forbiddenApis/base.txt</signaturesFile>
<!-- Solr-J does NOT depend on servlet-api -->
<!-- <signaturesFile>${top-level}/lucene/tools/forbiddenApis/servlet-api.txt</signaturesFile> -->
</signaturesFiles>

View File

@ -140,9 +140,8 @@
<bundledSignature>commons-io-unsafe-${commons-io.version}</bundledSignature>
</bundledSignatures>
<signaturesFiles>
<signaturesFile>${top-level}/lucene/tools/forbiddenApis/base.txt</signaturesFile>
<signaturesFile>${top-level}/lucene/tools/forbiddenApis/tests.txt</signaturesFile>
<signaturesFile>${top-level}/lucene/tools/forbiddenApis/executors.txt</signaturesFile>
<signaturesFile>${top-level}/lucene/tools/forbiddenApis/chars.txt</signaturesFile>
</signaturesFiles>
</configuration>
<goals>

View File

@ -128,10 +128,9 @@
<bundledSignature>commons-io-unsafe-${commons-io.version}</bundledSignature>
</bundledSignatures>
<signaturesFiles>
<signaturesFile>${top-level}/lucene/tools/forbiddenApis/base.txt</signaturesFile>
<signaturesFile>${top-level}/lucene/tools/forbiddenApis/servlet-api.txt</signaturesFile>
<signaturesFile>${top-level}/lucene/tools/forbiddenApis/tests.txt</signaturesFile>
<signaturesFile>${top-level}/lucene/tools/forbiddenApis/executors.txt</signaturesFile>
<signaturesFile>${top-level}/lucene/tools/forbiddenApis/chars.txt</signaturesFile>
</signaturesFiles>
</configuration>
<goals>

View File

@ -184,8 +184,7 @@
<bundledSignatures name="jdk-unsafe-${javac.target}"/>
<bundledSignatures name="jdk-deprecated-${javac.target}"/>
<signaturesFileSet dir="${common.dir}/tools/forbiddenApis">
<include name="executors.txt" />
<include name="chars.txt" />
<include name="base.txt" />
</signaturesFileSet>
<fileset dir="${basedir}/build" includes="**/*.class" />
</forbidden-apis>

View File

@ -13,11 +13,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.
# see Solr's DefaultSolrThreadFactory
# see Lucene's NamedThreadFactory
@defaultMessage spawns threads with vague names; use a custom thread factory and name threads so that you can tell (by its name) which executor it is associated with
@defaultMessage Spawns threads with vague names; use a custom thread factory (Lucene's NamedThreadFactory, Solr's DefaultSolrThreadFactory) and name threads so that you can tell (by its name) which executor it is associated with
java.util.concurrent.Executors#newFixedThreadPool(int)
java.util.concurrent.Executors#newSingleThreadExecutor()
java.util.concurrent.Executors#newCachedThreadPool()
@ -25,3 +21,10 @@ java.util.concurrent.Executors#newSingleThreadScheduledExecutor()
java.util.concurrent.Executors#newScheduledThreadPool(int)
java.util.concurrent.Executors#defaultThreadFactory()
java.util.concurrent.Executors#privilegedThreadFactory()
@defaultMessage Properties files should be read/written with InputStream/OutputStream for maximum compatibility, as it uses the official "properties file format" with unicode escapes and properly defined encoding
java.util.Properties#load(java.io.Reader)
java.util.Properties#store(java.io.Writer,java.lang.String)
java.lang.Character#codePointBefore(char[],int) @ Implicit start offset is error-prone when the char[] is a buffer and the first chars are random chars
java.lang.Character#codePointAt(char[],int) @ Implicit end offset is error-prone when the char[] is a buffer and the last chars are random chars

View File

@ -1,17 +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.
java.lang.Character#codePointBefore(char[],int) @ Implicit start offset is error-prone when the char[] is a buffer and the first chars are random chars
java.lang.Character#codePointAt(char[],int) @ Implicit end offset is error-prone when the char[] is a buffer and the last chars are random chars

View File

@ -265,8 +265,7 @@
<bundledSignatures name="jdk-deprecated-${javac.target}"/>
<bundledSignatures name="commons-io-unsafe-${commons-io.version}"/>
<signaturesFileSet dir="${common.dir}/tools/forbiddenApis">
<include name="executors.txt" />
<include name="chars.txt" />
<include name="base.txt" />
<include name="servlet-api.txt" />
</signaturesFileSet>
<fileset dir="${basedir}/build">