RFR: 8156593: DataOutput.write(byte[],int,int) and its implementations do not specify index out bounds
Andrey Turbanov
aturbanov at openjdk.org
Fri Oct 28 06:13:26 UTC 2022
On Thu, 27 Oct 2022 20:35:26 GMT, Brian Burkhalter <bpb at openjdk.org> wrote:
> Add `@throws IndexOutOfBoundsException {@inheritDoc}` to some `write(byte[],int,int)` and `read(byte[],int,int)` methods of some classes in the `java.io` package to make things a bit clearer.
src/java.base/share/classes/java/io/FileOutputStream.java line 346:
> 344: * @param b {@inheritDoc}
> 345: * @throws IOException {@inheritDoc}
> 346: * @throws IndexOutOfBoundsException {@inheritDoc}
When this IOOB can happen in `void write(byte[] b)` ?
-------------
PR: https://git.openjdk.org/jdk/pull/10890
More information about the core-libs-dev
mailing list