dweiss commented on pull request #567:
URL: https://github.com/apache/lucene/pull/567#issuecomment-1003181856


   Hi Uwe. I took a closer look at the cross-module resource accessibility. So 
in fact resources could be accessed between modules if their packages are open 
(or if the entire module is open). Here is a repro (Windows) that shows this by 
force-opening the package with an internal resource:
   
   https://github.com/dweiss/exp-module-resource-access
   
   if you run it, you'll see something like this:
   {code}
   Classpath mode:
   A.class.getResource("a.resource"): file:/C:/_tmp/repro/module_a/a/a.resource
   Module mode:
   A.class.getResource("a.resource"): null
   Module mode with forced opens:
   A.class.getResource("a.resource"): 
file:/C:/_tmp/repro/./module_a/a/a.resource
   {code}
   
   The same could be achieved by adding "opens a" or just declaring the module 
as open. While this does somewhat-work, I think changing the Lucene API is a 
better solution because it doesn't require people to open up entire packages 
(to reflection and resource-access) just so that IOUtil can open a single file. 
Yes, opens can be qualified at module-descriptor level but it introduces a 
level of sophistication I find hardly justifiable.


-- 
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

Reply via email to