Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit dadaaf09 authored by android-build-team Robot's avatar android-build-team Robot
Browse files

Snap for 6847951 from 55213aa5 to sc-release

Change-Id: I122900871b1b7799a4becc5bd938cf561fafb546
parents 8a549817 55213aa5
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -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 */
        }
    }
@@ -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);