File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed
src/test/java/com/microsoft/graph/functional Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff 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}
You can’t perform that action at this time.
0 commit comments