You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tika.apache.org by ta...@apache.org on 2024/01/25 12:19:00 UTC

(tika) branch TIKA-4184 created (now 88a8efaf7)

This is an automated email from the ASF dual-hosted git repository.

tallison pushed a change to branch TIKA-4184
in repository https://gitbox.apache.org/repos/asf/tika.git


      at 88a8efaf7 TIKA-4184 -- fix couple of assertNotNulls

This branch includes the following new commits:

     new 88a8efaf7 TIKA-4184 -- fix couple of assertNotNulls

The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.



(tika) 01/01: TIKA-4184 -- fix couple of assertNotNulls

Posted by ta...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

tallison pushed a commit to branch TIKA-4184
in repository https://gitbox.apache.org/repos/asf/tika.git

commit 88a8efaf7926618387fd737474416b00440a7969
Author: tallison <ta...@apache.org>
AuthorDate: Thu Jan 25 07:18:48 2024 -0500

    TIKA-4184 -- fix couple of assertNotNulls
---
 .../test/java/org/apache/tika/detect/MimeDetectionWithNNTest.java | 8 ++------
 .../src/test/java/org/apache/tika/mime/MimeDetectionTest.java     | 8 ++------
 .../java/org/apache/tika/mime/ProbabilisticMimeDetectionTest.java | 8 ++------
 3 files changed, 6 insertions(+), 18 deletions(-)

diff --git a/tika-core/src/test/java/org/apache/tika/detect/MimeDetectionWithNNTest.java b/tika-core/src/test/java/org/apache/tika/detect/MimeDetectionWithNNTest.java
index af7f56bb9..293f423d2 100644
--- a/tika-core/src/test/java/org/apache/tika/detect/MimeDetectionWithNNTest.java
+++ b/tika-core/src/test/java/org/apache/tika/detect/MimeDetectionWithNNTest.java
@@ -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;
@@ -100,7 +101,7 @@ public class MimeDetectionWithNNTest {
 
     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);
         }
@@ -120,11 +121,6 @@ public class MimeDetectionWithNNTest {
         }
     }
 
-    private void assertNotNull(String string, InputStream in) {
-        // TODO Auto-generated method stub
-
-    }
-
     /**
      * Test for type detection of empty documents.
      */
diff --git a/tika-core/src/test/java/org/apache/tika/mime/MimeDetectionTest.java b/tika-core/src/test/java/org/apache/tika/mime/MimeDetectionTest.java
index 690da4f29..434ff6c20 100644
--- a/tika-core/src/test/java/org/apache/tika/mime/MimeDetectionTest.java
+++ b/tika-core/src/test/java/org/apache/tika/mime/MimeDetectionTest.java
@@ -20,6 +20,7 @@ import static java.nio.charset.StandardCharsets.UTF_16BE;
 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;
@@ -162,7 +163,7 @@ public class MimeDetectionTest {
 
     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);
         }
@@ -182,11 +183,6 @@ public class MimeDetectionTest {
         }
     }
 
-    private void assertNotNull(String string, InputStream in) {
-        // TODO Auto-generated method stub
-
-    }
-
     /**
      * Test for type detection of empty documents.
      *
diff --git a/tika-core/src/test/java/org/apache/tika/mime/ProbabilisticMimeDetectionTest.java b/tika-core/src/test/java/org/apache/tika/mime/ProbabilisticMimeDetectionTest.java
index d9a65bf1b..c9d0073c2 100644
--- a/tika-core/src/test/java/org/apache/tika/mime/ProbabilisticMimeDetectionTest.java
+++ b/tika-core/src/test/java/org/apache/tika/mime/ProbabilisticMimeDetectionTest.java
@@ -20,6 +20,7 @@ import static java.nio.charset.StandardCharsets.UTF_16BE;
 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;
@@ -135,7 +136,7 @@ public class ProbabilisticMimeDetectionTest {
 
     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);
         }
@@ -155,11 +156,6 @@ public class ProbabilisticMimeDetectionTest {
         }
     }
 
-    private void assertNotNull(String string, InputStream in) {
-        // TODO Auto-generated method stub
-
-    }
-
     /**
      * Test for type detection of empty documents.
      *