5029431: (bf) Add absolute bulk put and get methods
brian.burkhalter at oracle.com
Mon Feb 11 18:13:27 UTC 2019
> On Feb 11, 2019, at 10:11 AM, Alan Bateman <Alan.Bateman at oracle.com> 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.
Agreed. I was just writing the same. If the exceptions were different it would disambiguate the circumstance to a certain degree.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the nio-dev