From 579a4a812285576801ccb2fa2b1d34b61449fc0f Mon Sep 17 00:00:00 2001 From: =?utf8?q?Andreas=20M=C3=BCller?= Date: Thu, 18 Jan 2018 11:45:13 +0100 Subject: [PATCH] ref #7201 remove created from equals and remove equals override in TermBase * the new CdmBase.equals implementation should now be equivalent to old TermBase.equals --- .../etaxonomy/cdm/model/common/CdmBase.java | 6 ++-- .../etaxonomy/cdm/model/common/TermBase.java | 28 +++++++++---------- 2 files changed, 18 insertions(+), 16 deletions(-) diff --git a/cdmlib-model/src/main/java/eu/etaxonomy/cdm/model/common/CdmBase.java b/cdmlib-model/src/main/java/eu/etaxonomy/cdm/model/common/CdmBase.java index 143cbe8e01..81e0d03570 100644 --- a/cdmlib-model/src/main/java/eu/etaxonomy/cdm/model/common/CdmBase.java +++ b/cdmlib-model/src/main/java/eu/etaxonomy/cdm/model/common/CdmBase.java @@ -336,7 +336,8 @@ public abstract class CdmBase implements Serializable, ICdmBase, ISelfDescriptiv /** * Is true if UUID and created timestamp (is this really needed/make sense?) * is the same for the passed Object and this one. - * This method is final as subclasses should not override it. + * This method is final as subclasses should not override it + * (NOTE. * The contract should be the same for all persistable entities. * 2 instances are equal if they represent the same entity in a given * database. @@ -374,7 +375,8 @@ public abstract class CdmBase implements Serializable, ICdmBase, ISelfDescriptiv } boolean uuidEqual = objUuid.equals(this.getUuid()); //TODO is this still needed? - boolean createdEqual = CdmUtils.nullSafeEqual(cdmObj.getCreated(), this.getCreated()); +// boolean createdEqual = CdmUtils.nullSafeEqual(cdmObj.getCreated(), this.getCreated()); + boolean createdEqual = true; //preliminary, to test im createdEqual is still needed #7201 if (! uuidEqual || !createdEqual){ return false; } diff --git a/cdmlib-model/src/main/java/eu/etaxonomy/cdm/model/common/TermBase.java b/cdmlib-model/src/main/java/eu/etaxonomy/cdm/model/common/TermBase.java index 302c592e91..881463ef8d 100644 --- a/cdmlib-model/src/main/java/eu/etaxonomy/cdm/model/common/TermBase.java +++ b/cdmlib-model/src/main/java/eu/etaxonomy/cdm/model/common/TermBase.java @@ -254,20 +254,20 @@ public abstract class TermBase extends IdentifiableEntity