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
Loading
Please sign in to comment