[jira] Commented: (CONFIGURATION-268) XMLConfiguration does not fully support disabled delimiter parsing
[ https://issues.apache.org/jira/browse/CONFIGURATION-268?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12494703 ] Emmanuel Bourg commented on CONFIGURATION-268: -- That looks a bit weird to introduce a secondary list delimiter to disable the primary list delimiter. Why not letting the user change the delimiter himself ? We might add a note in the javadoc suggesting that setDelimiterParsingDisabled(true) is not recommended if list properties are used in attributes, and that changing the list delimiter to an untypical character is preferred. XMLConfiguration does not fully support disabled delimiter parsing -- Key: CONFIGURATION-268 URL: https://issues.apache.org/jira/browse/CONFIGURATION-268 Project: Commons Configuration Issue Type: Bug Affects Versions: 1.4 Reporter: Oliver Heger Assigned To: Oliver Heger Fix For: 1.5 A call to setDelimiterParsingDisabled(true) should completely turn off the mechanism for searching for list delimiters and splitting property values. However XMLConfiguration.save() escapes list delimiters even in this mode. When later such a configuration file is loaded and delimiter parsing is turned off, the values of affected properties will contain the escape character. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[jira] Commented: (CONFIGURATION-268) XMLConfiguration does not fully support disabled delimiter parsing
[ https://issues.apache.org/jira/browse/CONFIGURATION-268?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12494011 ] Emmanuel Bourg commented on CONFIGURATION-268: -- And what about generating 2 elements ? test attr=1,2,3/ test attr=4,5,6/ XMLConfiguration does not fully support disabled delimiter parsing -- Key: CONFIGURATION-268 URL: https://issues.apache.org/jira/browse/CONFIGURATION-268 Project: Commons Configuration Issue Type: Bug Affects Versions: 1.4 Reporter: Oliver Heger Assigned To: Oliver Heger Fix For: 1.5 A call to setDelimiterParsingDisabled(true) should completely turn off the mechanism for searching for list delimiters and splitting property values. However XMLConfiguration.save() escapes list delimiters even in this mode. When later such a configuration file is loaded and delimiter parsing is turned off, the values of affected properties will contain the escape character. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[jira] Commented: (CONFIGURATION-268) XMLConfiguration does not fully support disabled delimiter parsing
[ https://issues.apache.org/jira/browse/CONFIGURATION-268?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12494115 ] Oliver Heger commented on CONFIGURATION-268: Adding new elements would change the indices of list elements in an almost unpredictable way. This could be quite confusing if keys with indices were used. I think I will go for the solution with the special delimiter and add some notes to the Javadocs. I just found out that we do not support escaping the escape character itself (e.g. in dirs value=C:\Temp\,C:\Progs\ the backslash behind Temp would escape the list delimiter). Will try to fix this. XMLConfiguration does not fully support disabled delimiter parsing -- Key: CONFIGURATION-268 URL: https://issues.apache.org/jira/browse/CONFIGURATION-268 Project: Commons Configuration Issue Type: Bug Affects Versions: 1.4 Reporter: Oliver Heger Assigned To: Oliver Heger Fix For: 1.5 A call to setDelimiterParsingDisabled(true) should completely turn off the mechanism for searching for list delimiters and splitting property values. However XMLConfiguration.save() escapes list delimiters even in this mode. When later such a configuration file is loaded and delimiter parsing is turned off, the values of affected properties will contain the escape character. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[jira] Commented: (CONFIGURATION-268) XMLConfiguration does not fully support disabled delimiter parsing
[ https://issues.apache.org/jira/browse/CONFIGURATION-268?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12493945 ] Oliver Heger commented on CONFIGURATION-268: Attributes are also affected, but here the situation is more complicated: We support multiple values for a single attribute, so somebody could do something like this: XMLConfiguration conf = new XMLConfiguration(); conf.setDelimiterParsingDisabled(true); conf.addProperty([EMAIL PROTECTED], 1,2,3); conf.addProperty([EMAIL PROTECTED], 4,5,6); If such a configuration is saved, our current implementation will produce the following element: test attr=1\,2\,3,4\,5\,6/ If this element is loaded when delimiter parsing is disabled, an attribute with two values is created, but the values contain the escaping character. (Note that this is not a problem when delimiters are enabled.) I think if delimiter parsing is disabled, attribute values should be read as they are without doing any modifications like removing escape characters. They may be part of the real attribute value. But because XML does not allow multiple occurrences of a single attribute, we always need a delimiter character for representing multiple attribute values. Now when loading a configuration file and delimiter parsing is disabled, deciding whether a delimiter character is used is not trivial. What we could do is using an untypical delimiter character, e.g. the pipe. Then the example element would look like test attr=1,2,3|4,5,6/ If an attribute value contained this delimiter character, it would have to be escaped. But we still cannot be 100% sure whether the user in deed wants to define an attribute with the single value 1,2,3\|4,5,6. XMLConfiguration does not fully support disabled delimiter parsing -- Key: CONFIGURATION-268 URL: https://issues.apache.org/jira/browse/CONFIGURATION-268 Project: Commons Configuration Issue Type: Bug Affects Versions: 1.4 Reporter: Oliver Heger Assigned To: Oliver Heger Fix For: 1.5 A call to setDelimiterParsingDisabled(true) should completely turn off the mechanism for searching for list delimiters and splitting property values. However XMLConfiguration.save() escapes list delimiters even in this mode. When later such a configuration file is loaded and delimiter parsing is turned off, the values of affected properties will contain the escape character. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]