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/Label.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/Label.java')
-rw-r--r-- | server/src/com/vaadin/ui/Label.java | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/server/src/com/vaadin/ui/Label.java b/server/src/com/vaadin/ui/Label.java index 89281e0c27..27145946d8 100644 --- a/server/src/com/vaadin/ui/Label.java +++ b/server/src/com/vaadin/ui/Label.java @@ -192,14 +192,9 @@ public class Label extends AbstractComponent implements Property<String>, * the New value of the label. */ @Override - public void setValue(Object newStringValue) { - if (newStringValue != null && newStringValue.getClass() != String.class) { - throw new Converter.ConversionException("Value of type " - + newStringValue.getClass() + " cannot be assigned to " - + String.class.getName()); - } + public void setValue(String newStringValue) { if (getPropertyDataSource() == null) { - getState().text = (String) newStringValue; + getState().text = newStringValue; } else { throw new IllegalStateException( "Label is only a Property.Viewer and cannot update its data source"); |