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,13 +111,11 @@ public abstract class AbstractEntityDraft<E> implements Drafted<E> {
|
||||||
|
|
||||||
if (value != null) {
|
if (value != null) {
|
||||||
if (entity != null) {
|
if (entity != null) {
|
||||||
if (entityMap.containsKey(key)) {
|
|
||||||
T currentValue = this.<T>fetch(key);
|
T currentValue = this.<T>fetch(key);
|
||||||
if (currentValue != null && !value.equals(currentValue)) {
|
if (currentValue != null && !value.equals(currentValue)) {
|
||||||
backingMap.put(key, value);
|
backingMap.put(key, value);
|
||||||
return value;
|
return value;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
} else {
|
} else {
|
||||||
backingMap.put(key, value);
|
backingMap.put(key, value);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue