diff options
author | Jens Jansson <peppe@vaadin.com> | 2012-01-18 15:16:12 +0200 |
---|---|---|
committer | Jens Jansson <peppe@vaadin.com> | 2012-01-18 15:16:12 +0200 |
commit | 2b29b8298054617fef7e6a170b47a75d689be645 (patch) | |
tree | 4d80cc7f07ef2481d0709a69e6561b815e6bfb44 /src/com/vaadin/ui/AbstractComponent.java | |
parent | 838d3f7120ae41b84a8894f7cab64ee09f3c74e4 (diff) | |
download | vaadin-framework-2b29b8298054617fef7e6a170b47a75d689be645.tar.gz vaadin-framework-2b29b8298054617fef7e6a170b47a75d689be645.zip |
#8019 Did a bunch of null checks for possible faulty null states which was not possible when we still used primitives.
Diffstat (limited to 'src/com/vaadin/ui/AbstractComponent.java')
-rw-r--r-- | src/com/vaadin/ui/AbstractComponent.java | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/src/com/vaadin/ui/AbstractComponent.java b/src/com/vaadin/ui/AbstractComponent.java index 4b9449c598..026b64299a 100644 --- a/src/com/vaadin/ui/AbstractComponent.java +++ b/src/com/vaadin/ui/AbstractComponent.java @@ -1324,9 +1324,12 @@ public abstract class AbstractComponent implements Component, MethodEventSource /* * (non-Javadoc) * - * @see com.vaadin.terminal.Sizeable#setHeight(float, int) + * @see com.vaadin.terminal.Sizeable#setHeight(float, Unit) */ public void setHeight(float height, Unit unit) { + if (unit == null) { + throw new IllegalArgumentException("Unit can not be null"); + } this.height = height; heightUnit = unit; requestRepaint(); @@ -1356,9 +1359,12 @@ public abstract class AbstractComponent implements Component, MethodEventSource /* * (non-Javadoc) * - * @see com.vaadin.terminal.Sizeable#setWidth(float, int) + * @see com.vaadin.terminal.Sizeable#setWidth(float, Unit) */ public void setWidth(float width, Unit unit) { + if (unit == null) { + throw new IllegalArgumentException("Unit can not be null"); + } this.width = width; widthUnit = unit; requestRepaint(); |