RFR: 8245036: DataInputStream.readFully(byte[], int, int) does not throw expected IndexOutOfBoundsExceptions
Brian Burkhalter
brian.burkhalter at oracle.com
Thu Aug 6 18:51:24 UTC 2020
Hi Raffaello,
This looks all right. I would be inclined to do like in [1] and throw the RuntimeException on the line after each readFully() and drop the return statements], but I’m not going to insist on it.
Thanks,
Brian
[1] http://hg.openjdk.java.net/jdk/jdk/file/db6952bf8c39/test/jdk/java/nio/file/etc/MacVolumesTest.java#l58
> On Aug 6, 2020, at 11:34 AM, Raffaello Giulietti <raffaello.giulietti at gmail.com> wrote:
>
> here's the newest patch.
>
> > Also, instead of using the boolean “caughtException,” we usually just
> > put, e.g., the throwing of the RuntimeException on the line after where
> > the IIOBE or whatever would be thrown. I don’t think the “finally” block
> > is necessary.
More information about the core-libs-dev
mailing list