summaryrefslogtreecommitdiffstats
path: root/src/com/vaadin/data/util/sqlcontainer
diff options
context:
space:
mode:
authorJonatan Kronqvist <jonatan.kronqvist@itmill.com>2011-09-12 12:30:23 +0000
committerJonatan Kronqvist <jonatan.kronqvist@itmill.com>2011-09-12 12:30:23 +0000
commit039fb08c3b7d1331654a04e2131e32d6e3c8bcac (patch)
tree630085827546f53794dda1580576856d450d2cd0 /src/com/vaadin/data/util/sqlcontainer
parentf066b248ad306277b30eacde0a29c200e6d9c010 (diff)
downloadvaadin-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.java10
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() {