Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Order is not preserved in collections #146

Closed
goneall opened this issue Jan 24, 2023 · 1 comment
Closed

Order is not preserved in collections #146

goneall opened this issue Jan 24, 2023 · 1 comment
Labels
wontfix This will not be worked on

Comments

@goneall
Copy link
Member

goneall commented Jan 24, 2023

This is not really a bug, but I'm noting it here in the issues in case a recent change in behavior trips up any users of the library.

Prior to PR #144 the order of any lists or collections involving any SPDX elements was preserved (e.g. a list of external references, list of checksums). With the introduction of hash maps to improve performance, the order is no longer preserved.

Note that the spec does not guarantee any order and the RDF serializations have never preserved the order - this change will only be noticed in the Tag/Value, Spreadsheet, YAML, JSON, and XML serialization formats.

@goneall goneall added the wontfix This will not be worked on label Jan 24, 2023
carmenerre added a commit to carmenerre/Spdx-Java-Library that referenced this issue May 31, 2023
@goneall
Copy link
Member Author

goneall commented May 31, 2023

With PR #176 thanks to @carmenerre order is now preserved for most serialization formats except for RDF.

Note that RDF uses Jena for the underlying storage and retrieval of properties and order is not guarantied by Jena as mentioned above.

Since order has been restored ;) to the YAML, JSON, and XML formats, I'll close this issue as resolved.

@goneall goneall closed this as completed May 31, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
wontfix This will not be worked on
Projects
None yet
Development

No branches or pull requests

1 participant