On Wed, 24 Jun 2026 08:11:07 GMT, Andrey Turbanov <[email protected]> wrote:

>> Move the functionality for converting a plain-text license file to an RTF 
>> file into a separate class.
>> 
>> - [x] I confirm that I make this contribution in accordance with the 
>> [OpenJDK Interim AI Policy](https://openjdk.org/legal/ai).
>
> src/jdk.jpackage/windows/classes/jdk/jpackage/internal/RtfConverter.java line 
> 51:
> 
>> 49:             byte[] firstBits = new byte[7];
>> 50: 
>> 51:             if (fin.read(firstBits) == firstBits.length) {
> 
> Shouldn't we use `fin.readNBytes` here?
> or `Files.newInputStream` always read at least 7 bytes?

`fin.read(firstBits)` reads at most 7 bytes.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/30904#discussion_r3467928475

Reply via email to