uschindler commented on PR #12308: URL: https://github.com/apache/lucene/pull/12308#issuecomment-1553429260
Thanks for the feedback. In the meantime I have tried out some code to "optimize" the case of Lucene's own classes. If the classname starts with "org.apache.lucene.", it will assume that the deprecated method is never overridden. Unfortunately, I found 2 tests (in TestKnnFloatQueryVector) using the deprecated method in 9.x, but nothing overriding it. The whole patch is a bit hacky, but works and spares the refection for Lucene's own classes. I committed the change, if we should not add the complexity I can revert it. Pros: - no reflection needed for Lucene's own classes - if you do not subclass Lucene classes, theres no need to add runtime permission Cons: - We have to be careful that Lucene's own classes never ever override deprecated rewrite(), as it is asumed they don't do it - If somebody subclasses a lucene class in Lucene's namespace it won't be detected Info: - If somebody shaded Lucene the optimization may not work, so its not needed. What do you think? Revert or not? -- 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: issues-unsubscr...@lucene.apache.org 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