[rfc][icedtea-web] do not dye if jnlp's icons points to nothing (eg 404)

Jiri Vanek jvanek at redhat.com
Mon Feb 2 14:04:03 UTC 2015


On 02/02/2015 01:57 PM, Jiri Vanek wrote:
> This patch is fixing state, when icon is expected to be downlaoded, but its location do not exists.
> Then when this code expect it to be found, NPE is thrown.
>
> Hmm.. Looking to this after break,
>
> - location = CacheUtil.getCachedResource(uiconLocation, null, UpdatePolicy.SESSION)
> -                     .toString();
> + locationURL = CacheUtil.getCachedResource(uiconLocation, null, UpdatePolicy.SESSION);
> + if (locationURL == null) {return null;}
> + location = locationURL.toString();
>
> Is probably much more suitable (need to test it)
>
>
> J.
Or maybe this third attempt?

Note - this is not refactoring, it changes behaviou, but I have not found more usages of 
getCachedResource ...

J.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: doNotDieOnNotExistingIcon2.patch
Type: text/x-patch
Size: 3823 bytes
Desc: not available
URL: <http://mail.openjdk.java.net/pipermail/distro-pkg-dev/attachments/20150202/8276fee4/doNotDieOnNotExistingIcon2.patch>


More information about the distro-pkg-dev mailing list