|
1 | 1 | package com.fasterxml.jackson.dataformat.ion.ionvalue; |
2 | 2 |
|
3 | | -import com.amazon.ion.IonList; |
| 3 | +import java.util.HashMap; |
| 4 | +import java.util.Map; |
| 5 | +import java.util.Objects; |
| 6 | + |
4 | 7 | import com.amazon.ion.IonSystem; |
5 | 8 | import com.amazon.ion.IonValue; |
6 | 9 | import com.amazon.ion.IonStruct; |
| 10 | + |
| 11 | +import org.junit.jupiter.api.Test; |
| 12 | + |
7 | 13 | import com.amazon.ion.system.IonSystemBuilder; |
8 | 14 | import com.fasterxml.jackson.annotation.JsonAnyGetter; |
9 | 15 | import com.fasterxml.jackson.annotation.JsonAnySetter; |
10 | 16 | import com.fasterxml.jackson.annotation.JsonInclude; |
11 | 17 | import com.fasterxml.jackson.annotation.JsonProperty; |
12 | | -import com.fasterxml.jackson.databind.ObjectWriter; |
| 18 | +import com.fasterxml.jackson.databind.PropertyNamingStrategies; |
13 | 19 | import com.fasterxml.jackson.databind.util.AccessPattern; |
14 | 20 | import com.fasterxml.jackson.dataformat.ion.IonObjectMapper; |
15 | 21 | import com.fasterxml.jackson.dataformat.ion.IonParser; |
16 | 22 |
|
17 | | - |
18 | | -import java.io.IOException; |
19 | | -import java.util.HashMap; |
20 | | -import java.util.Map; |
21 | | -import java.util.Objects; |
22 | | - |
23 | | -import org.junit.jupiter.api.Test; |
24 | | - |
25 | | -import static com.fasterxml.jackson.databind.PropertyNamingStrategies.SNAKE_CASE; |
26 | 23 | import static org.junit.jupiter.api.Assertions.assertEquals; |
27 | 24 | import static org.junit.jupiter.api.Assertions.assertNull; |
28 | 25 |
|
@@ -76,8 +73,10 @@ static class IonValueData extends Data<IonValue> { |
76 | 73 | } |
77 | 74 |
|
78 | 75 | private static final IonSystem SYSTEM = IonSystemBuilder.standard().build(); |
79 | | - private static final IonValueMapper ION_VALUE_MAPPER = new IonValueMapper(SYSTEM, SNAKE_CASE); |
80 | | - private static final IonValueMapper ION_MAPPER_READ_NULL_DISABLED = (IonValueMapper) new IonValueMapper(SYSTEM, SNAKE_CASE).disable(IonParser.Feature.READ_NULL_AS_IONVALUE); |
| 76 | + private static final IonValueMapper ION_VALUE_MAPPER |
| 77 | + = new IonValueMapper(SYSTEM, PropertyNamingStrategies.SNAKE_CASE); |
| 78 | + private static final IonValueMapper ION_MAPPER_READ_NULL_DISABLED |
| 79 | + = (IonValueMapper) new IonValueMapper(SYSTEM, PropertyNamingStrategies.SNAKE_CASE).disable(IonParser.Feature.READ_NULL_AS_IONVALUE); |
81 | 80 |
|
82 | 81 | @Test |
83 | 82 | public void shouldBeAbleToDeserialize() throws Exception { |
@@ -242,7 +241,7 @@ static class MyBean { |
242 | 241 | } |
243 | 242 |
|
244 | 243 | @Test |
245 | | - public void testWithMissingProperty() throws IOException |
| 244 | + public void testWithMissingProperty() throws Exception |
246 | 245 | { |
247 | 246 | IonSystem ionSystem = IonSystemBuilder.standard().build(); |
248 | 247 | IonObjectMapper ionObjectMapper = IonObjectMapper.builder(ionSystem) |
|
0 commit comments