File tree Expand file tree Collapse file tree 1 file changed +3
-6
lines changed
Parse/src/main/java/com/parse Expand file tree Collapse file tree 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 {
328328 state = task .getResult ();
329329 // Since we have successfully uploaded the file, we do not need to hold the file pointer
330330 // anymore.
331+ data = null ;
331332 file = null ;
332333 return task .makeVoid ();
333334 }
@@ -359,9 +360,6 @@ public Task<Void> then(Task<String> task) throws Exception {
359360 public Task <Void > then (Task <Void > task ) throws Exception {
360361 cts .trySetResult (null ); // release
361362 currentTasks .remove (cts );
362- // Clear in memory file pointer and data
363- data = null ;
364- file = null ;
365363 return task ;
366364 }
367365 });
@@ -439,8 +437,7 @@ public Task<byte[]> then(Task<Void> toAwait) throws Exception {
439437 public byte [] then (Task <File > task ) throws Exception {
440438 File file = task .getResult ();
441439 try {
442- byte [] data = ParseFileUtils .readFileToByteArray (file );
443- return data ;
440+ return ParseFileUtils .readFileToByteArray (file );
444441 } catch (IOException e ) {
445442 // do nothing
446443 }
@@ -542,7 +539,7 @@ public Task<File> then(Task<File> task) throws Exception {
542539 * @return A Task that is resolved when the data has been fetched.
543540 */
544541 public Task <File > getFileInBackground () {
545- return getFileInBackground ((ProgressCallback )null );
542+ return getFileInBackground ((ProgressCallback ) null );
546543 }
547544
548545 /**
You can’t perform that action at this time.
0 commit comments