We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 26d0084 commit 66533aaCopy full SHA for 66533aa
src/main/java/com/jnape/palatable/lambda/functions/builtin/fn2/Eq.java
@@ -3,6 +3,8 @@
3
import com.jnape.palatable.lambda.functions.specialized.BiPredicate;
4
import com.jnape.palatable.lambda.functions.specialized.Predicate;
5
6
+import java.util.Objects;
7
+
8
/**
9
* Type-safe equality in function form; uses {@link Object#equals}, not <code>==</code>.
10
*
@@ -17,7 +19,7 @@ private Eq() {
17
19
18
20
@Override
21
public Boolean checkedApply(A x, A y) {
- return x == null ? y == null : x.equals(y);
22
+ return Objects.equals(x, y);
23
}
24
25
@SuppressWarnings("unchecked")
0 commit comments