Skip to content
Snippets Groups Projects

Fix "A resource failed to call close." warnings.

Merged Ryan Harg requested to merge bugfix/missing-close into develop

The leaking resource is the BufferedReader returned from FFACache.get(). This is called from several places, most often to read one or all lines of a file.

Add getLine/getLines to FFACache to return the needed line or lines, closing the BufferedReader in the FFACache module. Where the BufferedReader itself is needed (Repository.fromCache), ensure the BufferedReader is closed after use.

The offending resource was identified with:

StrictMode.setVmPolicy(StrictMode.VmPolicy.Builder(). detectLeakedClosableObjects().penaltyLog().build())

Closes #119 (closed)

Edited by Ryan Harg

Merge request reports

Loading
Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
Please register or sign in to reply
Loading