Jonathon,

Thank you for the ideas. Actually, I ended up getting rid of references to 
FlexibleProperties - it didn't do anything special and only one other class is 
using it.

-Adrian

Jonathon -- Improov <[EMAIL PROTECTED]> wrote: Oh, I missed this.

Yeah, Properties implements Map. Isn't it possible to get a Properties from 
method 
getProperties(...), and the cast it to a Map?

In FlexibleProperties, override the Hashtable methods in Properties. That is, 
in 
FlexibleProperties, encapsulate one FastMap, and make sure all Map interfaces 
use that FastMap.

Jonathon

Adrian Crum wrote:
> Jonathon,
> 
> Properties extends Map. I ended up having two methods - one that returns 
> a Map in addition to the original.
> 
> I've been using it for nearly a week and everything seems to be working 
> well. I'll post it to Jira in the next few days.
> 
> -Adrian
> 
> Jonathon -- Improov wrote:
>> Adrian,
>>
>> How about getting FlexibleProperties to implement Map, in addition to 
>> Properties?
>>
>> Jonathon
>>
>> Adrian Crum wrote:
>>
>>> I've been working on the UtilProperties class to clean up some of the 
>>> code, improving the cache handling algorithm, improve support for 
>>> i18n, and add support for the new XML properties file format.
>>>
>>> I believe we could really improve the performance of OFBiz if we 
>>> cached FastMap instances instead of java.util.Properties instances. 
>>> That would require a slight change in the UtilProperties API - 
>>> UtilProperties.getProperties(...) would return a Map instance instead 
>>> of a Properties instance.
>>>
>>> Doing so wouldn't have a large impact on the existing code base - 
>>> there are only a handful of places where 
>>> UtilProperties.getProperties(...) is called. The problem would be 
>>> legacy installations - custom code that calls 
>>> UtilProperties.getProperties(...) would break.
>>>
>>> Should I change the existing method signature, or add the new methods 
>>> and deprecate the old ones?
>>>
>>> -Adrian
>>>
>>>
>>
>>
> 
> 



       
---------------------------------
Never miss a thing.   Make Yahoo your homepage.

Reply via email to