Re: JDK 9 RFR of JDK-8136738: InputStream documentation for IOException in skip() is unclear or incorrect

2016-06-04 Thread Colin Decker
Isn't this change actually changing the contract of skip()? It's currently legal for an implementation of skip() may throw IOException if it doesn't support skip(), and it seems likely that there are implementations out there that do this. I don't think the description of how InputStream itself hap

Re: JDK 9 RFR of JDK-8136738: InputStream documentation for IOException in skip() is unclear or incorrect

2016-06-03 Thread Pavel Rappo
Perfect! > On 3 Jun 2016, at 20:20, Roger Riggs wrote: > > +1 > > > On 6/3/2016 3:15 PM, Brian Burkhalter wrote: >> So if I make this change to the webrev >> >> --- a/src/java.base/share/classes/java/io/InputStream.java >> +++ b/src/java.base/share/classes/java/io/InputStream.java >> @@ -333,

Re: JDK 9 RFR of JDK-8136738: InputStream documentation for IOException in skip() is unclear or incorrect

2016-06-03 Thread Roger Riggs
+1 On 6/3/2016 3:15 PM, Brian Burkhalter wrote: So if I make this change to the webrev --- a/src/java.base/share/classes/java/io/InputStream.java +++ b/src/java.base/share/classes/java/io/InputStream.java @@ -333,8 +333,7 @@ * * @param n the number of bytes to be skipped.

Re: JDK 9 RFR of JDK-8136738: InputStream documentation for IOException in skip() is unclear or incorrect

2016-06-03 Thread Brian Burkhalter
So if I make this change to the webrev --- a/src/java.base/share/classes/java/io/InputStream.java +++ b/src/java.base/share/classes/java/io/InputStream.java @@ -333,8 +333,7 @@ * * @param n the number of bytes to be skipped. * @return the actual number of bytes skipped

Re: JDK 9 RFR of JDK-8136738: InputStream documentation for IOException in skip() is unclear or incorrect

2016-06-03 Thread Pavel Rappo
> On 3 Jun 2016, at 19:30, Bernd Eckenfels wrote: > > It is unclear to me if this is really forbidden in the interface or in > any implementation. With FileInputStream skip(-5) works. Don't mistake `seek` for `skip`. `skip` can be implemented using `read`, but may be using `seek`. Here's the A

Re: JDK 9 RFR of JDK-8136738: InputStream documentation for IOException in skip() is unclear or incorrect

2016-06-03 Thread Bernd Eckenfels
Hello, I think "seeking negatively" is a bad example for an IO problem. For this reason alone I would remove it. It is unclear to me if this is really forbidden in the interface or in any implementation. With FileInputStream skip(-5) works. (I would expect it to throw IllegalArgumentException or

Re: JDK 9 RFR of JDK-8136738: InputStream documentation for IOException in skip() is unclear or incorrect

2016-06-03 Thread Brian Burkhalter
Hi Pavel, On Jun 3, 2016, at 3:43 AM, Pavel Rappo wrote: > I have a minor question though: > > --- a/src/java.base/share/classes/java/io/InputStream.java > +++ b/src/java.base/share/classes/java/io/InputStream.java > > - * @exception IOException if the stream does not support seek, > -

Re: JDK 9 RFR of JDK-8136738: InputStream documentation for IOException in skip() is unclear or incorrect

2016-06-03 Thread Roger Riggs
+1 On 6/2/2016 5:48 PM, Brian Burkhalter wrote: Please review at your convenience this API doc-only change: Issue: https://bugs.openjdk.java.net/browse/JDK-8136738 Patch: http://cr.openjdk.java.net/~bpb/8136738/webrev.00/ Summary: Try to make the specification of InputStream.skip() slightl

Re: JDK 9 RFR of JDK-8136738: InputStream documentation for IOException in skip() is unclear or incorrect

2016-06-03 Thread Pavel Rappo
Hi Brian, > On 2 Jun 2016, at 22:48, Brian Burkhalter wrote: > > Please review at your convenience this API doc-only change: > > Issue:https://bugs.openjdk.java.net/browse/JDK-8136738 > Patch:http://cr.openjdk.java.net/~bpb/8136738/webrev.00/ > > Summary: > > Try to make the s

JDK 9 RFR of JDK-8136738: InputStream documentation for IOException in skip() is unclear or incorrect

2016-06-02 Thread Brian Burkhalter
Please review at your convenience this API doc-only change: Issue: https://bugs.openjdk.java.net/browse/JDK-8136738 Patch: http://cr.openjdk.java.net/~bpb/8136738/webrev.00/ Summary: Try to make the specification of InputStream.skip() slightly more precise. Thanks, Brian