avalon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stephen McConnell <mcconn...@apache.org>
Subject Re: Clarification on Configurable contract...
Date Sat, 25 Jan 2003 13:49:30 GMT


Sylvain Wallez wrote:

> Stephen McConnell wrote:
>
>> Leo Sutic wrote:
>>
>>>  
>>>
>>>> From: Vadim Gritsenko [mailto:]
>>>> Hi Avaloners,
>>>>
>>>> Can somebody clarify one simple detail of Configurable 
>>>> container/component contract:
>>>>
>>>>  Can container ever pass null into the configure()?
>>>
>>>
>>> No.
>>>  
>>
>>
>>
>> Agree.
>>
>> A container should pass an empty configuration - for example:
>>
>>    Cofiguration config = new DefaultConfiguration( "configuration", 
>> this.class.getName() );
>>
>> The passing that as the configuration argument.
>
>
>
> So what about defining an empty configuration constant in 
> DefaultConfiguration similar to Parameters.EMPTY_PARAMETERS ?
>
> This would avoid useless object creation.


Could be done - but I tend to always declare the source of creation so 
each empty configuration I create provides useful information from the 
getLocation() method.  The location value is needed when you want to 
construct helpful error messages.  

Cheers, Steve.
 

>
> Sylvain
>

-- 

Stephen J. McConnell
mailto:mcconnell@apache.org
http://www.osm.net




--
To unsubscribe, e-mail:   <mailto:avalon-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:avalon-dev-help@jakarta.apache.org>


Mime
View raw message