At 08:51 AM 6/15/2002 +0200, you wrote:

>Pete:
>
>The DefaultPackageRepository class contains the method 
>cacheOptionalPackage which contains the following statement:
>
>   final Extension extension =
>     optionalPackage.getAvailableExtensions()[ 0 ];
>
>I have a situation where the getAvailableExtensions is returning a 0 
>length array which in turn is throwing an out of bounds exception.  I 
>checked in the OptionalPackage class and it's just returning the 
>m_available state member. So, should OptionalPackage be allowing a 0 
>length array,

yep.

>or should validation of the available packages array length be undertaken 
>in the cacheOptionalPackage methhod?

If it is 0 length then it probably does not need to be cached. I will try 
to have a look at it on tuesday.



Cheers,

Peter Donald
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
"Faced with the choice between changing one's mind,
and proving that there is no need to do so - almost
everyone gets busy on the proof."
              - John Kenneth Galbraith
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~


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

Reply via email to