You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tika.apache.org by bo...@apache.org on 2017/11/18 01:25:10 UTC

[tika] branch master updated: TIKA-2506 - Check config for null during DL4J Test.

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

bob pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/tika.git


The following commit(s) were added to refs/heads/master by this push:
     new 1e8008c  TIKA-2506 - Check config for null during DL4J Test.
1e8008c is described below

commit 1e8008c60ef1536b4c5bdd92fdae1e9e687e5966
Author: Bob Paulin <bo...@bobpaulin.com>
AuthorDate: Fri Nov 17 19:25:03 2017 -0600

    TIKA-2506 - Check config for null during DL4J Test.
---
 .../apache/tika/dl/imagerec/DL4JVGG16NetTest.java  | 22 +++++++++++++---------
 1 file changed, 13 insertions(+), 9 deletions(-)

diff --git a/tika-dl/src/test/java/org/apache/tika/dl/imagerec/DL4JVGG16NetTest.java b/tika-dl/src/test/java/org/apache/tika/dl/imagerec/DL4JVGG16NetTest.java
index dbea7f7..df5c572 100644
--- a/tika-dl/src/test/java/org/apache/tika/dl/imagerec/DL4JVGG16NetTest.java
+++ b/tika-dl/src/test/java/org/apache/tika/dl/imagerec/DL4JVGG16NetTest.java
@@ -39,16 +39,20 @@ public class DL4JVGG16NetTest {
                 return;
             }
         }
-        Tika tika = new Tika(config);
-        Metadata md = new Metadata();
-        tika.parse(getClass().getResourceAsStream("lion.jpg"), md);
-        String[] objects = md.getValues("OBJECT");
-        boolean found = false;
-        for (String object : objects) {
-            if (object.contains("lion")){
-                found = true;
+        
+        if(config != null)
+        {
+        	Tika tika = new Tika(config);
+            Metadata md = new Metadata();
+            tika.parse(getClass().getResourceAsStream("lion.jpg"), md);
+            String[] objects = md.getValues("OBJECT");
+            boolean found = false;
+            for (String object : objects) {
+                if (object.contains("lion")){
+                    found = true;
+                }
             }
+            assertTrue(found);
         }
-        assertTrue(found);
     }
 }
\ No newline at end of file

-- 
To stop receiving notification emails like this one, please contact
['"commits@tika.apache.org" <co...@tika.apache.org>'].