lucene-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From uschind...@apache.org
Subject lucene-solr:master: LUCENE-7296: Update forbiddenapis to version 2.1
Date Sun, 22 May 2016 22:17:04 GMT
Repository: lucene-solr
Updated Branches:
  refs/heads/master 3ea12f2be -> a5f190286


LUCENE-7296: Update forbiddenapis to version 2.1


Project: http://git-wip-us.apache.org/repos/asf/lucene-solr/repo
Commit: http://git-wip-us.apache.org/repos/asf/lucene-solr/commit/a5f19028
Tree: http://git-wip-us.apache.org/repos/asf/lucene-solr/tree/a5f19028
Diff: http://git-wip-us.apache.org/repos/asf/lucene-solr/diff/a5f19028

Branch: refs/heads/master
Commit: a5f19028696ae8468aaa03cf97bcec81fd1f7e87
Parents: 3ea12f2
Author: Uwe Schindler <uschindler@apache.org>
Authored: Mon May 23 00:16:47 2016 +0200
Committer: Uwe Schindler <uschindler@apache.org>
Committed: Mon May 23 00:16:47 2016 +0200

----------------------------------------------------------------------
 lucene/CHANGES.txt                                   |  3 +++
 lucene/common-build.xml                              | 15 ++++++++-------
 .../flexible/core/nodes/QueryNodeImpl.java           |  2 +-
 lucene/tools/forbiddenApis/base.txt                  |  4 ----
 solr/common-build.xml                                | 13 ++++++++-----
 .../solr/client/solrj/io/sql/ResultSetImpl.java      |  2 ++
 6 files changed, 22 insertions(+), 17 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/a5f19028/lucene/CHANGES.txt
----------------------------------------------------------------------
diff --git a/lucene/CHANGES.txt b/lucene/CHANGES.txt
index d4f5841..f6788cab 100644
--- a/lucene/CHANGES.txt
+++ b/lucene/CHANGES.txt
@@ -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)
 

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/a5f19028/lucene/common-build.xml
----------------------------------------------------------------------
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>

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/a5f19028/lucene/queryparser/src/java/org/apache/lucene/queryparser/flexible/core/nodes/QueryNodeImpl.java
----------------------------------------------------------------------
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();
 

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/a5f19028/lucene/tools/forbiddenApis/base.txt
----------------------------------------------------------------------
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
 

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/a5f19028/solr/common-build.xml
----------------------------------------------------------------------
diff --git a/solr/common-build.xml b/solr/common-build.xml
index 39e1561..c6ff092 100644
--- a/solr/common-build.xml
+++ b/solr/common-build.xml
@@ -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" />

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/a5f19028/solr/solrj/src/java/org/apache/solr/client/solrj/io/sql/ResultSetImpl.java
----------------------------------------------------------------------
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);
   }


Mime
View raw message