Thu, 22 Jan 2015 13:21:57 +0100
Incorporate requested changes from Mozilla in review:
https://bugzilla.mozilla.org/show_bug.cgi?id=1123480#c6
1 /* Any copyright is dedicated to the Public Domain.
2 http://creativecommons.org/publicdomain/zero/1.0/ */
4 package org.mozilla.gecko.background.sync.helpers;
6 import org.mozilla.gecko.sync.repositories.InvalidRequestException;
7 import org.mozilla.gecko.sync.repositories.domain.Record;
9 public class ExpectInvalidRequestFetchDelegate extends DefaultFetchDelegate {
10 public static final String LOG_TAG = "ExpInvRequestFetchDel";
12 @Override
13 public void onFetchFailed(Exception ex, Record rec) {
14 if (ex instanceof InvalidRequestException) {
15 onDone();
16 } else {
17 performNotify("Expected InvalidRequestException but got ", ex);
18 }
19 }
21 private void onDone() {
22 performNotify();
23 }
24 }