Skip to content

Commit

Permalink
Add another type check.
Browse files Browse the repository at this point in the history
  • Loading branch information
raphw committed Aug 14, 2024
1 parent 3454af4 commit 899aaf6
Showing 1 changed file with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2452,6 +2452,9 @@ public Sort getSort() {
public AnnotationValue<U, V> filter(MethodDescription.InDefinedShape property, TypeDefinition typeDefinition) {
if (typeDefinition.isArray() && typeDefinition.getComponentType().asErasure().equals(componentType)) {
for (AnnotationValue<?, ?> value : values) {
if (value.getSort() != Sort.of(componentType)) {
return new ForMismatchedType<U, V>(property, RenderingDispatcher.CURRENT.toArrayErrorString(value.getSort()));
}
value = value.filter(property, typeDefinition.getComponentType());
if (value.getState() != State.RESOLVED) {
return (AnnotationValue<U, V>) value;
Expand Down

0 comments on commit 899aaf6

Please sign in to comment.