Skip to content

Commit e716f5e

Browse files
author
Andrey Turbanov
committed
8336755: Remove unused UNALIGNED field from view buffers
Reviewed-by: alanb, liach, bpb
1 parent 5a8861a commit e716f5e

File tree

1 file changed

+2
-8
lines changed

1 file changed

+2
-8
lines changed

src/java.base/share/classes/java/nio/Direct-X-Buffer.java.template

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -56,14 +56,6 @@ class Direct$Type$Buffer$RW$$BO$
5656
{
5757

5858
#if[rw]
59-
60-
// Cached unaligned-access capability
61-
protected static final boolean UNALIGNED = Bits.unaligned();
62-
63-
// Base address, used in all indexing calculations
64-
// NOTE: moved up to Buffer.java for speed in JNI GetDirectBufferAddress
65-
// protected long address;
66-
6759
// An object attached to this buffer. If this buffer is a view of another
6860
// buffer then we use this field to keep a reference to that buffer to
6961
// ensure that its memory isn't freed before we are done with it.
@@ -74,6 +66,8 @@ class Direct$Type$Buffer$RW$$BO$
7466
}
7567

7668
#if[byte]
69+
// Cached unaligned-access capability
70+
static final boolean UNALIGNED = Bits.unaligned();
7771

7872
private record Deallocator(long address, long size, int capacity) implements Runnable {
7973
private Deallocator {

0 commit comments

Comments
 (0)