Skip to content

Fix java.sql.Timestamp serialization#688

Open
g-tom wants to merge 2 commits intoeclipse-ee4j:masterfrom
Intevation:sql-timestamp-serialization
Open

Fix java.sql.Timestamp serialization#688
g-tom wants to merge 2 commits intoeclipse-ee4j:masterfrom
Intevation:sql-timestamp-serialization

Conversation

@g-tom
Copy link

@g-tom g-tom commented Nov 10, 2025

Closes #687.

SqlTimestampSerializer missed to override toTemporalAccessor,
leading to ClassCastExceptions in the default implementation in
AbstractDateSerializer. Since it does all formatting after
calling toInstant on the value, we can safely use the same code
path as is used for java.util.Date (despite what is said about
the inheritance relationship between Date and Timestamp in their
API documentation).

Closes eclipse-ee4j#687.
@g-tom g-tom force-pushed the sql-timestamp-serialization branch from 71afad5 to 0931470 Compare November 12, 2025 20:30
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.

Serializing java.sql.Timestamp fails with custom date format

2 participants