uschindler commented on a change in pull request #1624:
URL: https://github.com/apache/lucene-solr/pull/1624#discussion_r446632680
##########
File path: solr/core/src/java/org/apache/solr/api/AnnotatedApi.java
##########
@@ -225,7 +228,11 @@ public void call(SolrQueryRequest req, SolrQueryResponse
rsp) {
if (Modifier.isPublic(method.getModifiers())) {
this.command = command;
this.obj = obj;
- this.method = method;
+ try {
+ this.method = MethodHandles.publicLookup().unreflect(method);
+ } catch (IllegalAccessException e) {
+ throw new RuntimeException("Unable to unlookup method");
Review comment:
The exception text should not mention internal details. It should just
say that the method cannot be called, as it's not accessible (non public, class
not visible, different classloader,...)
----------------------------------------------------------------
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]