@@ -98,6 +98,10 @@ TypeDescription resolveSuperType(TypeDescription actual) {
9898 return actual ;
9999 }
100100
101+ static List <TypeDescription > descriptors (Class <?>... classses ) {
102+ return Stream .of (classses ).map (TypeDescription .ForLoadedType ::of ).collect (toList ());
103+ }
104+
101105 }
102106
103107 // TODO Possible checks during compile time: (but all these checks could be a
@@ -120,9 +124,8 @@ TypeDescription resolveSuperType(TypeDescription actual) {
120124 new FixedClassConfigEntry (NotNull .class , Object .class ), //
121125 new FixedClassConfigEntry (NotBlank .class , CharSequence .class ), //
122126 new ConfigEntry (NotEmpty .class ) {
123- List <TypeDescription > validTypes = Stream
124- .of (CharSequence .class , Collection .class , Map .class , Object [].class )
125- .map (TypeDescription .ForLoadedType ::of ).collect (toList ());
127+ List <TypeDescription > validTypes = descriptors (CharSequence .class , Collection .class , Map .class ,
128+ Object [].class );
126129
127130 @ Override
128131 TypeDescription resolveSuperType (TypeDescription actual ) {
@@ -131,9 +134,8 @@ TypeDescription resolveSuperType(TypeDescription actual) {
131134 };
132135 }, //
133136 new ConfigEntry (Size .class ) {
134- List <TypeDescription > validTypes = Stream
135- .of (CharSequence .class , Collection .class , Map .class , Object [].class )
136- .map (TypeDescription .ForLoadedType ::of ).collect (toList ());
137+ List <TypeDescription > validTypes = descriptors (CharSequence .class , Collection .class , Map .class ,
138+ Object [].class );
137139
138140 @ Override
139141 TypeDescription resolveSuperType (TypeDescription actual ) {
0 commit comments