J2K: Fix java 9 try-with-resources

This commit is contained in:
Simon Ogorodnik
2020-07-17 23:06:36 +03:00
parent c5005f8695
commit 8bcf1000f6
10 changed files with 107 additions and 14 deletions
+17
View File
@@ -0,0 +1,17 @@
import java.io.BufferedReader
import java.io.IOException
import java.io.InputStreamReader
class Java9 {
@Throws(IOException::class)
fun check() {
val br = BufferedReader(InputStreamReader(System.`in`))
val br2 = BufferedReader(InputStreamReader(System.`in`))
br.use {
br2.use {
br.readLine()
br2.readLine()
}
}
}
}