We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 74fe81f commit 9e73c85Copy full SHA for 9e73c85
datetime/src/test/java/com/fasterxml/jackson/datatype/jsr310/deser/YearDeserTest.java
@@ -76,9 +76,10 @@ public void testWithCustomFormat() throws Exception
76
@Test
77
public void testWithFormatViaConfigOverride() throws Exception
78
{
79
- ObjectMapper mapper = newMapper();
80
- mapper.configOverride(Year.class)
81
- .setFormat(JsonFormat.Value.forPattern("'X'yyyy"));
+ ObjectMapper mapper = newMapperBuilder()
+ .withConfigOverride(Year.class,
+ vc -> vc.setFormat((JsonFormat.Value.forPattern("'X'yyyy"))))
82
+ .build();
83
Year input = Year.of(2018);
84
String json = mapper.writeValueAsString(input);
85
assertEquals("\"X2018\"", json);
0 commit comments