Commit 094c77be authored by Przemyslaw Szczepaniak's avatar Przemyslaw Szczepaniak
Browse files

Fix ByteBuffer.put(ByteBuffer) edge case.

Replaced use of ByteBuffer.array() in ByteBuffer.put(ByteBuffer)
with a raw "hb" field access. This prevents .array() throwing a
ReadOnlyBufferException in case the buffer is a MappedByteBuffer
(only type of ByteBuffer without a backing array) and the put
argument is a non-empty, read-only HeapByteBuffer.

Test: CtsLibcoreTestCases
Bug: 34045479

_______________________________

Change-Id: I59dcfab85c4ee6bc02f1f5dad4ad2f8de43dd991
parent d2e8a8a4
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment