From 068e0916a24794d4fe886d4bc28acda6d9b53a58 Mon Sep 17 00:00:00 2001 From: Tom Morris Date: Sat, 13 Oct 2012 15:58:44 +0000 Subject: [PATCH] FIXED - task 587: Correct initialization of the temporary directory - patch from the Wikier project http://code.google.com/p/google-refine/issues/detail?id=587 https://bitbucket.org/wikier/google-refine/changeset/f3dbdb16a320#chg-main/src/com/google/refine/RefineServlet.java git-svn-id: http://google-refine.googlecode.com/svn/trunk@2583 7d457c2a-affb-35e4-300a-418c747d4874 --- main/src/com/google/refine/RefineServlet.java | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/main/src/com/google/refine/RefineServlet.java b/main/src/com/google/refine/RefineServlet.java index 74bee9c91..6ea7641ba 100644 --- a/main/src/com/google/refine/RefineServlet.java +++ b/main/src/com/google/refine/RefineServlet.java @@ -71,6 +71,7 @@ public class RefineServlet extends Butterfly { static final long serialVersionUID = 2386057901503517403L; static private final String JAVAX_SERVLET_CONTEXT_TEMPDIR = "javax.servlet.context.tempdir"; + private File tempDir = null; static private RefineServlet s_singleton; static private File s_dataDir; @@ -221,11 +222,9 @@ public class RefineServlet extends Butterfly { return path; } - private File tempDir = null; - public File getTempDir() { if (tempDir == null) { - File tempDir = (File) _config.getServletContext().getAttribute(JAVAX_SERVLET_CONTEXT_TEMPDIR); + tempDir = (File) _config.getServletContext().getAttribute(JAVAX_SERVLET_CONTEXT_TEMPDIR); if (tempDir == null) { throw new RuntimeException("This app server doesn't support temp directories"); }