[icedtea-web] RFC: Reduce URLConnection knowledge in CacheEntry
Andrew Azores
aazores at redhat.com
Fri May 2 19:30:40 UTC 2014
On 05/02/2014 03:27 PM, Omair Majid wrote:
> Hi,
>
> Thanks for the review.
>
> * Andrew Azores <aazores at redhat.com> [2014-05-02 14:56]:
>> On 05/02/2014 01:23 PM, Omair Majid wrote:
>>> I had to work on CacheEntry for a few fixes (I will be posting those
>>> later) and the class seems to be doing a bit too much. The knowledge of
>>> URLConnection is especially troubling, since the metadata for a
>>> CacheEntry doesn't really match the URL in the presence of compression.
>>>
>>> The attached patch tries to reduce how much CacheEntry knows about
>>> URLConnection.
>> Looks good. One nit: should #getLongKey() return 0 on exception? 0
>> may actually be a valid result. Perhaps -1 instead, since this is
>> being refactored anyway? And please consider logging the exception
>> as well.
> The existing code that was using the value (refactored into
> #getLongKey()) was expecting 0. My next patch introduces some code that
> needs other values, so I am going to change getLongKey() to return other
> values too. But in a separate patch. I hope that's okay.
>
> Thanks,
> Omair
>
Sure, sounds fine. Are you going to also log the exception being thrown
in there?
Thanks,
--
Andrew A
More information about the distro-pkg-dev
mailing list