SystemCertificateSource: Mitigate NPE when checking updateable certs directory
The updateable conscrypt APEX certificate store located at /apex/com.android.conscrypt/cacert may be empty.
Previously we would check whether or not the folder is empty by determinimg if the length of the returned list[]
array was non-zero. However, when a directory is empty, a null value is returned instead of an empty array. We
rectify that here by utilizing the helper function ArrayUtils.isEmpty() instead of manually checking the length.
Flag: NONE
Test: atest NetworkSecurityConfigTests
Change-Id: I3557f75aa5a807623df6e978145c4378f06c625b
Signed-off-by:
Syed Zaidi <zaidisyed@meta.com>
Loading
Please register or sign in to comment