diff options
| author | 2024-04-10 10:00:06 -0500 | |
|---|---|---|
| committer | 2024-04-10 10:00:06 -0500 | |
| commit | c4b105801cd1adf0e215c573c953d46faa82dc9a (patch) | |
| tree | d3425bae709204d48bd06ff94ef60c8d0de2dcd8 /libs/androidfw/StringPool.cpp | |
| parent | ac18d855987a9558b51c1150bc6d934c01fc7729 (diff) | |
PackageUtils: Use try-with block for DigestInputStream.
Bug: 332045106
Previously, a DigestInputStream object was opened within an
ordinary try clause that was not explicitly closed, causing
potential resource leakage.
This fix changes the opening of that to be within a try-with
clause to ensure auto closure of the stream.
Test: Manual.
adb shell cmd transparency get apex_info -o
The command above was executed pre and post change to
ensure SHA256 of large files are still computed correctly
by this change.
Change-Id: Ic56dbf72ae8375e9f6897eea93f56a6148e33bc1
Diffstat (limited to 'libs/androidfw/StringPool.cpp')
0 files changed, 0 insertions, 0 deletions