This is an automated email from the ASF dual-hosted git repository.
jamesbognar pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/juneau.git
The following commit(s) were added to refs/heads/master by this push:
new 37d4f2ffdd Utility class modernization
37d4f2ffdd is described below
commit 37d4f2ffddb1a174e5a36c78c93680ca48027c8f
Author: James Bognar <[email protected]>
AuthorDate: Fri Nov 7 11:13:24 2025 -0500
Utility class modernization
---
.../src/main/java/org/apache/juneau/common/reflect/MethodInfo.java | 5 +----
1 file changed, 1 insertion(+), 4 deletions(-)
diff --git
a/juneau-core/juneau-common/src/main/java/org/apache/juneau/common/reflect/MethodInfo.java
b/juneau-core/juneau-common/src/main/java/org/apache/juneau/common/reflect/MethodInfo.java
index fb404ce24e..72193d6bdb 100644
---
a/juneau-core/juneau-common/src/main/java/org/apache/juneau/common/reflect/MethodInfo.java
+++
b/juneau-core/juneau-common/src/main/java/org/apache/juneau/common/reflect/MethodInfo.java
@@ -484,10 +484,7 @@ public class MethodInfo extends ExecutableInfo implements
Comparable<MethodInfo>
*/
@SafeVarargs
public final boolean hasAnyAnnotations(Class<? extends
Annotation>...types) {
- for (var a : types)
- if (hasAnnotation(a))
- return true;
- return false;
+ return getAnnotationInfos().stream().anyMatch(ai ->
stream(types).anyMatch(t -> t.isInstance(ai.inner())));
}
/**