|
|
DescriptionIntroduce objectEquals for null-safe equality check
There exists a similar API in Objects[1] but it's only available in
API 19+. Will be used in http://crrev.com/2704263004
[1] https://developer.android.com/reference/java/util/Objects.html
Review-Url: https://codereview.chromium.org/2733363003
Cr-Commit-Position: refs/heads/master@{#455900}
Committed: https://chromium.googlesource.com/chromium/src/+/d41491179d6dd91eeca40fc743889eafe98a7050
Patch Set 1 #
Total comments: 2
Patch Set 2 : Add @see annotation #Messages
Total messages: 22 (11 generated)
ortuno@chromium.org changed reviewers: + nyquist@chromium.org
nyquist: PTAL.
The CQ bit was checked by ortuno@chromium.org to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: This issue passed the CQ dry run.
https://codereview.chromium.org/2733363003/diff/1/base/android/java/src/org/c... File base/android/java/src/org/chromium/base/ApiCompatibilityUtils.java (right): https://codereview.chromium.org/2733363003/diff/1/base/android/java/src/org/c... base/android/java/src/org/chromium/base/ApiCompatibilityUtils.java:646: public static boolean objectEquals(Object a, Object b) { Can you please add a @see annotation?
TBH, I don't think we'd want this in base. I suggest you put this in a private static boolean method where it will be used instead of putting it in //base. I'll upload a CL to move out the two other compare-methods too.
On 2017/03/08 18:27:08, nyquist wrote: > TBH, I don't think we'd want this in base. I suggest you put this in a private > static boolean method where it will be used instead of putting it in //base. > > I'll upload a CL to move out the two other compare-methods too. While I'm the one who suggested moving this and the others to base, I do strongly disagree, but I'm not an OWNER so I can't force it. ApiCompatibilityUtils exists to handle the case where APIs are inconsistently, not implemented on different Android versions. These fall into that and having basic comparators implemented everywhere because there is no compat for that seems very bad to me. Maybe splitting up ApiCompatibilityUtils into smaller classes would be good, but I think having these rather fundamental things in something like base is the right thing.
Yeah, I think moving them out to smaller things would be helpful. But that's not for this CL to do I think. So, lgtm to me :-)
The CQ bit was checked by ortuno@chromium.org
Thanks!
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
The CQ bit was unchecked by ortuno@chromium.org
Forgot to address the comment. Canceling cq.
The CQ bit was checked by ortuno@chromium.org
Thanks! Happy to send a follow up patch if someone could advice on the name of the new file. https://codereview.chromium.org/2733363003/diff/1/base/android/java/src/org/c... File base/android/java/src/org/chromium/base/ApiCompatibilityUtils.java (right): https://codereview.chromium.org/2733363003/diff/1/base/android/java/src/org/c... base/android/java/src/org/chromium/base/ApiCompatibilityUtils.java:646: public static boolean objectEquals(Object a, Object b) { On 2017/03/08 at 18:09:51, nyquist OOO back 3-14 wrote: > Can you please add a @see annotation? Done.
The patchset sent to the CQ was uploaded after l-g-t-m from nyquist@chromium.org Link to the patchset: https://codereview.chromium.org/2733363003/#ps20001 (title: "Add @see annotation")
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
CQ is committing da patch. Bot data: {"patchset_id": 20001, "attempt_start_ts": 1489099507799200, "parent_rev": "034bdcd0c7f1a735dd7f03813a38d1a498c80535", "commit_rev": "d41491179d6dd91eeca40fc743889eafe98a7050"}
Message was sent while issue was closed.
Description was changed from ========== Introduce objectEquals for null-safe equality check There exists a similar API in Objects[1] but it's only available in API 19+. Will be used in http://crrev.com/2704263004 [1] https://developer.android.com/reference/java/util/Objects.html ========== to ========== Introduce objectEquals for null-safe equality check There exists a similar API in Objects[1] but it's only available in API 19+. Will be used in http://crrev.com/2704263004 [1] https://developer.android.com/reference/java/util/Objects.html Review-Url: https://codereview.chromium.org/2733363003 Cr-Commit-Position: refs/heads/master@{#455900} Committed: https://chromium.googlesource.com/chromium/src/+/d41491179d6dd91eeca40fc74388... ==========
Message was sent while issue was closed.
Committed patchset #2 (id:20001) as https://chromium.googlesource.com/chromium/src/+/d41491179d6dd91eeca40fc74388... |