diff options
author | Jens Jansson <peppe@vaadin.com> | 2011-12-22 10:09:04 +0200 |
---|---|---|
committer | Jens Jansson <peppe@vaadin.com> | 2011-12-22 12:26:15 +0200 |
commit | cc4c6b28f4d07d70913abe44149117f8dc343601 (patch) | |
tree | d5cfe5d14ec3929f5046573d3fd3f506d8119dcd /src | |
parent | a327be687e901dec4108da4d3e747ebf8cf833c7 (diff) | |
download | vaadin-framework-cc4c6b28f4d07d70913abe44149117f8dc343601.tar.gz vaadin-framework-cc4c6b28f4d07d70913abe44149117f8dc343601.zip |
#8019 fixed an NPE which came along with changing Sizable units from constants to enum
Diffstat (limited to 'src')
-rw-r--r-- | src/com/vaadin/ui/AbstractComponent.java | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/src/com/vaadin/ui/AbstractComponent.java b/src/com/vaadin/ui/AbstractComponent.java index 7462aab3a5..4d81014e7f 100644 --- a/src/com/vaadin/ui/AbstractComponent.java +++ b/src/com/vaadin/ui/AbstractComponent.java @@ -1372,7 +1372,11 @@ public abstract class AbstractComponent implements Component, MethodEventSource */ public void setWidth(String width) { Size size = parseStringSize(width); - setWidth(size.getSize(), size.getUnit()); + if (size != null) { + setWidth(size.getSize(), size.getUnit()); + } else { + setWidth(-1, Unit.PIXELS); + } } /* @@ -1382,7 +1386,11 @@ public abstract class AbstractComponent implements Component, MethodEventSource */ public void setHeight(String height) { Size size = parseStringSize(height); - setHeight(size.getSize(), size.getUnit()); + if (size != null) { + setHeight(size.getSize(), size.getUnit()); + } else { + setHeight(-1, Unit.PIXELS); + } } /* |