6516099: InputStream.skipFully(int k) to skip exactly k bytes

Brian Burkhalter brian.burkhalter at oracle.com
Fri Nov 9 22:04:44 UTC 2018


Hi Roger,

> On Nov 9, 2018, at 11:48 AM, Roger Riggs <Roger.Riggs at oracle.com> wrote:
> 
> Thanks for taking the suggestions.

Suggestions always welcome!

> I think some of the statements should be normative for all implementations and
> we're trying too hard to work with a possibly broken skip() implementation.
> 
> I would recommend that if skip does not do what is expected, then
> an IOException is immediately thrown.  There's no need for a second attempt.
> That will encourage correction of badly written skip() or overrides of skipNbytes().
> 
> Attached is a patch on top of your webrev with my attempt at
> separating normative text and reducing the complexity in the @implSpec.

I like the verbiage the way you modified it. An updated patch is at

http://cr.openjdk.java.net/~bpb/6516099/webrev.06/ <http://cr.openjdk.java.net/~bpb/6516099/webrev.06/>

including a revision of the implementation to align with the words. The tests are not updated yet.

Thanks,

Brian


More information about the core-libs-dev mailing list