Fix NPE in line iterator

This commit is contained in:
Paul Schaub 2023-11-15 18:50:34 +01:00
parent 3eaae149b7
commit 6c952efca2
Signed by: vanitasvitae
GPG key ID: 62BEE9264BF17311

View file

@ -62,9 +62,9 @@ class InlineVerifyExternal(
val verificationsOutIn = FileInputStream(verificationsOut)
val reader = BufferedReader(InputStreamReader(verificationsOutIn))
val verificationList: MutableList<Verification> = mutableListOf()
var line: String
var line: String?
while (reader.readLine().also { line = it } != null) {
verificationList.add(fromString(line.trim()))
verificationList.add(fromString(line!!.trim()))
}
return verificationList