You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by "Niall Pemberton (JIRA)" <ji...@apache.org> on 2008/02/04 09:47:08 UTC

[jira] Commented: (BEANUTILS-301) In ArrayConverter, the allowedChars array should (possibly) include the underscore character

    [ https://issues.apache.org/jira/browse/BEANUTILS-301?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12565288#action_12565288 ] 

Niall Pemberton commented on BEANUTILS-301:
-------------------------------------------

You can configure the allowed characters to recognize the underscore:

        ArrayConverter converter = new ArrayConverter(String[].class, new StringConverter());
        converter.setAllowedChars(new char[] {'.', '-', '_'});

then register your configured converter:
        ConvertUtils.register(converter, String[].class);


> In ArrayConverter, the allowedChars array should (possibly) include the underscore character
> --------------------------------------------------------------------------------------------
>
>                 Key: BEANUTILS-301
>                 URL: https://issues.apache.org/jira/browse/BEANUTILS-301
>             Project: Commons BeanUtils
>          Issue Type: Improvement
>          Components: ConvertUtils & Converters
>    Affects Versions: 1.8.0-BETA
>         Environment: All
>            Reporter: Martin Bartlett
>            Priority: Minor
>
> An array value passed as:
> this_is_my_first_value,this_is_my_second_value
> should (could: please) result in a two-element array - currently the "_" is not recognized as a word character and thus results in the StreamTokenizer splitting each string at the underscore. Maybe ALL Java symbol characters should be recognized? This would avoid unnecessary quoting ala "this_is_my_first_value","this_is_my_second_value"
> (note there is also a BUG related to this, since parsing the above string also results in an NPE in the current BETA- report to follow)

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