Skip to content

Commit 62ffe2b

Browse files
committed
Use mutable byte buffer for read window.
1 parent 4a53e15 commit 62ffe2b

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

core/src/org/jsl/collider/DataBlock.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ public class DataBlock
3030
public DataBlock( ByteBuffer buf )
3131
{
3232
ww = buf;
33-
rw = buf.asReadOnlyBuffer();
33+
rw = buf.duplicate();
3434
}
3535

3636
public final DataBlock reset()

core/src/org/jsl/collider/RetainableDataBlock.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ protected void finalRelease()
5555
public RetainableDataBlock( ByteBuffer byteBuffer )
5656
{
5757
ww = byteBuffer;
58-
rw = new BufferImpl( byteBuffer.asReadOnlyBuffer(), this );
58+
rw = new BufferImpl( byteBuffer.duplicate(), this );
5959
}
6060

6161
public final void release()

0 commit comments

Comments
 (0)