You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@commons.apache.org by "Emmanuel Bourg (JIRA)" <ji...@apache.org> on 2007/04/10 16:47:32 UTC
[jira] Reopened: (CONFIGURATION-43) [configuration]
BaseConfiguration.addProperty() and MapConfiguration.addProperty() do not
behave the same
[ https://issues.apache.org/jira/browse/CONFIGURATION-43?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Emmanuel Bourg reopened CONFIGURATION-43:
-----------------------------------------
> [configuration] BaseConfiguration.addProperty() and MapConfiguration.addProperty() do not behave the same
> ---------------------------------------------------------------------------------------------------------
>
> Key: CONFIGURATION-43
> URL: https://issues.apache.org/jira/browse/CONFIGURATION-43
> Project: Commons Configuration
> Issue Type: Bug
> Affects Versions: 1.1
> Environment: Operating System: other
> Platform: Other
> Reporter: smarc
> Fix For: 1.2
>
>
> Hello,
> the contract of Configuration.addProperty(), namely to add the value to the list
> of values for that property, is not held by MapConfiguration.addProperty() where
> the previous value is simply replaced by the new one.
> Example 1 with a BaseConfiguration (OK):
> conf = new BaseConfiguration();
> conf.addProperty( "key", "value1" ); // "key" --> "value1"
> conf.addProperty( "key", "value2" ); // "key" --> [ "value1", "value2" ]
> Example 2 with a MapConfiguration (BAD):
> conf = new BaseConfiguration();
> conf.addProperty( "key", "value1" ); // "key" --> "value1"
> conf.addProperty( "key", "value2" ); // "key" --> "value2" : CONTRACT NOT RESPECTED!
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org