From 039fb08c3b7d1331654a04e2131e32d6e3c8bcac Mon Sep 17 00:00:00 2001 From: Jonatan Kronqvist Date: Mon, 12 Sep 2011 12:30:23 +0000 Subject: Cleanup for #7434 svn changeset:20961/svn branch:6.7 --- src/com/vaadin/data/util/sqlcontainer/ColumnProperty.java | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) (limited to 'src/com/vaadin/data/util/sqlcontainer') diff --git a/src/com/vaadin/data/util/sqlcontainer/ColumnProperty.java b/src/com/vaadin/data/util/sqlcontainer/ColumnProperty.java index db935e0124..8d6175d426 100644 --- a/src/com/vaadin/data/util/sqlcontainer/ColumnProperty.java +++ b/src/com/vaadin/data/util/sqlcontainer/ColumnProperty.java @@ -140,12 +140,10 @@ final public class ColumnProperty implements Property { } private boolean isValueAlreadySet(Object newValue) { - if (isModified()) { - return (isNullable() && newValue == null && changedValue == null) - || newValue.equals(changedValue); - } - return (isNullable() && newValue == null && value == null) - || newValue.equals(value); + Object referenceValue = isModified() ? changedValue : value; + + return (isNullable() && newValue == null && referenceValue == null) + || newValue.equals(referenceValue); } public Class getType() { -- cgit v1.2.3