Loading tests/functional/com/android/documentsui/archives/ArchiveHandleTest.java +3 −3 Original line number Diff line number Diff line Loading @@ -394,7 +394,7 @@ public class ArchiveHandleTest { try { archiveHandle.getInputStream(archiveEntry); fail("It should not be here."); } catch (IllegalArgumentException | ArchiveException | CompressorException e) { } catch (ClassCastException e) { /* do nothing */ } } Loading @@ -416,13 +416,13 @@ public class ArchiveHandleTest { } @Test public void getInputStream_zeroSizeEntry_shouldFail() throws Exception { public void getInputStream_negativeSizeEntry_shouldFail() throws Exception { ArchiveHandle archiveHandle = prepareArchiveHandle("archives/zip/hello.zip", ".zip", "application/zip"); ArchiveEntry archiveEntry = mock(ArchiveEntry.class); when(archiveEntry.isDirectory()).thenReturn(false); when(archiveEntry.getSize()).thenReturn(0L); when(archiveEntry.getSize()).thenReturn(-1L); try { archiveHandle.getInputStream(archiveEntry); Loading Loading
tests/functional/com/android/documentsui/archives/ArchiveHandleTest.java +3 −3 Original line number Diff line number Diff line Loading @@ -394,7 +394,7 @@ public class ArchiveHandleTest { try { archiveHandle.getInputStream(archiveEntry); fail("It should not be here."); } catch (IllegalArgumentException | ArchiveException | CompressorException e) { } catch (ClassCastException e) { /* do nothing */ } } Loading @@ -416,13 +416,13 @@ public class ArchiveHandleTest { } @Test public void getInputStream_zeroSizeEntry_shouldFail() throws Exception { public void getInputStream_negativeSizeEntry_shouldFail() throws Exception { ArchiveHandle archiveHandle = prepareArchiveHandle("archives/zip/hello.zip", ".zip", "application/zip"); ArchiveEntry archiveEntry = mock(ArchiveEntry.class); when(archiveEntry.isDirectory()).thenReturn(false); when(archiveEntry.getSize()).thenReturn(0L); when(archiveEntry.getSize()).thenReturn(-1L); try { archiveHandle.getInputStream(archiveEntry); Loading