Hi folks,

Here's a patch for bug 7190219, could you please help to have a look?
http://cr.openjdk.java.net/~luchsh/7190219/

According to the specification, in the method java.nio.CharBuffer.put(String src, int start, int end). If there are more chars to be copied from the string than remain in this buffer, that is, if end - start > remaining(), then no chars are transferred and a|BufferOverflowException||| <cid:part1.03040006.09080809@linux.vnet.ibm.com> is thrown.

But actually the test case from that webrev proves that the buffer was modified even after BufferOverflowException, so I suggest to add additional check after checkBounds() call, in the same way as java.nio.CharBuffer.put(char[] src, int offset, int length).

Thanks
Jonathan

Reply via email to