diff options
author | Leif Åstrand <leif@vaadin.com> | 2012-09-04 16:59:24 +0300 |
---|---|---|
committer | Leif Åstrand <leif@vaadin.com> | 2012-09-05 11:39:35 +0300 |
commit | b0b1a13247bf931eb7f33ff6d0a88fc1833144e9 (patch) | |
tree | b00c4174fd4a9f2b0d77d45d835e4cc60469f994 /uitest/src/com/vaadin/tests/util | |
parent | c71563c8a6e9993cbbdff3ddfdfccfee4aa34f7b (diff) | |
download | vaadin-framework-b0b1a13247bf931eb7f33ff6d0a88fc1833144e9.tar.gz vaadin-framework-b0b1a13247bf931eb7f33ff6d0a88fc1833144e9.zip |
Move getBaseDirectory() to DeploymentConfiguration (#9402)
Diffstat (limited to 'uitest/src/com/vaadin/tests/util')
-rw-r--r-- | uitest/src/com/vaadin/tests/util/SampleDirectory.java | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/uitest/src/com/vaadin/tests/util/SampleDirectory.java b/uitest/src/com/vaadin/tests/util/SampleDirectory.java index e15f0ccfe3..7304f1cab8 100644 --- a/uitest/src/com/vaadin/tests/util/SampleDirectory.java +++ b/uitest/src/com/vaadin/tests/util/SampleDirectory.java @@ -20,10 +20,12 @@ import java.io.File; import com.vaadin.Application; import com.vaadin.server.SystemError; +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 @@ -46,7 +48,8 @@ public class SampleDirectory { + "context base directory failed, " + "possible security constraint with Application " + "Server or Servlet Container.<br />"; - File file = application.getContext().getBaseDirectory(); + File file = CurrentInstance.get(WrappedRequest.class) + .getDeploymentConfiguration().getBaseDirectory(); if ((file == null) || (!file.canRead()) || (file.getAbsolutePath() == null)) { // cannot access example directory, possible security issue with |