Reset of a value in AbstractEntityDraft should update with the current value is either null or not equal to desired value, fixed logic.

This commit is contained in:
Greg Burd 2017-09-26 09:26:06 -04:00
parent d3c24b70bf
commit 5c8a0360a2
2 changed files with 2 additions and 2 deletions

View file

@ -5,7 +5,7 @@
<modelVersion>4.0.0</modelVersion>
<groupId>net.helenus</groupId>
<artifactId>helenus-core</artifactId>
<version>2.0.43-SNAPSHOT</version>
<version>2.0.44-SNAPSHOT</version>
<packaging>jar</packaging>
<name>helenus</name>

View file

@ -110,7 +110,7 @@ public abstract class AbstractEntityDraft<E> implements Drafted<E> {
if (key != null && desiredValue != null) {
@SuppressWarnings("unchecked")
T currentValue = (T) backingMap.get(key);
if (currentValue != null && !currentValue.equals(desiredValue)) {
if (currentValue == null || !currentValue.equals(desiredValue)) {
return set(key, desiredValue) != null;
}
}