Skip to content

Negative Duration does not round-trip properly with WRITE_DURATIONS_AS_TIMESTAMPS enabled #337

@jmuia

Description

@jmuia

I found this similar issue #165 but it seems different, as that user reported a bug on 2.10.2 and refers to a different config option.

WRITE_DURATIONS_AS_TIMESTAMPS defaults to true.

Before v2.12.0

WRITE_DURATIONS_AS_TIMESTAMPS set to true.

It seems that a negative value...

  • Serializes incorrectly ❌
  • Deserializes back to the original value ✅

v2.12.0 and later (including 2.18.2)

WRITE_DURATIONS_AS_TIMESTAMPS set to true.

It seems that a negative value...

  • Serializes correctly ✅
  • Deserializes incorrectly ❌

Here is an example repo demonstrating the problem https://github.com/jmuia/jackson-duration-serialization

Metadata

Metadata

Assignees

No one assigned

    Labels

    2.19has-failing-testIndicates that there exists a test case (under `failing/`) to reproduce the issue

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions