File tree 1 file changed +3
-6
lines changed
Parse/src/main/java/com/parse 1 file changed +3
-6
lines changed Original file line number Diff line number Diff line change @@ -328,6 +328,7 @@ public Task<Void> then(Task<State> task) throws Exception {
328
328
state = task .getResult ();
329
329
// Since we have successfully uploaded the file, we do not need to hold the file pointer
330
330
// anymore.
331
+ data = null ;
331
332
file = null ;
332
333
return task .makeVoid ();
333
334
}
@@ -359,9 +360,6 @@ public Task<Void> then(Task<String> task) throws Exception {
359
360
public Task <Void > then (Task <Void > task ) throws Exception {
360
361
cts .trySetResult (null ); // release
361
362
currentTasks .remove (cts );
362
- // Clear in memory file pointer and data
363
- data = null ;
364
- file = null ;
365
363
return task ;
366
364
}
367
365
});
@@ -439,8 +437,7 @@ public Task<byte[]> then(Task<Void> toAwait) throws Exception {
439
437
public byte [] then (Task <File > task ) throws Exception {
440
438
File file = task .getResult ();
441
439
try {
442
- byte [] data = ParseFileUtils .readFileToByteArray (file );
443
- return data ;
440
+ return ParseFileUtils .readFileToByteArray (file );
444
441
} catch (IOException e ) {
445
442
// do nothing
446
443
}
@@ -542,7 +539,7 @@ public Task<File> then(Task<File> task) throws Exception {
542
539
* @return A Task that is resolved when the data has been fetched.
543
540
*/
544
541
public Task <File > getFileInBackground () {
545
- return getFileInBackground ((ProgressCallback )null );
542
+ return getFileInBackground ((ProgressCallback ) null );
546
543
}
547
544
548
545
/**
You can’t perform that action at this time.
0 commit comments