[9] RFR of 8065556: (bf) Buffer.position and other methods should include detail in IAE

Alan Bateman Alan.Bateman at oracle.com
Tue Apr 21 16:10:43 UTC 2015


On 21/04/2015 01:33, Brian Burkhalter wrote:
> Reprising this thread:
>
> http://mail.openjdk.java.net/pipermail/nio-dev/2015-March/003074.html
>
> I have an updated patch for review when convenient:
>
> http://cr.openjdk.java.net/~bpb/8065556/webrev.03/
>
> I hope that it adequately addresses the points that were raised in the discussion. I am not sure about Buffer.srcEqualsThisBufferException() …
Would it be cleaner to rename of these to something like failXXXX 
(failNegativeCapacity or failPositionOutOfBounds for example) that 
throws the exception rather than returns it. That would reduce the 
method names a bit too.

What is the issue with srcEqualsThisBufferException? That scenario is 
specified to throw IAE.

Extending the test coverage for this case is good. If you can then keep 
the line length consistent with the rest of the test.

-Alan.








More information about the nio-dev mailing list