RFR 8180410: ByteArrayOutputStream should not throw IOExceptions

Brian Burkhalter brian.burkhalter at oracle.com
Wed Mar 21 20:01:12 UTC 2018


On Mar 21, 2018, at 12:34 PM, Stuart Marks <stuart.marks at oracle.com> 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 that doesn't appear to be the intent.)

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)}.”

which appears to correspond to the description

Implementation Specification. This is where the default implementation (or an overrideable implementation in a class) is specified. [1]

Thanks,

Brian

[1] https://bugs.openjdk.java.net/browse/JDK-8068562


More information about the core-libs-dev mailing list