File tree 1 file changed +2
-2
lines changed
spring-core/src/main/java/org/springframework/core
1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -647,7 +647,7 @@ public Annotation[] getParameterAnnotations() {
647
647
// for inner classes, so access it with the actual parameter index lowered by 1
648
648
index = this .parameterIndex - 1 ;
649
649
}
650
- paramAnns = (index >= 0 && index < annotationArray .length ?
650
+ paramAnns = (index >= 0 && index < annotationArray .length && annotationArray [ index ]. length > 0 ?
651
651
adaptAnnotationArray (annotationArray [index ]) : EMPTY_ANNOTATION_ARRAY );
652
652
this .parameterAnnotations = paramAnns ;
653
653
}
@@ -916,7 +916,7 @@ public Annotation[] getParameterAnnotations() {
916
916
merged .add (fieldAnn );
917
917
}
918
918
}
919
- anns = merged .toArray (new Annotation [ 0 ] );
919
+ anns = merged .toArray (EMPTY_ANNOTATION_ARRAY );
920
920
}
921
921
}
922
922
catch (NoSuchFieldException | SecurityException ex ) {
You can’t perform that action at this time.
0 commit comments