Source:
<code>private static <C, R> R processMethodHierarchy(C context, int[] aggregateIndex, Class<?> sourceClass, AnnotationsProcessor<C, R> processor, @Nullable BiPredicate<C, Class<?>> classFilter, Method rootMethod, boolean includeInterfaces) { R result = processor.doWithAggregate(context, aggregateIndex[0]); if (result != null) { return result; } if (hasPlainJavaAnnotationsOnly(sourceClass)) { return null; } boolean calledProcessor = false; if (sourceClass == rootMethod.getDeclaringClass()) { result = processMethodAnnotations(context, aggregateIndex[0], rootMethod, processor, classFilter); calledProcessor = true; if (result != null) { return result; } } else { for (Method candidateMethod : getBaseTypeMethods(context, sourceClass, classFilter)) { if (candidateMethod != null && isOverride(rootMethod, candidateMethod)) { result = processMethodAnnotations(context, aggregateIndex[0], candidateMethod, processor, classFilter); calledProcessor = true; if (result != null) { return result; } } } } if (Modifier.isPrivate(rootMethod.getModifiers())) { return null; } if (calledProcessor) { aggregateIndex[0]++; } if (includeInterfaces) { for (Class<?> interfaceType : sourceClass.getInterfaces()) { R interfacesResult = processMethodHierarchy(context, aggregateIndex, interfaceType, processor, classFilter, rootMethod, true); if (interfacesResult != null) { return interfacesResult; } } } Class<?> superclass = sourceClass.getSuperclass(); if (superclass != Object.class && superclass != null) { R superclassResult = processMethodHierarchy(context, aggregateIndex, superclass, processor, classFilter, rootMethod, includeInterfaces); <START> return superclassResult; <END> } return null; }</code><technical_language>this technically equivalent, breaks structure of rest of method. such, I do change is warranted. So, please revert this change</technical_language>

Target:
private static <C, R> R processMethodHierarchy(C context, int[] aggregateIndex, Class<?> sourceClass, AnnotationsProcessor<C, R> processor, @Nullable BiPredicate<C, Class<?>> classFilter, Method rootMethod, boolean includeInterfaces) { R result = processor.doWithAggregate(context, aggregateIndex[0]); if (result != null) { return result; } if (hasPlainJavaAnnotationsOnly(sourceClass)) { return null; } boolean calledProcessor = false; if (sourceClass == rootMethod.getDeclaringClass()) { result = processMethodAnnotations(context, aggregateIndex[0], rootMethod, processor, classFilter); calledProcessor = true; if (result != null) { return result; } } else { for (Method candidateMethod : getBaseTypeMethods(context, sourceClass, classFilter)) { if (candidateMethod != null && isOverride(rootMethod, candidateMethod)) { result = processMethodAnnotations(context, aggregateIndex[0], candidateMethod, processor, classFilter); calledProcessor = true; if (result != null) { return result; } } } } if (Modifier.isPrivate(rootMethod.getModifiers())) { return null; } if (calledProcessor) { aggregateIndex[0]++; } if (includeInterfaces) { for (Class<?> interfaceType : sourceClass.getInterfaces()) { R interfacesResult = processMethodHierarchy(context, aggregateIndex, interfaceType, processor, classFilter, rootMethod, true); if (interfacesResult != null) { return interfacesResult; } } } Class<?> superclass = sourceClass.getSuperclass(); if (superclass != Object.class && superclass != null) { R superclassResult = processMethodHierarchy(context, aggregateIndex, superclass, processor, classFilter, rootMethod, includeInterfaces); if (superclassResult != null) { return superclassResult; } } return null; }