RFR: 8300979: Lazily initialize (byte, char)arr in java.io.DataInputStream
Brian Burkhalter
bpb at openjdk.org
Tue Mar 21 16:20:28 UTC 2023
On Tue, 21 Mar 2023 15:41:13 GMT, Per Minborg <pminborg at openjdk.org> wrote:
> This PR proposed to lazily initialize the scratch arrays only if/when needed.
src/java.base/share/classes/java/io/DataInputStream.java line 64:
> 62: * working arrays initialized on demand by readUTF
> 63: */
> 64: private byte[] bytearr;
Could the `bytearr` and `chararr` instance variables be removed altogether?
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/13121#discussion_r1143664354
More information about the core-libs-dev
mailing list