summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorLeif Åstrand <leif@vaadin.com>2012-08-03 17:02:56 +0300
committerLeif Åstrand <leif@vaadin.com>2012-08-03 17:02:56 +0300
commitb2761e03005e6fa6671a73e2aaceab0c6ae951f9 (patch)
treef61124138d578bef82869aad55bfff272336051f /tests
parent20af2f5623d264a418f73cd9cd053462227d0eb4 (diff)
downloadvaadin-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.java7
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());
}
}