File tree Expand file tree Collapse file tree 1 file changed +8
-0
lines changed
src/main/java/org/scijava/util Expand file tree Collapse file tree 1 file changed +8
-0
lines changed Original file line number Diff line number Diff line change @@ -307,6 +307,10 @@ public static <A extends Annotation> List<Method> getAnnotatedMethods(
307307 getAnnotatedMethods (final Class <?> c , final Class <A > annotationClass ,
308308 final List <Method > methods )
309309 {
310+ // NB: The java.lang.Object class does not have any annotated methods.
311+ // And even if it did, it definitely does not have any methods annotated
312+ // with SciJava annotations such as org.scijava.event.EventHandler, which
313+ // are the main sorts of methods we are interested in.
310314 if (c == null || c == Object .class ) return ;
311315
312316 // check supertypes for annotated methods first
@@ -363,6 +367,10 @@ public static <A extends Annotation> List<Field> getAnnotatedFields(
363367 public static <A extends Annotation > void getAnnotatedFields (
364368 final Class <?> c , final Class <A > annotationClass , final List <Field > fields )
365369 {
370+ // NB: The java.lang.Object class does not have any annotated fields.
371+ // And even if it did, it definitely does not have any fields annotated
372+ // with SciJava annotations such as org.scijava.plugin.Parameter, which
373+ // are the main sorts of fields we are interested in.
366374 if (c == null || c == Object .class ) return ;
367375
368376 // check supertypes for annotated fields first
You can’t perform that action at this time.
0 commit comments