Skip to content

Commit dc40ef7

Browse files
committed
...
1 parent 9be0398 commit dc40ef7

File tree

2 files changed

+8
-7
lines changed

2 files changed

+8
-7
lines changed

ion/src/test/java/tools/jackson/dataformat/ion/IonTimestampRoundTripTest.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
import com.amazon.ion.system.IonSystemBuilder;
2121
import org.junit.jupiter.api.Test;
2222

23-
import tools.jackson.databind.SerializationFeature;
23+
import tools.jackson.databind.cfg.DateTimeFeature;
2424
import tools.jackson.databind.json.JsonMapper;
2525

2626
import static org.junit.jupiter.api.Assertions.assertEquals;
@@ -33,7 +33,7 @@ public void testDateRoundTrip()
3333
{
3434
Date date = new Date();
3535
IonObjectMapper m = IonObjectMapper.builder()
36-
.disable(SerializationFeature.WRITE_DATES_AS_TIMESTAMPS)
36+
.disable(DateTimeFeature.WRITE_DATES_AS_TIMESTAMPS)
3737
.build();
3838

3939
String val = m.writeValueAsString(date);
@@ -53,7 +53,7 @@ public void testMillisCompatibility()
5353
{
5454
Date date = new Date();
5555
IonObjectMapper m = IonObjectMapper.builder()
56-
.enable(SerializationFeature.WRITE_DATES_AS_TIMESTAMPS)
56+
.enable(DateTimeFeature.WRITE_DATES_AS_TIMESTAMPS)
5757
.build();
5858

5959
String val = m.writeValueAsString(date);
@@ -69,7 +69,7 @@ public void testNonJoiCompatibility()
6969
Date date = new Date();
7070
JsonMapper nonJoiMillis = new JsonMapper();
7171
JsonMapper nonJoiM = JsonMapper.builder()
72-
.disable(SerializationFeature.WRITE_DATES_AS_TIMESTAMPS)
72+
.disable(DateTimeFeature.WRITE_DATES_AS_TIMESTAMPS)
7373
.build();
7474
IonObjectMapper joiM = new IonObjectMapper();
7575

ion/src/test/java/tools/jackson/dataformat/ion/tofix/PolymorphicRoundtripTest.java

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@
2929

3030
import tools.jackson.databind.*;
3131
import tools.jackson.databind.annotation.JsonTypeResolver;
32+
import tools.jackson.databind.cfg.DateTimeFeature;
3233
import tools.jackson.databind.cfg.MapperConfig;
3334
import tools.jackson.databind.jsontype.PolymorphicTypeValidator;
3435
import tools.jackson.databind.jsontype.TypeIdResolver;
@@ -271,7 +272,7 @@ public void testWithIonDate() throws IOException {
271272
resolveAllTypes = true;
272273
ObjectMapper mapper = IonObjectMapper.builder()
273274
.addModule(new IonAnnotationModule())
274-
.disable(SerializationFeature.WRITE_DATES_AS_TIMESTAMPS)
275+
.disable(DateTimeFeature.WRITE_DATES_AS_TIMESTAMPS)
275276
.build();
276277
long etime = 1449191916000L;
277278
java.util.Date uDate = new java.util.Date(etime);
@@ -293,7 +294,7 @@ public void testWithDateAsTimestamp() throws IOException {
293294
resolveAllTypes = true;
294295
ObjectMapper ionDateMapper = IonObjectMapper.builder()
295296
.addModule(new IonAnnotationModule())
296-
.enable(SerializationFeature.WRITE_DATES_AS_TIMESTAMPS)
297+
.enable(DateTimeFeature.WRITE_DATES_AS_TIMESTAMPS)
297298
.build();
298299
long etime = 1449191916000L;
299300
java.util.Date uDate = new java.util.Date(etime);
@@ -321,7 +322,7 @@ public void testPolymorphicTypeWithDate() throws IOException{
321322
new ChildBeanSub("child_field", "extra_field", uDate, sDate, null));
322323

323324
IonObjectMapper mapper = IonObjectMapper.builder()
324-
.disable(SerializationFeature.WRITE_DATES_AS_TIMESTAMPS)
325+
.disable(DateTimeFeature.WRITE_DATES_AS_TIMESTAMPS)
325326
.addModule(new IonAnnotationModule())
326327
.build();
327328
// roundtrip

0 commit comments

Comments
 (0)