You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by gg...@apache.org on 2020/11/20 21:29:23 UTC
[commons-rdf] branch master updated: Use Objects.equals().
This is an automated email from the ASF dual-hosted git repository.
ggregory pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/commons-rdf.git
The following commit(s) were added to refs/heads/master by this push:
new b649e6a Use Objects.equals().
b649e6a is described below
commit b649e6a11c02dfc046bb5d846079120c623ae2e8
Author: Gary Gregory <ga...@gmail.com>
AuthorDate: Fri Nov 20 16:29:19 2020 -0500
Use Objects.equals().
---
.../src/main/java/org/apache/commons/rdf/simple/BlankNodeImpl.java | 6 +-----
1 file changed, 1 insertion(+), 5 deletions(-)
diff --git a/commons-rdf-simple/src/main/java/org/apache/commons/rdf/simple/BlankNodeImpl.java b/commons-rdf-simple/src/main/java/org/apache/commons/rdf/simple/BlankNodeImpl.java
index f604f3e..f751f47 100644
--- a/commons-rdf-simple/src/main/java/org/apache/commons/rdf/simple/BlankNodeImpl.java
+++ b/commons-rdf-simple/src/main/java/org/apache/commons/rdf/simple/BlankNodeImpl.java
@@ -100,11 +100,7 @@ final class BlankNodeImpl implements BlankNode, SimpleRDFTerm {
return false;
}
final BlankNodeImpl other = (BlankNodeImpl) obj;
- if (uniqueReference == null) {
- if (other.uniqueReference != null) {
- return false;
- }
- } else if (!uniqueReference.equals(other.uniqueReference)) {
+ if (!Objects.equals(uniqueReference, other.uniqueReference)) {
return false;
}
return true;