RFR: 8300236: Use VarHandle access in Data(Input | Output)Stream classes

Per Minborg pminborg at openjdk.org
Mon Jan 23 07:59:05 UTC 2023


On Fri, 20 Jan 2023 16:36:23 GMT, Roger Riggs <rriggs at 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`
>
> src/java.base/share/classes/jdk/internal/util/access/ByteArrayAccess.java line 26:
> 
>> 24:  */
>> 25: 
>> 26: package jdk.internal.util.access;
> 
> This is pretty deep; I'd drop the final "access". The package name `jdk.internal.util` is fine.

Happy to rename to `ByteArray` if we keep the package. The reason for proposing a separate package is that if we later decide to export the class, we are able to `export to` only this package and not all the other classes in `jdk.internal.util'. This could reduce coupling.

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

PR: https://git.openjdk.org/jdk/pull/12076


More information about the core-libs-dev mailing list