spdx / Spdx-Java-Library

Java library which implements the Java object model for SPDX and provides useful helper functions
Apache License 2.0
32 stars 33 forks source link

Preserve order in collections. #176

Closed carmenerre closed 1 year ago

carmenerre commented 1 year ago

This MR tries to solve https://github.com/spdx/Spdx-Java-Library/issues/146

It replaces the use of HashMap with LinkedHashMap, which preserves the performance improvement done in https://github.com/spdx/Spdx-Java-Library/pull/144 but keeps the insertion order in collections.

Because LinkedHashMap is not synchronized, it has been wrapped using Collections.synchronizedMap method.

beltran-rubo commented 1 year ago

@goneall any ETA for a new release in June? This is a great improvement, thanks.

goneall commented 1 year ago

@beltran-rubo - would you want a complete release of all the java tools or just this library? I could spin the library version pretty quickly if it helps. Otherwise, it will probably be towards the end of June for a release of the complete set of Java tools as I'm working on a release of the online tools over the next week or two.

beltran-rubo commented 1 year ago

We are using the Java library itself, it would be great to get it sooner than later including this improvement. Thanks!

goneall commented 1 year ago

We are using the Java library itself, it would be great to get it sooner than later including this improvement. Thanks!

In that case I'll plan on producing a release of this library over the next couple of days.

goneall commented 1 year ago

@beltran-rubo - Totally different topic - as a user of the library directly, would you be interested, available to review the approach and design for the SPDX 3 changes? I'm just starting to implement and there are some breaking changes I'd like to get feedback on before going too far.

I just created https://github.com/spdx/Spdx-Java-Library/issues/178 to track feedback prior to a pull request being created.

beltran-rubo commented 1 year ago

Thanks! Still a bit early to move to version 3 on our side but we can help with the revision and testing.

goneall commented 1 year ago

@beltran-rubo The release with this fix has been published: https://github.com/spdx/Spdx-Java-Library/releases/tag/v1.1.7 It should be available in Maven Central soon.