changeset 54709:90855d9c3c39

8223265: Clarify operational semantics of java.util.Objects.equals() Reviewed-by: bpb, alanb
author darcy
date Fri, 03 May 2019 09:25:59 -0700
parents b7e6fc77c2f3
children aa29971a17a1
files src/java.base/share/classes/java/util/Objects.java
diffstat 1 files changed, 5 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/src/java.base/share/classes/java/util/Objects.java	Fri May 03 09:07:30 2019 -0700
+++ b/src/java.base/share/classes/java/util/Objects.java	Fri May 03 09:25:59 2019 -0700
@@ -62,10 +62,11 @@
      * Returns {@code true} if the arguments are equal to each other
      * and {@code false} otherwise.
      * Consequently, if both arguments are {@code null}, {@code true}
-     * is returned and if exactly one argument is {@code null}, {@code
-     * false} is returned.  Otherwise, equality is determined by using
-     * the {@link Object#equals equals} method of the first
-     * argument.
+     * is returned.  Otherwise, if the first argument is not {@code
+     * null}, equality is determined by calling the {@link
+     * Object#equals equals} method of the first argument with the
+     * second argument of this method. Otherwise, {@code false} is
+     * returned.
      *
      * @param a an object
      * @param b an object to be compared with {@code a} for equality