RFR: 8279283 - BufferedInputStream should override transferTo [v10]

Markus KARG duke at openjdk.org
Fri Sep 9 10:06:56 UTC 2022


On Fri, 9 Sep 2022 08:49:07 GMT, Daniel Fuchs <dfuchs at openjdk.org> wrote:

>> I did not do that so far, as we agreed to check the *new* code path, which is only executed when noting was marked (so reset plays no role). Certainly I will be happy to add another test for the use case you describe (i. e. the *old* code path), even if we all know -thanks to our knowledge of the existence of the two code paths-, that it will surely pass even with my PR in place, unless there is a bug in the *old* code path... ;-)
>
> Unless there's a bug and the new code path is triggered when there's a mark ;-) . Maybe we can convince ourselves that this can't happen now (by reading the code), but if someone modifies this code 2 years from now and introduces a bug that changes that it would be good to have a test to catch it.

It depends on the target of a test, but I am fine with adding such a test, as I alrready wrote.

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

PR: https://git.openjdk.org/jdk/pull/6935


More information about the core-libs-dev mailing list