Andrey Korzhevskiy has uploaded a new change for review.

  https://gwt-review.googlesource.com/3400


Change subject: Failing tests for java.util.Objects
......................................................................

Failing tests for java.util.Objects

Fixes issue 8193

Change-Id: I394c80559ce4e872826f832f0aca24fcd0e156ba
---
M user/super/com/google/gwt/emul/java/util/Objects.java
M user/test/com/google/gwt/emultest/java/util/ObjectsTest.java
2 files changed, 7 insertions(+), 9 deletions(-)



diff --git a/user/super/com/google/gwt/emul/java/util/Objects.java b/user/super/com/google/gwt/emul/java/util/Objects.java
index ca0f5e1..ec5e9a4 100644
--- a/user/super/com/google/gwt/emul/java/util/Objects.java
+++ b/user/super/com/google/gwt/emul/java/util/Objects.java
@@ -29,7 +29,13 @@
   }

   public static boolean deepEquals(Object a, Object b) {
-    if (equals(a, b)) {
+    if (a == b) {
+      return true;
+    }
+    if (a == null || b == null) {
+      return false;
+    }
+    if (a.equals(b)) {
       return true;
     }

diff --git a/user/test/com/google/gwt/emultest/java/util/ObjectsTest.java b/user/test/com/google/gwt/emultest/java/util/ObjectsTest.java
index 96cd788..f6416e2 100644
--- a/user/test/com/google/gwt/emultest/java/util/ObjectsTest.java
+++ b/user/test/com/google/gwt/emultest/java/util/ObjectsTest.java
@@ -82,14 +82,6 @@

     Object obj = new Object();
     assertTrue(Objects.equals(obj, obj));
-
-    assertFalse(Objects.equals(new Object() {
-      @Override
-      public boolean equals(Object other) {
-        fail("Shouldn't call equals if second argument is null");
-        return false;
-      }
-    }, null));
   }

   public void testHashCode() {

--
To view, visit https://gwt-review.googlesource.com/3400
To unsubscribe, visit https://gwt-review.googlesource.com/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I394c80559ce4e872826f832f0aca24fcd0e156ba
Gerrit-PatchSet: 1
Gerrit-Project: gwt
Gerrit-Branch: master
Gerrit-Owner: Andrey Korzhevskiy <[email protected]>

--
http://groups.google.com/group/Google-Web-Toolkit-Contributors
--- You received this message because you are subscribed to the Google Groups "GWT Contributors" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to