On Mon, 23 Jan 2023 12:38:24 GMT, Per Minborg <pminb...@openjdk.org> wrote:
>> This PR proposes using a performance optimization using a new supported API >> for operations similar to those found in `java.io.Bits` > > Per Minborg has updated the pull request incrementally with one additional > commit since the last revision: > > Remove methods with implicit zero offset src/java.base/share/classes/java/io/DataInputStream.java line 59: > 57: } > 58: > 59: private final byte[] readBuffer = new byte[8]; No objection to the readBuffer but it does make it wonder if we should re-visit bytearr and chararr as they are only need for reading modified UTF-8 strings and shouldn't need to be eagerly created. src/java.base/share/classes/jdk/internal/util/ByteArray.java line 37: > 35: * <p> > 36: * All methods in this class will throw an {@linkplain > NullPointerException} if {@code null} is > 37: * passed in as a method parameter for a byte array. The NPE is described in both the class description and some of the methods, it doesn't need to be both. ------------- PR: https://git.openjdk.org/jdk/pull/12076