diff options
author | Artur Signell <artur@vaadin.com> | 2012-09-24 16:19:41 +0300 |
---|---|---|
committer | Artur Signell <artur@vaadin.com> | 2012-10-23 14:42:57 +0300 |
commit | 0121af0c28d92db37dea94050f3453ecf46556b9 (patch) | |
tree | ba8397bcfbf5747708f040fee76a6dd5cb8bc515 /server/src/com/vaadin/ui/AbstractField.java | |
parent | ce0640100a3892a1e36d25df1b85de73b6e2d1d0 (diff) | |
download | vaadin-framework-0121af0c28d92db37dea94050f3453ecf46556b9.tar.gz vaadin-framework-0121af0c28d92db37dea94050f3453ecf46556b9.zip |
Changed Property.setValue(Object) to setValue(T) (#8791)
Change-Id: I9f0e6bd62102c5adc461884b1f3b2cbe69f19259
Diffstat (limited to 'server/src/com/vaadin/ui/AbstractField.java')
-rw-r--r-- | server/src/com/vaadin/ui/AbstractField.java | 14 |
1 files changed, 3 insertions, 11 deletions
diff --git a/server/src/com/vaadin/ui/AbstractField.java b/server/src/com/vaadin/ui/AbstractField.java index d6dd03c171..59f730f275 100644 --- a/server/src/com/vaadin/ui/AbstractField.java +++ b/server/src/com/vaadin/ui/AbstractField.java @@ -427,17 +427,9 @@ public abstract class AbstractField<T> extends AbstractComponent implements * @throws Property.ReadOnlyException */ @Override - public void setValue(Object newFieldValue) - throws Property.ReadOnlyException, Converter.ConversionException { - // This check is needed as long as setValue accepts Object instead of T - if (newFieldValue != null) { - if (!getType().isAssignableFrom(newFieldValue.getClass())) { - throw new Converter.ConversionException("Value of type " - + newFieldValue.getClass() + " cannot be assigned to " - + getType().getName()); - } - } - setValue((T) newFieldValue, false); + public void setValue(T newFieldValue) throws Property.ReadOnlyException, + Converter.ConversionException { + setValue(newFieldValue, false); } /** |