On Mon, 10 Nov 2025 17:53:50 GMT, Henry Jen <[email protected]> wrote:

>> I think this is an err.jlink.version.mismatch, of sorts, case. The user has 
>> run the jlink command with a module path containing a version of java.base 
>> that is at least one feature release old. I think a mismatch would be less 
>> confusing than an IllegalArgumentException.
>
> For target java.base not having release.txt will show mismatch against build 
> "N/A". But I am thinking I will tighten it up to avoid current release.txt is 
> have a value "N/A".
> 
> What I am talking about is should we fail gracefully on current java.base for 
> jlink not having a release.txt, which should not happen with a proper build. 
> In that sense, an IllegalArgumentException is not that bad.

Sorry for the confusion, if a java.base cannot be found with given module path, 
java.base from current jlink runtime is to be used. That has been checked in 
initJlinkConfig() before calling checkBaseJavaVersion. That's why 
NoSuchElementException is caught with an assert in the initial PR.

I'll rafactor the code to make that more clear.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/28155#discussion_r2511535066

Reply via email to