On Mon, 11 Apr 2022 17:27:11 GMT, Daniel Fuchs <dfu...@openjdk.org> wrote:

> Not sure if that even matters - but there will be a slight change of 
> behaviour here if `InternalLock.CAN_USE_INTERNAL_LOCK` is ever `false`. 
> Instead of synchronizing on `in`, the `BufferedReader` will synchronize on 
> `this`.

Good!  We can change this so that depends on whether BufferedReader is extended 
and whether the given Reader is trusted. It's not clear if anyone could 
reliably depend on undocumented behavior like this but we have to be cautious 
at the same time.

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

PR: https://git.openjdk.java.net/jdk/pull/8166

Reply via email to