From 19e69a1ed5dd37f68d4511a6736c99cfa3441489 Mon Sep 17 00:00:00 2001 From: Rainnny7 Date: Sun, 28 Apr 2024 03:55:22 -0400 Subject: [PATCH] fix checkstyle errs --- .../java/me/braydon/pelican/action/PanelAction.java | 10 +++++----- .../java/me/braydon/pelican/client/ClientConfig.java | 3 +++ src/main/java/me/braydon/pelican/client/Pelican4J.java | 2 +- src/main/java/me/braydon/pelican/model/PanelModel.java | 1 + .../me/braydon/pelican/request/JsonWebRequest.java | 2 +- .../java/me/braydon/pelican/request/QueuedAction.java | 1 + .../me/braydon/pelican/request/RateLimitHandler.java | 2 +- 7 files changed, 13 insertions(+), 8 deletions(-) diff --git a/src/main/java/me/braydon/pelican/action/PanelAction.java b/src/main/java/me/braydon/pelican/action/PanelAction.java index 16ba632..2821a69 100644 --- a/src/main/java/me/braydon/pelican/action/PanelAction.java +++ b/src/main/java/me/braydon/pelican/action/PanelAction.java @@ -39,8 +39,8 @@ import java.util.function.Consumer; /** * An action that can be executed on a panel. * - * @param the type of response expected when this action is executed * @author Braydon + * @param the type of response expected when this action is executed */ @AllArgsConstructor(access = AccessLevel.PRIVATE) public class PanelAction> { @@ -104,11 +104,11 @@ public class PanelAction> { /** * Create a new panel action. * - * @param clientConfig the client config to use for executing actions + * @param clientConfig the client config to use for executing actions * @param rateLimitHandler the rate limit handler to use for querying actions - * @param webRequest the web request to send for this action - * @param responseType the expected response type, null if none - * @param the response type + * @param webRequest the web request to send for this action + * @param responseType the expected response type, null if none + * @param the response type * @return the panel action */ @NonNull diff --git a/src/main/java/me/braydon/pelican/client/ClientConfig.java b/src/main/java/me/braydon/pelican/client/ClientConfig.java index da9ca56..8cbd477 100644 --- a/src/main/java/me/braydon/pelican/client/ClientConfig.java +++ b/src/main/java/me/braydon/pelican/client/ClientConfig.java @@ -51,6 +51,9 @@ public final class ClientConfig { */ private final boolean debugging; + /** + * The config builder. + */ public static class ClientConfigBuilder { @NonNull public ClientConfigBuilder debugging(boolean state) { diff --git a/src/main/java/me/braydon/pelican/client/Pelican4J.java b/src/main/java/me/braydon/pelican/client/Pelican4J.java index 235e21c..ebdccb1 100644 --- a/src/main/java/me/braydon/pelican/client/Pelican4J.java +++ b/src/main/java/me/braydon/pelican/client/Pelican4J.java @@ -38,8 +38,8 @@ import java.io.Closeable; /** * A client for the API. * - * @param the actions for this client * @author Braydon + * @param the actions for this client */ @Getter @Accessors(fluent = true) @Slf4j(topic = "Pelican4J Client") diff --git a/src/main/java/me/braydon/pelican/model/PanelModel.java b/src/main/java/me/braydon/pelican/model/PanelModel.java index f452ae5..8437076 100644 --- a/src/main/java/me/braydon/pelican/model/PanelModel.java +++ b/src/main/java/me/braydon/pelican/model/PanelModel.java @@ -30,6 +30,7 @@ import lombok.*; * A model for the panel. * * @author Braydon + * @param The type of the value of this model */ @NoArgsConstructor @Setter @Getter @ToString public class PanelModel { diff --git a/src/main/java/me/braydon/pelican/request/JsonWebRequest.java b/src/main/java/me/braydon/pelican/request/JsonWebRequest.java index 1e1d39a..dc76fa5 100644 --- a/src/main/java/me/braydon/pelican/request/JsonWebRequest.java +++ b/src/main/java/me/braydon/pelican/request/JsonWebRequest.java @@ -70,8 +70,8 @@ public class JsonWebRequest { * * @param clientConfig the client config to use * @param responseType the expected response type, null for none - * @return the response, null if none * @param the response type + * @return the response, null if none */ @SneakyThrows public > T execute(@NonNull ClientConfig clientConfig, Class responseType) { diff --git a/src/main/java/me/braydon/pelican/request/QueuedAction.java b/src/main/java/me/braydon/pelican/request/QueuedAction.java index 3adc65d..e392b71 100644 --- a/src/main/java/me/braydon/pelican/request/QueuedAction.java +++ b/src/main/java/me/braydon/pelican/request/QueuedAction.java @@ -36,6 +36,7 @@ import java.util.function.BiConsumer; * Represents a queued action. * * @author Braydon + * @param the action response type */ @AllArgsConstructor(access = AccessLevel.PROTECTED) @Getter public class QueuedAction> { diff --git a/src/main/java/me/braydon/pelican/request/RateLimitHandler.java b/src/main/java/me/braydon/pelican/request/RateLimitHandler.java index c1984ba..ae1a29a 100644 --- a/src/main/java/me/braydon/pelican/request/RateLimitHandler.java +++ b/src/main/java/me/braydon/pelican/request/RateLimitHandler.java @@ -108,8 +108,8 @@ public final class RateLimitHandler { * @param callback the callback to invoke * @param throwRateLimitErrors whether rate limit errors should be thrown * @param retry should the action be retried if a rate limit is hit (and being thrown)? - * @return whether the request was successful * @param the action response type + * @return whether the request was successful */ @SuppressWarnings("unchecked") public > boolean tryRequest(@NonNull PanelAction action, BiConsumer callback, boolean throwRateLimitErrors, boolean retry) {