@@ -355,7 +355,7 @@ private static DeserializerFactoryConfig getDeserializerFactoryConfig(ObjectMapp
355
355
356
356
@ Test
357
357
public void propertyNamingStrategy () {
358
- PropertyNamingStrategy strategy = new PropertyNamingStrategy .LowerCaseWithUnderscoresStrategy ();
358
+ PropertyNamingStrategy strategy = new PropertyNamingStrategy .SnakeCaseStrategy ();
359
359
ObjectMapper objectMapper = Jackson2ObjectMapperBuilder .json ().propertyNamingStrategy (strategy ).build ();
360
360
assertThat (objectMapper .getSerializationConfig ().getPropertyNamingStrategy ()).isSameAs (strategy );
361
361
assertThat (objectMapper .getDeserializationConfig ().getPropertyNamingStrategy ()).isSameAs (strategy );
@@ -443,7 +443,7 @@ public void completeSetup() throws JsonMappingException {
443
443
JsonSerializer <Number > serializer2 = new NumberSerializer (Integer .class );
444
444
445
445
Jackson2ObjectMapperBuilder builder = Jackson2ObjectMapperBuilder .json ()
446
- .modules (new ArrayList <>()) // Disable well-known modules detection
446
+ .modules (new ArrayList <>()) // Disable well-known modules detection
447
447
.serializers (serializer1 )
448
448
.serializersByType (Collections .singletonMap (Boolean .class , serializer2 ))
449
449
.deserializersByType (deserializerMap )
@@ -551,7 +551,6 @@ public void factory() {
551
551
assertThat (objectMapper .getFactory ().getClass ()).isEqualTo (SmileFactory .class );
552
552
}
553
553
554
-
555
554
@ Test
556
555
public void visibility () throws JsonProcessingException {
557
556
ObjectMapper objectMapper = Jackson2ObjectMapperBuilder .json ()
@@ -565,6 +564,7 @@ public void visibility() throws JsonProcessingException {
565
564
assertThat (json ).doesNotContain ("property3" );
566
565
}
567
566
567
+
568
568
public static class CustomIntegerModule extends Module {
569
569
570
570
@ Override
@@ -651,6 +651,7 @@ public void setList(List<T> list) {
651
651
}
652
652
}
653
653
654
+
654
655
public static class JacksonVisibilityBean {
655
656
656
657
@ SuppressWarnings ("unused" )
@@ -661,9 +662,9 @@ public static class JacksonVisibilityBean {
661
662
public String getProperty3 () {
662
663
return null ;
663
664
}
664
-
665
665
}
666
666
667
+
667
668
static class OffsetDateTimeDeserializer extends JsonDeserializer <OffsetDateTime > {
668
669
669
670
private static final String CURRENT_ZONE_OFFSET = OffsetDateTime .now ().getOffset ().toString ();
@@ -684,6 +685,7 @@ public OffsetDateTime deserialize(JsonParser jsonParser, DeserializationContext
684
685
}
685
686
}
686
687
688
+
687
689
@ JsonDeserialize
688
690
static class DemoPojo {
689
691
@@ -696,13 +698,14 @@ public OffsetDateTime getOffsetDateTime() {
696
698
public void setOffsetDateTime (OffsetDateTime offsetDateTime ) {
697
699
this .offsetDateTime = offsetDateTime ;
698
700
}
699
-
700
701
}
701
702
703
+
702
704
@ SuppressWarnings ("serial" )
703
705
public static class MyXmlFactory extends XmlFactory {
704
706
}
705
707
708
+
706
709
static class Foo {}
707
710
708
711
static class Bar {}
0 commit comments