[icedtea-web] RFC: Reduce URLConnection knowledge in CacheEntry

Andrew Azores aazores at redhat.com
Fri May 2 19:38:22 UTC 2014


On 05/02/2014 03:32 PM, Omair Majid wrote:
> * Andrew Azores <aazores at redhat.com> [2014-05-02 15:30]:
>> On 05/02/2014 03:27 PM, Omair Majid wrote:
>>> * Andrew Azores <aazores at redhat.com> [2014-05-02 14:56]:
>>>> 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.
>> Sure, sounds fine. Are you going to also log the exception being
>> thrown in there?
> I don't really see a need to, but if you think it's a good idea, I will.
>
> Thanks,
> Omair
>

Well, it depends. I think it should be logged if it ends up being 
possible that the returned value on error is also potentially a valid 
response in some contexts, otherwise any potential bug stemming from bad 
values will be less obvious to track down. Even if the returned value is 
never a valid response, having the exception appear in logs could be 
helpful, if noisy.

Thanks,

-- 
Andrew A



More information about the distro-pkg-dev mailing list