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:
Greg Burd 2018-01-25 12:41:13 -05:00
parent f168b33f6a
commit 96a8476fd8

View file

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