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

Roger Riggs Roger.Riggs at oracle.com
Mon Feb 11 15:12:33 UTC 2019


Hi Brian,

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.

In the examples, use the full parameter names instead of abbreviations.

780, 1008: "off" -> "offset" since offset is used in the prose

826, 1057, add a colon ":" after "invocation"

$.02, Roger

On 02/08/2019 06:08 PM, Brian Burkhalter wrote:
> Continuing the thread [1] from October, 2018 regarding [2].
>
> The webrev [3] includes mainly the template files, not source nor test files generated therefrom. The following methods are added to the $Type$Buffer classes where $Type$ is in {Byte, Char, Double, Float, Int, Long, Short} and, respectively, $type$ is in {byte, char, double, float, int, long, short}:
>
> public $Type$Buffer get(int index, $type$[] dst, int offset, int length) {}
> public $Type$Buffer get(int index, $type$[] dst) {}
> public $Type$Buffer put(int index, $type$[] src, int offset, int length) {}
> public $Type$Buffer put(int index, $type$[] src) {}
> public $Type$Buffer put(int index, $Type$Buffer src, int offset, int length) {}
>
> In addition to the changes implied by the foregoing, there is a javadoc fix at line 843 / 927, and “@throws NullPointerException” is removed at line 437 as it is redundant with the package documentation.
>
> (I know there are some commented out print statements; they’ll be excised later.)
>
> Thanks,
>
> Brian
>
> [1] http://mail.openjdk.java.net/pipermail/nio-dev/2018-October/005517.html
> [2] https://bugs.openjdk.java.net/browse/JDK-5029431
> [3] http://cr.openjdk.java.net/~bpb/5029431/webrev.00



More information about the nio-dev mailing list