commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Oliver Heger (JIRA)" <>
Subject [jira] Commented: (CONFIGURATION-342) DatabaseConfiguration.copy() loses list/array values
Date Sat, 25 Oct 2008 15:03:44 GMT


Oliver Heger commented on CONFIGURATION-342:

This looks interesting. For DatabaseConfiguration to be useful on its own such a feature has
to be integrated into this class. E.g. when adding a new property the flattening has to be
performed executing multiple inserts if necessary. (BTW I am not sure whether flatten()/unflatten()
is the right naming because it can be confused with transforming a hierarchical configuration
into a flat one and vice versa.)

Making DatabaseConfiguration a true hierarchical configuration will even be more complex.
I assume this was not intended when the class was created, and I would already be happy if
we get support for multiple properties right.

> DatabaseConfiguration.copy() loses list/array values
> ----------------------------------------------------
>                 Key: CONFIGURATION-342
>                 URL:
>             Project: Commons Configuration
>          Issue Type: Bug
>          Components: Type conversion
>    Affects Versions: 1.5
>            Reporter: Scott Wells
>         Attachments:
> I've found a bug where adding a list property to a BaseConfiguration, then copying that
full BaseConfiguration to a DatabaseConfiguration, the list is lost and only the first element
is copied to the destination DatabaseConfiguration.  For example:
> BaseConfiguration bc = new BaseConfiguration();
> bc.addProperty("myList", Arrays.asList("1", "2", "3", "4");
> DatabaseConfiguration dc = new DatabaseConfiguration(...);
> dc.copy(bc);
> List list = dc.getList("myList");
> // At this point, you'll get a single element list containing only "1"

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

View raw message