When items are reset, they may also be null which would incorrectly return false.

This commit is contained in:
Greg Burd 2017-09-26 10:18:29 -04:00
parent 5c8a0360a2
commit 16af6ea175
2 changed files with 3 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.44-SNAPSHOT</version>
<version>2.0.45-SNAPSHOT</version>
<packaging>jar</packaging>
<name>helenus</name>

View file

@ -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;