Browse Source

无JIRA任务 jdk1.6兼容

10.0
rinoux 7 years ago
parent
commit
36ea2972b2
  1. 7
      fine-jedis/src/com/fr/third/redis/clients/jedis/Tuple.java

7
fine-jedis/src/com/fr/third/redis/clients/jedis/Tuple.java

@ -1,7 +1,6 @@
package com.fr.third.redis.clients.jedis;
import java.util.Arrays;
import java.util.Objects;
import com.fr.third.redis.clients.jedis.util.ByteArrayComparator;
import com.fr.third.redis.clients.jedis.util.SafeEncoder;
@ -42,7 +41,7 @@ public class Tuple implements Comparable<Tuple> {
if (getClass() != obj.getClass()) return false;
Tuple other = (Tuple) obj;
if (!Arrays.equals(element, other.element)) return false;
return Objects.equals(score, other.score);
return equals(score, other.score);
}
@Override
@ -77,4 +76,8 @@ public class Tuple implements Comparable<Tuple> {
public String toString() {
return '[' + SafeEncoder.encode(element) + ',' + score + ']';
}
public static boolean equals(Object a, Object b) {
return (a == b) || (a != null && a.equals(b));
}
}

Loading…
Cancel
Save