diff options
| author | 2023-04-18 17:07:00 -0700 | |
|---|---|---|
| committer | 2023-04-18 17:09:55 -0700 | |
| commit | 75eb42b914ed228c20f3b8af97ee452e1dcc9e2e (patch) | |
| tree | 3b931439855d592a6dda71751761ff3660876620 /libs/androidfw/AssetManager.cpp | |
| parent | a1355bc271fb4c20f879f5c75921c4f6f82a793b (diff) | |
Use try-with-resources to avoid accidentaly leaking unclosed objects.
Try-with-resources guarantees that objects will be closed even if an
exception happens after their creation. It also handles nulls and avoids
throwing NPE.
Test: built and launched Cuttlefish.
Change-Id: I80e767d1fbbca25a724bfe94e1752f88891a6bb0
Diffstat (limited to 'libs/androidfw/AssetManager.cpp')
0 files changed, 0 insertions, 0 deletions