diff options
author | Leif Åstrand <leif@vaadin.com> | 2012-08-03 17:02:56 +0300 |
---|---|---|
committer | Leif Åstrand <leif@vaadin.com> | 2012-08-03 17:02:56 +0300 |
commit | b2761e03005e6fa6671a73e2aaceab0c6ae951f9 (patch) | |
tree | f61124138d578bef82869aad55bfff272336051f /tests | |
parent | 20af2f5623d264a418f73cd9cd053462227d0eb4 (diff) | |
download | vaadin-framework-b2761e03005e6fa6671a73e2aaceab0c6ae951f9.tar.gz vaadin-framework-b2761e03005e6fa6671a73e2aaceab0c6ae951f9.zip |
Add shorthand for avoiding null-checks with ResourceReference (#9211)
Diffstat (limited to 'tests')
-rw-r--r-- | tests/testbench/com/vaadin/tests/minitutorials/v7a2/ResourceInStateComponent.java | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/tests/testbench/com/vaadin/tests/minitutorials/v7a2/ResourceInStateComponent.java b/tests/testbench/com/vaadin/tests/minitutorials/v7a2/ResourceInStateComponent.java index f9d4cb38e6..b47f555640 100644 --- a/tests/testbench/com/vaadin/tests/minitutorials/v7a2/ResourceInStateComponent.java +++ b/tests/testbench/com/vaadin/tests/minitutorials/v7a2/ResourceInStateComponent.java @@ -20,11 +20,6 @@ public class ResourceInStateComponent extends AbstractComponent { } public Resource getMyIcon() { - ResourceReference ref = ((ResourceReference) getState().getMyIcon()); - if (ref != null) { - return ref.getResource(); - } else { - return null; - } + return ResourceReference.getResource(getState().getMyIcon()); } } |