From 4b34872b44701581d5378c13765483e6d42fd77f Mon Sep 17 00:00:00 2001 From: Claudio Atzori Date: Mon, 25 May 2020 10:14:15 +0200 Subject: [PATCH] using Objects.equals to check Field equivalence --- dhp-schemas/src/main/java/eu/dnetlib/dhp/schema/oaf/Field.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/dhp-schemas/src/main/java/eu/dnetlib/dhp/schema/oaf/Field.java b/dhp-schemas/src/main/java/eu/dnetlib/dhp/schema/oaf/Field.java index 1a85c6842..8358bc4b3 100644 --- a/dhp-schemas/src/main/java/eu/dnetlib/dhp/schema/oaf/Field.java +++ b/dhp-schemas/src/main/java/eu/dnetlib/dhp/schema/oaf/Field.java @@ -2,6 +2,7 @@ package eu.dnetlib.dhp.schema.oaf; import java.io.Serializable; +import java.util.Objects; public class Field implements Serializable { @@ -39,6 +40,6 @@ public class Field implements Serializable { if (getClass() != obj.getClass()) return false; Field other = (Field) obj; - return getValue().equals(other.getValue()); + return Objects.equals(getValue(), other.getValue()); } }