On Wed, 18 Dec 2024 16:22:51 GMT, Quan Anh Mai <qa...@openjdk.org> wrote:
> Hi, > > This patch adds the missing null checks to the shuffle arguments of the > various `rearrangeTemplate` method. For all other API points, we null check > arguments by calling `check` on them. As `rearrange` implementations cast the > argument to the concrete type, there is no need for species check, but we > still need the null check. This allows the intrinsics to know that the > argument is not `null`, as nullable argument makes the method > non-intrinsifiable. > > Please take a look, thanks a lot. Looks good, thanks for fixing. This is really a bug rather than an enhancement. In the package JavaDoc we state: > * For every class in this package, > * unless specified otherwise, any method arguments of reference > * type must not be null, and any null argument will elicit a > * {@code NullPointerException}. This fact is not individually > * documented for methods of this API. We should also backport to 24. From the main issue create a backport issue (from the `More` drop down menu). Then from the main PR type `/backport :jdk24`, that will create a PR for the `jdk24` branch from which i can review and then you can integrate. ------------- Marked as reviewed by psandoz (Reviewer). PR Review: https://git.openjdk.org/jdk/pull/22816#pullrequestreview-2512487860