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 35963] - [configuration] XMLConfiguration inconsistency towards empty values
Date Sun, 07 Aug 2005 16:38:45 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=35963>.
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=35963





------- Additional Comments From oliver.heger@t-online.de  2005-08-07 18:38 -------
I agree that the current implementation is inconsistent.

It should be no problem that XML elements occurring in the loaded configuration
document but don't have text are added to the configuration. To use your example:

<configuration>
  <foo>
    <bar/>
  </foo>
</configuration>

If this file was loaded, conf.containsKey("foo.bar") should return true and
conf.getString("foo.bar") should return an empty string, right?

What about the <foo> element? ATM the "foo" key is not contained in the
configuration object. For the sake of consistency the same results should be
returned as for the "foo.bar" key. Do you agree?

While this is only a minor change in the source code it will have a major
impact. The number of keys in an XMLConfiguration would increase, which might
break existing code using this class. What do others think about this?

-- 
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