Skip to content

Commit

Permalink
TIKA-4184 -- fix couple of assertNotNulls (#1560)
Browse files Browse the repository at this point in the history
  • Loading branch information
tballison committed Jan 25, 2024
1 parent a7a12f7 commit 33ace7f
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 18 deletions.
Expand Up @@ -17,6 +17,7 @@
package org.apache.tika.detect;

import static org.junit.jupiter.api.Assertions.assertEquals;
import static org.junit.jupiter.api.Assertions.assertNotNull;

import java.io.ByteArrayInputStream;
import java.io.IOException;
Expand Down Expand Up @@ -100,7 +101,7 @@ private void testFile(String expected, String filename) throws IOException {

private void testStream(String expected, String urlOrFileName, InputStream in)
throws IOException {
assertNotNull("Test stream: [" + urlOrFileName + "] is null!", in);
assertNotNull(in, "Test stream: [" + urlOrFileName + "] is null!");
if (!in.markSupported()) {
in = new java.io.BufferedInputStream(in);
}
Expand All @@ -120,11 +121,6 @@ private void testStream(String expected, String urlOrFileName, InputStream in)
}
}

private void assertNotNull(String string, InputStream in) {
// TODO Auto-generated method stub

}

/**
* Test for type detection of empty documents.
*/
Expand Down
Expand Up @@ -20,6 +20,7 @@
import static java.nio.charset.StandardCharsets.UTF_16LE;
import static java.nio.charset.StandardCharsets.UTF_8;
import static org.junit.jupiter.api.Assertions.assertEquals;
import static org.junit.jupiter.api.Assertions.assertNotNull;
import static org.junit.jupiter.api.Assertions.assertTrue;

import java.io.ByteArrayInputStream;
Expand Down Expand Up @@ -162,7 +163,7 @@ private void testFile(String expected, String filename) throws IOException {

private void testStream(String expected, String urlOrFileName, InputStream in)
throws IOException {
assertNotNull("Test stream: [" + urlOrFileName + "] is null!", in);
assertNotNull(in, "Test stream: [" + urlOrFileName + "] is null!");
if (!in.markSupported()) {
in = new java.io.BufferedInputStream(in);
}
Expand All @@ -182,11 +183,6 @@ private void testStream(String expected, String urlOrFileName, InputStream in)
}
}

private void assertNotNull(String string, InputStream in) {
// TODO Auto-generated method stub

}

/**
* Test for type detection of empty documents.
*
Expand Down
Expand Up @@ -20,6 +20,7 @@
import static java.nio.charset.StandardCharsets.UTF_16LE;
import static java.nio.charset.StandardCharsets.UTF_8;
import static org.junit.jupiter.api.Assertions.assertEquals;
import static org.junit.jupiter.api.Assertions.assertNotNull;
import static org.junit.jupiter.api.Assertions.assertTrue;

import java.io.ByteArrayInputStream;
Expand Down Expand Up @@ -135,7 +136,7 @@ private void testFile(String expected, String filename) throws IOException {

private void testStream(String expected, String urlOrFileName, InputStream in)
throws IOException {
assertNotNull("Test stream: [" + urlOrFileName + "] is null!", in);
assertNotNull(in, "Test stream: [" + urlOrFileName + "] is null!");
if (!in.markSupported()) {
in = new java.io.BufferedInputStream(in);
}
Expand All @@ -155,11 +156,6 @@ private void testStream(String expected, String urlOrFileName, InputStream in)
}
}

private void assertNotNull(String string, InputStream in) {
// TODO Auto-generated method stub

}

/**
* Test for type detection of empty documents.
*
Expand Down

0 comments on commit 33ace7f

Please sign in to comment.