1- package tools .jackson .databind .ext .javatime .tofix ;
1+ package tools .jackson .databind .ext .javatime .deser ;
22
33import java .time .Instant ;
44
77import tools .jackson .databind .JsonNode ;
88import tools .jackson .databind .ObjectMapper ;
99import tools .jackson .databind .cfg .DateTimeFeature ;
10+ import tools .jackson .databind .cfg .JsonNodeFeature ;
1011import tools .jackson .databind .ext .javatime .DateTimeTestBase ;
11- import tools .jackson .databind .testutil .failure .JacksonTestFailureExpected ;
1212
1313import static org .junit .jupiter .api .Assertions .*;
1414
1515// [modules-java8#307]: Loss of precision via JsonNode for BigDecimal-valued
1616// things (like Instant)
17- public class InstantViaBigDecimal307Test extends DateTimeTestBase
17+ public class InstantDeserViaBigDecimal307Test extends DateTimeTestBase
1818{
1919 public static class Wrapper307 {
2020 public Instant value ;
@@ -26,6 +26,7 @@ public Wrapper307() { }
2626 private final Instant ISSUED_AT = Instant .ofEpochSecond (1234567890 ).plusNanos (123456789 );
2727
2828 private ObjectMapper MAPPER = mapperBuilder ()
29+ .enable (JsonNodeFeature .USE_BIG_DECIMAL_FOR_FLOATS )
2930 .enable (DateTimeFeature .WRITE_DATES_AS_TIMESTAMPS )
3031 .build ();
3132
@@ -36,7 +37,6 @@ public void instantViaReadValue() throws Exception {
3637 assertEquals (ISSUED_AT , deserialized .value );
3738 }
3839
39- @ JacksonTestFailureExpected
4040 @ Test
4141 public void instantViaReadTree () throws Exception {
4242 String serialized = MAPPER .writeValueAsString (new Wrapper307 (ISSUED_AT ));
0 commit comments