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

lewismc pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-sdap-mudrod.git


The following commit(s) were added to refs/heads/master by this push:
     new 7a59ec4  SDAP-201 Empty CSV data results with NullPointerException. 
(#49)
7a59ec4 is described below

commit 7a59ec4c23eded30567ba390d13ebf7a87473bc0
Author: Furkan KAMACI <[email protected]>
AuthorDate: Wed Aug 7 19:41:08 2019 +0300

    SDAP-201 Empty CSV data results with NullPointerException. (#49)
---
 .../java/org/apache/sdap/mudrod/ssearch/ranking/DataGenerator.java     | 3 +++
 1 file changed, 3 insertions(+)

diff --git 
a/core/src/main/java/org/apache/sdap/mudrod/ssearch/ranking/DataGenerator.java 
b/core/src/main/java/org/apache/sdap/mudrod/ssearch/ranking/DataGenerator.java
index f6153bc..3c0763a 100644
--- 
a/core/src/main/java/org/apache/sdap/mudrod/ssearch/ranking/DataGenerator.java
+++ 
b/core/src/main/java/org/apache/sdap/mudrod/ssearch/ranking/DataGenerator.java
@@ -108,6 +108,9 @@ public class DataGenerator {
               calculateVec(dataArr);
             }
           }
+          if (dataArr == null) {
+            throw new RuntimeException("Specified CSV file content is empty to 
create header data!");
+          }
           storeHead(dataArr); // Store the header
         }
       } else // Process only one file

Reply via email to