summaryrefslogtreecommitdiffstats
path: root/src/com/vaadin/ui/AbstractComponent.java
diff options
context:
space:
mode:
authorHenri Sara <hesara@vaadin.com>2012-01-27 18:38:13 +0200
committerHenri Sara <hesara@vaadin.com>2012-01-27 18:38:13 +0200
commit91b3084e060f975ee35573972ace8bcf8fe3a5ed (patch)
tree154bb05f457b91388454fe42cd7652ca0d05c688 /src/com/vaadin/ui/AbstractComponent.java
parent06ef07c7fd6eab0b7446367fa5a43384ae469cef (diff)
downloadvaadin-framework-91b3084e060f975ee35573972ace8bcf8fe3a5ed.tar.gz
vaadin-framework-91b3084e060f975ee35573972ace8bcf8fe3a5ed.zip
Merge changes from master to rpc branch.
Diffstat (limited to 'src/com/vaadin/ui/AbstractComponent.java')
-rw-r--r--src/com/vaadin/ui/AbstractComponent.java10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/com/vaadin/ui/AbstractComponent.java b/src/com/vaadin/ui/AbstractComponent.java
index de114e996e..318bcd7ea2 100644
--- a/src/com/vaadin/ui/AbstractComponent.java
+++ b/src/com/vaadin/ui/AbstractComponent.java
@@ -1334,9 +1334,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();
@@ -1366,9 +1369,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();