diff options
author | Leif Åstrand <leif@vaadin.com> | 2012-09-19 12:19:30 +0300 |
---|---|---|
committer | Leif Åstrand <leif@vaadin.com> | 2012-09-19 12:19:43 +0300 |
commit | c1e82529b1191d9c41de0dc8a4cde8caf9754329 (patch) | |
tree | 47724ea23cd2e4126275b5d82379d29a77578569 /uitest/src/com/vaadin/tests/resources | |
parent | 56a5f6853318acbd743346e0f14faa0ed7325fa4 (diff) | |
download | vaadin-framework-c1e82529b1191d9c41de0dc8a4cde8caf9754329.tar.gz vaadin-framework-c1e82529b1191d9c41de0dc8a4cde8caf9754329.zip |
Add some getCurrent() methods (#9505)
This change also clears the current instances in the beginning of each
request in case something has accidentally been left uncleared in a
previous request on the same thread.
Diffstat (limited to 'uitest/src/com/vaadin/tests/resources')
-rw-r--r-- | uitest/src/com/vaadin/tests/resources/NonExistingFileResource.java | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/uitest/src/com/vaadin/tests/resources/NonExistingFileResource.java b/uitest/src/com/vaadin/tests/resources/NonExistingFileResource.java index c102291b50..f55c1f1f1d 100644 --- a/uitest/src/com/vaadin/tests/resources/NonExistingFileResource.java +++ b/uitest/src/com/vaadin/tests/resources/NonExistingFileResource.java @@ -3,11 +3,10 @@ package com.vaadin.tests.resources; import java.io.File; import com.vaadin.server.FileResource; -import com.vaadin.server.WrappedRequest; +import com.vaadin.server.VaadinService; import com.vaadin.tests.components.TestBase; import com.vaadin.ui.Button; import com.vaadin.ui.Button.ClickEvent; -import com.vaadin.util.CurrentInstance; public class NonExistingFileResource extends TestBase { @@ -26,10 +25,8 @@ public class NonExistingFileResource extends TestBase { @Override public void buttonClick(ClickEvent event) { - FileResource res = new FileResource(new File(CurrentInstance - .get(WrappedRequest.class).getVaadinService() - .getBaseDirectory() - + "/" + filename)); + FileResource res = new FileResource(new File(VaadinService + .getCurrent().getBaseDirectory() + "/" + filename)); getMainWindow().open(res); } |