Skip to content

Deserializing empty timestamp fields to null value doesn't work (instead becomes "empty", Epoch time) #561

@silvestr85

Description

@silvestr85

Hi.
From version 2.12.0 deserialization timestamps works in other way.
I have field in model:

    @JacksonXmlProperty(isAttribute = true,localName = "timestampDate")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Timestamp timestampDate;

In response i receive something like this:

<PositionsCurrent>
  <PositionsCurrent timestampDate="" />
</PositionsCurrent>

Earlier this assertion worked fine:
Assert.assertNull(response.getData());

On the newest version 2.14 deserialization returns something like this:
Actual :1970-01-01 01:00:00.0

Is it possible to return null again when I try deserialize empty field to Timestamp?

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions