Skip to content

Commit

Permalink
Merge branch '2.18' into 2.19
Browse files Browse the repository at this point in the history
  • Loading branch information
cowtowncoder committed Sep 29, 2024
2 parents fbb6c7c + 310734f commit b0a504e
Show file tree
Hide file tree
Showing 3 changed files with 33 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
package com.fasterxml.jackson.datatype.jsr310.misc;

import java.time.DateTimeException;

import org.junit.Test;

import com.fasterxml.jackson.databind.ObjectMapper;
import com.fasterxml.jackson.datatype.jsr310.ModuleTestBase;

import static org.junit.Assert.assertEquals;

public class DateTimeExceptionTest extends ModuleTestBase
{
private final ObjectMapper MAPPER = newMapper();

// [modules-java#319]: should not fail to ser/deser DateTimeException
@Test
public void testDateTimeExceptionRoundtrip() throws Exception
{
String json = MAPPER.writeValueAsString(new DateTimeException("Test!"));
DateTimeException result = MAPPER.readValue(json, DateTimeException.class);
assertEquals("Test!", result.getMessage());
}
}
4 changes: 4 additions & 0 deletions release-notes/CREDITS-2.x
Original file line number Diff line number Diff line change
Expand Up @@ -199,3 +199,7 @@ Emanuel Trandafir (@etrandafir93)
* Contribtued fix for #274: Deserializing `java.time.Month` from an int causes an off-by-one
error (`0`->`Jan`,`11`->`Dec`), because it's an enum
(2.17.0)

Ólafur Bragason (@olibraga)
* Reported #319: `java.time.DateTimeException` serialization fails
(2.18.1)
5 changes: 5 additions & 0 deletions release-notes/VERSION-2.x
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,11 @@ Modules:

-

2.18.1 (not yet released)

#319: `java.time.DateTimeException` serialization fails
(repored by Ólafur B)

2.18.0 (26-Sep-2024)

No changes since 2.17
Expand Down

0 comments on commit b0a504e

Please sign in to comment.