RFR: 8324718: Add a static function to java.util.Objects to simplify object equality checks

David Alayachew duke at openjdk.org
Sat Jan 27 04:10:48 UTC 2024


Adding a function to Objects in order to facilitate equality checking and enhance readability. You simply specify the 2 objects that you want to check for equality, and then provide the functions which will be used to provide the values that we will check for equality.

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

Commit messages:
 - Fixing whitespace
 - Correcting JavaDoc
 - Fixing a bug in the provided code example.
 - Adding better documentation for more corner cases
 - Adding helpful documentation to cover corner cases
 - paren
 - Using the @snippet feature
 - Merge branch 'openjdk:master' into patch-1
 - Add new method equalsBy to java.util.Objects

Changes: https://git.openjdk.org/jdk/pull/17603/files
 Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=17603&range=00
  Issue: https://bugs.openjdk.org/browse/JDK-8324718
  Stats: 102 lines in 1 file changed: 101 ins; 0 del; 1 mod
  Patch: https://git.openjdk.org/jdk/pull/17603.diff
  Fetch: git fetch https://git.openjdk.org/jdk.git pull/17603/head:pull/17603

PR: https://git.openjdk.org/jdk/pull/17603


More information about the core-libs-dev mailing list