You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by "Martin Bartlett (JIRA)" <ji...@apache.org> on 2008/01/30 16:12:34 UTC
[jira] Created: (BEANUTILS-301) In ArrayConverter, the allowedChars
array should (possibly) include the underscore character
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.
[jira] Resolved: (BEANUTILS-301) In ArrayConverter, the
allowedChars array should (possibly) include the underscore character
Posted by "Niall Pemberton (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/BEANUTILS-301?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Niall Pemberton resolved BEANUTILS-301.
---------------------------------------
Resolution: Won't Fix
> 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.
[jira] Commented: (BEANUTILS-301) In ArrayConverter, the
allowedChars array should (possibly) include the underscore character
Posted by "Niall Pemberton (JIRA)" <ji...@apache.org>.
[ 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.
[jira] Commented: (BEANUTILS-301) In ArrayConverter, the
allowedChars array should (possibly) include the underscore character
Posted by "Martin Bartlett (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/BEANUTILS-301?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12564058#action_12564058 ]
Martin Bartlett commented on BEANUTILS-301:
-------------------------------------------
BEANUTILS-302 describes the associated NPE bug.
> 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.