Skip to content

Commit f1c86c2

Browse files
author
Sam Sudar
committed
Use Arrays.equals for equality in Matrix.java
This doesn't affect the tests, which use .toString() as a proxy for equality, but it might affect users of the library and causes one of my lint tools to complain.
1 parent 1c10d87 commit f1c86c2

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/main/java/com/backblaze/erasure/Matrix.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@
66

77
package com.backblaze.erasure;
88

9+
import java.util.Arrays;
10+
911
/**
1012
* A matrix over the 8-bit Galois field.
1113
*
@@ -177,7 +179,7 @@ public boolean equals(Object other) {
177179
return false;
178180
}
179181
for (int r = 0; r < rows; r++) {
180-
if (!data[r].equals(((Matrix)other).data[r])) {
182+
if (!Arrays.equals(data[r], ((Matrix)other).data[r])) {
181183
return false;
182184
}
183185
}

0 commit comments

Comments
 (0)