KT-12100 convert try / finally to use: safe close() is allowed in finally + correct new lines

This commit is contained in:
Mikhail Glukhikh
2016-12-01 19:23:18 +03:00
parent 0ac443066e
commit 0cc52e2ff8
9 changed files with 37 additions and 11 deletions
@@ -1,11 +1,13 @@
// IS_APPLICABLE: false
// WITH_RUNTIME
import java.io.File
import java.io.BufferedReader
fun bar() {}
fun foo(reader: BufferedReader?) {
try {
reader?.readLine()
bar()
}
<caret>finally {
reader?.close()