StarChart-Labs / flare-plugins

Gradle plug-ins with opinionated defaults to allow streamlined, consistent operations
MIT License
1 stars 0 forks source link

Resource Leak When Reading Dependencies From Properties File #56

Closed romeara closed 4 years ago

romeara commented 4 years ago

Currently, the ConstraintFile implementation uses Files.lines to read in values from the dependency properties file. It turns out that the stream returned from this function is a rare occurrence where a Stream's close method must be invoked

Without close behavior implemented, this is currently a resource leak, and can cause issues modifying the file after accessing it via the plugin (running a build where this file has been modified, then trying to check out another Git branch will fail, at least in some OSes, for example)