Skip to content

Commit 3a4de58

Browse files
authored
Apply suggestions from code review
1 parent 8825fdc commit 3a4de58

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/test/java/com/microsoft/graph/functional/OneDriveTests.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,8 @@ public void failure(final ClientException ex) {
8181
@Test
8282
public void testDownloadWithCustomRequest() throws IOException {
8383
final String testDownloadFileId = "01RWFXFJG3UYRHE75RZVFYWKNUEBB53H7A";
84-
final InputStream stream = testBase.graphClient.customRequest("/me/drive/items/"+testDownloadFileId+"/content", InputStream.class).buildRequest().get();
85-
assertFalse("stream should not be empty", stream.read() == -1);
84+
try (final InputStream stream = testBase.graphClient.customRequest("/me/drive/items/"+testDownloadFileId+"/content", InputStream.class).buildRequest().get()) {
85+
assertFalse("stream should not be empty", stream.read() == -1);
86+
}
8687
}
8788
}

0 commit comments

Comments
 (0)