CSV scanner now skips empty line
Signed-off-by: Jim Martens <github@2martens.de>
This commit is contained in:
parent
995f01aaa0
commit
2eaad2996e
|
@ -23,6 +23,9 @@ public class CSVScanner {
|
||||||
while (scanner.hasNextLine()) {
|
while (scanner.hasNextLine()) {
|
||||||
List<String> line = new ArrayList<>();
|
List<String> line = new ArrayList<>();
|
||||||
String line_str = scanner.nextLine();
|
String line_str = scanner.nextLine();
|
||||||
|
if (line_str.isEmpty()) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
Scanner line_scanner = new Scanner(line_str);
|
Scanner line_scanner = new Scanner(line_str);
|
||||||
line_scanner.useDelimiter(";");
|
line_scanner.useDelimiter(";");
|
||||||
while (line_scanner.hasNext()) {
|
while (line_scanner.hasNext()) {
|
||||||
|
|
Loading…
Reference in New Issue