You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by "Oliver Heger (JIRA)" <ji...@apache.org> on 2010/01/15 07:56:57 UTC

[jira] Commented: (CONFIGURATION-403) XMLConfiguration isEmpty has altered behaviour between 1.4 and 1.6

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

Oliver Heger commented on CONFIGURATION-403:
--------------------------------------------

AFAICT this behavior was already changed in an earlier version of Commons Configuration in reaction to the ticket CONFIGURATION-6.

IMO the new behavior is more consistent because it allows to distinguish between a configuration with no keys at all and a configuration that contains some empty keys. But maybe we should update the documentation to make clear what is meant by "empty".

> XMLConfiguration isEmpty has altered behaviour between 1.4  and 1.6
> -------------------------------------------------------------------
>
>                 Key: CONFIGURATION-403
>                 URL: https://issues.apache.org/jira/browse/CONFIGURATION-403
>             Project: Commons Configuration
>          Issue Type: Bug
>    Affects Versions: 1.6
>         Environment: Windows Vista 64, JDK 1.6
>            Reporter: Daniel Berg
>            Priority: Minor
>
> Given xml configuration file
> {code:xml} 
> <?xml version="1.0" encoding="ISO-8859-1" ?>
> <empty></empty>
> {code}
> {code}
> XMLConfiguration xml = new XMLConfiguration(file);
> assertTrue(xml.isEmpty());
> {code}
> isEmpty() returned true on version 1.4 ?, now it returns false, and the configuration contains a single empty string as key.
> Not sure if this should be considered a bug, but the documnetation reads: Checks if this configuration is empty. Empty means that there are no keys with any values, though there can be some (empty) nodes. 

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