diff options
author | Jonatan Kronqvist <jonatan.kronqvist@itmill.com> | 2011-09-12 12:30:23 +0000 |
---|---|---|
committer | Jonatan Kronqvist <jonatan.kronqvist@itmill.com> | 2011-09-12 12:30:23 +0000 |
commit | 039fb08c3b7d1331654a04e2131e32d6e3c8bcac (patch) | |
tree | 630085827546f53794dda1580576856d450d2cd0 /src/com/vaadin/data/util/sqlcontainer | |
parent | f066b248ad306277b30eacde0a29c200e6d9c010 (diff) | |
download | vaadin-framework-039fb08c3b7d1331654a04e2131e32d6e3c8bcac.tar.gz vaadin-framework-039fb08c3b7d1331654a04e2131e32d6e3c8bcac.zip |
Cleanup for #7434
svn changeset:20961/svn branch:6.7
Diffstat (limited to 'src/com/vaadin/data/util/sqlcontainer')
-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() { |