Skip to content

Commit

Permalink
resolve comments
Browse files Browse the repository at this point in the history
  • Loading branch information
MrQuansy committed Nov 21, 2024
1 parent c3dc9fb commit 79ef347
Showing 1 changed file with 10 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,6 @@
*/
package org.apache.tsfile.utils;

import jdk.internal.util.ArraysSupport;

import java.io.Serializable;
import java.nio.charset.Charset;
import java.nio.charset.StandardCharsets;
Expand Down Expand Up @@ -105,8 +103,16 @@ public boolean equals(Object o) {
return false;
}

return ArraysSupport.mismatch(binary.getValues(), 0, otherBinary.binary.getValues(), 0, length)
== -1;
byte[] v0 = binary.getValues();
byte[] v1 = otherBinary.binary.getValues();

for (int i = 0; i < length; i++) {
if (v0[i] != v1[i]) {
return false;
}
}

return true;
}

@Override
Expand Down

0 comments on commit 79ef347

Please sign in to comment.