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

Vitaly Davidovich vitalyd at gmail.com
Tue Apr 21 18:20:21 UTC 2015


>
> 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.


Martin mentioned this bug earlier in this thread:
https://bugs.openjdk.java.net/browse/JDK-6533165

On Tue, Apr 21, 2015 at 12:10 PM, Alan Bateman <Alan.Bateman at oracle.com>
wrote:

> 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.
>
>
>
>
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.openjdk.java.net/pipermail/nio-dev/attachments/20150421/4b1e91fc/attachment-0001.html>


More information about the nio-dev mailing list