Skip to content

Commit 5e7ea46

Browse files
committed
modify RichReader for ability to check for the last line
1 parent dd6fd75 commit 5e7ea46

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

core/src/main/scala/org/dbpedia/extraction/util/RichReader.scala

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,9 @@ class RichReader(reader: BufferedReader) {
1717
def foreach[U](proc: String => U): Unit = {
1818
while (true) {
1919
val line = reader.readLine()
20-
if (line == null) return
20+
2121
proc(line)
22+
if (line == null) return
2223
}
2324
}
2425
}

0 commit comments

Comments
 (0)