You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In my use case my Map will contain a Map for both keys and values.
I have run into a weird case where I found two maps that are equal but the size of ObjectOutputStream are not. ( Which ChronicleMap uses under the covers ).
When using a java.util.HashMap my use case works as expected.
When I substitute in ChronicleMap, my use case no longer works.
Such is the limitation of ObjectOutputStream mechanism of the JVM - it will write repeating objects by handle. There is an unshared mechanism that could override that, but even if it was used it will break down on recursive data structures.
You can specify your own readers / data access for such maps of maps, by using ChronicleMapBuilder.keyReaderAndDataAccess().
If that is the default behavior, should ChronicleMap throw an exception when a Map is used as a key.....
"keyReaderAndDataAccess is required when using a Map as a key"
In my use case my Map will contain a Map for both keys and values.
I have run into a weird case where I found two maps that are equal but the size of ObjectOutputStream are not. ( Which ChronicleMap uses under the covers ).
When using a java.util.HashMap my use case works as expected.
When I substitute in ChronicleMap, my use case no longer works.
Here is a link to the code that shows the issue:
https://github.com/mores/maven-examples/blob/ac6012ca1236ad460f3b3767037531fdb2e3dffd/offHeapMap/src/test/java/org/test/MapTest.java#L76
I am able to reproduce this bug on ubuntu using both 1.8.0_161 and 11.0.17
The text was updated successfully, but these errors were encountered: