Skip to content

Commit

Permalink
Защита от неверного количества параметров аннотации
Browse files Browse the repository at this point in the history
  • Loading branch information
nixel2007 committed Dec 27, 2024
1 parent e87c132 commit 2393a2b
Showing 1 changed file with 1 addition and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,7 @@ private static Optional<Pair<MethodSymbol, Annotation>> findAnnotation(MethodSym
return methodSymbol.getAnnotations().stream()
.filter(annotation -> annotation.getName().equalsIgnoreCase("Аннотация"))
.findFirst()
.filter(annotation -> annotation.getParameters().size() == 1)
.map(annotation -> Pair.of(methodSymbol, annotation));
}

Expand Down

0 comments on commit 2393a2b

Please sign in to comment.