[rfc][icedtea-web] PR1271, Handle 'javascript:' urls, with tests

Andrew Azores aazores at redhat.com
Mon Aug 19 08:49:48 PDT 2013


On 08/19/2013 10:38 AM, Adam Domurad wrote:
> On 08/16/2013 11:51 AM, Andrew Azores wrote:
>> On 08/07/2013 10:08 AM, Adam Domurad wrote:
>>>>> +
>>>>> +            // Place an arbitrary handler, we only need the URL construction to not error-out
>>>>> +            handlers.put("javascript", new sun.net.www.protocol.http.Handler());
>>>>> +        } catch (Exception e) {
>>>> Uhh ahh, there are good reasons not to do this :)
>>> Indeed, unless there are no better ideas. There isn't exactly an API for
>>> doing this.
>> Is there a more specific Exception type that could be caught?
> There are several, I can catch them all explicitly if you'd like. The
> exception should probably be logged even not in debug, come to think of it.

Up to you, I just prefer not to catch-all when feasible :) logging when
not in debug also sounds like a good idea.

>
>>> Happy hacking,
>>> -Adam
>> I think this looks good though.
> Is that an approval ? :-)

Yes it is (other than minor nitpick above).

>
>> Thanks,
>>
> Happy hacking,
> -Adam

Thanks,

-- 
Andrew A




More information about the distro-pkg-dev mailing list