@@ -227,31 +227,33 @@ private boolean isConcreteClass(AnnotatedType type) {
227227 */
228228 private List <BeanPropertyBiDefinition > introspectBeanProperties (JavaType javaType ) {
229229 Map <String , BeanPropertyDefinition > forSerializationProps =
230- springDocObjectMapper .jsonMapper ()
231- .getSerializationConfig ()
232- .introspect (javaType )
233- .findProperties ()
234- .stream ()
235- .collect (toMap (BeanPropertyDefinition ::getName , identity ()));
230+ springDocObjectMapper .jsonMapper ()
231+ .getSerializationConfig ()
232+ .introspect (javaType )
233+ .findProperties ()
234+ .stream ()
235+ .collect (toMap (BeanPropertyDefinition ::getName , identity ()));
236236 Map <String , BeanPropertyDefinition > forDeserializationProps =
237- springDocObjectMapper .jsonMapper ()
238- .getDeserializationConfig ()
239- .introspect (javaType )
240- .findProperties ()
241- .stream ()
242- .collect (toMap (BeanPropertyDefinition ::getName , identity ()));
237+ springDocObjectMapper .jsonMapper ()
238+ .getDeserializationConfig ()
239+ .introspect (javaType )
240+ .findProperties ()
241+ .stream ()
242+ .collect (toMap (BeanPropertyDefinition ::getName , identity ()));
243243
244244 return forSerializationProps .keySet ().stream ()
245- .map (key -> new BeanPropertyBiDefinition (forSerializationProps .get (key ), forDeserializationProps .get (key )))
246- .toList ();
245+ .map (key -> new BeanPropertyBiDefinition (forSerializationProps .get (key ), forDeserializationProps .get (key )))
246+ .toList ();
247247 }
248248
249249 /**
250250 * A record representing the bi-definition of a bean property, combining both
251251 * serialization and deserialization property views.
252252 */
253- private record BeanPropertyBiDefinition (BeanPropertyDefinition forSerialization ,
254- BeanPropertyDefinition forDeserialization ) {
253+ private record BeanPropertyBiDefinition (
254+ BeanPropertyDefinition forSerialization ,
255+ BeanPropertyDefinition forDeserialization
256+ ) {
255257
256258 /**
257259 * Retrieves an annotation of the specified type from either the serialization or
@@ -278,36 +280,36 @@ public <A extends Annotation> boolean isAnyAnnotated(Class<A> acls) {
278280 public JavaType getPrimaryType () {
279281 JavaType forSerializationType = null ;
280282 if (forSerialization != null ) {
281- forSerializationType = forSerialization .getPrimaryType ();
282- }
283+ forSerializationType = forSerialization .getPrimaryType ();
284+ }
283285
284286 JavaType forDeserializationType = null ;
285287 if (forDeserialization != null ) {
286- forDeserializationType = forDeserialization .getPrimaryType ();
287- }
288+ forDeserializationType = forDeserialization .getPrimaryType ();
289+ }
288290
289291 if (forSerializationType != null && forDeserializationType != null && forSerializationType != forDeserializationType ) {
290292 throw new IllegalStateException ("The property " + forSerialization .getName () + " has different types for serialization and deserialization: "
291- + forSerializationType + " and " + forDeserializationType );
293+ + forSerializationType + " and " + forDeserializationType );
292294 }
293295
294296 return forSerializationType != null ? forSerializationType : forDeserializationType ;
295297 }
296298
297299 private <A extends Annotation > A getAnyAnnotation (BeanPropertyDefinition prop , Class <A > acls ) {
298300 if (prop == null ) {
299- return null ;
300- }
301+ return null ;
302+ }
301303
302304 if (prop .getField () != null ) {
303- return prop .getField ().getAnnotation (acls );
304- }
305+ return prop .getField ().getAnnotation (acls );
306+ }
305307 if (prop .getGetter () != null ) {
306- return prop .getGetter ().getAnnotation (acls );
307- }
308+ return prop .getGetter ().getAnnotation (acls );
309+ }
308310 if (prop .getSetter () != null ) {
309- return prop .getSetter ().getAnnotation (acls );
310- }
311+ return prop .getSetter ().getAnnotation (acls );
312+ }
311313
312314 return null ;
313315 }
0 commit comments