summaryrefslogtreecommitdiffstats
path: root/uitest/src/com/vaadin/tests/util
diff options
context:
space:
mode:
authorLeif Åstrand <leif@vaadin.com>2012-09-19 12:19:30 +0300
committerLeif Åstrand <leif@vaadin.com>2012-09-19 12:19:43 +0300
commitc1e82529b1191d9c41de0dc8a4cde8caf9754329 (patch)
tree47724ea23cd2e4126275b5d82379d29a77578569 /uitest/src/com/vaadin/tests/util
parent56a5f6853318acbd743346e0f14faa0ed7325fa4 (diff)
downloadvaadin-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/util')
-rw-r--r--uitest/src/com/vaadin/tests/util/SampleDirectory.java6
1 files changed, 2 insertions, 4 deletions
diff --git a/uitest/src/com/vaadin/tests/util/SampleDirectory.java b/uitest/src/com/vaadin/tests/util/SampleDirectory.java
index 140f778551..5c45e0d64e 100644
--- a/uitest/src/com/vaadin/tests/util/SampleDirectory.java
+++ b/uitest/src/com/vaadin/tests/util/SampleDirectory.java
@@ -19,13 +19,12 @@ package com.vaadin.tests.util;
import java.io.File;
import com.vaadin.server.SystemError;
+import com.vaadin.server.VaadinService;
import com.vaadin.server.VaadinSession;
-import com.vaadin.server.WrappedRequest;
import com.vaadin.shared.ui.label.ContentMode;
import com.vaadin.ui.Label;
import com.vaadin.ui.Panel;
import com.vaadin.ui.UI;
-import com.vaadin.util.CurrentInstance;
/**
* Provides sample directory based on application directory. If this fails then
@@ -48,8 +47,7 @@ public class SampleDirectory {
+ "context base directory failed, "
+ "possible security constraint with Application "
+ "Server or Servlet Container.<br />";
- File file = CurrentInstance.get(WrappedRequest.class)
- .getVaadinService().getBaseDirectory();
+ File file = VaadinService.getCurrent().getBaseDirectory();
if ((file == null) || (!file.canRead())
|| (file.getAbsolutePath() == null)) {
// cannot access example directory, possible security issue with