On Wed, 23 Sep 2026 19:59:10 GMT, Phil Race <[email protected]> wrote:
> This fixes a corner case (although the corner repeats in a number of > locations), whereby a specified NPE for null parameters doesn't happen > because code that would throw is not reached when width or height is zero. > No existing tests fail, and the new jtreg test passes whereas it fails > without this fix. > > --------- > - [x] I confirm that I make this contribution in accordance with the [OpenJDK > Interim AI Policy](https://openjdk.org/legal/ai). src/java.desktop/share/classes/java/awt/image/SampleModel.java line 607: > 605: > 606: if (obj == null) { > 607: throw new NullPointerException("Array must not be null"); Shouldn't it be "object must not be null", there's no array here test/jdk/java/awt/image/SampleModelNullTests.java line 57: > 55: operation.run(); > 56: if (npe) { > 57: throw new RuntimeException("No NPE for " + description); probably test can be improved to not bail out on 1st failure since so many test checks are being done...maybe we can collate the failures and fail later.. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/33042#discussion_r4089320466 PR Review Comment: https://git.openjdk.org/jdk/pull/33042#discussion_r4089381015
