diff options
-rw-r--r-- | src/com/vaadin/data/util/sqlcontainer/ColumnProperty.java | 10 |
1 files changed, 4 insertions, 6 deletions
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() { |