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 b608b83074 Utility class modernization
b608b83074 is described below

commit b608b830749c91efc03e089a02ab314212fe161b
Author: James Bognar <[email protected]>
AuthorDate: Thu Nov 6 14:01:22 2025 -0500

    Utility class modernization
---
 .../apache/juneau/common/reflect/ClassInfo.java    | 33 ----------------------
 1 file changed, 33 deletions(-)

diff --git 
a/juneau-core/juneau-common/src/main/java/org/apache/juneau/common/reflect/ClassInfo.java
 
b/juneau-core/juneau-common/src/main/java/org/apache/juneau/common/reflect/ClassInfo.java
index 5d4168e5ad..6d99deab23 100644
--- 
a/juneau-core/juneau-common/src/main/java/org/apache/juneau/common/reflect/ClassInfo.java
+++ 
b/juneau-core/juneau-common/src/main/java/org/apache/juneau/common/reflect/ClassInfo.java
@@ -498,18 +498,6 @@ public class ClassInfo extends ElementInfo implements 
Annotatable {
                return findAnnotation(annotationProvider, type);
        }
 
-       /**
-        * Returns the first matching annotation of the specified type defined 
on the specified class or parent classes/interfaces in parent-to-child order.
-        *
-        * @param <A> The annotation type to look for.
-        * @param type The annotation to look for.
-        * @param filter A predicate to apply to the entries to determine if 
value should be used.  Can be <jk>null</jk>.
-        * @return This object.
-        */
-       public <A extends Annotation> A getAnnotation(Class<A> type, 
Predicate<A> filter) {
-               return getAnnotation(null, type, filter);
-       }
-
        /**
         * Returns all annotations of the specified type defined on this or 
parent classes/interfaces.
         *
@@ -2382,27 +2370,6 @@ public class ClassInfo extends ElementInfo implements 
Annotatable {
                return null;
        }
 
-       private <A extends Annotation> A getAnnotation(AnnotationProvider ap, 
Class<A> a, Predicate<A> filter) {
-               if (ap == null)
-                       ap = AnnotationProvider.DEFAULT;
-               A t2 = getPackageAnnotation(a);
-               if (nn(t2) && filter.test(t2))
-                       return t2;
-               var interfaces2 = interfaces.get();
-               for (int i = interfaces2.size() - 1; i >= 0; i--) {
-                       A o = ap.firstDeclaredAnnotation(a, 
interfaces2.get(i).inner(), filter);
-                       if (nn(o))
-                               return o;
-               }
-               var parents2 = parents.get();
-               for (int i = parents2.size() - 1; i >= 0; i--) {
-                       A o = ap.firstDeclaredAnnotation(a, 
parents2.get(i).inner(), filter);
-                       if (nn(o))
-                               return o;
-               }
-               return null;
-       }
-
        /**
         * Returns the first type parameter of this type if it's parameterized 
(e.g., T in Optional&lt;T&gt;).
         *

Reply via email to