-
Type:
Bug
-
Resolution: Fixed
-
Priority:
P4
-
None
-
Affects Version/s: 14, 15, repo-panama
-
Component/s: tools
The static JavaNioAccess nioAccess field (introduced by JDK-8234049) in VarHandleByteArrayAs* should be final. It would probably also make sense to move it to VarHandleByteArrayBase.
This is not a problem for inlining because there's only a single implementor of that interface, but it'll result in an unnecessary field load and null check.
```
final class VarHandleByteArrayAsInts extends VarHandleByteArrayBase {
static JavaNioAccess nioAccess = SharedSecrets.getJavaNioAccess();
```
This is not a problem for inlining because there's only a single implementor of that interface, but it'll result in an unnecessary field load and null check.
```
final class VarHandleByteArrayAsInts extends VarHandleByteArrayBase {
static JavaNioAccess nioAccess = SharedSecrets.getJavaNioAccess();
```