5029431: (bf) Add absolute bulk put and get methods

Roger Riggs Roger.Riggs at oracle.com
Mon Feb 11 18:52:52 UTC 2019

Hi Alan,

There are not formatters or providers involved, it is just a method
to create the exception;  so that a  disambiguating message text can be 


On 02/11/2019 01:11 PM, Alan Bateman wrote:
> On 11/02/2019 18:05, Roger Riggs wrote:
>>>> On Feb 11, 2019, at 7:12 AM, Roger Riggs <Roger.Riggs at oracle.com 
>>>> <mailto:Roger.Riggs at oracle.com>> wrote:
>>>> With two buffer/arrays and each with offset and length, I think the 
>>>> exceptions
>>>> should identify which set of parameters is out of range.
>>>> Using Preconditions.checkFromIndexSize directly would allow 
>>>> providing a formatter
>>>> that could identify the source or dest.
>>> As buffers are used during startup would this cause problems?
>> Not a problem, that is the same method invoked from 
>> Objects.checkFromToIndex
>> but has an argument to generate the exception.
>> (Which can be a instance of a static class if lambda is ruled out due 
>> to startup sequence).
> I don't think we want any formatters or anything that uses the service 
> provider mechanism here. In any case, the check is for later, I think 
> we first need to establish what the right exceptions are when there is 
> buffer overflow/underflow.
> -Alan

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.openjdk.java.net/pipermail/nio-dev/attachments/20190211/c248e2b6/attachment.html>

More information about the nio-dev mailing list