on 5/2/01 11:26 PM, "Costas Stergiou" <[EMAIL PROTECTED]> wrote:
> Hi all,
> I send a small patch with a simple utillity method for the
> TurbineGlobalCacheService. Can anyone please commit it
> or if there is any argument on that discuss it?
> thanks,
> Costas
>
>
> diff -u -r1.12 TurbineGlobalCacheService.java
> --- TurbineGlobalCacheService.java 2001/04/05 04:02:56 1.12
> +++ TurbineGlobalCacheService.java 2001/04/30 07:01:09
> + /**
> + * Returns the number of objects currently stored in the cache
> + *
> + * @return int number of object in the cache
> + */
> + public int getNumberOfObjects()
> + {
> + return cache.size();
> + }
> }
This isn't a valid patch (try to apply it yourself).
Your code also didn't check for nulls. I hand applied it and made the
appropriate changes. Please try harder next time to at least provide a
working patch.
...
/**
* Returns the number of objects currently stored in the cache
*
* @return int number of object in the cache or -1 if the cache is null
*/
public int getNumberOfObjects()
{
return cache == null ? -1 : cache.size();
}
Thanks,
-jon
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]