@@ -53,7 +53,7 @@ public class AnnotationAttributes extends LinkedHashMap<String, Object> {
53
53
54
54
final String displayName ;
55
55
56
- boolean validated = false ;
56
+ final boolean validated ;
57
57
58
58
59
59
/**
@@ -62,6 +62,7 @@ public class AnnotationAttributes extends LinkedHashMap<String, Object> {
62
62
public AnnotationAttributes () {
63
63
this .annotationType = null ;
64
64
this .displayName = UNKNOWN ;
65
+ this .validated = false ;
65
66
}
66
67
67
68
/**
@@ -73,6 +74,7 @@ public AnnotationAttributes(int initialCapacity) {
73
74
super (initialCapacity );
74
75
this .annotationType = null ;
75
76
this .displayName = UNKNOWN ;
77
+ this .validated = false ;
76
78
}
77
79
78
80
/**
@@ -85,6 +87,7 @@ public AnnotationAttributes(Map<String, Object> map) {
85
87
super (map );
86
88
this .annotationType = null ;
87
89
this .displayName = UNKNOWN ;
90
+ this .validated = false ;
88
91
}
89
92
90
93
/**
@@ -108,9 +111,20 @@ public AnnotationAttributes(AnnotationAttributes other) {
108
111
* @since 4.2
109
112
*/
110
113
public AnnotationAttributes (Class <? extends Annotation > annotationType ) {
111
- Assert .notNull (annotationType , "'annotationType' must not be null" );
112
- this .annotationType = annotationType ;
113
- this .displayName = annotationType .getName ();
114
+ this (annotationType , false );
115
+ }
116
+
117
+ /**
118
+ * Create a new, empty {@link AnnotationAttributes} instance for the
119
+ * specified {@code annotationType}.
120
+ * @param annotationType the annotation type name represented by this
121
+ * {@code AnnotationAttributes} instance; never {@code null}
122
+ * @param classLoader the ClassLoader to try to load the annotation type on,
123
+ * or {@code null} to just store the annotation type name
124
+ * @since 4.3.2
125
+ */
126
+ public AnnotationAttributes (String annotationType , @ Nullable ClassLoader classLoader ) {
127
+ this (getAnnotationType (annotationType , classLoader ), false );
114
128
}
115
129
116
130
/**
@@ -129,20 +143,6 @@ public AnnotationAttributes(Class<? extends Annotation> annotationType) {
129
143
this .validated = validated ;
130
144
}
131
145
132
- /**
133
- * Create a new, empty {@link AnnotationAttributes} instance for the
134
- * specified {@code annotationType}.
135
- * @param annotationType the annotation type name represented by this
136
- * {@code AnnotationAttributes} instance; never {@code null}
137
- * @param classLoader the ClassLoader to try to load the annotation type on,
138
- * or {@code null} to just store the annotation type name
139
- * @since 4.3.2
140
- */
141
- public AnnotationAttributes (String annotationType , @ Nullable ClassLoader classLoader ) {
142
- Assert .notNull (annotationType , "'annotationType' must not be null" );
143
- this .annotationType = getAnnotationType (annotationType , classLoader );
144
- this .displayName = annotationType ;
145
- }
146
146
147
147
@ SuppressWarnings ("unchecked" )
148
148
@ Nullable
0 commit comments