From 5c8a0360a28a1727111d9efcf2ff6a425b9e7069 Mon Sep 17 00:00:00 2001 From: Greg Burd Date: Tue, 26 Sep 2017 09:26:06 -0400 Subject: [PATCH] Reset of a value in AbstractEntityDraft should update with the current value is either null or not equal to desired value, fixed logic. --- pom.xml | 2 +- src/main/java/net/helenus/core/AbstractEntityDraft.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/pom.xml b/pom.xml index c99c610..6384b1f 100644 --- a/pom.xml +++ b/pom.xml @@ -5,7 +5,7 @@ 4.0.0 net.helenus helenus-core - 2.0.43-SNAPSHOT + 2.0.44-SNAPSHOT jar helenus diff --git a/src/main/java/net/helenus/core/AbstractEntityDraft.java b/src/main/java/net/helenus/core/AbstractEntityDraft.java index 54a3edf..18d9f7c 100644 --- a/src/main/java/net/helenus/core/AbstractEntityDraft.java +++ b/src/main/java/net/helenus/core/AbstractEntityDraft.java @@ -110,7 +110,7 @@ public abstract class AbstractEntityDraft implements Drafted { if (key != null && desiredValue != null) { @SuppressWarnings("unchecked") T currentValue = (T) backingMap.get(key); - if (currentValue != null && !currentValue.equals(desiredValue)) { + if (currentValue == null || !currentValue.equals(desiredValue)) { return set(key, desiredValue) != null; } }