[icedtea-web] RFC: warning cleanup
Omair Majid
omajid at redhat.com
Fri Dec 3 12:08:32 PST 2010
Hi,
On 12/02/2010 03:46 PM, Dr Andrew John Hughes wrote:
>
> diff -r 6c8e9229bded netx/net/sourceforge/jnlp/cache/CacheUtil.java
> --- a/netx/net/sourceforge/jnlp/cache/CacheUtil.java Thu Dec 02 10:22:44 2010 -0500
> +++ b/netx/net/sourceforge/jnlp/cache/CacheUtil.java Thu Dec 02 19:49:46 2010 +0000
> @@ -80,7 +80,7 @@
> rt.addResource(location, version, policy);
> try {
> File f = rt.getCacheFile(location);
> - return f.toURL();
> + return f.toURI().toURL();
> }
> catch (MalformedURLException ex) {
> return location;
> diff -r 6c8e9229bded netx/net/sourceforge/jnlp/cache/ResourceTracker.java
> --- a/netx/net/sourceforge/jnlp/cache/ResourceTracker.java Thu Dec 02 10:22:44 2010 -0500
> +++ b/netx/net/sourceforge/jnlp/cache/ResourceTracker.java Thu Dec 02 19:49:46 2010 +0000
> @@ -331,7 +331,7 @@
> try {
> File f = getCacheFile(location);
> if (f != null)
> - return f.toURL();
> + return f.toURI().toURL();
> }
> catch (MalformedURLException ex) {
> if (JNLPRuntime.isDebug())
> diff -r 6c8e9229bded netx/net/sourceforge/jnlp/runtime/Boot.java
> --- a/netx/net/sourceforge/jnlp/runtime/Boot.java Thu Dec 02 10:22:44 2010 -0500
> +++ b/netx/net/sourceforge/jnlp/runtime/Boot.java Thu Dec 02 19:49:46 2010 +0000
> @@ -258,7 +258,7 @@
>
> try {
> if (new File(location).exists())
> - url = new File(location).toURL(); // Why use file.getCanonicalFile?
> + url = new File(location).toURI().toURL(); // Why use file.getCanonicalFile?
> else
> url = new URL(ServiceUtil.getBasicService().getCodeBase(), location);
> } catch (Exception e) {
> diff -r 6c8e9229bded netx/net/sourceforge/jnlp/runtime/JNLPClassLoader.java
> --- a/netx/net/sourceforge/jnlp/runtime/JNLPClassLoader.java Thu Dec 02 10:22:44 2010 -0500
> +++ b/netx/net/sourceforge/jnlp/runtime/JNLPClassLoader.java Thu Dec 02 19:49:46 2010 +0000
> @@ -469,7 +469,7 @@
> continue; // JAR not found. Keep going.
> }
>
> - URL location = cachedFile.toURL();
> + URL location = cachedFile.toURI().toURL();
> SecurityDesc jarSecurity = file.getSecurity();
>
> if (file instanceof PluginBridge) {
> @@ -651,7 +651,7 @@
> try {
> URL location = jar.getLocation(); // non-cacheable, use source location
> if (localFile != null) {
> - location = localFile.toURL(); // cached file
> + location = localFile.toURI().toURL(); // cached file
>
> // This is really not the best way.. but we need some way for
> // PluginAppletViewer::getCachedImageRef() to check if the image
I am against apply this patch as is. Especially to the release branch.
These changes to names of cached files make me a little nervous. These
changes may result in some comparisons between file names changing. In
fact I posted a patch a while back to change a toURI().toURL() to a
toURL() as it was breaking applications [1].
Please dont apply this patch; or at least remove the changes to
file.toURL().
Thanks,
Omair
[1] http://mail.openjdk.java.net/pipermail/distro-pkg-dev/2010-October/010567.html
More information about the distro-pkg-dev
mailing list