On Wed, 17 Dec 2025 21:03:48 GMT, Roger Riggs <[email protected]> wrote:
>> eunbin son has updated the pull request incrementally with one additional >> commit since the last revision: >> >> 8373661: Use assertSame for exception instance verification >> >> Updated testRequireNonNullWithSupplierThrowingException to allocate >> the exception outside of the lambda and use assertSame to verify >> the same exception instance is thrown, as suggested by @liach. >> >> This provides a more precise verification that the exception from >> the supplier is thrown directly, not wrapped. >> >> Thanks to @liach for the feedback. > > test/jdk/java/util/Objects/BasicObjectsTest.java line 218: > >> 216: "isNull(null) should return true"); >> 217: assertFalse(Objects.isNull(Objects.class), >> 218: "isNull(Objects.class) should return false"); > > Could be simplifed with Assertions.assertNull or assertNonNull. Here and > elsewhere in this test. I think this is testing `isNull` API and shouldn't be simplified. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/28845#discussion_r2628817056
