64
64
import com .fasterxml .jackson .databind .ser .std .NumberSerializer ;
65
65
import com .fasterxml .jackson .databind .type .SimpleType ;
66
66
import com .fasterxml .jackson .dataformat .xml .XmlMapper ;
67
-
68
67
import kotlin .ranges .IntRange ;
69
68
import org .joda .time .DateTime ;
70
69
import org .joda .time .DateTimeZone ;
@@ -253,7 +252,7 @@ public void wellKnownModules() throws JsonProcessingException, UnsupportedEncodi
253
252
assertEquals (timestamp .toString (), new String (objectMapper .writeValueAsBytes (dateTime ), "UTF-8" ));
254
253
255
254
Path file = Paths .get ("foo" );
256
- assertEquals ( " \" foo \" " , new String (objectMapper .writeValueAsBytes (file ), "UTF-8" ));
255
+ assertTrue ( new String (objectMapper .writeValueAsBytes (file ), "UTF-8" ). endsWith ( "foo \" " ));
257
256
258
257
Optional <String > optional = Optional .of ("test" );
259
258
assertEquals ("\" test\" " , new String (objectMapper .writeValueAsBytes (optional ), "UTF-8" ));
@@ -263,7 +262,7 @@ public void wellKnownModules() throws JsonProcessingException, UnsupportedEncodi
263
262
assertEquals ("{\" start\" :1,\" end\" :3}" , new String (objectMapper .writeValueAsBytes (range ), "UTF-8" ));
264
263
}
265
264
266
- @ Test // SPR-12634
265
+ @ Test // SPR-12634
267
266
public void customizeWellKnownModulesWithModule () throws JsonProcessingException , UnsupportedEncodingException {
268
267
ObjectMapper objectMapper = Jackson2ObjectMapperBuilder .json ()
269
268
.modulesToInstall (new CustomIntegerModule ()).build ();
@@ -272,7 +271,7 @@ public void customizeWellKnownModulesWithModule() throws JsonProcessingException
272
271
assertThat (new String (objectMapper .writeValueAsBytes (new Integer (4 )), "UTF-8" ), containsString ("customid" ));
273
272
}
274
273
275
- @ Test // SPR-12634
274
+ @ Test // SPR-12634
276
275
@ SuppressWarnings ("unchecked" )
277
276
public void customizeWellKnownModulesWithModuleClass () throws JsonProcessingException , UnsupportedEncodingException {
278
277
ObjectMapper objectMapper = Jackson2ObjectMapperBuilder .json ().modulesToInstall (CustomIntegerModule .class ).build ();
@@ -281,7 +280,7 @@ public void customizeWellKnownModulesWithModuleClass() throws JsonProcessingExce
281
280
assertThat (new String (objectMapper .writeValueAsBytes (new Integer (4 )), "UTF-8" ), containsString ("customid" ));
282
281
}
283
282
284
- @ Test // SPR-12634
283
+ @ Test // SPR-12634
285
284
public void customizeWellKnownModulesWithSerializer () throws JsonProcessingException , UnsupportedEncodingException {
286
285
ObjectMapper objectMapper = Jackson2ObjectMapperBuilder .json ()
287
286
.serializerByType (Integer .class , new CustomIntegerSerializer ()).build ();
@@ -520,6 +519,7 @@ public void setProperty2(String property2) {
520
519
}
521
520
}
522
521
522
+
523
523
public static class ListContainer <T > {
524
524
525
525
private List <T > list ;
0 commit comments