On Thu, 9 Jan 2025 18:25:16 GMT, Severin Gehwolf <sgehw...@openjdk.org> wrote:

>> During code review of 
>> [JDK-8346239](https://bugs.openjdk.org/browse/JDK-8346239) a few comments 
>> were made after the PR integrated. This follow-up patch cleans this up and 
>> adds a unit test for the `JimageDiffGenerator` class.
>> 
>> Testing:
>> - [ ] GHA
>> - [x] tools/jlink tests (including the new one).
>> 
>> Thoughts?
>
> Severin Gehwolf has updated the pull request incrementally with one 
> additional commit since the last revision:
> 
>   Review feedback

(Getting into marginal returns on comments here, so my apologies for nitpicking)

The loop could be simplified even further...

while (true) {
    int bytesRead1 = is1.readNBytes(buf1, 0, buf1.length);
    int bytesRead2 = is2.readNBytes(buf2, 0, buf2.length);
    if (!Arrays.equals(buf1, 0, bytesRead1, buf2, 0, bytesRead2))
        return false; 
    if (bytesRead1 == 0)
        return true;
}

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

PR Comment: https://git.openjdk.org/jdk/pull/23014#issuecomment-2581110477

Reply via email to