diff --git a/fine-jedis/src/com/fr/third/redis/clients/jedis/Tuple.java b/fine-jedis/src/com/fr/third/redis/clients/jedis/Tuple.java index a2b7575f2..36bfe481b 100755 --- a/fine-jedis/src/com/fr/third/redis/clients/jedis/Tuple.java +++ b/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 { 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 { public String toString() { return '[' + SafeEncoder.encode(element) + ',' + score + ']'; } + + public static boolean equals(Object a, Object b) { + return (a == b) || (a != null && a.equals(b)); + } }