When items are reset, they may also be null which would incorrectly return false.
This commit is contained in:
parent
5c8a0360a2
commit
16af6ea175
2 changed files with 3 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.44-SNAPSHOT</version>
|
||||
<version>2.0.45-SNAPSHOT</version>
|
||||
<packaging>jar</packaging>
|
||||
|
||||
<name>helenus</name>
|
||||
|
|
|
@ -111,7 +111,8 @@ public abstract class AbstractEntityDraft<E> implements Drafted<E> {
|
|||
@SuppressWarnings("unchecked")
|
||||
T currentValue = (T) backingMap.get(key);
|
||||
if (currentValue == null || !currentValue.equals(desiredValue)) {
|
||||
return set(key, desiredValue) != null;
|
||||
set(key, desiredValue);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
|
|
Loading…
Reference in a new issue