commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Emmanuel Bourg (JIRA)" <>
Subject [jira] Updated: (CONFIGURATION-362) XMLPropertyListConfiguration doesn't handle empty <dict/> correctly
Date Fri, 19 Jun 2009 12:37:08 GMT


Emmanuel Bourg updated CONFIGURATION-362:

I got a look at the issue, it doesn't seem specific to the dict element. I observed the same
behavior with <date/>. The <data/> and <array/> elements are ok, but <real/>
and <integer/> cause an exception.

I think the solution is to save the type of the data in the PListNode when the configuration
is parsed, and use this type to determine how to format the value when it's null.

> XMLPropertyListConfiguration doesn't handle empty <dict/> correctly
> -------------------------------------------------------------------
>                 Key: CONFIGURATION-362
>                 URL:
>             Project: Commons Configuration
>          Issue Type: Bug
>    Affects Versions: 1.6
>         Environment: Mac OS X 10.5.6  JDK 1.5
>            Reporter: Kent McPhee
>             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'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.

View raw message