File tree Expand file tree Collapse file tree 2 files changed +4
-4
lines changed
buildSrc/src/main/kotlin/io/spine/gradle/report/pom Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -92,7 +92,7 @@ internal object PomFormatting {
92
92
* Writes the specified lines using the specified [destination], dividing them
93
93
* by platform-specific line separator.
94
94
*
95
- * The written lines are also padded with platform's line separator from both sides
95
+ * The written lines are also padded with the platform's line separator from both sides.
96
96
*/
97
97
internal fun writeBlocks (destination : StringWriter , vararg lines : String ) {
98
98
lines.iterator().forEach {
Original file line number Diff line number Diff line change @@ -55,7 +55,6 @@ internal constructor(
55
55
*/
56
56
fun writeTo (file : File ) {
57
57
val out = StringWriter ()
58
-
59
58
writeStart(out )
60
59
writeBlocks(
61
60
out ,
@@ -66,8 +65,9 @@ internal constructor(
66
65
)
67
66
PomFormatting .writeEnd(out )
68
67
69
- fileWriter.write(out .toString())
70
- fileWriter.close()
68
+ FileWriter (file).use {
69
+ it.write(out .toString())
70
+ }
71
71
}
72
72
73
73
/* *
You can’t perform that action at this time.
0 commit comments