This is an automated email from the ASF dual-hosted git repository.
szetszwo pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/ratis.git
The following commit(s) were added to refs/heads/master by this push:
new 3d9f5af37 RATIS-2420: Fix CT_CONSTRUCTOR_THROW in
AtomicFileOutputStream (#1361)
3d9f5af37 is described below
commit 3d9f5af376409de7e635bb67c7dfbeadc882c413
Author: Snehasish Roy <[email protected]>
AuthorDate: Tue Mar 3 23:46:01 2026 +0530
RATIS-2420: Fix CT_CONSTRUCTOR_THROW in AtomicFileOutputStream (#1361)
---
.../main/java/org/apache/ratis/client/api/SnapshotManagementApi.java | 2 +-
ratis-common/dev-support/findbugsExcludeFile.xml | 4 ----
.../src/main/java/org/apache/ratis/util/AtomicFileOutputStream.java | 2 +-
3 files changed, 2 insertions(+), 6 deletions(-)
diff --git
a/ratis-client/src/main/java/org/apache/ratis/client/api/SnapshotManagementApi.java
b/ratis-client/src/main/java/org/apache/ratis/client/api/SnapshotManagementApi.java
index f83d97604..359763fe9 100644
---
a/ratis-client/src/main/java/org/apache/ratis/client/api/SnapshotManagementApi.java
+++
b/ratis-client/src/main/java/org/apache/ratis/client/api/SnapshotManagementApi.java
@@ -40,7 +40,7 @@ public interface SnapshotManagementApi {
/**
* Trigger to create a snapshot.
*
- * @param creationGap When (creationGap > 0) and (astAppliedIndex -
lastSnapshotIndex < creationGap),
+ * @param creationGap When (creationGap > 0) and (lastAppliedIndex -
lastSnapshotIndex < creationGap),
* return lastSnapshotIndex; otherwise, take a new
snapshot and then return its index.
* When creationGap == 0, use the server configured value
as the creationGap.
* @return a reply. When {@link RaftClientReply#isSuccess()} is true,
diff --git a/ratis-common/dev-support/findbugsExcludeFile.xml
b/ratis-common/dev-support/findbugsExcludeFile.xml
index 787621f17..882f08b7f 100644
--- a/ratis-common/dev-support/findbugsExcludeFile.xml
+++ b/ratis-common/dev-support/findbugsExcludeFile.xml
@@ -23,10 +23,6 @@
<Class name="org.apache.ratis.protocol.GroupInfoReply" />
<Bug pattern="EI_EXPOSE_REP2" />
</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" />
diff --git
a/ratis-common/src/main/java/org/apache/ratis/util/AtomicFileOutputStream.java
b/ratis-common/src/main/java/org/apache/ratis/util/AtomicFileOutputStream.java
index 3961d7336..ec0eda94f 100644
---
a/ratis-common/src/main/java/org/apache/ratis/util/AtomicFileOutputStream.java
+++
b/ratis-common/src/main/java/org/apache/ratis/util/AtomicFileOutputStream.java
@@ -45,7 +45,7 @@ import java.util.concurrent.atomic.AtomicBoolean;
* NOTE that on Windows platforms, the output file, if it exists, is deleted
* before the temporary file is moved.
*/
-public class AtomicFileOutputStream extends FilterOutputStream {
+public final class AtomicFileOutputStream extends FilterOutputStream {
static final Logger LOG =
LoggerFactory.getLogger(AtomicFileOutputStream.class);
public static final String TMP_EXTENSION = ".tmp";