Add catching of IllegalArgumentException, which gets thrown when there is a malformed Unicode escape character sequence
System crashes are occurring for partners (b/396308673) due to the DataStore failing to load. While we investigate the underlying cause, add IllegalArgumentExceptions to the catch clause to prevent the fatal exception from being thrown. Change-Id: I99e72af60064e2f0a5eed69c4f82b6cc69ee5f66 Fixes: 396308673 Flag: com.android.net.ct.flags.certificate_transparency_service Test: atest NetworkSecurityUnitTests
This commit is contained in:
parent
5817d88cf5
commit
3f4ee6c4b5
1 changed files with 2 additions and 1 deletions
|
|
@ -44,8 +44,9 @@ class DataStore extends Properties {
|
|||
}
|
||||
try (InputStream in = new FileInputStream(mPropertyFile)) {
|
||||
load(in);
|
||||
} catch (IOException e) {
|
||||
} catch (IOException | IllegalArgumentException e) {
|
||||
Log.e(TAG, "Error loading property store", e);
|
||||
delete();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue