stefanseifert commented on code in PR #26:
URL:
https://github.com/apache/sling-org-apache-sling-testing-osgi-mock/pull/26#discussion_r1189541679
##########
core/src/main/java/org/apache/sling/testing/mock/osgi/OsgiServiceUtil.java:
##########
@@ -135,6 +136,35 @@ public static boolean modified(Object target,
MockComponentContext componentCont
+ " found in class " + targetClass.getName());
}
+ /**
+ * SLING-11860 - find the nearest match. First find any match in the
class itself.
+ * If none is found, then walk up the ancestor super classes to look
for a match
+ *
+ * @param targetClass the class to start from
+ * @param fn the function to find and invoke the method
+ * @return the found method or null if not found
+ */
+ private static boolean findAndInvokeNearestMethod(Class<?> targetClass,
Predicate<Class<?>> fn) {
Review Comment:
the method name is misleading ad it finds methods, but does not invoke them
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]