diff --git a/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/util/TestGSet.java b/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/util/TestGSet.java index 2d39f3daa5..14dde6a0c7 100644 --- a/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/util/TestGSet.java +++ b/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/util/TestGSet.java @@ -23,7 +23,6 @@ import java.util.Random; import org.apache.hadoop.HadoopIllegalArgumentException; -import org.apache.hadoop.util.Time; import org.junit.Assert; import org.junit.Test; @@ -471,7 +470,7 @@ private static class IntElement implements LightWeightGSet.LinkedElement, @Override public boolean equals(Object obj) { - return obj != null && obj instanceof IntElement + return obj instanceof IntElement && value == ((IntElement)obj).value; }