| lucene/common-build.xml | 15 ++++++++------- |
| .../queryparser/flexible/core/nodes/QueryNodeImpl.java | 2 +- |
| lucene/tools/forbiddenApis/base.txt | 4 ---- |
| solr/common-build.xml | 8 +++++--- |
| .../apache/solr/client/solrj/io/sql/ResultSetImpl.java | 2 ++ |
| 5 files changed, 16 insertions(+), 15 deletions(-) |
| |
| diff --git a/lucene/common-build.xml b/lucene/common-build.xml |
| index 8fb9ea0..b4074ac 100644 |
| --- a/lucene/common-build.xml |
| +++ b/lucene/common-build.xml |
| @@ -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> |
| diff --git a/lucene/queryparser/src/java/org/apache/lucene/queryparser/flexible/core/nodes/QueryNodeImpl.java b/lucene/queryparser/src/java/org/apache/lucene/queryparser/flexible/core/nodes/QueryNodeImpl.java |
| index 7d9316b..fca8386 100644 |
| --- a/lucene/queryparser/src/java/org/apache/lucene/queryparser/flexible/core/nodes/QueryNodeImpl.java |
| +++ b/lucene/queryparser/src/java/org/apache/lucene/queryparser/flexible/core/nodes/QueryNodeImpl.java |
| @@ -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(); |
| |
| diff --git a/lucene/tools/forbiddenApis/base.txt b/lucene/tools/forbiddenApis/base.txt |
| index 401fcec..1bb8118 100644 |
| --- a/lucene/tools/forbiddenApis/base.txt |
| +++ b/lucene/tools/forbiddenApis/base.txt |
| @@ -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 |
| |
| diff --git a/solr/common-build.xml b/solr/common-build.xml |
| index b13d737..76d481d 100644 |
| --- a/solr/common-build.xml |
| +++ b/solr/common-build.xml |
| @@ -505,11 +505,13 @@ |
| <!-- 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"> |
| + <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" /> |
| diff --git a/solr/solrj/src/java/org/apache/solr/client/solrj/io/sql/ResultSetImpl.java b/solr/solrj/src/java/org/apache/solr/client/solrj/io/sql/ResultSetImpl.java |
| index 91b99b9..7be0ebd 100644 |
| --- a/solr/solrj/src/java/org/apache/solr/client/solrj/io/sql/ResultSetImpl.java |
| +++ b/solr/solrj/src/java/org/apache/solr/client/solrj/io/sql/ResultSetImpl.java |
| @@ -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); |
| } |