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

This commit is contained in:
Christopher Tate
2013-03-22 22:24:21 +00:00
committed by Android (Google) Code Review

View File

@@ -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;
}