Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 39c52ce5 authored by Atneya Nair's avatar Atneya Nair
Browse files

[util] Improve ArrayMap concurrent exception

Wrap the underlying array OOB exception for better debuggability.

Test: compiles
Bug: 401768134
Flag: EXEMPT logs
Change-Id: I4e545f27b0a03681f1842ab5f70c3f49b2a65cf9
parent 250a0eda
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -129,7 +129,7 @@ public final class ArrayMap<K, V> implements Map<K, V> {
            return ContainerHelpers.binarySearch(hashes, N, hash);
        } catch (ArrayIndexOutOfBoundsException e) {
            if (CONCURRENT_MODIFICATION_EXCEPTIONS) {
                throw new ConcurrentModificationException();
                throw new ConcurrentModificationException(e);
            } else {
                throw e; // the cache is poisoned at this point, there's not much we can do
            }