On 12 October 2010 20:02, Gary Gregory <ggreg...@seagullsoftware.com> wrote:
>> -----Original Message-----
>> From: sebb [mailto:seb...@gmail.com]
>> Sent: Tuesday, October 12, 2010 11:28
>> To: Commons Developers List
>> Subject: [pool] can the factory field ever usefully be null?
>>
>> Now that the setFactory() methods have been removed, and the factories
>> made immutable, does it still make sense to ever allow a null factory?
>>
>> Some places still check for null, some assume non-null.
>> There are also some ctors which set the factory to null.
>>
>> Seems to me that the factory field needs to be final and non-null; the
>> ctor should enfore non-null, and then there is no further need to
>> check it for null.
>
> Then we can remove ctors that do not specify a factory. For example: 
> GenericObjectPool()

Yes, and

StackKeyedObjectPool()
StackKeyedObjectPool(int)
StackKeyedObjectPool(int,int)

Also

SoftReferenceObjectPool() - already deprecated and marked for removal

> Gary
>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: dev-unsubscr...@commons.apache.org
>> For additional commands, e-mail: dev-h...@commons.apache.org
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscr...@commons.apache.org
> For additional commands, e-mail: dev-h...@commons.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@commons.apache.org
For additional commands, e-mail: dev-h...@commons.apache.org

Reply via email to