Skip to content

Commit 184e749

Browse files
committed
check resource input stream
1 parent 23cfe1d commit 184e749

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

opengrok-indexer/src/test/java/org/opengrok/indexer/history/SCCSgetTest.java

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@
3636
import java.util.zip.ZipInputStream;
3737

3838
import static org.junit.jupiter.api.Assertions.assertEquals;
39+
import static org.junit.jupiter.api.Assertions.assertNotNull;
3940
import static org.junit.jupiter.api.Assertions.assertTrue;
4041
import static org.opengrok.indexer.condition.RepositoryInstalled.Type.SCCS;
4142

@@ -106,7 +107,9 @@ private String readInput(InputStream in) throws IOException {
106107
*/
107108
@Test
108109
void getRevision() throws Exception {
109-
ZipInputStream zstream = new ZipInputStream(getClass().getResourceAsStream("/history/sccs-revisions.zip"));
110+
InputStream inputStream = getClass().getResourceAsStream("/history/sccs-revisions.zip");
111+
assertNotNull(inputStream);
112+
ZipInputStream zstream = new ZipInputStream(inputStream);
110113
ZipEntry entry;
111114

112115
while ((entry = zstream.getNextEntry()) != null) {

0 commit comments

Comments
 (0)