You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by "Lee Naylor (JIRA)" <ji...@apache.org> on 2009/10/20 21:31:59 UTC

[jira] Created: (CONFIGURATION-400) PropertiesConfiguration: Can't disable attribute splitting

PropertiesConfiguration: Can't disable attribute splitting 
-----------------------------------------------------------

                 Key: CONFIGURATION-400
                 URL: https://issues.apache.org/jira/browse/CONFIGURATION-400
             Project: Commons Configuration
          Issue Type: Bug
          Components: Format
    Affects Versions: 1.5
            Reporter: Lee Naylor
            Assignee: Oliver Heger
             Fix For: 1.6


My XML configuration has the following attribute:
<some-element some-attribute="&#x0A;&#x0D;" />

But XML Configuration is trying to split this string and trims it after splitting. I don't need this behaviour, but setting setDelimiterParsingDisabled() just changing delimeter to "|" and not disables attribute trimming.

Need either to disable trimming/splitting if setDelimiterParsingDisabled() is set to TRUE (incompatible change), or add something like setParseAttributesAsIs() that will prevent attributes to be trimmed and splitted

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


[jira] Commented: (CONFIGURATION-400) PropertiesConfiguration: Can't disable attribute splitting

Posted by "Oliver Heger (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CONFIGURATION-400?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12768100#action_12768100 ] 

Oliver Heger commented on CONFIGURATION-400:
--------------------------------------------

The splitting is already performed during loading, so you have to disable the delimiter parsing *before* you load the configuration. Afterwards it has no more effect. This is documented in the Javadocs of the {{setDelimiterParsingDisabled()}} method:

??Set whether this configuration should use delimiters when parsing property values to convert them to lists of values. By default delimiter parsing is enabled Note: this change will only be effective for new parsings. If you want it to take effect for all loaded properties use the no arg constructor and call this method before setting source.??

Does this solve your problem?

> PropertiesConfiguration: Can't disable attribute splitting 
> -----------------------------------------------------------
>
>                 Key: CONFIGURATION-400
>                 URL: https://issues.apache.org/jira/browse/CONFIGURATION-400
>             Project: Commons Configuration
>          Issue Type: Bug
>          Components: Format
>    Affects Versions: 1.6
>            Reporter: Lee Naylor
>            Assignee: Oliver Heger
>
> My XML configuration has the following attribute:
> <some-element some-attribute="&#x0A;&#x0D;" />
> But XML Configuration is trying to split this string and trims it after splitting. I don't need this behaviour, but setting setDelimiterParsingDisabled() just changing delimeter to "|" and not disables attribute trimming.
> Need either to disable trimming/splitting if setDelimiterParsingDisabled() is set to TRUE (incompatible change), or add something like setParseAttributesAsIs() that will prevent attributes to be trimmed and splitted

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


[jira] Commented: (CONFIGURATION-400) PropertiesConfiguration: Can't disable attribute splitting

Posted by "Lee Naylor (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CONFIGURATION-400?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12768350#action_12768350 ] 

Lee Naylor commented on CONFIGURATION-400:
------------------------------------------

Yes is does! 

Thanks, I obviously didn't ready the full documentation. I'll be sure to next time.

> PropertiesConfiguration: Can't disable attribute splitting 
> -----------------------------------------------------------
>
>                 Key: CONFIGURATION-400
>                 URL: https://issues.apache.org/jira/browse/CONFIGURATION-400
>             Project: Commons Configuration
>          Issue Type: Bug
>          Components: Format
>    Affects Versions: 1.6
>            Reporter: Lee Naylor
>            Assignee: Oliver Heger
>
> My XML configuration has the following attribute:
> <some-element some-attribute="&#x0A;&#x0D;" />
> But XML Configuration is trying to split this string and trims it after splitting. I don't need this behaviour, but setting setDelimiterParsingDisabled() just changing delimeter to "|" and not disables attribute trimming.
> Need either to disable trimming/splitting if setDelimiterParsingDisabled() is set to TRUE (incompatible change), or add something like setParseAttributesAsIs() that will prevent attributes to be trimmed and splitted

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


[jira] Updated: (CONFIGURATION-400) PropertiesConfiguration: Can't disable attribute splitting

Posted by "Lee Naylor (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CONFIGURATION-400?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Lee Naylor updated CONFIGURATION-400:
-------------------------------------

        Fix Version/s:     (was: 1.6)
    Affects Version/s:     (was: 1.5)
                       1.6

> PropertiesConfiguration: Can't disable attribute splitting 
> -----------------------------------------------------------
>
>                 Key: CONFIGURATION-400
>                 URL: https://issues.apache.org/jira/browse/CONFIGURATION-400
>             Project: Commons Configuration
>          Issue Type: Bug
>          Components: Format
>    Affects Versions: 1.6
>            Reporter: Lee Naylor
>            Assignee: Oliver Heger
>
> My XML configuration has the following attribute:
> <some-element some-attribute="&#x0A;&#x0D;" />
> But XML Configuration is trying to split this string and trims it after splitting. I don't need this behaviour, but setting setDelimiterParsingDisabled() just changing delimeter to "|" and not disables attribute trimming.
> Need either to disable trimming/splitting if setDelimiterParsingDisabled() is set to TRUE (incompatible change), or add something like setParseAttributesAsIs() that will prevent attributes to be trimmed and splitted

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


[jira] Resolved: (CONFIGURATION-400) PropertiesConfiguration: Can't disable attribute splitting

Posted by "Oliver Heger (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CONFIGURATION-400?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Oliver Heger resolved CONFIGURATION-400.
----------------------------------------

    Resolution: Invalid

No problem. This delimiter splitting has caused us a bunch of trouble. I guess we will change this in the next major release.

> PropertiesConfiguration: Can't disable attribute splitting 
> -----------------------------------------------------------
>
>                 Key: CONFIGURATION-400
>                 URL: https://issues.apache.org/jira/browse/CONFIGURATION-400
>             Project: Commons Configuration
>          Issue Type: Bug
>          Components: Format
>    Affects Versions: 1.6
>            Reporter: Lee Naylor
>            Assignee: Oliver Heger
>
> My XML configuration has the following attribute:
> <some-element some-attribute="&#x0A;&#x0D;" />
> But XML Configuration is trying to split this string and trims it after splitting. I don't need this behaviour, but setting setDelimiterParsingDisabled() just changing delimeter to "|" and not disables attribute trimming.
> Need either to disable trimming/splitting if setDelimiterParsingDisabled() is set to TRUE (incompatible change), or add something like setParseAttributesAsIs() that will prevent attributes to be trimmed and splitted

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


[jira] Commented: (CONFIGURATION-400) PropertiesConfiguration: Can't disable attribute splitting

Posted by "Lee Naylor (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CONFIGURATION-400?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12767917#action_12767917 ] 

Lee Naylor commented on CONFIGURATION-400:
------------------------------------------

I'm having the same issue as the one I cloned this issue from. The only difference is I'm using PropertiesConfiguration. I'm trying to pass in a sql query which has ',' separating the different columns i'm selecting.

my property is (all on the same line) ...
db.query = select c.ldc_cnsmr_acnt_num, (select c_p.acnt_validator from cb_cust_prev_validator c_p where c_p.customer_oid = c.oid AND c_p.acnt_validator != c.ldc_cnsmr_acnt_num AND c_p.effect_date = (select max(effect_date) from cb_cust_prev_validator c_p2 where c_p2.customer_oid = c_p.customer_oid)), c.full_name, 'P', 'ACOV', c.addr_validator, c.addr_validator, c.addr_validator from cb_customer c where c.ldc_cnsmr_acnt_num = '##account_id##'

I've tried ...
setDelimiterParsingDisabled(true);
setListDelimiter('^');

When i call isDelimiterParsingDisabled() or getListDelimiter() it shows that the attributes have been updated, but when i call getString("db.query") it always returns just "select c.ldc_cnsmr_acnt_num"

> PropertiesConfiguration: Can't disable attribute splitting 
> -----------------------------------------------------------
>
>                 Key: CONFIGURATION-400
>                 URL: https://issues.apache.org/jira/browse/CONFIGURATION-400
>             Project: Commons Configuration
>          Issue Type: Bug
>          Components: Format
>    Affects Versions: 1.6
>            Reporter: Lee Naylor
>            Assignee: Oliver Heger
>
> My XML configuration has the following attribute:
> <some-element some-attribute="&#x0A;&#x0D;" />
> But XML Configuration is trying to split this string and trims it after splitting. I don't need this behaviour, but setting setDelimiterParsingDisabled() just changing delimeter to "|" and not disables attribute trimming.
> Need either to disable trimming/splitting if setDelimiterParsingDisabled() is set to TRUE (incompatible change), or add something like setParseAttributesAsIs() that will prevent attributes to be trimmed and splitted

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