uschindler commented on a change in pull request #1624:
URL: https://github.com/apache/lucene-solr/pull/1624#discussion_r446632932
##########
File path: solr/core/src/java/org/apache/solr/api/AnnotatedApi.java
##########
@@ -113,7 +116,7 @@ public EndPoint getEndPoint() {
return Collections.singletonList(new AnnotatedApi(specProvider,
endPoint, commands, null));
} else {
List<Api> apis = new ArrayList<>();
- for (Method m : klas.getDeclaredMethods()) {
+ for (Method m : klas.getMethods()) {
EndPoint endPoint = m.getAnnotation(EndPoint.class);
if (endPoint == null) continue;
if (!Modifier.isPublic(m.getModifiers())) {
Review comment:
The if statement is not needed, because the public checks are done by
unreflect().
This code is from reflection times to catch error early. By using method
handles everything is checked and linked early, so you can't get any surprises
later. So the public checks is complete obsolete, all this is handled by
unreflect.
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]