[ 
https://issues.apache.org/jira/browse/LUCENE-10335?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17464050#comment-17464050
 ] 

Uwe Schindler commented on LUCENE-10335:
----------------------------------------

Yes I figured, it is caller sensitive: 
https://github.com/openjdk/jdk/blob/master/src/java.base/share/classes/java/lang/Class.java#L2858

So the problem is that the core module where IOUtils resides can't access the 
expression module.

So we should check this, we have other places like this, not only this utility 
method. Every utility method that takes takes a class and calls caller 
sensitive stuff may break.

> IOUtils.getDecodingReader(Class<?>, String) is broken with modules
> ------------------------------------------------------------------
>
>                 Key: LUCENE-10335
>                 URL: https://issues.apache.org/jira/browse/LUCENE-10335
>             Project: Lucene - Core
>          Issue Type: Bug
>            Reporter: Dawid Weiss
>            Priority: Major
>
> This method calls clazz.getResourceAsStream() but in a modular application 
> the method won't see any of the resources in clazz's module, causing an NPE. 
> We should deprecate or even remove this method entirely, leaving only 
> getDecodingReader(InputStream) and opening the resource on the caller's side.



--
This message was sent by Atlassian Jira
(v8.20.1#820001)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to