[9] RFR of 8065556: (bf) Buffer.position and other methods should include detail in IAE
Brian Burkhalter
brian.burkhalter at oracle.com
Mon Mar 23 20:38:04 UTC 2015
Moving this thread to nio-dev where I should posted it in the first place.
Here’s an updated patch which I hope addresses the concerns:
http://cr.openjdk.java.net/~bpb/8065556/webrev.01/
It’s probably a bit of overkill in a couple of places.
One addition change might be to put the check at lines 203-205 of Buffer.java into a private method.
Thanks,
Brian
On Mar 20, 2015, at 10:09 PM, John Rose <john.r.rose at oracle.com> wrote:
> Yes, that's still a good idea, until we fix JDK-6316156. Thanks, Martin. — John
>
> On Mar 20, 2015, at 6:36 PM, Martin Buchholz <martinrb at google.com> wrote:
>>
>> The message construction code takes many bytecodes, and best practice a few
>> years ago was to segregate cold code like this into a separate method, and
>> that's probably still true. Follow the practice of other classes and define
>>
>> private String outOfBoundsMsg(int position)
>>
>> On Fri, Mar 20, 2015 at 3:52 PM, Brian Burkhalter <
>> brian.burkhalter at oracle.com> wrote:
>>
>>> Please review at your convenience.
>>>
>>> Issue: https://bugs.openjdk.java.net/browse/JDK-8065556
>>> Patch: http://cr.openjdk.java.net/~bpb/8065556/webrev.00/
>>>
>>> My doubts concern the changes to the test portion, viz.:
>>>
>>> 1) Is the style sufficiently consistent?
>>> 2) I have not added a “@bug” tag like we normally would because all the
>>> affected test files are generated from a template which contains no such
>>> tag. (Should one perhaps be added to Basic.java with no other changes to
>>> that file?).
>>>
>>> Thanks,
>>>
>>> Brian
>
More information about the core-libs-dev
mailing list