Merge pull request #5 from inm-certi/master

Fix parser to work with empty lines after EOF
This commit is contained in:
Jan Breuer 2018-05-25 23:06:29 +02:00 committed by GitHub
commit 6a2b638463
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 0 deletions

View File

@ -217,6 +217,10 @@ public class Parser {
String recordStr;
while ((recordStr = reader.readLine()) != null) {
// Ignore if this is a blank line.
if (recordStr.isEmpty()) {
continue;
}
Record record = parseRecord(recordStr);
processRecord(record);
recordIdx++;