Skip to content

Commit

Permalink
fix: Fixes file leak in Extensions.kt
Browse files Browse the repository at this point in the history
Merge pull request #82 from pablobaxter/main
  • Loading branch information
wangela authored Apr 29, 2024
2 parents ffe2539 + d8953b6 commit a36e713
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 a36e713

Please sign in to comment.