From d38b4254af72962db10fa236c3df13d263b57eae Mon Sep 17 00:00:00 2001
From: Schankula Christopher <schankuc@mcmaster.ca>
Date: Tue, 27 Mar 2018 16:29:02 -0400
Subject: [PATCH] goodbye null pointer exceptions???

---
 src/data/FileProcessor.java | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/src/data/FileProcessor.java b/src/data/FileProcessor.java
index d224fc5..af5b7f2 100644
--- a/src/data/FileProcessor.java
+++ b/src/data/FileProcessor.java
@@ -153,7 +153,9 @@ public class FileProcessor {
 		int errorCount=0;	// TESTING ONLY
 		if (!matchEventId.group(10).equals("NA")) {
 			try{
-				al.add(createRecord(Integer.parseInt(matchEventId.group(3)), matchEventId.group(1), BioTree.processRecord(matchEventId.group(10)), Integer.parseInt(matchEventId.group(2)), Float.parseFloat(matchEventId.group(7)), Float.parseFloat(matchEventId.group(8)), Integer.parseInt(matchEventId.group(4)), Integer.parseInt(matchEventId.group(5)), Integer.parseInt(matchEventId.group(6))));
+				Integer taxonId = BioTree.processRecord(matchEventId.group(10));
+				if (taxonId != null)
+					al.add(createRecord(Integer.parseInt(matchEventId.group(3)), matchEventId.group(1), taxonId, Integer.parseInt(matchEventId.group(2)), Float.parseFloat(matchEventId.group(7)), Float.parseFloat(matchEventId.group(8)), Integer.parseInt(matchEventId.group(4)), Integer.parseInt(matchEventId.group(5)), Integer.parseInt(matchEventId.group(6))));
 			} catch(IOException e) {
 				System.out.println("Input Error:" + e);
 			} catch(NullPointerException e) {
-- 
GitLab