[#462] size of ObjectOutputStream is not equal when two Maps are equal - #612
Draft
peter-lawrey wants to merge 1 commit into
Draft
[#462] size of ObjectOutputStream is not equal when two Maps are equal#612peter-lawrey wants to merge 1 commit into
peter-lawrey wants to merge 1 commit into
Conversation
Chronicle Map identifies keys by serialized bytes, while Java serialization can encode equals()-equal objects differently because of graph sharing, collection ordering, or fields ignored by equals(). Track whether key serialization was selected by the automatic Java-serialization fallback. Warn for every such key by default for compatibility, and reject every fallback key when strictSerializedKeyIdentity is enabled. Explicitly configured DataAccess implementations remain trusted caller contracts. Cover the original TreeMap shared-reference mechanism, a non-container domain key, a declared supertype, explicit DataAccess exemption, warnings, and the system property. This is an opt-in guard and does not change default lookup semantics. Refs #462
peter-lawrey
force-pushed
the
fix/Chronicle-Map-462-builder-time-detection-of-java-ser
branch
from
August 22, 2026 11:00
b972b45 to
73e9e50
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What changed
Local
207c8c94detects Java-serialised container keys at builder time and supplies warning/strict behaviour plus tests.Why
This publishes the reviewed local solution for #462 so the implementation can be discussed in the normal review workflow.
Review status
Draft — coherent local solution, not yet merge-ready.
Before marking ready: Review compatibility of the new surface and custom
DataAccessdocumentation, then publish.Validation
git diff --checkagainstea: passed..pr/scaffolding and local workspace paths: removed.Tracking
Fixes #462