RFR: 8351344: Avoid explicit Objects.requireNonNull in String.join

Raffaello Giulietti rgiulietti at openjdk.org
Thu Mar 6 20:24:53 UTC 2025


On Thu, 20 Feb 2025 09:30:02 GMT, Andrey Turbanov <aturbanov at openjdk.org> wrote:

> We have helpful NPE messages now - they are more user-friendly.
> And shorter methods are more likely to be inlined.

At some point we will probably have [null-restricted types](https://openjdk.org/jeps/8303099).

Then it will be possible to annotate the parameters as null-restricted, and remove the _explicit_ validation checks, which enhances readability. But they will be replaced by language compiler generated checks, in some form or another.

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

PR Comment: https://git.openjdk.org/jdk/pull/23710#issuecomment-2704858514


More information about the core-libs-dev mailing list