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

Commit 57b0f363 authored by Christopher Tate's avatar Christopher Tate Committed by Android (Google) Code Review
Browse files

Merge "Throw on illegal arguments to ArrayUtils.equals(a1, a2, len)" into jb-mr2-dev

parents 81cce37d fc054349
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -79,6 +79,10 @@ public class ArrayUtils
     * @return true if they're equal, false otherwise
     */
    public static boolean equals(byte[] array1, byte[] array2, int length) {
        if (length < 0) {
            throw new IllegalArgumentException();
        }

        if (array1 == array2) {
            return true;
        }