8242208: Use Method.getParameterCount where applicable

Reviewed-by: redestad, chegar
This commit is contained in:
Christoph Dreis 2020-04-06 13:46:09 +02:00 committed by Claes Redestad
parent e9adf7bbe1
commit 08b90285b2
3 changed files with 5 additions and 5 deletions

View file

@ -121,7 +121,7 @@ public class AnnotationType {
if (Modifier.isPublic(method.getModifiers()) &&
Modifier.isAbstract(method.getModifiers()) &&
!method.isSynthetic()) {
if (method.getParameterTypes().length != 0) {
if (method.getParameterCount() != 0) {
throw new IllegalArgumentException(method + " has params");
}
String name = method.getName();