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

NPE thrown on jedis.aclLog() used against Redis server 7.2.0< #4016

Closed
ggivo opened this issue Nov 11, 2024 · 1 comment · Fixed by #4015
Closed

NPE thrown on jedis.aclLog() used against Redis server 7.2.0< #4016

ggivo opened this issue Nov 11, 2024 · 1 comment · Fixed by #4015
Assignees
Labels

Comments

@ggivo
Copy link
Collaborator

ggivo commented Nov 11, 2024

New fields are added in Redis version 7.2.0 (entry ID, timestamp created, and timestamp last updated).
When using Jedis client against older server version where those fields are missing NPE is thrown
java.lang.NullPointerException: Cannot invoke "java.lang.Long.longValue()" because the return value of "java.util.Map.get(Object)" is null

Expected behavior

Do not throw NPE.
Since AccessControlLogEntry``timestamp created, and timestamp last updated are of primary type return default values
when misisng

Actual behavior

NPE is thrown

Steps to reproduce:

Invoke jedis.aclLog()against any Redis server 6.2.16
or run test AccessControlListCommandsTest#aclLogWithEntryID

try (Jedis jedis = new Jedis( "localhost", 6379)) {
    jedis.aclLog() throws NPE
}

Redis / Jedis Configuration

Jedis version:

5.2.0

Redis version:

6.2.16 or any other which is older than 7.2.0

Java version:

1.8

@sazzad16
Copy link
Contributor

sazzad16 commented Dec 4, 2024

Resolved by #4030

@sazzad16 sazzad16 closed this as completed Dec 4, 2024
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