Skip to content

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

@ggivo

Description

@ggivo

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

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions