From e9129a6b6b9402a6d1454caa750a1d7422ab4ed3 Mon Sep 17 00:00:00 2001
From: Piotr Gawron <piotr.gawron@uni.lu>
Date: Thu, 16 Mar 2017 10:49:53 +0100
Subject: [PATCH] unimportant log messages removed

---
 .../java/smash/appointment/parse/SubjectParser.java    | 10 ++++++++--
 1 file changed, 8 insertions(+), 2 deletions(-)

diff --git a/appointment-import/src/main/java/smash/appointment/parse/SubjectParser.java b/appointment-import/src/main/java/smash/appointment/parse/SubjectParser.java
index f979012b..557f4806 100644
--- a/appointment-import/src/main/java/smash/appointment/parse/SubjectParser.java
+++ b/appointment-import/src/main/java/smash/appointment/parse/SubjectParser.java
@@ -63,7 +63,10 @@ public abstract class SubjectParser {
 	private Subject parseSubject(Row row) {
 		String screeningNumber = parseScreeningNumber(row);
 		if (screeningNumber == null || screeningNumber.isEmpty()) {
-			logger.debug("Skipping row: (" + getString(row.getCell(0)) + ", " + getString(row.getCell(1)) + ")");
+			String name = getString(row.getCell(0)) + " " + getString(row.getCell(1));
+			if (!name.trim().isEmpty()) {
+				logger.debug("Skipping row: (" + name + ")");
+			}
 			return null;
 		}
 		String name = parseName(row);
@@ -97,6 +100,7 @@ public abstract class SubjectParser {
 	}
 
 	protected abstract boolean parseDead(Row row);
+
 	protected abstract boolean parsePostponed(Row row);
 
 	protected abstract boolean parseResigned(Row row);
@@ -214,7 +218,9 @@ public abstract class SubjectParser {
 		result = result.replaceAll("cot", "08");
 		result = result.replaceAll("sep", "09");
 		result = result.replaceAll("oct", "10");
-		if (result.length() != 10) {
+		if (result.trim().isEmpty()) {
+			result = defaultDateString;
+		} else if (result.length() != 10) {
 			logger.warn("Invalid date. Ignoring: " + result);
 			result = defaultDateString;
 		}
-- 
GitLab