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:
parent
d3c24b70bf
commit
5c8a0360a2
2 changed files with 2 additions and 2 deletions
2
pom.xml
2
pom.xml
|
@ -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>
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue