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

Replace deprecated Date constructor use in Jackson test #27568

Merged
merged 1 commit into from
Aug 29, 2022

Conversation

geoand
Copy link
Contributor

@geoand geoand commented Aug 29, 2022

No description provided.

@quarkus-bot quarkus-bot bot added the area/jackson Issues related to Jackson (JSON library) label Aug 29, 2022
@@ -25,7 +28,8 @@ public class JacksonTimeZonePropertiesTest {

@Test
public void testTimezone() throws JsonProcessingException {
Assertions.assertThat(objectMapper.writeValueAsString(new Pojo(new Date(2021, Calendar.MARCH, 3, 11, 5))))
Assertions.assertThat(objectMapper.writeValueAsString(new Pojo(Date.from(
ZonedDateTime.of(LocalDateTime.of(2021, Month.MARCH, 3, 11, 5), ZoneId.of("GMT")).toInstant()))))
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The zone here does not matter because the point of the test is to show that Jackson overrides the timezone with the one configured in application.properties

@gsmet gsmet merged commit 4ea1c65 into quarkusio:main Aug 29, 2022
@quarkus-bot quarkus-bot bot added this to the 2.13 - main milestone Aug 29, 2022
@geoand geoand deleted the jackson-date-polish branch August 30, 2022 12:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/jackson Issues related to Jackson (JSON library)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants