Revision 13e1c3b2
Added by Andreas Müller almost 13 years ago
cdmlib-model/src/main/java/eu/etaxonomy/cdm/model/common/VersionableEntity.java | ||
---|---|---|
27 | 27 |
import org.hibernate.search.annotations.FieldBridge; |
28 | 28 |
import org.joda.time.DateTime; |
29 | 29 |
|
30 |
import eu.etaxonomy.cdm.common.CdmUtils; |
|
30 | 31 |
import eu.etaxonomy.cdm.hibernate.DateTimeBridge; |
31 | 32 |
import eu.etaxonomy.cdm.jaxb.DateTimeAdapter; |
32 | 33 |
import eu.etaxonomy.cdm.strategy.match.Match; |
... | ... | |
125 | 126 |
} |
126 | 127 |
ICdmBase cdmObj = (ICdmBase)obj; |
127 | 128 |
boolean uuidEqual = cdmObj.getUuid().equals(this.getUuid()); |
128 |
boolean createdEqual = cdmObj.getCreated().equals(this.getCreated()); |
|
129 |
//TODO is this still needed? |
|
130 |
boolean createdEqual = CdmUtils.nullSafeEqual(cdmObj.getCreated(), this.getCreated()); |
|
129 | 131 |
if (! uuidEqual || !createdEqual){ |
130 | 132 |
return false; |
131 | 133 |
} |
Also available in: Unified diff
Avoid NPE in VersionableEntity.equals() if for some reason created is not set