From 96a8476fd83397b6ccd683182fd25eac688d19a4 Mon Sep 17 00:00:00 2001 From: Greg Burd Date: Thu, 25 Jan 2018 12:41:13 -0500 Subject: [PATCH] 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. --- .../java/net/helenus/core/AbstractEntityDraft.java | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/src/main/java/net/helenus/core/AbstractEntityDraft.java b/src/main/java/net/helenus/core/AbstractEntityDraft.java index 7a6004c..8159347 100644 --- a/src/main/java/net/helenus/core/AbstractEntityDraft.java +++ b/src/main/java/net/helenus/core/AbstractEntityDraft.java @@ -111,12 +111,10 @@ public abstract class AbstractEntityDraft implements Drafted { if (value != null) { if (entity != null) { - if (entityMap.containsKey(key)) { - T currentValue = this.fetch(key); - if (currentValue != null && !value.equals(currentValue)) { - backingMap.put(key, value); - return value; - } + T currentValue = this.fetch(key); + if (currentValue != null && !value.equals(currentValue)) { + backingMap.put(key, value); + return value; } } else { backingMap.put(key, value);