You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@bookkeeper.apache.org by eo...@apache.org on 2019/01/16 12:24:17 UTC

[bookkeeper] branch master updated: Make Spotbugs pass on JDK11

This is an automated email from the ASF dual-hosted git repository.

eolivelli pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/bookkeeper.git


The following commit(s) were added to refs/heads/master by this push:
     new d00491b  Make Spotbugs pass on JDK11
d00491b is described below

commit d00491bc103dd85fb60307257bc2ad6d44f3118f
Author: Enrico Olivelli <eo...@gmail.com>
AuthorDate: Wed Jan 16 13:24:12 2019 +0100

    Make Spotbugs pass on JDK11
    
    Descriptions of the changes in this PR:
    - upgrade spotbugs to 3.1.8
    - disable spotbugs on JDK11 (due to for https://github.com/spotbugs/spotbugs/issues/756)
    
    ### Motivation
    
    This change is on the way to give full "official" support do JDK11
    
    ### Changes
    
    - upgrade spotbugs to 3.1.8
    - fix new spotbugs issues
    - disable spotbugs on JDK11 (due to for https://github.com/spotbugs/spotbugs/issues/756)
    
    
    
    
    Reviewers: Sijie Guo <si...@apache.org>
    
    This closes #1849 from eolivelli/fix/ci-java11
---
 .../common/collections/RecyclableArrayList.java    | 11 +++++++++++
 pom.xml                                            | 22 ++++++++++++++++++++--
 2 files changed, 31 insertions(+), 2 deletions(-)

diff --git a/bookkeeper-common/src/main/java/org/apache/bookkeeper/common/collections/RecyclableArrayList.java b/bookkeeper-common/src/main/java/org/apache/bookkeeper/common/collections/RecyclableArrayList.java
index 4915d77..a4932c0 100644
--- a/bookkeeper-common/src/main/java/org/apache/bookkeeper/common/collections/RecyclableArrayList.java
+++ b/bookkeeper-common/src/main/java/org/apache/bookkeeper/common/collections/RecyclableArrayList.java
@@ -64,4 +64,15 @@ public final class RecyclableArrayList<T> extends ArrayList<T> {
             handle.recycle(this);
         }
     }
+
+    @Override
+    public boolean equals(Object obj) {
+        return super.equals(obj);
+    }
+
+    @Override
+    public int hashCode() {
+        return super.hashCode();
+    }
+
 }
diff --git a/pom.xml b/pom.xml
index c0c2c1a..e8715f7 100644
--- a/pom.xml
+++ b/pom.xml
@@ -164,7 +164,7 @@
     <shrinkwrap.version>3.0.1</shrinkwrap.version>
     <slf4j.version>1.7.25</slf4j.version>
     <snakeyaml.version>1.19</snakeyaml.version>
-    <spotbugs-annotations.version>3.1.1</spotbugs-annotations.version>
+    <spotbugs-annotations.version>3.1.8</spotbugs-annotations.version>
     <javax-annotations-api.version>1.3.2</javax-annotations-api.version>
     <testcontainers.version>1.8.3</testcontainers.version>
     <twitter-server.version>1.29.0</twitter-server.version>
@@ -196,7 +196,7 @@
     <os-maven-plugin.version>1.4.1.Final</os-maven-plugin.version>
     <protobuf-maven-plugin.version>0.5.0</protobuf-maven-plugin.version>
     <puppycrawl.checkstyle.version>6.19</puppycrawl.checkstyle.version>
-    <spotbugs-maven-plugin.version>3.1.0-RC6</spotbugs-maven-plugin.version>
+    <spotbugs-maven-plugin.version>3.1.8</spotbugs-maven-plugin.version>
   </properties>
 
   <!-- dependency definitions -->
@@ -1100,5 +1100,23 @@
         <module>stream</module>
       </modules>
     </profile>
+
+    <profile>
+      <id>jdk11-no-spotbugs</id>
+      <activation>
+        <jdk>[11,)</jdk>
+      </activation>
+      <build>
+        <plugins>
+           <plugin>
+             <groupId>com.github.spotbugs</groupId>
+             <artifactId>spotbugs-maven-plugin</artifactId>
+             <configuration>
+                 <skip>true</skip>
+             </configuration>
+          </plugin>
+        </plugins>
+      </build>
+    </profile>
   </profiles>
 </project>