Chromium Code Reviews| Index: sync/android/java/src/org/chromium/sync/notifier/InvalidationPreferences.java |
| diff --git a/sync/android/java/src/org/chromium/sync/notifier/InvalidationPreferences.java b/sync/android/java/src/org/chromium/sync/notifier/InvalidationPreferences.java |
| index c3192ef210003ba062fb0ba8384a93f1b6a5af09..0a128492ebf32a27d68ff03e37b0036dc0e6f211 100644 |
| --- a/sync/android/java/src/org/chromium/sync/notifier/InvalidationPreferences.java |
| +++ b/sync/android/java/src/org/chromium/sync/notifier/InvalidationPreferences.java |
| @@ -11,7 +11,6 @@ import android.preference.PreferenceManager; |
| import android.util.Base64; |
| import android.util.Log; |
| -import com.google.common.base.Preconditions; |
| import com.google.ipc.invalidation.external.client.types.ObjectId; |
| import org.chromium.base.VisibleForTesting; |
| @@ -112,7 +111,7 @@ public class InvalidationPreferences { |
| /** Sets the saved sync types to {@code syncTypes} in {@code editContext}. */ |
| public void setSyncTypes(EditContext editContext, Collection<String> syncTypes) { |
| - Preconditions.checkNotNull(syncTypes); |
| + if (syncTypes == null) throw new NullPointerException("syncTypes is null."); |
|
Colin Meek
2014/09/16 17:54:35
Do you typically use braces around 'if' block?
nyquist
2014/09/16 17:59:04
Yes, but one-liners are OK if they make sense. We
|
| Set<String> selectedTypesSet = new HashSet<String>(syncTypes); |
| editContext.mEditor.putStringSet(PrefKeys.SYNC_TANGO_TYPES, selectedTypesSet); |
| } |
| @@ -137,7 +136,7 @@ public class InvalidationPreferences { |
| /** Sets the saved non-sync object ids */ |
| public void setObjectIds(EditContext editContext, Collection<ObjectId> objectIds) { |
| - Preconditions.checkNotNull(objectIds); |
| + if (objectIds == null) throw new NullPointerException("objectIds is null."); |
| Set<String> objectIdStrings = new HashSet<String>(objectIds.size()); |
| for (ObjectId objectId : objectIds) { |
| objectIdStrings.add(getObjectIdString(objectId)); |