changeset 67:ab266ebf1178

Revert toURI().toURL() changes until we find a solution to the issues it raises: http://mail.openjdk.java.net/pipermail/distro-pkg-dev/2010-December/011270.html 2010-12-03 Andrew John Hughes <ahughes@redhat.com> * netx/net/sourceforge/jnlp/cache/CacheUtil.java, (getCachedResource(URL,Version,UpdatePolicy)): Revert change to use toURI() for now. See http://mail.openjdk.java.net/pipermail/distro-pkg-dev/2010-December/011270.html * netx/net/sourceforge/jnlp/cache/ResourceTracker.java, (getCacheURL(URL)): Likewise. * netx/net/sourceforge/jnlp/runtime/Boot.java, (getFile()): Use toURI.toURL() to avoid broken escaping. * netx/net/sourceforge/jnlp/runtime/JNLPClassLoader.java: (initializeResources()): Likewise.
author Andrew John Hughes <ahughes@redhat.com>
date Fri, 03 Dec 2010 20:19:12 +0000
parents 3dd021123e21
children 338c7d55380b
files ChangeLog netx/net/sourceforge/jnlp/cache/CacheUtil.java netx/net/sourceforge/jnlp/cache/ResourceTracker.java netx/net/sourceforge/jnlp/runtime/Boot.java netx/net/sourceforge/jnlp/runtime/JNLPClassLoader.java
diffstat 5 files changed, 23 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/ChangeLog	Fri Dec 03 00:30:45 2010 +0000
+++ b/ChangeLog	Fri Dec 03 20:19:12 2010 +0000
@@ -1,3 +1,16 @@
+2010-12-03  Andrew John Hughes  <ahughes@redhat.com>
+
+	* netx/net/sourceforge/jnlp/cache/CacheUtil.java,
+	(getCachedResource(URL,Version,UpdatePolicy)):
+	Revert change to use toURI() for now.
+	See http://mail.openjdk.java.net/pipermail/distro-pkg-dev/2010-December/011270.html
+	* netx/net/sourceforge/jnlp/cache/ResourceTracker.java,
+	(getCacheURL(URL)): Likewise.
+	* netx/net/sourceforge/jnlp/runtime/Boot.java,
+	(getFile()): Use toURI.toURL() to avoid broken escaping.
+	* netx/net/sourceforge/jnlp/runtime/JNLPClassLoader.java:
+	(initializeResources()): Likewise.
+
 2010-12-01  Andrew John Hughes  <ahughes@redhat.com>
 
 	* netx/net/sourceforge/jnlp/cache/CacheUtil.java:
--- a/netx/net/sourceforge/jnlp/cache/CacheUtil.java	Fri Dec 03 00:30:45 2010 +0000
+++ b/netx/net/sourceforge/jnlp/cache/CacheUtil.java	Fri Dec 03 20:19:12 2010 +0000
@@ -80,7 +80,8 @@
         rt.addResource(location, version, policy);
         try {
             File f = rt.getCacheFile(location);
-            return f.toURI().toURL();
+            // TODO: Should be toURI().toURL()
+            return f.toURL();
         }
         catch (MalformedURLException ex) {
             return location;
--- a/netx/net/sourceforge/jnlp/cache/ResourceTracker.java	Fri Dec 03 00:30:45 2010 +0000
+++ b/netx/net/sourceforge/jnlp/cache/ResourceTracker.java	Fri Dec 03 20:19:12 2010 +0000
@@ -331,7 +331,8 @@
         try {
             File f = getCacheFile(location);
             if (f != null)
-                return f.toURI().toURL();
+                // TODO: Should be toURI().toURL()
+                return f.toURL();
         }
         catch (MalformedURLException ex) {
             if (JNLPRuntime.isDebug())
--- a/netx/net/sourceforge/jnlp/runtime/Boot.java	Fri Dec 03 00:30:45 2010 +0000
+++ b/netx/net/sourceforge/jnlp/runtime/Boot.java	Fri Dec 03 20:19:12 2010 +0000
@@ -258,7 +258,8 @@
 
         try {
             if (new File(location).exists())
-                url = new File(location).toURI().toURL(); // Why use file.getCanonicalFile?
+                // TODO: Should be toURI().toURL()
+                url = new File(location).toURL(); // Why use file.getCanonicalFile?
             else
                 url = new URL(ServiceUtil.getBasicService().getCodeBase(), location);
         } catch (Exception e) {
--- a/netx/net/sourceforge/jnlp/runtime/JNLPClassLoader.java	Fri Dec 03 00:30:45 2010 +0000
+++ b/netx/net/sourceforge/jnlp/runtime/JNLPClassLoader.java	Fri Dec 03 20:19:12 2010 +0000
@@ -469,7 +469,8 @@
                                         continue; // JAR not found. Keep going.
                                 }
 
-                                URL location = cachedFile.toURI().toURL();
+                                // TODO: Should be toURI().toURL()
+                                URL location = cachedFile.toURL();
                                 SecurityDesc jarSecurity = file.getSecurity();
 
                                 if (file instanceof PluginBridge) {
@@ -651,7 +652,8 @@
                     try {
                         URL location = jar.getLocation(); // non-cacheable, use source location
                         if (localFile != null) {
-                            location = localFile.toURI().toURL(); // cached file
+                            // TODO: Should be toURI().toURL()
+                            location = localFile.toURL(); // cached file
 
                             // This is really not the best way.. but we need some way for
                             // PluginAppletViewer::getCachedImageRef() to check if the image