From 859827532c047fe4978f328c1f7685df44d79380 Mon Sep 17 00:00:00 2001 From: M Sazzadul Hoque <7600764+sazzad16@users.noreply.github.com> Date: Mon, 7 Oct 2024 15:18:10 +0600 Subject: [PATCH] Fix JavaDoc warnings (#3990) --- .../redis/clients/jedis/CommandObjects.java | 2 +- .../jedis/DefaultJedisClientConfig.java | 3 ++- .../redis/clients/jedis/JedisCluster.java | 20 +++++++++++++------ .../commands/FunctionBinaryCommands.java | 2 +- .../commands/SortedSetBinaryCommands.java | 15 +++++++------- .../SortedSetPipelineBinaryCommands.java | 3 +-- 6 files changed, 26 insertions(+), 19 deletions(-) diff --git a/src/main/java/redis/clients/jedis/CommandObjects.java b/src/main/java/redis/clients/jedis/CommandObjects.java index 5a66f803a8..36cbebfb68 100644 --- a/src/main/java/redis/clients/jedis/CommandObjects.java +++ b/src/main/java/redis/clients/jedis/CommandObjects.java @@ -2006,7 +2006,7 @@ public final CommandObject> zdiffWithScores(byte[]... keys) { } /** - * @deprecated Use {@link #zdiffstore(byte..., byte[]...)}. + * @deprecated Use {@link #zdiffstore(byte[], byte[][])}. */ @Deprecated public final CommandObject zdiffStore(byte[] dstkey, byte[]... keys) { diff --git a/src/main/java/redis/clients/jedis/DefaultJedisClientConfig.java b/src/main/java/redis/clients/jedis/DefaultJedisClientConfig.java index f26513fa58..e304e961f1 100644 --- a/src/main/java/redis/clients/jedis/DefaultJedisClientConfig.java +++ b/src/main/java/redis/clients/jedis/DefaultJedisClientConfig.java @@ -175,7 +175,8 @@ public DefaultJedisClientConfig build() { } /** - * Shortcut to {@link Builder#protocol(redis.clients.jedis.RedisProtocol)} with {@link RedisProtocol#RESP3}. + * Shortcut to {@link redis.clients.jedis.DefaultJedisClientConfig.Builder#protocol(RedisProtocol)} with + * {@link RedisProtocol#RESP3}. */ public Builder resp3() { return protocol(RedisProtocol.RESP3); diff --git a/src/main/java/redis/clients/jedis/JedisCluster.java b/src/main/java/redis/clients/jedis/JedisCluster.java index db8d17ee15..d4c555230c 100644 --- a/src/main/java/redis/clients/jedis/JedisCluster.java +++ b/src/main/java/redis/clients/jedis/JedisCluster.java @@ -30,8 +30,10 @@ public class JedisCluster extends UnifiedJedis { public static final int DEFAULT_MAX_ATTEMPTS = 5; /** - * Creates a JedisCluster instance. The provided node is used to make the first contact with the cluster.
- * Here, the default timeout of {@value JedisCluster#DEFAULT_TIMEOUT} ms is being used with {@value JedisCluster#DEFAULT_MAX_ATTEMPTS} maximum attempts. + * Creates a JedisCluster instance. The provided node is used to make the first contact with the cluster. + *

+ * Here, the default timeout of {@value redis.clients.jedis.JedisCluster#DEFAULT_TIMEOUT} ms is being used with + * {@value redis.clients.jedis.JedisCluster#DEFAULT_MAX_ATTEMPTS} maximum attempts. * @param node Node to first connect to. */ public JedisCluster(HostAndPort node) { @@ -39,8 +41,10 @@ public JedisCluster(HostAndPort node) { } /** - * Creates a JedisCluster instance. The provided node is used to make the first contact with the cluster.
- * Here, the default timeout of {@value JedisCluster#DEFAULT_TIMEOUT} ms is being used with {@value JedisCluster#DEFAULT_MAX_ATTEMPTS} maximum attempts. + * Creates a JedisCluster instance. The provided node is used to make the first contact with the cluster. + *

+ * Here, the default timeout of {@value redis.clients.jedis.JedisCluster#DEFAULT_TIMEOUT} ms is being used with + * {@value redis.clients.jedis.JedisCluster#DEFAULT_MAX_ATTEMPTS} maximum attempts. * @param node Node to first connect to. * @param timeout connection and socket timeout in milliseconds. */ @@ -117,7 +121,9 @@ public JedisCluster(HostAndPort node, final JedisClientConfig clientConfig, int /** * Creates a JedisCluster with multiple entry points. - * Here, the default timeout of {@value JedisCluster#DEFAULT_TIMEOUT} ms is being used with {@value JedisCluster#DEFAULT_MAX_ATTEMPTS} maximum attempts. + *

+ * Here, the default timeout of {@value redis.clients.jedis.JedisCluster#DEFAULT_TIMEOUT} ms is being used with + * {@value redis.clients.jedis.JedisCluster#DEFAULT_MAX_ATTEMPTS} maximum attempts. * @param nodes Nodes to connect to. */ public JedisCluster(Set nodes) { @@ -126,7 +132,9 @@ public JedisCluster(Set nodes) { /** * Creates a JedisCluster with multiple entry points. - * Here, the default timeout of {@value JedisCluster#DEFAULT_TIMEOUT} ms is being used with {@value JedisCluster#DEFAULT_MAX_ATTEMPTS} maximum attempts. + *

+ * Here, the default timeout of {@value redis.clients.jedis.JedisCluster#DEFAULT_TIMEOUT} ms is being used with + * {@value redis.clients.jedis.JedisCluster#DEFAULT_MAX_ATTEMPTS} maximum attempts. * @param nodes Nodes to connect to. * @param timeout connection and socket timeout in milliseconds. */ diff --git a/src/main/java/redis/clients/jedis/commands/FunctionBinaryCommands.java b/src/main/java/redis/clients/jedis/commands/FunctionBinaryCommands.java index 14daafd4c9..f1704de057 100644 --- a/src/main/java/redis/clients/jedis/commands/FunctionBinaryCommands.java +++ b/src/main/java/redis/clients/jedis/commands/FunctionBinaryCommands.java @@ -14,7 +14,7 @@ public interface FunctionBinaryCommands { * @param name * @param keys * @param args - * @return + * @return value depends on the function that was executed */ Object fcall(byte[] name, List keys, List args); diff --git a/src/main/java/redis/clients/jedis/commands/SortedSetBinaryCommands.java b/src/main/java/redis/clients/jedis/commands/SortedSetBinaryCommands.java index 747e3370f0..e9cb38a616 100644 --- a/src/main/java/redis/clients/jedis/commands/SortedSetBinaryCommands.java +++ b/src/main/java/redis/clients/jedis/commands/SortedSetBinaryCommands.java @@ -2,7 +2,6 @@ import java.util.List; import java.util.Map; -import java.util.Set; import redis.clients.jedis.args.SortedSetOption; import redis.clients.jedis.params.*; @@ -139,7 +138,7 @@ default ScanResult zscan(byte[] key, byte[] cursor) { List zdiffWithScores(byte[]... keys); /** - * @deprecated Use {@link #zdiffstore(byte..., byte[]...)}. + * @deprecated Use {@link #zdiffstore(byte[], byte[][])}. */ @Deprecated long zdiffStore(byte[] dstkey, byte[]... keys); @@ -155,24 +154,24 @@ default ScanResult zscan(byte[] key, byte[] cursor) { long zinterstore(byte[] dstkey, ZParams params, byte[]... sets); /** - * Similar to {@link SortedSetBinaryCommands#zinter(ZParams, byte[]...) ZINTER}, but - * instead of returning the result set, it returns just the cardinality of the result. + * Similar to {@link #zinter(ZParams, byte[][]) ZINTER}, but instead of returning the result set, + * it returns just the cardinality of the result. *

* Time complexity O(N*K) worst case with N being the smallest input sorted set, K * being the number of input sorted sets - * @see SortedSetBinaryCommands#zinter(ZParams, byte[]...) + * @see #zinter(ZParams, byte[][]) * @param keys group of sets * @return The number of elements in the resulting intersection */ long zintercard(byte[]... keys); /** - * Similar to {@link SortedSetBinaryCommands#zinter(ZParams, byte[]...) ZINTER}, but - * instead of returning the result set, it returns just the cardinality of the result. + * Similar to {@link #zinter(ZParams, byte[][]) ZINTER}, but instead of returning the result set, + * it returns just the cardinality of the result. *

* Time complexity O(N*K) worst case with N being the smallest input sorted set, K * being the number of input sorted sets - * @see SortedSetBinaryCommands#zinter(ZParams, byte[]...) + * @see #zinter(ZParams, byte[][]) * @param limit If the intersection cardinality reaches limit partway through the computation, * the algorithm will exit and yield limit as the cardinality * @param keys group of sets diff --git a/src/main/java/redis/clients/jedis/commands/SortedSetPipelineBinaryCommands.java b/src/main/java/redis/clients/jedis/commands/SortedSetPipelineBinaryCommands.java index 128b61822b..da7f4f0395 100644 --- a/src/main/java/redis/clients/jedis/commands/SortedSetPipelineBinaryCommands.java +++ b/src/main/java/redis/clients/jedis/commands/SortedSetPipelineBinaryCommands.java @@ -2,7 +2,6 @@ import java.util.List; import java.util.Map; -import java.util.Set; import redis.clients.jedis.Response; import redis.clients.jedis.args.SortedSetOption; @@ -140,7 +139,7 @@ default Response> zscan(byte[] key, byte[] cursor) { Response> zdiffWithScores(byte[]... keys); /** - * @deprecated Use {@link #zdiffstore(byte..., byte[]...)}. + * @deprecated Use {@link #zdiffstore(byte[], byte[][])}. */ @Deprecated Response zdiffStore(byte[] dstkey, byte[]... keys);