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

Uwe Schindler commented on LUCENE-10339:
----------------------------------------

I can explain this:

You can reflectively access any class if the module is already on the module 
graph and exports that class (e.g. by a dependency inside jdk). It looks like 
the hotspot VM loads the module by default (which is undocumented). The 
jdk.unsupported module is never ever used by jdk internal code (it's just there 
for compatibility, jdk uses its own jdk.internal.Unsafe class encapsulated). So 
unless you add the module manually to the graph you won't see it.

Nevertheless we should keep the optional dependency as in your patch, because 
it makes explicit that we use it.

> Add require derective for jdk.management to core's module descriptor.
> ---------------------------------------------------------------------
>
>                 Key: LUCENE-10339
>                 URL: https://issues.apache.org/jira/browse/LUCENE-10339
>             Project: Lucene - Core
>          Issue Type: Sub-task
>            Reporter: Tomoko Uchida
>            Priority: Major
>         Attachments: Screenshot from 2021-12-25 18-04-55.png, Screenshot from 
> 2021-12-25 20-11-38.png
>
>          Time Spent: 10m
>  Remaining Estimate: 0h
>
> IntelliJ IDEA warns as follows in o.a.l.u.RamUsageEstimator.
>  !Screenshot from 2021-12-25 18-04-55.png! 
>  !Screenshot from 2021-12-25 20-11-38.png! 
> This means we would need "require" or "require static" directive(s) in core's 
> module descriptor to make RamUsageEstimator correctly work.



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