Skip to content

Stop using reference equality for bytes match - #145

Merged
divarvel merged 1 commit into
eclipse-biscuit:mainfrom
saoirse-a:saoirse/bytes-match-equality
Oct 25, 2026
Merged

divarvel merged 1 commit into
eclipse-biscuit:mainfrom
saoirse-a:saoirse/bytes-match-equality

Conversation

@saoirse-a

Copy link
Copy Markdown
Contributor

The equals method on byte[] performs reference equality rather than structural equality. Instead just delegate to our own equals method, like Term.Null and Term.Date do.

In the current library this check would incorrectly fail:

foo(hex:deadbeef);
check if foo(hex:deadbeef);

The equals method on `byte[]` performs reference equality rather than
structural equality. Instead just delegate to our own equals method,
like `Term.Null` and `Term.Date` do.

In the current library this check would incorrectly fail:

```
foo(hex:deadbeef);
check if foo(hex:deadbeef);
```
@divarvel
divarvel merged commit 4c39804 into eclipse-biscuit:main Oct 25, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants