Change exception priority for ByteBuffer.put(null)

Commit 7e02765b7ada4e85f941f0a6b0fc60a8a76301f3
made ByteBuffer.put(null) throw a NullPointerException
if the ByteBuffer was read only. Previously it would
throw a ReadOnlyBufferException. The priority
of exceptions is unclear, but this returns the behavior
to what it was before and fixes 3 CTS tests:

ReadOnlyWrappedByteBufferTest.testPutByteBuffer
ReadOnlyHeapByteBufferTest.testPutByteBuffer
ReadOnlyDirectByteBufferTest.testPutByteBuffer

Change-Id: I90dd4b6969a4f31a26651d7b35758f899cc020b4
1 file changed