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. Removed the test from this cherry-pick to not cause CTS issues. Test: CtsLibcoreTestCases Bug: 34045479 _______________________________ Change-Id: I59dcfab85c4ee6bc02f1f5dad4ad2f8de43dd991 (cherry picked from commit 094c77be)
Loading
Please sign in to comment