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

Brian Burkhalter brian.burkhalter at oracle.com
Thu Apr 23 18:04:27 UTC 2015


Alexey,

These changes were suggested by others based on various data points in their experience so I will leave it to them to respond to the specifics of your comment. I would say however that it seems to me to be less of a question of style than what works from a performance perspective. The latter consideration dictates the admittedly ugly style.

Brian

On Apr 23, 2015, at 10:31 AM, Alexey Utkin <alexey.utkin at gmail.com> wrote:

> IMHO
> 
> http://cr.openjdk.java.net/~bpb/8065556/webrev.04/src/java.base/share/classes/java/nio/Buffer.java.frames.html
> {code}
> 272         if (newPosition > limit | newPosition < 0)
> 273             throw createPositionOutOfBoundsException(newPosition);
> =================================================================
> 326         if (newLimit > capacity | newLimit < 0)
> 327             throw createLimitOutOfBoundsException(newLimit);
> {code}
> 
> is not good code style.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.openjdk.java.net/pipermail/nio-dev/attachments/20150423/98bf46de/attachment-0001.html>


More information about the nio-dev mailing list