From d72059e7d801d3e1eb84c3c12dacb937a45bc138 Mon Sep 17 00:00:00 2001 From: bischoffz Date: Mon, 25 Mar 2024 18:49:43 -0400 Subject: [PATCH] TextTableReader allow Empty Strings --- pom.xml | 2 +- .../java/gov/hhs/aspr/ms/util/readers/TextTableReader.java | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/pom.xml b/pom.xml index 6d9645c..ff0bf21 100644 --- a/pom.xml +++ b/pom.xml @@ -7,7 +7,7 @@ gov.hhs.aspr.ms util - 4.1.0 + 4.1.1 jar Modeling Utils diff --git a/src/main/java/gov/hhs/aspr/ms/util/readers/TextTableReader.java b/src/main/java/gov/hhs/aspr/ms/util/readers/TextTableReader.java index d454593..4ac3f4c 100644 --- a/src/main/java/gov/hhs/aspr/ms/util/readers/TextTableReader.java +++ b/src/main/java/gov/hhs/aspr/ms/util/readers/TextTableReader.java @@ -90,7 +90,7 @@ public static void readToMap(String delimeter, String expectedHeader, Path fileP public static void read(String delimeter, String expectedHeader, Path filePath, Consumer consumer) { BufferedReader reader = getReader(filePath); - String[] expectedHeaders = expectedHeader.split(delimeter); + String[] expectedHeaders = expectedHeader.split(delimeter, -1); int expectedHeaderLength = expectedHeaders.length; int headerLength = expectedHeaderLength; @@ -107,7 +107,7 @@ public static void read(String delimeter, String expectedHeader, Path filePath, long lineNumber = 1; while ((line = reader.readLine()) != null) { - String[] lineValues = line.split(delimeter); + String[] lineValues = line.split(delimeter, -1); if (lineIsCommentLine(lineValues[0], delimeter)) { lineNumber++;