commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Christian Uldall Pedersen (JIRA)" <j...@apache.org>
Subject [jira] Commented: (CONFIGURATION-366) XMLConfiguration.getKeys() broken
Date Tue, 24 Feb 2009 13:18:02 GMT

    [ https://issues.apache.org/jira/browse/CONFIGURATION-366?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12676261#action_12676261
] 

Christian Uldall Pedersen commented on CONFIGURATION-366:
---------------------------------------------------------

What would be the best way to obtain the behavior that I am looking for? The following seems
like a bad solution:

Iterator<?> keys = raspConfigurationFile.getKeys(csXpath);
			
boolean hasChildren = true;
if (keys.hasNext()) {
     if (keys.next().equals(csXpath)) {
            hasChildren = false;
     }
}

> XMLConfiguration.getKeys() broken
> ---------------------------------
>
>                 Key: CONFIGURATION-366
>                 URL: https://issues.apache.org/jira/browse/CONFIGURATION-366
>             Project: Commons Configuration
>          Issue Type: Bug
>          Components: Build
>    Affects Versions: 1.6
>         Environment: Java 6
>            Reporter: Christian Uldall Pedersen
>         Attachments: Config_1.xml, Config_2.xml, ConfigTest.java
>
>   Original Estimate: 48h
>  Remaining Estimate: 48h
>
> XMLConfiguration.getKeys(String prefix) returns iterator with the string argument "prefix",
when the xpath specified has no sub elements. The XPathExpressionEngine has been used as Expression
engine.
> Version 1.3 does not have this problem. Here an empty Iterator is returned.
> This seems related to:
> http://issues.apache.org/jira/browse/CONFIGURATION-87

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message