RFR 8180410: ByteArrayOutputStream should not throw IOExceptions

Brian Burkhalter brian.burkhalter at oracle.com
Wed Mar 21 20:27:14 UTC 2018


On Mar 21, 2018, at 1:23 PM, Stuart Marks <stuart.marks at oracle.com> 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 implementation.
> 
> Consider a possible future refactoring, where writeBytes() calls some internal method instead of calling write(b, 0, b.length). This might be done, for example, to leverage an intrinsic, or to avoid unnecessary bounds checks, or for some other reason we can't imagine at the moment.
> 
> Such a refactoring would be prohibited by an @implSpec.

Why then not an @implNote instead of an @apiNote?

Thanks,

Brian


More information about the core-libs-dev mailing list