On Tue, 16 Dec 2025 13:22:40 GMT, eunbin son <[email protected]> wrote:

> ## Summary
> Adds comprehensive edge case tests for `Objects.requireNonNull`, 
> `requireNonNullElse`, and `requireNonNullElseGet` methods to improve 
> test coverage.
> 
> ## Problem
> The current test suite for `Objects.requireNonNull` methods covers 
> basic cases but lacks edge case coverage.
> 
> ## Solution
> This PR adds tests for the following edge cases:
> - requireNonNull with null Supplier parameter
> - requireNonNull with Supplier that throws exception
> - requireNonNullElse with both arguments null
> - requireNonNullElseGet with null supplier
> - requireNonNullElseGet with supplier returning null
> 
> ## Issue
> Fixes JDK-8373661
> 
> **JBS Issue Link**: 
> https://bugs.java.com/bugdatabase/view_bug?bug_id=JDK-8373661
> 
> ## Type of Change
> - [x] Test addition/modification
> - [ ] Bug fix
> - [ ] New feature
> - [ ] Documentation improvement
> - [ ] Refactoring
> 
> ## Testing
> 
> make test TEST="jtreg:test/jdk/java/util/Objects"

The new tests scope is good.
The current standard for tests is JUnit and it would be better to convert the 
test to JUnit before adding new tests.

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

PR Comment: https://git.openjdk.org/jdk/pull/28845#issuecomment-3662639789

Reply via email to