Plugin fix: intention description ConvertFinallyToUseCallIntention --> ConvertTryFinallyToUseCallIntention
This commit is contained in:
+6
@@ -0,0 +1,6 @@
|
||||
fun main(args: Array<String>) {
|
||||
val writer = File("hello-world.txt").bufferedReader()
|
||||
writer.use { writer ->
|
||||
// do stuff with writer
|
||||
}
|
||||
}
|
||||
+9
@@ -0,0 +1,9 @@
|
||||
fun main(args: Array<String>) {
|
||||
val writer = File("hello-world.txt").bufferedReader()
|
||||
try {
|
||||
// do stuff with writer
|
||||
}
|
||||
finally {
|
||||
writer.close()
|
||||
}
|
||||
}
|
||||
+5
@@ -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>
|
||||
Reference in New Issue
Block a user