Skip to content

chore: Simplify immutable collections implementation by using standard Java APIs #2363

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

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

gnodet
Copy link
Contributor

@gnodet gnodet commented May 21, 2025

  • Replace custom List implementation with standard List.of() and List.copyOf()
  • Remove unnecessary custom list implementations (List1, List2, ListN, etc.)
  • Remove ROProperties implementation as it's no longer needed
  • Add documentation note referencing JDK issue JDK-8323729
  • Reduce code complexity and maintenance burden by leveraging JDK standard APIs

This change aligns with the goal of using standard Java APIs where possible
instead of maintaining custom implementations.

…d Java APIs

- Replace custom List implementation with standard List.of() and List.copyOf()
- Remove unnecessary custom list implementations (List1, List2, ListN, etc.)
- Remove ROProperties implementation as it's no longer needed
- Add documentation note referencing JDK issue JDK-8323729
- Reduce code complexity and maintenance burden by leveraging JDK standard APIs

This change aligns with the goal of using standard Java APIs where possible
instead of maintaining custom implementations.
@mbien
Copy link
Member

mbien commented May 26, 2025

one landmine to watch out for is that JDK's immutable collections can't contain null.

List.of("duke").contains(null); // even contains throws NPE

@pzygielo
Copy link
Contributor

one landmine to watch out for is that JDK's immutable collections can't contain null.

https://bugs.openjdk.org/browse/JDK-8265905

@gnodet gnodet added this to the 4.1.0 milestone Jun 3, 2025
Co-authored-by: Tamas Cservenak <tamas@cservenak.net>
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.

5 participants