[
https://issues.apache.org/jira/browse/CONFIGURATION-398?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12761686#action_12761686
]
Oliver Heger commented on CONFIGURATION-398:
--------------------------------------------
I am not able to reproduce the problem. I have added a unit test for the
{{setProperty()}} method to the test class for {{DatabaseConfiguration}}
(http://svn.apache.org/viewvc/commons/proper/configuration/trunk/src/test/org/apache/commons/configuration/TestDatabaseConfiguration.java?view=markup)
that sets a list of properties, but this test succeeds.
Behind the scenes {{setProperty()}} is implemented by calling
{{clearProperty()}} followed by {{addProperty()}}, so the value of the property
is replaced by the new value. Therefore {{setProperty()}} should behave exactly
the same as {{addProperty()}}.
Does the {{addProperty()}} method work for you? Can you verify that you work
with the correct version of Commons Configuration? If so, could you provide a
short code fragment (or even better a unit test) that demonstrates the bug?
> DatabaseConfiguration.setProperty() causes unique constraint violation for
> list values
> --------------------------------------------------------------------------------------
>
> Key: CONFIGURATION-398
> URL: https://issues.apache.org/jira/browse/CONFIGURATION-398
> Project: Commons Configuration
> Issue Type: Bug
> Affects Versions: 1.6, 1.7
> Reporter: Thorsten Gilfert
>
> Calling DatabaseConfiguration.setProperty() with a string-based list (e.g.
> "foo,bar,baz") causes unique constraint violations because setProperty()
> tries to add a DB entry for every list value. I think it is the same problem
> as fixed in CONFIGURATION-255 for addProperty().
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.