Commit d838a561 authored by rouslan's avatar rouslan Committed by Commit bot

Remove incorrect asserts in PaymentRequest

When creating a new contact, the AutofillContact object is created with
both null phone number and null email address. Therefore, asserts that
one of them should be not null are not correct. This patch removes these
asserts.

BUG=624211

Review-Url: https://codereview.chromium.org/2101983004
Cr-Commit-Position: refs/heads/master@{#402642}
parent c34468b2
...@@ -72,7 +72,6 @@ public class AutofillContact extends PaymentOption { ...@@ -72,7 +72,6 @@ public class AutofillContact extends PaymentOption {
private void setPhoneEmail(@Nullable String phone, @Nullable String email) { private void setPhoneEmail(@Nullable String phone, @Nullable String email) {
mPayerPhone = TextUtils.isEmpty(phone) ? null : phone; mPayerPhone = TextUtils.isEmpty(phone) ? null : phone;
mPayerEmail = TextUtils.isEmpty(email) ? null : email; mPayerEmail = TextUtils.isEmpty(email) ? null : email;
assert mPayerPhone != null || mPayerEmail != null;
updateLabels(mPayerPhone == null ? mPayerEmail : mPayerPhone, updateLabels(mPayerPhone == null ? mPayerEmail : mPayerPhone,
mPayerPhone == null ? null : mPayerEmail); mPayerPhone == null ? null : mPayerEmail);
} }
......
...@@ -64,7 +64,6 @@ public class PaymentOption { ...@@ -64,7 +64,6 @@ public class PaymentOption {
* @param sublabel The new sublabel to use. Can be null. * @param sublabel The new sublabel to use. Can be null.
*/ */
protected void updateLabels(String label, @Nullable String sublabel) { protected void updateLabels(String label, @Nullable String sublabel) {
assert label != null;
mLabel = label; mLabel = label;
mSublabel = sublabel; mSublabel = sublabel;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment