RFR: 8155902: DataOutputStream writeInt creates 2 packets instead of 1 [v3]

Alan Bateman alanb at openjdk.org
Tue Jul 11 17:27:15 UTC 2023


On Tue, 11 Jul 2023 16:48:24 GMT, Brian Burkhalter <bpb at openjdk.org> wrote:

>> Add a disclaimer to `java.io.DataOutputStream` to the effect that it makes no guarantee as to how the underlying output stream actually writes the bytes provided to it.
>
> Brian Burkhalter has updated the pull request incrementally with one additional commit since the last revision:
> 
>   8155902: Add verbiage to existing paragraph; remove apiNote

src/java.base/share/classes/java/io/DataOutputStream.java line 37:

> 35:  * write methods of that output stream. Hence writing data consisting of
> 36:  * more than a single byte may cause several writes to the underlying
> 37:  * output stream.

This looks much better than the apiNote. One suggestion is to drop "Hence", I don't think it is needed here.

-------------

PR Review Comment: https://git.openjdk.org/jdk/pull/14791#discussion_r1260044736


More information about the core-libs-dev mailing list