@@ -467,7 +467,7 @@ protected final JsonSerializer<?> findSerializerByPrimaryType(SerializerProvider
467
467
}
468
468
if (Number .class .isAssignableFrom (raw )) {
469
469
// 21-May-2014, tatu: Couple of alternatives actually
470
- JsonFormat .Value format = beanDesc .findExpectedFormat (null );
470
+ JsonFormat .Value format = beanDesc .findExpectedFormat ();
471
471
switch (format .getShape ()) {
472
472
case STRING :
473
473
return ToStringSerializer .instance ;
@@ -713,7 +713,7 @@ protected JsonSerializer<?> buildCollectionSerializer(SerializerProvider prov,
713
713
if (ser == null ) {
714
714
// We may also want to use serialize Collections "as beans", if (and only if)
715
715
// this is specified with `@JsonFormat(shape=Object)`
716
- JsonFormat .Value format = beanDesc .findExpectedFormat (null );
716
+ JsonFormat .Value format = beanDesc .findExpectedFormat ();
717
717
if (format .getShape () == JsonFormat .Shape .OBJECT ) {
718
718
return null ;
719
719
}
@@ -803,7 +803,7 @@ protected JsonSerializer<?> buildMapSerializer(SerializerProvider prov,
803
803
{
804
804
// [databind#467]: This is where we could allow serialization "as POJO": But! It's
805
805
// nasty to undo, and does not apply on per-property basis. So, hardly optimal
806
- JsonFormat .Value format = beanDesc .findExpectedFormat (null );
806
+ JsonFormat .Value format = beanDesc .findExpectedFormat ();
807
807
if (format .getShape () == JsonFormat .Shape .OBJECT ) {
808
808
return null ;
809
809
}
@@ -924,7 +924,7 @@ protected JsonSerializer<?> buildMapEntrySerializer(SerializerProvider prov,
924
924
// [databind#865]: Allow serialization "as POJO" -- note: to undo, declare
925
925
// serialization as `Shape.NATURAL` instead; that's JSON Object too.
926
926
JsonFormat .Value formatOverride = prov .getDefaultPropertyFormat (Map .Entry .class );
927
- JsonFormat .Value formatFromAnnotation = beanDesc .findExpectedFormat (null );
927
+ JsonFormat .Value formatFromAnnotation = beanDesc .findExpectedFormat ();
928
928
JsonFormat .Value format = JsonFormat .Value .merge (formatFromAnnotation , formatOverride );
929
929
if (format .getShape () == JsonFormat .Shape .OBJECT ) {
930
930
return null ;
@@ -1202,7 +1202,7 @@ protected JsonSerializer<?> buildEnumSerializer(SerializationConfig config,
1202
1202
* POJO style serialization, so we must handle that special case separately;
1203
1203
* otherwise pass it to EnumSerializer.
1204
1204
*/
1205
- JsonFormat .Value format = beanDesc .findExpectedFormat (null );
1205
+ JsonFormat .Value format = beanDesc .findExpectedFormat ();
1206
1206
if (format .getShape () == JsonFormat .Shape .OBJECT ) {
1207
1207
// one special case: suppress serialization of "getDeclaringClass()"...
1208
1208
((BasicBeanDescription ) beanDesc ).removeProperty ("declaringClass" );
0 commit comments