Skip to content

Commit 58950b4

Browse files
Andre Naujoksjulietkilo
authored andcommitted
add a final processLine after the file has ended, so the last block of data is parsed as well.
Signed-off-by: julietkilo <[email protected]>
1 parent 619cc46 commit 58950b4

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/main/java/com/github/canbabel/canio/dbc/DbcReader.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -288,6 +288,8 @@ public boolean parseFile(File file, OutputStream logStream) {
288288
contents.append(text);
289289
isFirstLine = false;
290290
}
291+
// since there is no last keyword to trigger the parsing of the last block, we just parse it.
292+
processLine(contents);
291293
network.getBus().add(bus);
292294
} catch (FileNotFoundException e) {
293295
e.printStackTrace(logWriter);

0 commit comments

Comments
 (0)