Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Parse/src/main/java/com/parse/ParseAWSRequest.java
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ public Void call() throws Exception {
InputStream responseStream = null;
try {
responseStream = response.getContent();
FileOutputStream tempFileStream = new FileOutputStream(tempFile);
FileOutputStream tempFileStream = ParseFileUtils.openOutputStream(tempFile);

int nRead;
byte[] data = new byte[32 << 10]; // 32KB
Expand Down
4 changes: 3 additions & 1 deletion Parse/src/test/java/com/parse/ParseFileControllerTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -303,7 +303,9 @@ public void testFetchAsyncSuccess() throws Exception {

ParseHttpClient awsClient = mock(ParseHttpClient.class);
when(awsClient.execute(any(ParseHttpRequest.class))).thenReturn(mockResponse);
File root = temporaryFolder.getRoot();
// Make sure cache dir does not exist
File root = new File(temporaryFolder.getRoot(), "cache");
assertFalse(root.exists());
ParseFileController controller = new ParseFileController(null, root).awsClient(awsClient);

ParseFile.State state = new ParseFile.State.Builder()
Expand Down