> ## 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"
eunbin son has updated the pull request incrementally with two additional commits since the last revision: - 8373661: Address liach's feedback on test verbosity - Removed exception message tests to allow API flexibility - Removed verbose Javadoc and inline comments - Simplified test messages to use method names only - Updated copyright year Thanks to @liach for the feedback. - Update full name ------------- Changes: - all: https://git.openjdk.org/jdk/pull/28845/files - new: https://git.openjdk.org/jdk/pull/28845/files/11d7aae7..a81933ef Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=28845&range=05 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=28845&range=04-05 Stats: 55 lines in 1 file changed: 0 ins; 39 del; 16 mod Patch: https://git.openjdk.org/jdk/pull/28845.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/28845/head:pull/28845 PR: https://git.openjdk.org/jdk/pull/28845
