Re: [configuration] SubsetConfiguration

2004-03-22 Thread Emmanuel Bourg
Thank you Eric ! I noticed you reintroduced a subset() method in the CompositeConfiguration class, why was this necessary ? I tried to remove it and all test cases still pass successfully. Emmanuel Bourg Eric Pugh wrote: Applied! Can you review.. Eric

RE: [configuration] SubsetConfiguration

2004-03-22 Thread Eric Pugh
Message- From: Emmanuel Bourg [mailto:[EMAIL PROTECTED] Sent: Monday, March 22, 2004 12:04 PM To: Jakarta Commons Developers List Subject: Re: [configuration] SubsetConfiguration Thank you Eric ! I noticed you reintroduced a subset() method in the CompositeConfiguration class, why

RE: [configuration] SubsetConfiguration

2004-03-09 Thread Eric Pugh
keep things on track. Eric -Original Message- From: Jörg Schaible [mailto:[EMAIL PROTECTED] Sent: Tuesday, March 09, 2004 7:54 AM To: Jakarta Commons Developers List; [EMAIL PROTECTED] Subject: RE: [configuration] SubsetConfiguration Hi Eric, Eric Pugh wrote on Tuesday

RE: [configuration] SubsetConfiguration

2004-03-09 Thread Jörg Schaible
Eric Pugh wrote on Tuesday, March 09, 2004 11:33 AM: Jörg, Not sure what happened last night, obviously my fuzzy brain wasn't working with CVS well. I have just committed all the SubsetConfiguration that I thought was committed last night! Would you mind reviewing it for me? Yes it's

RE: [configuration] SubsetConfiguration

2004-03-08 Thread Eric Pugh
Applied! Can you review.. Eric -Original Message- From: Emmanuel Bourg [mailto:[EMAIL PROTECTED] Sent: Friday, March 05, 2004 5:28 PM To: Jakarta Commons Developers List Subject: Re: [configuration] SubsetConfiguration Here is a new implementation of the SubsetConfiguration

RE: [configuration] SubsetConfiguration

2004-03-08 Thread Eric Pugh
: [configuration] SubsetConfiguration Here is a new implementation of the SubsetConfiguration: - a null or empty key can now be used to retrieve the subset root element. - subset.getKeys() and subset.getKeys(prefix) are now fixed, previously they returned the keys of the parent configuration

RE: [configuration] SubsetConfiguration

2004-03-08 Thread Jörg Schaible
To: Jakarta Commons Developers List Subject: Re: [configuration] SubsetConfiguration Here is a new implementation of the SubsetConfiguration: - a null or empty key can now be used to retrieve the subset root element. - subset.getKeys() and subset.getKeys(prefix) are now fixed, previously

Re: [configuration] SubsetConfiguration

2004-03-05 Thread Emmanuel Bourg
Jörg Schaible wrote: after recognizing, that you've attached the diff, I had a look at the changes in the test case. I am not quite sure, that this is really good. Intentionally I thought, you would return an empty configuration only, if the pattern equals the key, but you do so now also if the

RE: [configuration] SubsetConfiguration

2004-03-05 Thread Jörg Schaible
Emmanuel Bourg wrote on Friday, March 05, 2004 11:38 AM: Jörg Schaible wrote: after recognizing, that you've attached the diff, I had a look at the changes in the test case. I am not quite sure, that this is really good. Intentionally I thought, you would return an empty configuration

Re: [configuration] SubsetConfiguration

2004-03-05 Thread Emmanuel Bourg
I tried to push the reasoning a bit further yesterday and observed that if there is a SubsetConfiguration shifting the parent keys to the left, we might imagine a SupersetConfiguration shifting the keys to the right by adding a prefix. Both classes could even be merged into a

RE: [configuration] SubsetConfiguration

2004-03-05 Thread Jörg Schaible
Emmanuel Bourg wrote on Friday, March 05, 2004 12:17 PM: I tried to push the reasoning a bit further yesterday and observed that if there is a SubsetConfiguration shifting the parent keys to the left, we might imagine a SupersetConfiguration shifting the keys to the right by adding a

Re: [configuration] SubsetConfiguration

2004-03-05 Thread Emmanuel Bourg
Jörg Schaible wrote: Looking at the changes for teh test cases, I have the impression that conf.setProperty(x.y.z, 1); subset = conf.subset(x.y.z.not_there); will also return an empty configuration, whereas this return value was previously always just null. Yes indeed, but since the subset is

RE: [configuration] SubsetConfiguration

2004-03-05 Thread Jörg Schaible
Emmanuel Bourg wrote on Friday, March 05, 2004 1:27 PM: Jörg Schaible wrote: Looking at the changes for teh test cases, I have the impression that conf.setProperty(x.y.z, 1); subset = conf.subset(x.y.z.not_there); will also return an empty configuration, whereas this return value was

Re: [configuration] SubsetConfiguration

2004-03-05 Thread Emmanuel Bourg
Jörg Schaible wrote: Sure, but here is the compatibility issue: Configuration config = new BaseConfiguration(); Configuration subset = config.subset(database); if(subset == null) { // continue with limited functionality } else {

Re: [configuration] SubsetConfiguration

2004-03-05 Thread Emmanuel Bourg
Jörg Schaible wrote: - it fixes Bug 27427 OK. Then don't apply it g Actually it doesn't fix 27427 completely, the getKeys(prefix) method will still return an extra key. I'll change the implementation of this method and use a FilterIterator from [collections] instead, that will remove the copy

Re: [configuration] SubsetConfiguration

2004-03-05 Thread Emmanuel Bourg
Here is a new implementation of the SubsetConfiguration: - a null or empty key can now be used to retrieve the subset root element. - subset.getKeys() and subset.getKeys(prefix) are now fixed, previously they returned the keys of the parent configuration and not the keys of the subset. -

Re: [configuration] SubsetConfiguration

2004-03-04 Thread Jrg Schaible
Emmanuel Bourg wrote: I have reimplemented the subset code with a decorator, the pros : - the resulting code is much cleaner - it fixes some old quicks - it fixes Bug 27427 OK. Then don't apply it g - no property is copied = more memory efficient - the subset is fully synchronized with

RE: [configuration] SubsetConfiguration

2004-03-04 Thread Eric Pugh
PROTECTED] Behalf Of Jörg Schaible Sent: Thursday, March 04, 2004 9:07 PM To: [EMAIL PROTECTED] Subject: Re: [configuration] SubsetConfiguration Emmanuel Bourg wrote: I have reimplemented the subset code with a decorator, the pros : - the resulting code is much cleaner - it fixes some

RE: [configuration] SubsetConfiguration

2004-03-04 Thread Jrg Schaible
Hi Eric, Eric Pugh wrote: Guys.. I have been a little remiss keeping up with the flow of patches.. However, this weekend I will go through them all and try and get all the good stuff updated. :) Emmanuel said he already made 27427 obsolete, but I could not see an issue in Bugzilla yet.

RE: [configuration] SubsetConfiguration

2004-03-04 Thread Jrg Schaible
Jörg Schaible wrote: Hi Eric, Eric Pugh wrote: Guys.. I have been a little remiss keeping up with the flow of patches.. However, this weekend I will go through them all and try and get all the good stuff updated. :) Emmanuel said he already made 27427 obsolete, but I could not see

Re: [configuration] SubsetConfiguration

2004-03-04 Thread Jrg Schaible
Hi Emmanuel, Emmanuel Bourg wrote: I had to change a test for HierarchicalConfiguration, I hope it doesn't break the initial intent. after recognizing, that you've attached the diff, I had a look at the changes in the test case. I am not quite sure, that this is really good. Intentionally I