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

Alan Bateman alanb at openjdk.org
Tue Jul 11 08:18:13 UTC 2023


On Fri, 7 Jul 2023 15:44:06 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: Delete "merely"

In passing, we should probably look into the inconsistency in the synchronization. The write methods are synchronized, the writeXXX methods and other methods are not. The class specified that it is not safe for use by concurrent threads without appropriate synchronization.

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

PR Comment: https://git.openjdk.org/jdk/pull/14791#issuecomment-1630363468


More information about the core-libs-dev mailing list