commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 37667] New: - BaseConfiguration.addProperty() and MapConfiguration.addProperty() do not behave the same
Date Mon, 28 Nov 2005 17:02:02 GMT
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=37667>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND·
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=37667

           Summary: BaseConfiguration.addProperty() and
                    MapConfiguration.addProperty() do not behave the same
           Product: Commons
           Version: 1.1 Final
          Platform: Other
        OS/Version: other
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Configuration
        AssignedTo: commons-dev@jakarta.apache.org
        ReportedBy: smarc@gmx.net


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!

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

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


Mime
View raw message