Skip to content

fix(store): keep SPDX element ids case-sensitive - #464

Open
soimkim wants to merge 1 commit into
spdx:masterfrom
soimkim:fix/spdx-element-id-case
Open

soimkim wants to merge 1 commit into
spdx:masterfrom
soimkim:fix/spdx-element-id-case

Conversation

@soimkim

@soimkim soimkim commented Nov 19, 2026

Copy link
Copy Markdown

Summary

Fixes #463.

InMemSpdxStore stored every object URI under a lowercased key, so two SPDX element ids that differ only by case were rejected as duplicates. SPDX 2.3.1 treats those ids as different elements.

  • An SPDXRef- fragment keeps its original case. SPDXRef-Arcturus.ogg and SPDXRef-arcturus.ogg can both be stored.
  • License identifiers stay case-insensitive. LicenseRef-Name and LicenseRef-name are still the same id, matching SPDX license expression case rules.
  • The part of the URI before # is still lowercased, so only the element id case changes.

Spec:

Test plan

  • mvn -Dtest=InMemSpdxStoreTest test (25 tests, 0 failures)
  • New test stores SPDXRef-Arcturus.ogg and SPDXRef-arcturus.ogg as two elements, and deleting one leaves the other
  • New test still rejects LicenseRef-Name and LicenseRef-name as a duplicate and resolves the original case

SPDX 2.3.1 treats SPDXRef- ids that differ only by case as different
elements. License identifiers stay case-insensitive.

This branch has not been deployed

No deployments
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.

SPDX IDs that differ only by case are treated as duplicates

1 participant