Plugin fix: intention description ConvertFinallyToUseCallIntention --> ConvertTryFinallyToUseCallIntention

This commit is contained in:
Mikhail Glukhikh
2016-12-02 14:04:55 +03:00
parent 6301e3ec30
commit 0e9b024720
3 changed files with 0 additions and 0 deletions
@@ -0,0 +1,6 @@
fun main(args: Array<String>) {
val writer = File("hello-world.txt").bufferedReader()
writer.use { writer ->
// do stuff with writer
}
}
@@ -0,0 +1,9 @@
fun main(args: Array<String>) {
val writer = File("hello-world.txt").bufferedReader()
try {
// do stuff with writer
}
finally {
writer.close()
}
}
@@ -0,0 +1,5 @@
<html>
<body>
This intention converts a try-finally block with resource.close() in finally into the resource.use() call
</body>
</html>