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

Tomoko Uchida commented on LUCENE-10335:
----------------------------------------

Let me know if the patch is needed - I just found the warning but have not had 
a chance to run RamUsageEstimator on module-mode yet, and I am not quite sure 
which one is correct/sufficient here - "require" or "require static". Testing 
in module-mode needs a bit of additional setting (making separate 
project/module and main class) to me.

I happened to encounter one warning. There could be other reflective accesses 
that could be problematic on module-mode and difficult to detect by existing 
tests (on class-path mode)? I will report if I notice other ones. I have no 
sophisticated method for that, but at least "git grep" would work for me.

> 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
>         Attachments: LUCENE-10335-1.patch, LUCENE-10335.patch, Screenshot 
> from 2021-12-25 18-04-55.png
>
>          Time Spent: 10h 20m
>  Remaining Estimate: 0h
>
> 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: issues-unsubscr...@lucene.apache.org
For additional commands, e-mail: issues-h...@lucene.apache.org

Reply via email to