On Sat, 30 Aug 2025 14:23:33 GMT, Chen Liang <li...@openjdk.org> wrote:

>> src/java.base/share/classes/jdk/internal/jrtfs/SystemImage.java line 81:
>> 
>>> 79:     }
>>> 80: 
>>> 81:     private static final String RUNTIME_HOME;
>> 
>> Hiding these prevents unwanted use by other classes (which would make them 
>> effectively untestable).
>
> You can still use Method handles and `@modules 
> java.base/jdk.internal.jrtfs:+open` in JTReg to test these.

Sure, but anyone who accesses these via method handles deserves all they get 
(imo).
If these do need to be tested, they can be opened up again. Making them private 
is taking the temptation to just use them casually away from whoever edits 
these files next.

-------------

PR Review Comment: https://git.openjdk.org/jdk/pull/26757#discussion_r2319737044

Reply via email to