uschindler commented on pull request #567: URL: https://github.com/apache/lucene/pull/567#issuecomment-1003358980
Hi @mocobeta, I cherrypicked your commit and modified it a bit: To still support full names, it just prefixes all paths with "/". After doing this I was able to revert the test changes which shows that its 100% backwards compatible. In general a simple hotfix rule for `Class#getClassLoader().getResource(xxx)` is: Replace by `Class#getResource("/".concat(xxx))` The main difference between ClassLoader and Class ist: For Class you can load non-open module-local resources, while ClassLoader *ALWAYS* needs open packages, also for callers from own module. The reason for that is simple: A ClassLoader can be shared between different modules, so the getResource() methods there have no idea from which module you want to get resources, so they block everything which is not open. So we should really forbid usage of `ClassLoader#getResource...()` (separate issue). -- 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