Hi Andrew, Thanks for the suggestion. Will consider it for the final check-in.
Brian > On Oct 24, 2018, at 12:39 PM, Andrew Luo <[email protected]> > wrote: > > I'm not a reviewer/committer but just a suggestion: > > You can use assert to ensure "document" that skip(long) should never return > negative (and also provide useful debugging when assertions are enabled), for > example: > > 586 long ns = skip(n); > assert ns >= 0 : "skip(long) returned negative value " + ns; > 587 > 588 // If not enough skipped, read and discard bytes, failing on > EOF > 589 if (ns != n) { > 590 discardNBytes(n - ns, true); > 591 }
