On Tue, 6 Sep 2022 17:11:39 GMT, Daniel Fuchs <dfu...@openjdk.org> wrote:
>> Thank you all for your kind help and feedback. >> >> @AlanBateman So is now the time to switch this PR from Draft to Ready? > > The source changes LGTM. I suppose you should now revert the changes above > (in `HexPrinter.java`), otherwise the bytes will now be counted twice :-). > Which BTW shows that you would be depending on undocumented behavior whatever > you do: > `transferTo` is not documented to call `this.read(...)`, but neither is it > documented to **not call** `this.read(...)`... Hyrum's law wins here ;-) https://github.com/openjdk/jdk/pull/6935/commits/b4d5004dd3299d084769309b505b19ed7dd3182e reverts the change, as it is not needed (and wrong) with the check in place. I wonder if in future people will actually understand what actually is going on under the hood here. ------------- PR: https://git.openjdk.org/jdk/pull/6935