FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

ByteArrayProxy should be final · lmdbjava/lmdbjava@530296e · GitHub

Commit 530296e

Browse files
committed
ByteArrayProxy should be final
1 parent 0d70e33 commit 530296e

1 file changed

Lines changed: 9 additions & 9 deletions

File tree

‎src/main/java/org/lmdbjava/ByteArrayProxy.java‎

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
*
3232
* {@link Env#create(org.lmdbjava.BufferProxy)}.
3333
*/
34-
public class ByteArrayProxy extends BufferProxy<byte[]> {
34+
public final class ByteArrayProxy extends BufferProxy<byte[]> {
3535

3636
/**
3737
* The byte array proxy. Guaranteed to never be null.
@@ -69,42 +69,42 @@ public static int compareArrays(final byte[] o1, final byte[] o2) {
6969
}
7070

7171
@Override
72-
protected final byte[] allocate() {
72+
protected byte[] allocate() {
7373
return new byte[0];
7474
}
7575

7676
@Override
77-
protected final int compare(final byte[] o1, final byte[] o2) {
77+
protected int compare(final byte[] o1, final byte[] o2) {
7878
return compareArrays(o1, o2);
7979
}
8080

8181
@Override
82-
protected final void deallocate(final byte[] buff) {
82+
protected void deallocate(final byte[] buff) {
8383
// byte arrays cannot be allocated
8484
}
8585

8686
@Override
87-
protected final byte[] getBytes(final byte[] buffer) {
87+
protected byte[] getBytes(final byte[] buffer) {
8888
return Arrays.copyOf(buffer, buffer.length);
8989
}
9090

9191
@Override
92-
protected final void in(final byte[] buffer, final Pointer ptr,
93-
final long ptrAddr) {
92+
protected void in(final byte[] buffer, final Pointer ptr,
93+
final long ptrAddr) {
9494
final Pointer pointer = MEM_MGR.allocateDirect(buffer.length);
9595
pointer.put(0, buffer, 0, buffer.length);
9696
ptr.putLong(STRUCT_FIELD_OFFSET_SIZE, buffer.length);
9797
ptr.putAddress(STRUCT_FIELD_OFFSET_DATA, pointer.address());
9898
}
9999

100100
@Override
101-
protected final void in(final byte[] buffer, final int size, final Pointer ptr,
101+
protected void in(final byte[] buffer, final int size, final Pointer ptr,
102102
final long ptrAddr) {
103103
// cannot reserve for byte arrays
104104
}
105105

106106
@Override
107-
protected final byte[] out(final byte[] buffer, final Pointer ptr,
107+
protected byte[] out(final byte[] buffer, final Pointer ptr,
108108
final long ptrAddr) {
109109
final long addr = ptr.getAddress(STRUCT_FIELD_OFFSET_DATA);
110110
final int size = (int) ptr.getLong(STRUCT_FIELD_OFFSET_SIZE);

0 commit comments

Comments
 (0)

Back | FazBrowse Home | New Git URL