From 7345cc1c080e004573b7403d98d7ea9b557acf56 Mon Sep 17 00:00:00 2001 From: Julien Guerinet Date: Thu, 13 Jul 2017 11:20:03 -0400 Subject: [PATCH] Added check for a null header. --- src/main/java/com/guerinet/stringparser/StringParser.java | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/main/java/com/guerinet/stringparser/StringParser.java b/src/main/java/com/guerinet/stringparser/StringParser.java index fd8582f..3987ccb 100644 --- a/src/main/java/com/guerinet/stringparser/StringParser.java +++ b/src/main/java/com/guerinet/stringparser/StringParser.java @@ -320,6 +320,11 @@ private static List downloadStrings(String urlName, String url, for (int i = 0; i < header.length; i ++) { String string = header[i]; + if (string == null) { + // Disregard null headers + continue; + } + // Check if the String matches the key key if (string.equalsIgnoreCase(KEY)) { keyColumn = i;