Use bufferedReader() extension method

Signed-off-by: Graham <gpe@openrs2.dev>
Graham 4 years ago
parent efc7ba9d2b
commit 2c7abdc7ff
  1. 4
      crypto/src/test/java/dev/openrs2/crypto/IsaacRandomTest.kt

@ -1,7 +1,5 @@
package dev.openrs2.crypto package dev.openrs2.crypto
import java.io.BufferedReader
import java.io.InputStreamReader
import java.nio.ByteBuffer import java.nio.ByteBuffer
import java.nio.ByteOrder import java.nio.ByteOrder
import kotlin.test.Test import kotlin.test.Test
@ -62,7 +60,7 @@ object IsaacRandomTest {
private fun readVector(file: String): IntArray { private fun readVector(file: String): IntArray {
val input = IsaacRandomTest::class.java.getResourceAsStream("isaac/$file") val input = IsaacRandomTest::class.java.getResourceAsStream("isaac/$file")
return BufferedReader(InputStreamReader(input)).useLines { lines -> return input.bufferedReader().useLines { lines ->
val elements = mutableListOf<Int>() val elements = mutableListOf<Int>()
for (line in lines) { for (line in lines) {

Loading…
Cancel
Save