From 36ea2972b25467c7ba435922d128956c87d14fdf Mon Sep 17 00:00:00 2001 From: rinoux Date: Fri, 9 Mar 2018 16:47:52 +0800 Subject: [PATCH] =?UTF-8?q?=E6=97=A0JIRA=E4=BB=BB=E5=8A=A1=20jdk1.6?= =?UTF-8?q?=E5=85=BC=E5=AE=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- fine-jedis/src/com/fr/third/redis/clients/jedis/Tuple.java | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) 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)); + } }