|
|
@@ -42,6 +42,7 @@ import com.vaadin.server.AbstractErrorMessage; |
|
|
|
import com.vaadin.server.CompositeErrorMessage; |
|
|
|
import com.vaadin.server.ErrorMessage; |
|
|
|
import com.vaadin.shared.AbstractFieldState; |
|
|
|
import com.vaadin.shared.util.SharedUtil; |
|
|
|
|
|
|
|
/** |
|
|
|
* <p> |
|
|
@@ -427,7 +428,7 @@ public abstract class AbstractField<T> extends AbstractComponent implements |
|
|
|
throws Property.ReadOnlyException, Converter.ConversionException, |
|
|
|
InvalidValueException { |
|
|
|
|
|
|
|
if (!equals(newFieldValue, getInternalValue())) { |
|
|
|
if (!SharedUtil.equals(newFieldValue, getInternalValue())) { |
|
|
|
|
|
|
|
// Read only fields can not be changed |
|
|
|
if (isReadOnly()) { |
|
|
@@ -435,7 +436,8 @@ public abstract class AbstractField<T> extends AbstractComponent implements |
|
|
|
} |
|
|
|
try { |
|
|
|
T doubleConvertedFieldValue = convertFromModel(convertToModel(newFieldValue)); |
|
|
|
if (!equals(newFieldValue, doubleConvertedFieldValue)) { |
|
|
|
if (!SharedUtil |
|
|
|
.equals(newFieldValue, doubleConvertedFieldValue)) { |
|
|
|
newFieldValue = doubleConvertedFieldValue; |
|
|
|
repaintIsNotNeeded = false; |
|
|
|
} |
|
|
@@ -512,11 +514,9 @@ public abstract class AbstractField<T> extends AbstractComponent implements |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
@Deprecated |
|
|
|
static boolean equals(Object value1, Object value2) { |
|
|
|
if (value1 == null) { |
|
|
|
return value2 == null; |
|
|
|
} |
|
|
|
return value1.equals(value2); |
|
|
|
return SharedUtil.equals(value1, value2); |
|
|
|
} |
|
|
|
|
|
|
|
/* External data source */ |
|
|
@@ -1204,8 +1204,8 @@ public abstract class AbstractField<T> extends AbstractComponent implements |
|
|
|
public void valueChange(Property.ValueChangeEvent event) { |
|
|
|
if (!isBuffered()) { |
|
|
|
if (committingValueToDataSource) { |
|
|
|
boolean propertyNotifiesOfTheBufferedValue = equals(event |
|
|
|
.getProperty().getValue(), getInternalValue()); |
|
|
|
boolean propertyNotifiesOfTheBufferedValue = SharedUtil.equals( |
|
|
|
event.getProperty().getValue(), getInternalValue()); |
|
|
|
if (!propertyNotifiesOfTheBufferedValue) { |
|
|
|
/* |
|
|
|
* Property (or chained property like PropertyFormatter) now |
|
|
@@ -1321,7 +1321,7 @@ public abstract class AbstractField<T> extends AbstractComponent implements |
|
|
|
} |
|
|
|
|
|
|
|
private void localeMightHaveChanged() { |
|
|
|
if (!equals(valueLocale, getLocale())) { |
|
|
|
if (!SharedUtil.equals(valueLocale, getLocale())) { |
|
|
|
// The locale HAS actually changed |
|
|
|
|
|
|
|
if (dataSource != null && !isModified()) { |
|
|
@@ -1329,7 +1329,7 @@ public abstract class AbstractField<T> extends AbstractComponent implements |
|
|
|
// read from that we want to update the value |
|
|
|
T newInternalValue = convertFromModel(getPropertyDataSource() |
|
|
|
.getValue()); |
|
|
|
if (!equals(newInternalValue, getInternalValue())) { |
|
|
|
if (!SharedUtil.equals(newInternalValue, getInternalValue())) { |
|
|
|
setInternalValue(newInternalValue); |
|
|
|
fireValueChange(false); |
|
|
|
} |
|
|
@@ -1345,7 +1345,7 @@ public abstract class AbstractField<T> extends AbstractComponent implements |
|
|
|
Object convertedValue = convertToModel(getInternalValue(), |
|
|
|
valueLocale); |
|
|
|
T newinternalValue = convertFromModel(convertedValue); |
|
|
|
if (!equals(getInternalValue(), newinternalValue)) { |
|
|
|
if (!SharedUtil.equals(getInternalValue(), newinternalValue)) { |
|
|
|
setConvertedValue(convertedValue); |
|
|
|
} |
|
|
|
} |
|
|
@@ -1594,7 +1594,7 @@ public abstract class AbstractField<T> extends AbstractComponent implements |
|
|
|
setModified(false); |
|
|
|
|
|
|
|
// If the new value differs from the previous one |
|
|
|
if (!equals(newFieldValue, getInternalValue())) { |
|
|
|
if (!SharedUtil.equals(newFieldValue, getInternalValue())) { |
|
|
|
setInternalValue(newFieldValue); |
|
|
|
fireValueChange(false); |
|
|
|
} else if (wasModified) { |