Skip to content

Remove unusable aclLogBinary() methods - #4580

Merged
ggivo merged 3 commits into
redis:masterfrom
ggivo:topic/ggivo/drop-acl-log-binary
Jun 29, 2026
Merged

ggivo merged 3 commits into
redis:masterfrom
ggivo:topic/ggivo/drop-acl-log-binary

Conversation

@ggivo

@ggivo ggivo commented Jun 26, 2026 •

Copy link
Copy Markdown
Collaborator

Problem

Jedis.aclLogBinary() / aclLogBinary(int) (declared on AccessControlLogBinaryCommands) declare List<byte[]>, but the ACL LOG reply is a nested array (Array<Array<...>>) β€” a list of entries, each itself a flattened list of key/value pairs. getBinaryMultiBulkReply() only does an unchecked (List<byte[]>) cast, so the elements are actually nested lists. Reading any element throws ClassCastException: java.util.ArrayList cannot be cast to [B. The methods have never been usable.

Fixes #4579.

Change

  • Remove aclLogBinary() and aclLogBinary(int) from Jedis and AccessControlLogBinaryCommands.
  • Drop the test-only ACLTestUtil.filterBinaryByClientId and its usage in AccessControlListCommandsTest.
  • Document the removal in the v7β†’v8 migration guide.

Migration

Use aclLog() / aclLog(int), which return structured AccessControlLogEntry objects for the same data.


Note

Low Risk
Small API deletion of methods that were never usable; migration path to existing aclLog() APIs is straightforward.

Overview
Removes aclLogBinary() and aclLogBinary(int) from Jedis and AccessControlLogBinaryCommands. Those APIs claimed List<byte[]> but could not parse the nested ACL LOG reply, so they threw ClassCastException at runtime.

Callers should use aclLog() / aclLog(int), which return AccessControlLogEntry objects. The v7β†’v8 migration guide adds a breaking-change section for this removal. Tests drop binary ACL log coverage and the test-only ACLTestUtil.filterBinaryByClientId helper.

Reviewed by Cursor Bugbot for commit c190541. Bugbot is set up for automated code reviews on this repo. Configure here.

ggivo and others added 2 commits June 26, 2026 19:05
The List<byte[]> return type cannot represent the ACL LOG reply (a
nested array of entries), so element access always threw
ClassCastException. aclLog() already exposes the same data as
structured AccessControlLogEntry objects.
@ggivo ggivo added bug breakingchange Pull request that has breaking changes. Must include the breaking behavior in release notes. labels Jun 26, 2026
@ggivo ggivo added this to the 8.0.0 milestone Jun 26, 2026
@ggivo
ggivo requested review from atakavci and uglide June 26, 2026 16:34
@ggivo
ggivo merged commit b405db6 into redis:master Jun 29, 2026
26 of 27 checks passed
@ggivo
ggivo deleted the topic/ggivo/drop-acl-log-binary branch June 29, 2026 10:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

breakingchange Pull request that has breaking changes. Must include the breaking behavior in release notes. bug

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Jedis.aclLogBinary() is unusable β€” wrong return type

2 participants