Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Jedis#commandInfo throws excpetion when used with commands having subcommands #4020

Closed
ggivo opened this issue Nov 11, 2024 · 0 comments · Fixed by #4022
Closed

Jedis#commandInfo throws excpetion when used with commands having subcommands #4020

ggivo opened this issue Nov 11, 2024 · 0 comments · Fixed by #4022
Labels

Comments

@ggivo
Copy link
Contributor

ggivo commented Nov 11, 2024

jedis.commandInfo("ACL");

Expected behavior

returns successfullt command info for "ACL" command

Actual behavior

java.lang.ClassCastException: class java.util.ArrayList cannot be cast to class [B (java.util.ArrayList and [B are in module java.base of loader 'bootstrap')

	at redis.clients.jedis.BuilderFactory$17.build(BuilderFactory.java:256)
	at redis.clients.jedis.BuilderFactory$17.build(BuilderFactory.java:253)
	at java.base/java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:197)
	at java.base/java.util.ArrayList$ArrayListSpliterator.forEachRemaining(ArrayList.java:1625)
	at java.base/java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:509)
	at java.base/java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:499)
	at java.base/java.util.stream.ReduceOps$ReduceOp.evaluateSequential(ReduceOps.java:921)
	at java.base/java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
	at java.base/java.util.stream.ReferencePipeline.collect(ReferencePipeline.java:682)
	at redis.clients.jedis.BuilderFactory$18.build(BuilderFactory.java:270)
	at redis.clients.jedis.BuilderFactory$18.build(BuilderFactory.java:265)
	at redis.clients.jedis.resps.CommandInfo$1.build(CommandInfo.java:113)
	at redis.clients.jedis.resps.CommandInfo$1.build(CommandInfo.java:97)
	at redis.clients.jedis.BuilderFactory$56.build(BuilderFactory.java:995)
	at redis.clients.jedis.BuilderFactory$56.build(BuilderFactory.java:978)
	at redis.clients.jedis.Jedis.commandInfo(Jedis.java:8253)
	at 

Steps to reproduce:

Invoke
jedis.commandInfo("ACL");

Redis / Jedis Configuration

default

Jedis version:

5.2.0

Redis version:

tested with 8.0-M01
reproducible with any Redis server version

Java version:

1.8

@sazzad16 sazzad16 added the bug label Nov 11, 2024
sazzad16 added a commit that referenced this issue Nov 11, 2024
* COMMAND INFO reply contains subcommand detail
* Add 'name' in CommandInfo

Fixes #4020 
___

* COMMAND INFO reply contains subcommand detail

* Add 'name' in CommandInfo

* Safeguard test from future ACL subcommands

* Ensure reply size

* Move null checking into COMMAND_INFO_BUILDER from inside loop and reduce parsing 'name' multiple times
ggivo added a commit to ggivo/jedis that referenced this issue Nov 26, 2024
ggivo added a commit to ggivo/jedis that referenced this issue Nov 26, 2024
ggivo added a commit to ggivo/jedis that referenced this issue Jan 3, 2025
ggivo added a commit to ggivo/jedis that referenced this issue Jan 3, 2025
ggivo added a commit to ggivo/jedis that referenced this issue Jan 6, 2025
ggivo added a commit to ggivo/jedis that referenced this issue Jan 6, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants