Skip to content

Commit 50438b5

Browse files
committed
Remove unnecessary buffer duplicate
1 parent 7573aba commit 50438b5

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/main/java/com/maxmind/db/MultiBuffer.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,7 @@ public Buffer get(byte[] dst) {
133133
while (length > 0) {
134134
int bufIndex = (int) (pos / CHUNK_SIZE);
135135
int bufOffset = (int) (pos % CHUNK_SIZE);
136-
ByteBuffer buf = buffers[bufIndex].duplicate();
136+
ByteBuffer buf = buffers[bufIndex];
137137
buf.position(bufOffset);
138138
int toRead = Math.min(buf.remaining(), length);
139139
buf.get(dst, offset, toRead);

0 commit comments

Comments
 (0)