summaryrefslogtreecommitdiffstats
path: root/server/src/com/vaadin/ui/Slider.java
diff options
context:
space:
mode:
Diffstat (limited to 'server/src/com/vaadin/ui/Slider.java')
-rw-r--r--server/src/com/vaadin/ui/Slider.java9
1 files changed, 2 insertions, 7 deletions
diff --git a/server/src/com/vaadin/ui/Slider.java b/server/src/com/vaadin/ui/Slider.java
index fe913f6b2c..4c829a7cb4 100644
--- a/server/src/com/vaadin/ui/Slider.java
+++ b/server/src/com/vaadin/ui/Slider.java
@@ -289,14 +289,9 @@ public class Slider extends AbstractField<Double> {
}
@Override
- public void setValue(Object newFieldValue) {
- if (newFieldValue instanceof Number) {
- // Support setting all types of Numbers
- newFieldValue = ((Number) newFieldValue).doubleValue();
- }
+ public void setValue(Double newFieldValue) {
super.setValue(newFieldValue);
- // The cast is safe if the above call returned without throwing
- getState().value = (Double) newFieldValue;
+ getState().value = newFieldValue;
}
/**