Thomas Broyer has posted comments on this change.

Change subject: Emulate java.util.Objects
......................................................................


Patch Set 3:

(3 comments)

....................................................
File user/super/com/google/gwt/emul/java/util/Arrays.java
Line 414:   static boolean deepEquals0(Object obj1, Object obj2) {
This should be moved to Objects as the implementation of Objects.deepEquals, and Arrays.deepEquals(Object[],Object[]) should simply call Objects.deepEquals(Object,Object)


....................................................
File user/super/com/google/gwt/emul/java/util/Objects.java
Line 32:     return Arrays.deepEquals0(a, b);
@John: it actually does (at the very beginning of deepEquals0).
@Ray: Objects.deepEquals is defined in terms of Object#equals() for non-array types.


Line 36:     return (a == b) || (a != null && a.equals(b));
According to the javadoc, the equals() is not used if any or both of a and b is null. Object#equals' javadoc is silent about 'null', so I think we should have a b!=null check:

 return (a == b) || (a != null && b != null && a.equals(b));


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

Gerrit-MessageType: comment
Gerrit-Change-Id: I15a10e7c52eb39baac2c22b9f6596ad0a5c1c599
Gerrit-PatchSet: 3
Gerrit-Project: gwt
Gerrit-Branch: master
Gerrit-Owner: Andrey Korzhevskiy <a.korzhevs...@gmail.com>
Gerrit-Reviewer: John A. Tamplin <j...@jaet.org>
Gerrit-Reviewer: Ray Cromwell <cromwell...@gmail.com>
Gerrit-Reviewer: Thomas Broyer <t.bro...@gmail.com>
Gerrit-HasComments: Yes

--
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 google-web-toolkit-contributors+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to