uschindler edited a comment on pull request #567: URL: https://github.com/apache/lucene/pull/567#issuecomment-1000288771
> Also, are we sure this stuff isn't bugs in the JDK? Seems like a design flaw in modules. I was in the discussion before Java 9 came out. It was a mess and I argued several times, because you were not even able to load class files anymore as resources (now they have an exception for that specific use case in ClassLoader). `Class#getResourceAsStream()` (and getResource, too) was changed several times to work around some problems with legacy apps. At the end we came out with this and it is clearly documented in the JLS and the API and you won't change it anymore: - a Class instance located in unnamed modules (classpath) can be used to load any resource (it's the backwards compatibility layer) - a Class instance for a class located in a named module can only load resoures that the caller of getResourceAsStream can see (exported packages). This won't be problematic for analyzers module unless we use static utility methods. In the analyzers module it is not a problem anymore, only a few issues are there. -- 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