@@ -651,20 +651,19 @@ public TypeResolverBuilder<?> findPropertyContentTypeResolver(MapperConfig<?> co
651651 public List <NamedType > findSubtypes (MapperConfig <?> config , Annotated a )
652652 {
653653 JsonSubTypes t = _findAnnotation (a , JsonSubTypes .class );
654- if (t != null ) {
654+ if (t != null ) {
655655 return findSubtypesByJsonSubTypesAnnotation (config , a , t );
656656 }
657-
658- if (a .getAnnotated () instanceof Class <?> clazz && clazz .isSealed ()
657+ if (a .getAnnotated () instanceof Class <?> clazz && clazz .isSealed ()
659658 && clazz .getPermittedSubclasses ().length > 0 ) {
660659 return findSubtypesByPermittedSubclasses (config , a , clazz );
661660 }
662-
663661 return null ;
664662 }
665663
666664 // @since 3.0
667- private List <NamedType > findSubtypesByJsonSubTypesAnnotation (MapperConfig <?> config , Annotated a , JsonSubTypes t )
665+ private List <NamedType > findSubtypesByJsonSubTypesAnnotation (MapperConfig <?> config ,
666+ Annotated a , JsonSubTypes t )
668667 {
669668 JsonSubTypes .Type [] types = t .value ();
670669
@@ -673,7 +672,7 @@ private List<NamedType> findSubtypesByJsonSubTypesAnnotation(MapperConfig<?> con
673672 if (t .failOnRepeatedNames ()) {
674673 return findSubtypesByJsonSubTypesAnnotationCheckRepeatedNames (a .getName (), types );
675674 } else {
676- ArrayList <NamedType > result = new ArrayList <NamedType >(types .length );
675+ ArrayList <NamedType > result = new ArrayList <>(types .length );
677676 for (JsonSubTypes .Type type : types ) {
678677 result .add (new NamedType (type .value (), type .name ()));
679678 // [databind#2761]: alternative set of names to use
@@ -686,9 +685,10 @@ private List<NamedType> findSubtypesByJsonSubTypesAnnotation(MapperConfig<?> con
686685 }
687686
688687 // @since 3.0
689- private List <NamedType > findSubtypesByJsonSubTypesAnnotationCheckRepeatedNames (String annotatedTypeName , JsonSubTypes .Type [] types )
688+ private List <NamedType > findSubtypesByJsonSubTypesAnnotationCheckRepeatedNames (String annotatedTypeName ,
689+ JsonSubTypes .Type [] types )
690690 {
691- ArrayList <NamedType > result = new ArrayList <NamedType >(types .length );
691+ ArrayList <NamedType > result = new ArrayList <>(types .length );
692692 Set <String > seenNames = new HashSet <>();
693693 for (JsonSubTypes .Type type : types ) {
694694 final String typeName = type .name ();
0 commit comments