You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@commons.apache.org by bu...@apache.org on 2005/02/22 16:14:54 UTC

DO NOT REPLY [Bug 33691] New: - SubsetConfiguration.getKeys() always appends "." delimiter to prefix

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=33691>.
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=33691

           Summary: SubsetConfiguration.getKeys() always appends "."
                    delimiter to prefix
           Product: Commons
           Version: unspecified
          Platform: PC
        OS/Version: Windows XP
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Configuration
        AssignedTo: commons-dev@jakarta.apache.org
        ReportedBy: timothomas@web.de


When creating a SubsetConfiguration object, e.g.

conf = new SubsetConfiguration(parentConf, "myprefixwithadot.");

calls to conf.getProperty("prop") result in a call to
parent.conf(conf.getPrefix() + "prop") as expected.

However, a key iterator obtained by calling conf.getKeys() will only iterate
over keys starting with (conf.getPrefix() + "."). In the example, this will be
"myprefixwithadot..". There should not be a dot appended. 

The error is probably caused by line #283 in AbstractConfiguration.java

return key.startsWith(prefix + ".") || key.equals(prefix);

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