LUCENE-7296: Update forbiddenapis to version 2.1

This commit is contained in:
Uwe Schindler 2016-05-23 00:16:47 +02:00
parent 3ea12f2be4
commit a5f1902869
6 changed files with 22 additions and 17 deletions

View File

@ -155,6 +155,9 @@ Build
compilation on Java 9+ to ensure real cross-compilation.
(Uwe Schindler)
* LUCENE-7296: Update forbiddenapis to version 2.1.
(Uwe Schindler)
======================= Lucene 6.0.1 =======================
(No Changes)

View File

@ -2330,7 +2330,7 @@ ${ant.project.name}.test.dependencies=${test.classpath.list}
<property name="forbidden-sysout-excludes" value=""/>
<target name="-install-forbidden-apis" unless="forbidden-apis.loaded" depends="ivy-availability-check,ivy-configure">
<ivy:cachepath organisation="de.thetaphi" module="forbiddenapis" revision="2.0"
<ivy:cachepath organisation="de.thetaphi" module="forbiddenapis" revision="2.1"
inline="true" conf="default" transitive="true" pathid="forbidden-apis.classpath"/>
<taskdef name="forbidden-apis" classname="de.thetaphi.forbiddenapis.ant.AntTask" classpathref="forbidden-apis.classpath"/>
<property name="forbidden-apis.loaded" value="true"/>
@ -2360,11 +2360,12 @@ ${ant.project.name}.test.dependencies=${test.classpath.list}
<!-- applies to both source and test code -->
<target name="-check-forbidden-all" depends="-init-forbidden-apis,compile-core,compile-test">
<forbidden-apis internalRuntimeForbidden="true" suppressAnnotation="**.SuppressForbidden" classpathref="forbidden-apis.allclasses.classpath">
<forbidden-apis suppressAnnotation="**.SuppressForbidden" classpathref="forbidden-apis.allclasses.classpath" targetVersion="${javac.release}">
<signatures>
<!-- TODO: fix this in forbiddenapis 2.1+ -->
<bundled name="jdk-unsafe-1.${javac.release}"/>
<bundled name="jdk-deprecated-1.${javac.release}"/>
<bundled name="jdk-unsafe"/>
<bundled name="jdk-deprecated"/>
<bundled name="jdk-non-portable"/>
<bundled name="jdk-reflection"/>
<fileset dir="${common.dir}/tools/forbiddenApis">
<include name="base.txt"/>
<include name="lucene.txt" if="forbidden-isLucene"/>
@ -2377,7 +2378,7 @@ ${ant.project.name}.test.dependencies=${test.classpath.list}
<!-- 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" suppressAnnotation="**.SuppressForbidden" classpathref="forbidden-apis.allclasses.classpath">
<forbidden-apis signaturesFile="${common.dir}/tools/forbiddenApis/tests.txt" suppressAnnotation="**.SuppressForbidden" classpathref="forbidden-apis.allclasses.classpath" targetVersion="${javac.release}">
<fileset dir="${build.dir}/classes/test" excludes="${forbidden-tests-excludes}"/>
</forbidden-apis>
</target>
@ -2386,7 +2387,7 @@ ${ant.project.name}.test.dependencies=${test.classpath.list}
<target name="-check-forbidden-core" depends="-init-forbidden-apis,compile-core,-check-forbidden-sysout" />
<target name="-check-forbidden-sysout" depends="-init-forbidden-apis,compile-core">
<forbidden-apis bundledSignatures="jdk-system-out" suppressAnnotation="**.SuppressForbidden" classpathref="forbidden-apis.allclasses.classpath">
<forbidden-apis bundledSignatures="jdk-system-out" suppressAnnotation="**.SuppressForbidden" classpathref="forbidden-apis.allclasses.classpath" targetVersion="${javac.release}">
<fileset dir="${build.dir}/classes/java" excludes="${forbidden-sysout-excludes}"/>
</forbidden-apis>
</target>

View File

@ -92,7 +92,7 @@ public abstract class QueryNodeImpl implements QueryNode, Cloneable {
if (isLeaf() || this.clauses == null) {
ResourceBundle bundle = ResourceBundle
.getBundle("org.apache.lucene.queryParser.messages.QueryParserMessages");
.getBundle("org.apache.lucene.queryParser.messages.QueryParserMessages", Locale.getDefault());
String message = bundle.getObject("Q0008E.NODE_ACTION_NOT_SUPPORTED")
.toString();

View File

@ -27,10 +27,6 @@ java.util.Properties#load(java.io.InputStream)
java.util.Properties#save(java.io.OutputStream,java.lang.String)
java.util.Properties#store(java.io.OutputStream,java.lang.String)
@defaultMessage Accessing private members of foreign classes breaks in security-sensitive environments. In addition, it no longer works with Java 9 on runtime classes.
java.lang.reflect.AccessibleObject#setAccessible(boolean)
java.lang.reflect.AccessibleObject#setAccessible(java.lang.reflect.AccessibleObject[],boolean)
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

@ -504,12 +504,15 @@
<!-- Forbidden API Task, customizations for Solr -->
<target name="-check-forbidden-all" depends="-init-forbidden-apis,compile-core,compile-test">
<property prefix="ivyversions" file="${common.dir}/ivy-versions.properties"/> <!-- for commons-io version -->
<forbidden-apis internalRuntimeForbidden="true" suppressAnnotation="**.SuppressForbidden" classpathref="forbidden-apis.allclasses.classpath">
<!--<property prefix="ivyversions" file="${common.dir}/ivy-versions.properties"/>--> <!-- for commons-io version -->
<!-- HACK: --><property name="ivyversions./commons-io/commons-io" value="2.4"/>
<forbidden-apis suppressAnnotation="**.SuppressForbidden" classpathref="forbidden-apis.allclasses.classpath" targetVersion="${javac.release}">
<signatures>
<!-- TODO: fix this in forbiddenapis 2.1+ -->
<bundled name="jdk-unsafe-1.${javac.release}"/>
<bundled name="jdk-deprecated-1.${javac.release}"/>
<bundled name="jdk-unsafe"/>
<bundled name="jdk-deprecated"/>
<bundled name="jdk-non-portable"/>
<bundled name="jdk-reflection"/>
<bundled name="commons-io-unsafe-${ivyversions./commons-io/commons-io}"/>
<fileset dir="${common.dir}/tools/forbiddenApis">
<include name="base.txt" />
<include name="servlet-api.txt" />

View File

@ -40,6 +40,7 @@ import java.sql.Timestamp;
import java.util.Calendar;
import java.util.Map;
import org.apache.solr.common.util.SuppressForbidden;
import org.apache.solr.client.solrj.io.Tuple;
import org.apache.solr.client.solrj.io.stream.PushBackStream;
import org.apache.solr.client.solrj.io.stream.SolrStream;
@ -177,6 +178,7 @@ class ResultSetImpl implements ResultSet {
}
@Override
@SuppressForbidden(reason = "Implements deprecated method")
public BigDecimal getBigDecimal(int columnIndex, int scale) throws SQLException {
return this.getBigDecimal(this.resultSetMetaData.getColumnLabel(columnIndex), scale);
}