Skip to content

fix: OrganizationalEntity equality, hash and sorting consider address - #1079

Merged
jkowalleck merged 1 commit into
CycloneDX:mainfrom
Orion777-cmd:fix/organizational-entity-address-comparison
Nov 26, 2026
Merged

jkowalleck merged 1 commit into
CycloneDX:mainfrom
Orion777-cmd:fix/organizational-entity-address-comparison

Conversation

@Orion777-cmd

Copy link
Copy Markdown
Contributor

Description

OrganizationalEntity left address out of its comparison tuple, so entities differing only in address compared equal, hashed the same, and were deduplicated in sets. This adds address (in schema order) and tests for equality, hashing and sorting.

Resolves or fixes issue: #1073

AI Tool Disclosure

  • My contribution does not include any AI-generated content
  • My contribution includes AI-generated content, as disclosed below:
    • AI Tools: Claude Code
    • LLMs and versions: Claude Opus 5.5
    • Prompts: Reproduce #1073, write failing tests, implement the fix, run tests and linters. I reviewed the result.

Affirmation

…ess`

Two `OrganizationalEntity` objects that differed only in `address` compared
equal, hashed the same and sorted as equal, so one was silently dropped from
sets. Add `address` to the comparison tuple, in schema order.

Fixes CycloneDX#1073

Signed-off-by: orion777-cmd <abiy.biru78@gmail.com>
@Orion777-cmd
Orion777-cmd requested a review from a team as a code owner November 25, 2026 14:25
@codacy-production

Copy link
Copy Markdown

Up to standards ✅

🟢 Issues 0 issues

Results:
0 new issues

View in Codacy

🟢 Metrics 0 complexity · 0 duplication

Metric Results
Complexity 0
Duplication 0

View in Codacy

NEW Get contextual insights on your PRs based on Codacy's metrics, along with PR and Jira context, without leaving GitHub. Enable AI reviewer
TIP This summary will be updated as you push new changes.

@jkowalleck jkowalleck added the bug Something isn't working label Nov 25, 2026
@jkowalleck
jkowalleck merged commit d1a6276 into CycloneDX:main Nov 26, 2026
48 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[BUG] OrganizationalEntity equality, hash and sorting ignore address

2 participants