commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Oliver Heger (JIRA)" <j...@apache.org>
Subject [jira] Commented: (CONFIGURATION-342) DatabaseConfiguration.copy() loses list/array values
Date Thu, 23 Oct 2008 06:18:44 GMT

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

Oliver Heger commented on CONFIGURATION-342:
--------------------------------------------

It would be nice if you could attach your code (or a patch) to this ticket.

However, I am not sure whether the flatten/unflatten approach is the way to go because it
violates all rules of good database design and normalization. It would be cool if the table
layout used by DatabaseConfiguration could be made customizable, but this is certainly really
complex.

> DatabaseConfiguration.copy() loses list/array values
> ----------------------------------------------------
>
>                 Key: CONFIGURATION-342
>                 URL: https://issues.apache.org/jira/browse/CONFIGURATION-342
>             Project: Commons Configuration
>          Issue Type: Bug
>          Components: Type conversion
>    Affects Versions: 1.5
>            Reporter: Scott Wells
>
> 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.


Mime
View raw message