diff options
author | Jiri Vanek <[email protected]> | 2012-05-18 16:18:29 +0200 |
---|---|---|
committer | Jiri Vanek <[email protected]> | 2012-05-18 16:18:29 +0200 |
commit | 258fcac4b63f8e8be5a972d0f6a1eecca625772d (patch) | |
tree | 071ce4c5651a923d1cc39534518dde7c7ef6bce9 /netx/net | |
parent | 34995dfe086e30267dd367f65eaa45144235b069 (diff) |
More tests for Spaces and characters in urls
Diffstat (limited to 'netx/net')
-rw-r--r-- | netx/net/sourceforge/jnlp/cache/CacheLRUWrapper.java | 4 | ||||
-rw-r--r-- | netx/net/sourceforge/jnlp/cache/CacheUtil.java | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/netx/net/sourceforge/jnlp/cache/CacheLRUWrapper.java b/netx/net/sourceforge/jnlp/cache/CacheLRUWrapper.java index 4a23520..bf201af 100644 --- a/netx/net/sourceforge/jnlp/cache/CacheLRUWrapper.java +++ b/netx/net/sourceforge/jnlp/cache/CacheLRUWrapper.java @@ -71,8 +71,8 @@ enum CacheLRUWrapper { private FileLock fl = null; /* location of cache directory */ - private final String cacheDir = new File(JNLPRuntime.getConfiguration() - .getProperty(DeploymentConfiguration.KEY_USER_CACHE_DIR)).getPath(); + private final String setCachePath = JNLPRuntime.getConfiguration().getProperty(DeploymentConfiguration.KEY_USER_CACHE_DIR); + private final String cacheDir = new File(setCachePath != null ? setCachePath : System.getProperty("java.io.tmpdir")).getPath(); /* * back-end of how LRU is implemented This file is to keep track of the most diff --git a/netx/net/sourceforge/jnlp/cache/CacheUtil.java b/netx/net/sourceforge/jnlp/cache/CacheUtil.java index 2e9aaaa..d61da4b 100644 --- a/netx/net/sourceforge/jnlp/cache/CacheUtil.java +++ b/netx/net/sourceforge/jnlp/cache/CacheUtil.java @@ -47,8 +47,8 @@ import net.sourceforge.jnlp.util.PropertiesFile; */ public class CacheUtil { - private static final String cacheDir = new File(JNLPRuntime.getConfiguration() - .getProperty(DeploymentConfiguration.KEY_USER_CACHE_DIR)).getPath(); // Do this with file to standardize it. + private static final String setCacheDir = JNLPRuntime.getConfiguration().getProperty(DeploymentConfiguration.KEY_USER_CACHE_DIR); + private static final String cacheDir = new File(setCacheDir != null ? setCacheDir : System.getProperty("java.io.tmpdir")).getPath(); // Do this with file to standardize it. private static final CacheLRUWrapper lruHandler = CacheLRUWrapper.getInstance(); private static final HashMap<String, FileLock> propertiesLockPool = new HashMap<String, FileLock>(); |