On Thu, 20 Nov 2025 19:01:53 GMT, Henry Jen <[email protected]> wrote:
>> 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.
It might be useful to see what breaks if a JDK were built with a newline in the
vendor name, I assume other things will break.
Overall I think the changes are looking good, the main thing is that the error
message is clear.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/28155#discussion_r2550103816