On Wed, 8 Apr 2026 10:28:28 GMT, Alan Bateman <[email protected]> wrote:
>> What about changing it to: >> >> >> // If an IOException was already thrown by in.read(), >> remaining will be 0, >> // and we should not come here as in.read() should throw >> again. We should >> // get an IOException before reading the last byte, so >> assert that >> // remaining > 0 > >> Yes - but it is OK to read one byte as long as it is not the last one, >> otherwise we would not assert that remaining > 0 and continue reading. >> Obviously if we reach here the exception has not been thrown by in.read() >> yet. Let me see if I can improve that comment... > > Maybe just leave it out, it's not needed as part of this migration. My worry > is that a complex comment is just going to confuse readers. Ok - I will remove it. I added this comments in answer to https://github.com/openjdk/jdk/pull/30564#discussion_r3036874995 . But since I also refactored and got rid of the `if () { } else { }` then maybe the comment is not needed. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/30564#discussion_r3050767355
