commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Phil Steitz <phil.ste...@gmail.com>
Subject Re: [pool] can the factory field ever usefully be null?
Date Tue, 12 Oct 2010 19:20:46 GMT
On 10/12/10 3:14 PM, sebb wrote:
> On 12 October 2010 20:02, Gary Gregory<GGregory@seagullsoftware.com>  wrote:
>>> -----Original Message-----
>>> From: sebb [mailto:sebbaz@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
>
+1

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


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


Mime
View raw message