File tree Expand file tree Collapse file tree 2 files changed +8
-4
lines changed Expand file tree Collapse file tree 2 files changed +8
-4
lines changed Original file line number Diff line number Diff line change @@ -1448,10 +1448,14 @@ public Task<Void> then(Task<Void> task) throws Exception {
1448
1448
ParseOperationSet nextOperation = opIterator .next ();
1449
1449
nextOperation .mergeFrom (operationsBeforeSave );
1450
1450
if (store != null ) {
1451
- task = task .onSuccessTask (new Continuation <Void , Task <Void >>() {
1451
+ task = task .continueWithTask (new Continuation <Void , Task <Void >>() {
1452
1452
@ Override
1453
1453
public Task <Void > then (Task <Void > task ) throws Exception {
1454
- return store .updateDataForObjectAsync (ParseObject .this );
1454
+ if (task .isFaulted ()) {
1455
+ return Task .forResult (null );
1456
+ } else {
1457
+ return store .updateDataForObjectAsync (ParseObject .this );
1458
+ }
1455
1459
}
1456
1460
});
1457
1461
}
Original file line number Diff line number Diff line change @@ -146,7 +146,7 @@ public void testMissingRequiredFieldWhenSaveAsync() throws Exception {
146
146
ParseInstallation installation = ParseInstallation .getCurrentInstallation ();
147
147
assertNotNull (installation );
148
148
installation .put ("key" , "value" );
149
- installation .saveAsync (sessionToken , toAwait );
149
+ ParseTaskUtils . wait ( installation .saveAsync (sessionToken , toAwait ) );
150
150
verify (controller ).getAsync ();
151
151
verify (objController , times (2 )).saveAsync (
152
152
any (ParseObject .State .class ),
@@ -187,7 +187,7 @@ public void testObjectNotFoundWhenSaveAsync() throws Exception {
187
187
assertNotNull (installation );
188
188
installation .setState (state );
189
189
installation .put ("key" , "value" );
190
- installation .saveAsync (sessionToken , toAwait );
190
+ ParseTaskUtils . wait ( installation .saveAsync (sessionToken , toAwait ) );
191
191
192
192
verify (controller ).getAsync ();
193
193
verify (objController , times (2 )).saveAsync (
You can’t perform that action at this time.
0 commit comments