Skip to content

Commit

Permalink
#44 close reader after usage
Browse files Browse the repository at this point in the history
  • Loading branch information
Alex009 committed May 4, 2020
1 parent 0b9120c commit 61007fb
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,6 @@ actual class FileResource(
val resources: Resources = context.resources
val inputStream: InputStream = resources.openRawResource(rawResId)
val bufferedReader = BufferedReader(InputStreamReader(inputStream))
return bufferedReader.readText()
return bufferedReader.use { it.readText() }
}
}

0 comments on commit 61007fb

Please sign in to comment.