8000 ConcurrentSkipListMap (SortedMap) not stored correctly · Issue #375 · eclipse-store/store · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

ConcurrentSkipListMap (SortedMap) not stored correctly #375

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
hrstoyanov opened this issue Feb 17, 2025 · 1 comment
Open

ConcurrentSkipListMap (SortedMap) not stored correctly #375

hrstoyanov opened this issue Feb 17, 2025 · 1 comment

Comments

@hrstoyanov
Copy link
hrstoyanov commented Feb 17, 2025

Environment Details

  • EclipseStore Version: 2.1.1
  • JDK version: 22
  • OS: MacOS
  • Used frameworks: Helidon

Describe the bug

I store an object with this inside:

private final ConcurrentSkipListMap<InstantRange, Lazy<List<AuditEvent>>> eventsByPeriod = new ConcurrentSkipListMap<>(new Range.Comparator<>());

But the comparator in the constructor is not stored, so it remains NULL upon loading the map. This causes nasty run-time errors (in my case weeks after deployment!), because without the backing comparator, the key is expected to be Comparable:

 java.lang.ClassCastException: class com.utilities.InstantRange cannot be cast to class java.lang.Comparable 
@hg-ms
Copy link
Contributor
hg-ms commented Feb 17, 2025

May closely related or identical to #352.
At first glance the comperator seems not jet being loaded when the binary handler instantiates the ConcurrentSkipListSet / Map in the create method. Thus it instantiates with null instead of an comparator instance.

@hrstoyanov hrstoyanov changed the title ConcurrentSkipListMap (SoretdMap) not stored correctly ConcurrentSkipListMap (SortedMap) not stored correctly 4B76 Feb 18, 2025
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

No branches or pull requests

2 participants
0