-
Notifications
You must be signed in to change notification settings - Fork 3.9k
Closed
Labels
Description
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