On Tue, 23 Aug 2022 15:50:56 GMT, Daniel Fuchs <dfu...@openjdk.org> wrote:
> But assuming I've reverted the changes that are dubious, how could there be > bugs caused by replacement of multiple reads with a single one? I was sure > that such replacement improves thread safety as soon as we rid racy reads. The main thing is to think through the implications for async close where the close method replaces 'in'. There are a few examples in the JDK that extend FilterInputStream that do this. It was hard to reason about this scenario in the first iteration. ------------- PR: https://git.openjdk.org/jdk/pull/9956