RFR: 8373660: Add explicit null check in DataOutputStream.writeBytes
Alan Bateman
alanb at openjdk.org
Wed Dec 17 13:39:46 UTC 2025
On Wed, 17 Dec 2025 12:56:14 GMT, eunbin son <duke at openjdk.org> wrote:
> Add explicit null check using Objects.requireNonNull in DataOutputStream.writeBytes(String s) to provide a clearer error message and make the API contract explicit.
Can you paste in the existing NPE message vs. the new NPE message? With Helpful NPEs (JEP 358), there is a less need to make changes like this.
-------------
PR Comment: https://git.openjdk.org/jdk/pull/28869#issuecomment-3665396706
More information about the core-libs-dev
mailing list