Null values have no keys in the map, so this test fails. In most casses we're here after we resolve a getter so we know this key is valid. Skip the check.
This commit is contained in:
parent
f168b33f6a
commit
96a8476fd8
1 changed files with 4 additions and 6 deletions
|
@ -111,12 +111,10 @@ public abstract class AbstractEntityDraft<E> implements Drafted<E> {
|
|||
|
||||
if (value != null) {
|
||||
if (entity != null) {
|
||||
if (entityMap.containsKey(key)) {
|
||||
T currentValue = this.<T>fetch(key);
|
||||
if (currentValue != null && !value.equals(currentValue)) {
|
||||
backingMap.put(key, value);
|
||||
return value;
|
||||
}
|
||||
T currentValue = this.<T>fetch(key);
|
||||
if (currentValue != null && !value.equals(currentValue)) {
|
||||
backingMap.put(key, value);
|
||||
return value;
|
||||
}
|
||||
} else {
|
||||
backingMap.put(key, value);
|
||||
|
|
Loading…
Reference in a new issue