Re: RFR 8180410: ByteArrayOutputStream should not throw IOExceptions

2018-03-22 Thread Brian Burkhalter
Hi Roger, Thanks for the comments. It seems like we have agreement on using @apiNote instead of @implSpec. Brian On Mar 22, 2018, at 8:02 AM, Roger Riggs wrote: > The use of the word 'equivalent' regardless of the context, only says the > behavior is the same > it does not mandate the implem

Re: RFR 8180410: ByteArrayOutputStream should not throw IOExceptions

2018-03-22 Thread Roger Riggs
Hi Brian, The use of the word 'equivalent' regardless of the context, only says the behavior is the same it does not mandate the implementation except that it behaves the same. Since the behavior of the method is already specified, adding the 'equivalent' statement only makes it easier for th

Re: RFR 8180410: ByteArrayOutputStream should not throw IOExceptions

2018-03-21 Thread Brian Burkhalter
On Mar 21, 2018, at 2:21 PM, Stuart Marks wrote: >>> Such a refactoring would be prohibited by an @implSpec. >> Why then not an @implNote instead of an @apiNote? > The statement that was proposed: > This method is equivalent to write(b, 0, b.length). > is a statement about the semantics of writeB

Re: RFR 8180410: ByteArrayOutputStream should not throw IOExceptions

2018-03-21 Thread Stuart Marks
On 3/21/18 1:27 PM, Brian Burkhalter wrote: On Mar 21, 2018, at 1:23 PM, Stuart Marks > wrote: Perhaps instead the verbiage just needs to be changed to, e.g., “The implementation in this class simply invokes {@link #write(byte[],int,int) write(b, 0, b.length)}.”

Re: RFR 8180410: ByteArrayOutputStream should not throw IOExceptions

2018-03-21 Thread Brian Burkhalter
On Mar 21, 2018, at 1:23 PM, Stuart Marks wrote: >> Perhaps instead the verbiage just needs to be changed to, e.g., >> >> “The implementation in this class simply invokes {@link >> #write(byte[],int,int) write(b, 0, b.length)}.” > I don't think you want to specify this detail about the impleme

Re: RFR 8180410: ByteArrayOutputStream should not throw IOExceptions

2018-03-21 Thread Stuart Marks
On 3/21/18 1:01 PM, Brian Burkhalter wrote: On Mar 21, 2018, at 12:34 PM, Stuart Marks > wrote: Having this as an @implSpec sounds as if the implementation of this method in BAOS is *required* to call write(b, 0, b.length). It happens to do that in the current w

Re: RFR 8180410: ByteArrayOutputStream should not throw IOExceptions

2018-03-21 Thread Brian Burkhalter
On Mar 21, 2018, at 12:34 PM, Stuart Marks wrote: > Having this as an @implSpec sounds as if the implementation of this method in > BAOS is *required* to call write(b, 0, b.length). It happens to do that in > the current webrev, but this is not a requirement on the implementation. (At > least

Re: RFR 8180410: ByteArrayOutputStream should not throw IOExceptions

2018-03-21 Thread Stuart Marks
On 3/21/18 11:27 AM, Brian Burkhalter wrote: --- a/src/java.base/share/classes/java/io/ByteArrayOutputStream.java +++ b/src/java.base/share/classes/java/io/ByteArrayOutputStream.java @@ -158,15 +158,16 @@ count += len; } /** * Writes the complete contents of the

Re: RFR 8180410: ByteArrayOutputStream should not throw IOExceptions

2018-03-21 Thread Brian Burkhalter
The diff: --- a/src/java.base/share/classes/java/io/ByteArrayOutputStream.java +++ b/src/java.base/share/classes/java/io/ByteArrayOutputStream.java @@ -158,15 +158,16 @@ count += len; } /** * Writes the complete contents of the specified byte array * to this {@code

Re: RFR 8180410: ByteArrayOutputStream should not throw IOExceptions

2018-03-21 Thread Brian Burkhalter
Hi Roger, I’ll change before pushing. Thanks, Brian On Mar 21, 2018, at 9:58 AM, Roger Riggs wrote: > An @impSpec for that is fine with me.

Re: RFR 8180410: ByteArrayOutputStream should not throw IOExceptions

2018-03-21 Thread Roger Riggs
Hi Brian, An @impSpec for that is fine with me. Roger On 3/21/2018 12:48 PM, Brian Burkhalter wrote: On Mar 16, 2018, at 8:04 AM, Brian Burkhalter mailto:brian.burkhal...@oracle.com>> wrote: On Mar 16, 2018, at 7:59 AM, Roger Riggs > wrote: ByteArrayOutpu

Re: RFR 8180410: ByteArrayOutputStream should not throw IOExceptions

2018-03-21 Thread Brian Burkhalter
On Mar 16, 2018, at 8:04 AM, Brian Burkhalter wrote: > On Mar 16, 2018, at 7:59 AM, Roger Riggs wrote: > >> ByteArrayOutputStream: 166: Add spaces after "," in the code. > > Done: webrev.01 updated in place. > >> Write: >> Thanks for converting to TestNG. >> There are probably some more

Re: RFR 8180410: ByteArrayOutputStream should not throw IOExceptions

2018-03-16 Thread Brian Burkhalter
Hi ROger, On Mar 16, 2018, at 7:59 AM, Roger Riggs wrote: > ByteArrayOutputStream: 166: Add spaces after "," in the code. Done: webrev.01 updated in place. > Write: > Thanks for converting to TestNG. > There are probably some more testng'ish ways of coding the test but its fine > as is. >

Re: RFR 8180410: ByteArrayOutputStream should not throw IOExceptions

2018-03-16 Thread Roger Riggs
Hi Brian, ByteArrayOutputStream: 166:  Add spaces after "," in the code. Write:  Thanks for converting to TestNG.  There are probably some more testng'ish ways of coding the test but its fine as is. All set as far as I'm concerned. Thanks, Roger On 3/15/18 5:52 PM, Brian Burkhalter wrote: O

Re: RFR 8180410: ByteArrayOutputStream should not throw IOExceptions

2018-03-15 Thread Brian Burkhalter
On Mar 15, 2018, at 8:56 AM, Brian Burkhalter wrote: > On Mar 15, 2018, at 7:33 AM, Roger Riggs wrote: > >> BAOS.java: >> >> line 163: ok but I don't think I would keep using the expanded 'byte array >> output stream" phrase >> instead of the proper noun: ByteArrayOutputStream. (except for c

Re: RFR 8180410: ByteArrayOutputStream should not throw IOExceptions

2018-03-15 Thread Brian Burkhalter
Hi Roger, On Mar 15, 2018, at 7:33 AM, Roger Riggs wrote: > BAOS.java: > > line 163: ok but I don't think I would keep using the expanded 'byte array > output stream" phrase > instead of the proper noun: ByteArrayOutputStream. (except for consistency) I don’t like it either: I was just mainta

Re: RFR 8180410: ByteArrayOutputStream should not throw IOExceptions

2018-03-15 Thread Roger Riggs
Hi Brian, BAOS.java: line 163: ok but I don't think I would keep using the expanded 'byte array output stream" phrase instead of the proper noun: ByteArrayOutputStream. (except for consistency) In the Write.java test: line 60:  Probably "-" in the message should be "--" for consistency line

RFR 8180410: ByteArrayOutputStream should not throw IOExceptions

2018-03-14 Thread Brian Burkhalter
https://bugs.openjdk.java.net/browse/JDK-8180410 http://cr.openjdk.java.net/~bpb/8180410/webrev.00/ This proposed patch would make the following changes: 1. Add a new method writeBytes(byte[]) which writes all supplied bytes but does not throw IOE. 2. Document some previously undocumented except