mirror of
https://github.com/spring-projects/spring-framework
synced 2026-06-08 17:33:33 +00:00
6062363738
Prior to this commit, we invoked `Class.getName()` when building error messages during annotation processing, resulting in exceptions like the following which use binary names for nested types and arrays. Attribute 'chars' in annotation org.springframework.core.annotation.AnnotationUtilsTests$CharsContainer should be compatible with [C but a [I value was returned This commit switches to canonical names in error messages in annotation processing, resulting in improved such errors messages such as the following. Attribute 'chars' in annotation org.springframework.core.annotation.AnnotationUtilsTests.CharsContainer should be compatible with char[] but a int[] value was returned In addition, this commit introduces a new getCanonicalName(Class) method in ClassUtils, which has effectively been extracted from the following classes where this functionality was previously duplicated. - AttributeMethods - SynthesizedMergedAnnotationInvocationHandler - TypeDescriptor - DefaultRetryPolicy - ReflectiveIndexAccessor Closes gh-36607