Skip to content

Commit

Permalink
Fix leaky file
Browse files Browse the repository at this point in the history
  • Loading branch information
pablobaxter committed Apr 16, 2024
1 parent 16b9e72 commit d8953b6
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -49,9 +49,9 @@ fun Project.loadPropertiesFile(fileName: String): Properties {
}

// Load contents into properties object
val properties = Properties()
properties.load(propertiesFile.inputStream())
return properties
return Properties().apply {
propertiesFile.inputStream().use(::load)
}
}

private val javaVarRegexp = Regex(pattern = "((?![a-zA-Z_\$0-9]).)")
Expand Down

0 comments on commit d8953b6

Please sign in to comment.