@@ -338,7 +338,9 @@ private void doTestAnnotationInfo(AnnotationMetadata metadata) {
338
338
allMeta = metadata .getAllAnnotationAttributes (DirectAnnotation .class .getName ()).get ("value" );
339
339
assertThat (new HashSet <>(allMeta ), is (equalTo (new HashSet <Object >(Arrays .asList ("direct" , "meta" )))));
340
340
allMeta = metadata .getAllAnnotationAttributes (DirectAnnotation .class .getName ()).get ("additional" );
341
- assertThat (new HashSet <>(allMeta ), is (equalTo (new HashSet <Object >(Arrays .asList ("direct" )))));
341
+ assertThat (new HashSet <>(allMeta ), is (equalTo (new HashSet <Object >(Arrays .asList ("direct" , "" )))));
342
+ assertEquals ("" , metadata .getAnnotationAttributes (DirectAnnotation .class .getName ()).get ("additional" ));
343
+ assertEquals (0 , ((String []) metadata .getAnnotationAttributes (DirectAnnotation .class .getName ()).get ("additionalArray" )).length );
342
344
}
343
345
{ // perform tests with classValuesAsString = true
344
346
AnnotationAttributes specialAttrs = (AnnotationAttributes ) metadata .getAnnotationAttributes (
@@ -425,6 +427,8 @@ public static enum SomeEnum {
425
427
String myValue () default "" ;
426
428
427
429
String additional () default "direct" ;
430
+
431
+ String [] additionalArray () default "direct" ;
428
432
}
429
433
430
434
@ Target (ElementType .TYPE )
@@ -470,7 +474,7 @@ public enum SubclassEnum {
470
474
nestedAnno = @ NestedAnno (value = "na" , anEnum = SomeEnum .LABEL1 , classArray = {String .class }),
471
475
nestedAnnoArray = {@ NestedAnno , @ NestedAnno (value = "na1" , anEnum = SomeEnum .LABEL2 , classArray = {Number .class })})
472
476
@ SuppressWarnings ({"serial" , "unused" })
473
- @ DirectAnnotation ("direct" )
477
+ @ DirectAnnotation (value = "direct" , additional = "" , additionalArray = {} )
474
478
@ MetaMetaAnnotation
475
479
@ EnumSubclasses ({SubclassEnum .FOO , SubclassEnum .BAR })
476
480
private static class AnnotatedComponent implements Serializable {
0 commit comments