commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Kent McPhee (JIRA)" <j...@apache.org>
Subject [jira] Commented: (CONFIGURATION-362) XMLPropertyListConfiguration doesn't handle empty <dict/> correctly
Date Mon, 02 Feb 2009 23:33:59 GMT

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

Kent McPhee commented on CONFIGURATION-362:
-------------------------------------------

Suggestion for a quick fix is to change the assumption that no value and no children means
empty dict, not a string.

Longer term it would probably be best to make a PListNode subclass for <dict> elements
similar to the ArrayNode for <array> elements.  Or perhaps use a Map in some clever
way as I see that there is support for Map objects in printValue() already.

Anyone with more familiarity with the code and the types of input it has to deal with care
to comment?

> XMLPropertyListConfiguration doesn't handle empty <dict/> 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
>   Original Estimate: 24h
>  Remaining Estimate: 24h
>
> 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