on 5/2/01 11:50 PM, "Costas Stergiou" <[EMAIL PROTECTED]> wrote:

> Hi Jon,
> thanks for the commit (it is very usefull for people that cannot actually
> commit but do use the framework as much as I do!)
> I don't think it is necessary to check for nulls. The cache reference
> is itinialized in the init() method of the service.

Right, but there is a case where init() might not be called...therefore...it
should be checked.

> If we should check for a null in this method, then why we don't check
> in the getObject method, for example?

Then that is a bug imho.

> The -1 value is also not correct since we are dealing with a
> service here. The cache Hashtable is just an internal implementation
> of the service. The user should not care if it is null. So in the case
> of null, the method should return 0 (a user does not have any
> idea of the internals of the class). Thus being:
>       return cache == null ? -0 : cache.size();

No, because null != 0.

-jon


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to