/hg/icedtea-web: Fixed case when already decoded file is wonted ...
jvanek at icedtea.classpath.org
jvanek at icedtea.classpath.org
Thu Oct 23 11:12:53 UTC 2014
changeset 99d5407fab4a in /hg/icedtea-web
details: http://icedtea.classpath.org/hg/icedtea-web?cmd=changeset;node=99d5407fab4a
author: Jiri Vanek <jvanek at redhat.com>
date: Thu Oct 23 13:12:39 2014 +0200
Fixed case when already decoded file is wonted from cache (RH1154177)
netx/net/sourceforge/jnlp/cache/ResourceTracker.java: (getCacheFile) if all previous attempts to get cached file, plain url.getPath is tried.
diffstat:
ChangeLog | 6 ++++++
netx/net/sourceforge/jnlp/cache/ResourceTracker.java | 12 +++++++++++-
2 files changed, 17 insertions(+), 1 deletions(-)
diffs (36 lines):
diff -r 814b8977cb7f -r 99d5407fab4a ChangeLog
--- a/ChangeLog Thu Oct 23 12:21:24 2014 +0200
+++ b/ChangeLog Thu Oct 23 13:12:39 2014 +0200
@@ -1,3 +1,9 @@
+2014-10-21 Jiri Vanek <jvanek at redhat.com>
+
+ Fixed case when already decoded file is wonted from cache (RH1154177)
+ * netx/net/sourceforge/jnlp/cache/ResourceTracker.java: (getCacheFile) if
+ all previous attempts to get cached file, plain url.getPath is tried.
+
2014-10-21 Jiri Vanek <jvanek at redhat.com>
Unittests coverage adapted to latest jacoco
diff -r 814b8977cb7f -r 99d5407fab4a netx/net/sourceforge/jnlp/cache/ResourceTracker.java
--- a/netx/net/sourceforge/jnlp/cache/ResourceTracker.java Thu Oct 23 12:21:24 2014 +0200
+++ b/netx/net/sourceforge/jnlp/cache/ResourceTracker.java Thu Oct 23 13:12:39 2014 +0200
@@ -396,8 +396,18 @@
if (location.getProtocol().equalsIgnoreCase("file")) {
File file = UrlUtils.decodeUrlAsFile(location);
- if (file.exists())
+ if (file.exists()) {
return file;
+ }
+ // try plain, not decoded file now
+ // sometimes the jnlp app developers are encoding for us
+ // so we end up encoding already encoded file. See RH1154177
+ file = new File(location.getPath());
+ if (file.exists()) {
+ return file;
+ }
+ // have it sense to try also filename with whole query here?
+ // => location.getFile() ?
}
return null;
More information about the distro-pkg-dev
mailing list