Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

java.sql.Date serialization behavior change from 2.8.11 to 2.9.0 #3256

Closed
AdeshAtole opened this issue Aug 24, 2021 · 1 comment
Closed

java.sql.Date serialization behavior change from 2.8.11 to 2.9.0 #3256

AdeshAtole opened this issue Aug 24, 2021 · 1 comment
Labels
will-not-fix Closed as either non-issue or something not planned to be worked on

Comments

@AdeshAtole
Copy link

AdeshAtole commented Aug 24, 2021

Here's the code snippet

import java.sql.Date;
import com.fasterxml.jackson.core.JsonProcessingException;
import com.fasterxml.jackson.databind.ObjectMapper;

public class Main {
  public static void main(String[] args) throws JsonProcessingException {
    ObjectMapper mapper = new ObjectMapper();
    String output = mapper.writeValueAsString(new Date(new java.util.Date().getTime()));
    System.out.println("java.sql.Date " + output);
    output = mapper.writeValueAsString(new java.util.Date());
    System.out.println("java.util.Date " + output);
  }
}

Output on 2.8.11

java.sql.Date "2021-08-24"
java.util.Date 1629828787184

Output on 2.9.0

java.sql.Date 1629829274814
java.util.Date 1629829274837

Did not find anything in 2.9.0 changelog/issues about this.

@AdeshAtole AdeshAtole added the to-evaluate Issue that has been received but not yet evaluated label Aug 24, 2021
@cowtowncoder
Copy link
Member

cowtowncoder commented Aug 24, 2021

This would be due to #219, a planned change, included in release notes as the very first change? :)
(albeit not containing java.sql.Date in title)

@cowtowncoder cowtowncoder added will-not-fix Closed as either non-issue or something not planned to be worked on and removed to-evaluate Issue that has been received but not yet evaluated labels Aug 24, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
will-not-fix Closed as either non-issue or something not planned to be worked on
Projects
None yet
Development

No branches or pull requests

2 participants