From 19abc56a4eb5301c39c73787a15935562d5fac94 Mon Sep 17 00:00:00 2001 From: DaveTeng0 Date: Wed, 22 May 2024 10:49:01 -0700 Subject: [PATCH] fix checkstyle --- .../main/java/org/apache/ratis/shell/cli/SecurityUtils.java | 5 +---- .../ratis/shell/cli/sh/snapshot/TakeSnapshotCommand.java | 3 ++- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/ratis-shell/src/main/java/org/apache/ratis/shell/cli/SecurityUtils.java b/ratis-shell/src/main/java/org/apache/ratis/shell/cli/SecurityUtils.java index ec70076bf1..ac5178cbfb 100644 --- a/ratis-shell/src/main/java/org/apache/ratis/shell/cli/SecurityUtils.java +++ b/ratis-shell/src/main/java/org/apache/ratis/shell/cli/SecurityUtils.java @@ -17,9 +17,6 @@ */ package org.apache.ratis.shell.cli; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - import javax.net.ssl.TrustManager; import javax.net.ssl.TrustManagerFactory; import javax.net.ssl.X509TrustManager; @@ -33,7 +30,7 @@ import java.security.cert.X509Certificate; import java.util.Arrays; -public class SecurityUtils { +public final class SecurityUtils { private SecurityUtils() { // prevent instantiation } diff --git a/ratis-shell/src/main/java/org/apache/ratis/shell/cli/sh/snapshot/TakeSnapshotCommand.java b/ratis-shell/src/main/java/org/apache/ratis/shell/cli/sh/snapshot/TakeSnapshotCommand.java index 10b23e8492..2ff0136e7f 100644 --- a/ratis-shell/src/main/java/org/apache/ratis/shell/cli/sh/snapshot/TakeSnapshotCommand.java +++ b/ratis-shell/src/main/java/org/apache/ratis/shell/cli/sh/snapshot/TakeSnapshotCommand.java @@ -67,7 +67,8 @@ public int run(CommandLine cl) throws IOException { peerId = null; } RaftClientReply reply = raftClient.getSnapshotManagementApi(peerId).create(timeout); - processReply(reply, this::println, String.format("Failed to take snapshot of peerId %s", peerId != null ? peerId.toString() : null)); + processReply(reply, this::println, String.format("Failed to take snapshot of peerId %s", + peerId != null ? peerId.toString() : null)); printf(String.format("Successful take snapshot on peerId %s, the latest snapshot index is %d", peerId, reply.getLogIndex())); }