Skip to content

Commit

Permalink
Use Kotlin fluid File extensions
Browse files Browse the repository at this point in the history
Highlights the conversion of resources to URIs and then to files before
getting an output stream.
  • Loading branch information
fwendland committed Jul 18, 2024
1 parent b4efb6b commit 75d4849
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ class VersionProviderTest {

// change property s.t. internal check fails
val oldValue = properties.setProperty("project.name", "test") as String
FileOutputStream(File(propFile.toURI())).use {
File(propFile.toURI()).outputStream().use {
properties.store(it, null)
}

Expand All @@ -50,7 +50,7 @@ class VersionProviderTest {

// restore original properties file
properties.setProperty("project.name", oldValue)
FileOutputStream(File(propFile.toURI())).use {
File(propFile.toURI()).outputStream().use {
properties.store(it, null)
}
}
Expand Down

0 comments on commit 75d4849

Please sign in to comment.