Skip to content

fix(testLegacyEncryption): close FileInputStream i#5886

Open
tejasae-afk wants to merge 1 commit into
yuliskov:masterfrom
tejasae-afk:fix/close-fileinputstream-in-testl
Open

fix(testLegacyEncryption): close FileInputStream i#5886
tejasae-afk wants to merge 1 commit into
yuliskov:masterfrom
tejasae-afk:fix/close-fileinputstream-in-testl

Conversation

@tejasae-afk

Copy link
Copy Markdown

Spotted something in exoplayer-amzn-2.10.6/library/core/src/test/java/com/google/android/exoplayer2/upstream/cache/CachedContentIndexTest.java that might be worth a look: The resource opened there can leak if testLegacyEncryption exits on an error path. this patch moves the allocation into try-with-resources so cleanup happens on every exit path — happy to close if this isn’t useful.

Happy to revise the approach or close this if it doesn’t fit — you know the codebase far better than I do.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant