commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Emmanuel Bourg (JIRA)" <j...@apache.org>
Subject [jira] Commented: (CONFIGURATION-362) XMLPropertyListConfiguration doesn't handle empty elements correctly
Date Fri, 19 Jun 2009 13:23:07 GMT

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

Emmanuel Bourg commented on CONFIGURATION-362:
----------------------------------------------

Actually the issue with the string element can't be fixed. The XML parser can't make the difference
between <string/> and <string></string> unless we play with the xsi:nil
attribute. We have to assume it's either a null string or an empty string. I'll stick to the
later.

> XMLPropertyListConfiguration doesn't handle empty elements correctly
> --------------------------------------------------------------------
>
>                 Key: CONFIGURATION-362
>                 URL: https://issues.apache.org/jira/browse/CONFIGURATION-362
>             Project: Commons Configuration
>          Issue Type: Bug
>    Affects Versions: 1.6
>         Environment: Mac OS X 10.5.6  JDK 1.5
>            Reporter: Kent McPhee
>            Assignee: Emmanuel Bourg
>             Fix For: 1.7
>
>
> Empty "dict" elements are not handled properly.   During printing of a configuration,
configuration nodes that have no children and no value are assumed to be "strings" (see XMLPropertyListConfiguration.java:printValue()'s
last "else" clause).   <dict/> is parsed in such a way (see startElement() and endElement()
of that same file) that it ends up creating a configuration node with no children and no value.
 Thus printing out a parsed property list will print <string>null</string> everywhere
an empty dictionary was in the input.

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