[rfc][icedtea-web] fixing CacheReproducerTest and improving VersionedJarTest
Jie Kang
jkang at redhat.com
Wed Mar 4 15:37:08 UTC 2015
Hello,
Also, just noticed:
CacheLRUWrapper.java:
private boolean checkData () {
[...]
if (!path.contains(cacheDir.getAbsolutePath())) {
Here you use cacheDir.getAbsolutePath() but:
private String getIdForCacheFolder(String folder) {
int len = getCacheDir().getAbsolutePath().length();
Here you use getCacheDir().
I think you wanted to use getCacheDir() everywhere.
And one follow-up question:
CacheUtil gets cacheDir from CacheLRUWrapper with default constructor which has:
public CacheLRUWrapper() {
this(PathsAndFiles.RECENTLY_USED_FILE.getFile());
}
Does this mean that DeploymentConfiguration.KEY_USER_CACHE_DIR is not used anymore?
This means that code like:
JNLPRuntime.getConfiguration().setProperty(DeploymentConfiguration.KEY_USER_CACHE_DIR, System.getProperty("java.io.tmpdir") + File.separator + "tempcache");
won't work right?
Also, can you double-check if this works with changing the cache directory in itweb-settings? From what I remember, the code there sets the DeploymentConfiguration.KEY_USER_CACHE_DIR, but you may have changed it already.
So for CacheUtil unit tests, how do we create a temporary cache now? The tests need to make sure CacheUtil functions actually work, but they should definitely not use the user's cache.
Regards,
--
Jie Kang
OpenJDK Team - Software Engineering Intern
More information about the distro-pkg-dev
mailing list