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

Commit 5c9e3c6a authored by Svetoslav Ganov's avatar Svetoslav Ganov Committed by android-build-merger
Browse files

Merge \\"Removed warning when objects are added on wrong order.\\" into nyc-dev am: a98e4512

am: 7524b136

Change-Id: Ied3eaa444419fcb6b429a2101d960ba0dcba449f
parents 4e7c631a 7524b136
Loading
Loading
Loading
Loading
+8 −5
Original line number Original line Diff line number Diff line
@@ -402,11 +402,14 @@ public final class ArraySet<E> implements Collection<E>, Set<E> {
            throw new IllegalStateException("Array is full");
            throw new IllegalStateException("Array is full");
        }
        }
        if (index > 0 && mHashes[index - 1] > hash) {
        if (index > 0 && mHashes[index - 1] > hash) {
            // Cannot optimize since it would break the sorted order - fallback to add()
            if (DEBUG) {
                RuntimeException e = new RuntimeException("here");
                RuntimeException e = new RuntimeException("here");
                e.fillInStackTrace();
                e.fillInStackTrace();
                Log.w(TAG, "New hash " + hash
                Log.w(TAG, "New hash " + hash
                        + " is before end of array hash " + mHashes[index - 1]
                        + " is before end of array hash " + mHashes[index - 1]
                        + " at index " + index, e);
                        + " at index " + index, e);
            }
            add(value);
            add(value);
            return;
            return;
        }
        }