On Tue, 12 Nov 2024 21:45:41 GMT, Brian Burkhalter <b...@openjdk.org> wrote:
> Uses of `InternalLock` are removed and `synchronized` is reinstated. src/java.base/share/classes/java/io/BufferedInputStream.java line 241: > 239: } > 240: initialSize = size; > 241: buf = new byte[size]; This should probably still retain the lazy buffer array creation: Suggestion: size; if (getClass() == BufferedInputStream.class) { // lazily create buffer when not subclassed buf = EMPTY; } else { // eagerly create buffer when subclassed buf = new byte[size]; } ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/22048#discussion_r1839298849