On 3/21/18 1:01 PM, Brian Burkhalter wrote:
On Mar 21, 2018, at 12:34 PM, Stuart Marks <stuart.ma...@oracle.com <mailto:stuart.ma...@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)}.”
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.

s'marks

Reply via email to