RFR: 8347831: Re-examine version check when cross linking [v8]

Henry Jen henryjen at openjdk.org
Thu Nov 20 19:07:38 UTC 2025


On Wed, 19 Nov 2025 12:47:14 GMT, Severin Gehwolf <sgehwolf at openjdk.org> wrote:

>> Henry Jen has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   adapt review feedbacks
>
> src/jdk.jlink/share/classes/jdk/tools/jlink/internal/JlinkTask.java line 259:
> 
>> 257: 
>> 258:             try (var r = new BufferedReader(new InputStreamReader(release.get()))) {
>> 259:                 return Optional.of(r.readLine());
> 
> As suggested on the CSR we should read the entire file, not just the first line and treat the entire content as a string in a specific encoding. While I wasn't able to get the JDK build a vendor name with new lines (due to jrt-fs.jar putting `COMPANYNAME` in the MANIFEST.MF) it's conceivable that some `release.txt` file might have more than one line.
> 
> Alternatively we need to specify that the file must not contain line breaks or unusual encodings.

The proposal is to have a one line release signature set up by the build, briefly discussed the possibility to use a java properties file format as the current release file distributed with JDK, but then a simplified approach of one signature is preferred.

I'll update the PR once we come to conclusion with the CSR.

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

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


More information about the build-dev mailing list