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:
us...@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscr...@lucene.apache.org
For additional commands, e-mail: issues-h...@lucene.apache.org

Reply via email to