Skip to content
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -189,8 +189,8 @@
<protobuf-maven-plugin.version>0.6.1</protobuf-maven-plugin.version>
<cyclonedx.version>2.8.0</cyclonedx.version>

<spotbugs.version>4.2.1</spotbugs.version>
<spotbugs-plugin.version>4.2.0</spotbugs-plugin.version>
<spotbugs.version>4.8.6</spotbugs.version>
<spotbugs-plugin.version>4.8.6.2</spotbugs-plugin.version>

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why not 4.9.x?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

4.8.6 fits the building with JDK21, thus it's chosen.

Or do you suggest we choose a more up-to-date version?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can't version 4.9.x be built with JDK 21? I could not see more information about this in 4.9.0 release notte(https://github.com/spotbugs/spotbugs/releases/tag/4.9.0), could you please explain more details about this?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's use 4.9.x. Apache Hadoop has been updated to 4.9.x. It is working fine.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated to 4.9.7, same as Hadoop.


<distMgmtSnapshotsId>apache.snapshots.https</distMgmtSnapshotsId>
<distMgmtSnapshotsName>Apache Development Snapshot Repository</distMgmtSnapshotsName>
Expand Down
42 changes: 42 additions & 0 deletions ratis-client/dev-support/findbugsExcludeFile.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
<!--
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.
-->
<FindBugsFilter>
<Match>
<Class name="org.apache.ratis.client.DataStreamClient$Builder" />
<Bug pattern="EI_EXPOSE_REP2" />
</Match>
<Match>
<Class name="org.apache.ratis.client.RaftClient$Builder" />
<Bug pattern="EI_EXPOSE_REP2" />
</Match>
<Match>
<Class name="org.apache.ratis.client.impl.DataStreamClientImpl$DataStreamOutputImpl" />
<Bug pattern="EI_EXPOSE_REP" />
</Match>
<Match>
<Class name="org.apache.ratis.client.impl.RaftClientRpcWithProxy" />
<Bug pattern="EI_EXPOSE_REP" />
</Match>
<Match>
<Class name="org.apache.ratis.client.retry.ClientRetryEvent" />
<Bug pattern="EI_EXPOSE_REP" />
</Match>
<Match>
<Class name="org.apache.ratis.client.retry.ClientRetryEvent" />
<Bug pattern="EI_EXPOSE_REP2" />
</Match>
</FindBugsFilter>
11 changes: 11 additions & 0 deletions ratis-client/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -59,4 +59,15 @@
<scope>test</scope>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>com.github.spotbugs</groupId>
<artifactId>spotbugs-maven-plugin</artifactId>
<configuration>
<excludeFilterFile>${basedir}/dev-support/findbugsExcludeFile.xml</excludeFilterFile>
</configuration>
</plugin>
</plugins>
</build>
</project>
130 changes: 130 additions & 0 deletions ratis-common/dev-support/findbugsExcludeFile.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,130 @@
<!--
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.
-->
<FindBugsFilter>
<Match>
<Class name="org.apache.ratis.datastream.impl.DataStreamReplyByteBuffer$Builder" />
<Bug pattern="EI_EXPOSE_REP2" />
</Match>
<Match>
<Class name="org.apache.ratis.io.MD5Hash" />
<Bug pattern="CT_CONSTRUCTOR_THROW" />
Comment thread
symious marked this conversation as resolved.
</Match>
<Match>
<Class name="org.apache.ratis.protocol.GroupInfoReply" />
<Bug pattern="EI_EXPOSE_REP2" />
</Match>
<Match>
<Class name="org.apache.ratis.retry.MultipleLinearRandomRetry" />
<Bug pattern="CT_CONSTRUCTOR_THROW" />
</Match>
<Match>
<Class name="org.apache.ratis.util.AtomicFileOutputStream" />
<Bug pattern="CT_CONSTRUCTOR_THROW" />
</Match>
<Match>
<Class name="org.apache.ratis.util.Daemon" />
<Bug pattern="EI_EXPOSE_REP2" />
</Match>
<Match>
<Class name="org.apache.ratis.retry.MultipleLinearRandomRetry$Pair" />
<Bug pattern="CT_CONSTRUCTOR_THROW" />
</Match>
<Match>
<Class name="org.apache.ratis.util.Daemon$Builder" />
<Bug pattern="EI_EXPOSE_REP2" />
</Match>
<Match>
<Class name="org.apache.ratis.conf.ReconfigurationBase" />
<Bug pattern="EI_EXPOSE_REP" />
</Match>
<Match>
<Class name="org.apache.ratis.conf.ReconfigurationStatus" />
<Bug pattern="EI_EXPOSE_REP" />
</Match>
<Match>
<Class name="org.apache.ratis.datastream.impl.DataStreamReplyByteBuffer" />
<Bug pattern="EI_EXPOSE_REP" />
</Match>
<Match>
<Class name="org.apache.ratis.datastream.impl.DataStreamRequestByteBuffer" />
<Bug pattern="EI_EXPOSE_REP" />
</Match>
<Match>
<Class name="org.apache.ratis.datastream.impl.DataStreamRequestFilePositionCount" />
<Bug pattern="EI_EXPOSE_REP" />
</Match>
<Match>
<Class name="org.apache.ratis.protocol.DataStreamReplyHeader" />
<Bug pattern="EI_EXPOSE_REP" />
</Match>
<Match>
<Class name="org.apache.ratis.protocol.GroupInfoReply" />
<Bug pattern="EI_EXPOSE_REP" />
</Match>
<Match>
<Class name="org.apache.ratis.protocol.RaftClientReply" />
<Bug pattern="EI_EXPOSE_REP" />
</Match>
<Match>
<Class name="org.apache.ratis.protocol.RaftClientReply$Builder" />
<Bug pattern="EI_EXPOSE_REP2" />
</Match>
<Match>
<Class name="org.apache.ratis.protocol.RaftClientRequest" />
<Bug pattern="EI_EXPOSE_REP" />
</Match>
<Match>
<Class name="org.apache.ratis.protocol.RaftClientRequest$Builder" />
<Bug pattern="EI_EXPOSE_REP2" />
</Match>
<Match>
<Class name="org.apache.ratis.protocol.RaftPeerId" />
<Bug pattern="EI_EXPOSE_REP" />
</Match>
<Match>
<Class name="org.apache.ratis.protocol.SetConfigurationRequest$Arguments" />
<Bug pattern="EI_EXPOSE_REP" />
</Match>
<Match>
<Class name="org.apache.ratis.protocol.SetConfigurationRequest$Arguments$Builder" />
<Bug pattern="EI_EXPOSE_REP2" />
</Match>
<Match>
<Class name="org.apache.ratis.protocol.exceptions.LeaderNotReadyException" />
<Bug pattern="EI_EXPOSE_REP" />
</Match>
<Match>
<Class name="org.apache.ratis.protocol.exceptions.NotLeaderException" />
<Bug pattern="EI_EXPOSE_REP" />
</Match>
<Match>
<Class name="org.apache.ratis.protocol.exceptions.NotReplicatedException" />
<Bug pattern="EI_EXPOSE_REP" />
</Match>
<Match>
<Class name="org.apache.ratis.protocol.exceptions.NotReplicatedException" />
<Bug pattern="EI_EXPOSE_REP2" />
</Match>
<Match>
<Class name="org.apache.ratis.util.SlidingWindow$Client" />
<Bug pattern="EI_EXPOSE_REP2" />
</Match>
<Match>
<Class name="org.apache.ratis.util.TimeDuration$Abbreviation" />
<Bug pattern="EI_EXPOSE_REP" />
</Match>
</FindBugsFilter>
11 changes: 11 additions & 0 deletions ratis-common/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -59,4 +59,15 @@
<scope>test</scope>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>com.github.spotbugs</groupId>
<artifactId>spotbugs-maven-plugin</artifactId>
<configuration>
<excludeFilterFile>${basedir}/dev-support/findbugsExcludeFile.xml</excludeFilterFile>
</configuration>
</plugin>
</plugins>
</build>
</project>
26 changes: 26 additions & 0 deletions ratis-examples/dev-support/findbugsExcludeFile.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
<!--
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.
-->
<FindBugsFilter>
<Match>
<Class name="org.apache.ratis.examples.arithmetic.expression.Variable"/>
<Bug pattern="CT_CONSTRUCTOR_THROW"/>
</Match>
<Match>
<Class name="org.apache.ratis.examples.membership.server.CServer"/>
<Bug pattern="CT_CONSTRUCTOR_THROW"/>
</Match>
</FindBugsFilter>
7 changes: 7 additions & 0 deletions ratis-examples/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -179,6 +179,13 @@
</roots>
</configuration>
</plugin>
<plugin>
<groupId>com.github.spotbugs</groupId>
<artifactId>spotbugs-maven-plugin</artifactId>
<configuration>
<excludeFilterFile>${basedir}/dev-support/findbugsExcludeFile.xml</excludeFilterFile>
</configuration>
</plugin>
</plugins>
</build>
</project>
26 changes: 26 additions & 0 deletions ratis-grpc/dev-support/findbugsExcludeFile.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
<!--
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.
-->
<FindBugsFilter>
<Match>
<Class name="org.apache.ratis.grpc.server.GrpcAdminProtocolService"/>
<Bug pattern="EI_EXPOSE_REP2"/>
</Match>
<Match>
<Class name="org.apache.ratis.grpc.server.GrpcServicesImpl"/>
<Bug pattern="EI_EXPOSE_REP"/>
</Match>
</FindBugsFilter>
11 changes: 11 additions & 0 deletions ratis-grpc/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -74,4 +74,15 @@
<scope>test</scope>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>com.github.spotbugs</groupId>
<artifactId>spotbugs-maven-plugin</artifactId>
<configuration>
<excludeFilterFile>${basedir}/dev-support/findbugsExcludeFile.xml</excludeFilterFile>
</configuration>
</plugin>
</plugins>
</build>
</project>
22 changes: 22 additions & 0 deletions ratis-metrics-api/dev-support/findbugsExcludeFile.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
<!--
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.
-->
<FindBugsFilter>
<Match>
<Class name="org.apache.ratis.metrics.RatisMetrics"/>
<Bug pattern="EI_EXPOSE_REP"/>
</Match>
</FindBugsFilter>
11 changes: 11 additions & 0 deletions ratis-metrics-api/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -51,4 +51,15 @@
<scope>test</scope>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>com.github.spotbugs</groupId>
<artifactId>spotbugs-maven-plugin</artifactId>
<configuration>
<excludeFilterFile>${basedir}/dev-support/findbugsExcludeFile.xml</excludeFilterFile>
</configuration>
</plugin>
</plugins>
</build>
</project>
22 changes: 22 additions & 0 deletions ratis-metrics-default/dev-support/findbugsExcludeFile.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
<!--
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.
-->
<FindBugsFilter>
<Match>
<Class name="org.apache.ratis.metrics.impl.RatisMetricRegistryImpl"/>
<Bug pattern="EI_EXPOSE_REP"/>
</Match>
</FindBugsFilter>
11 changes: 11 additions & 0 deletions ratis-metrics-default/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -56,4 +56,15 @@
<scope>test</scope>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>com.github.spotbugs</groupId>
<artifactId>spotbugs-maven-plugin</artifactId>
<configuration>
<excludeFilterFile>${basedir}/dev-support/findbugsExcludeFile.xml</excludeFilterFile>
</configuration>
</plugin>
</plugins>
</build>
</project>
Loading
Loading