You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by "Glenn Thompson (JIRA)" <ji...@apache.org> on 2010/04/06 21:05:33 UTC

[jira] Created: (BEANUTILS-374) BooleanConverter will not convert t/f

BooleanConverter will not convert t/f
-------------------------------------

                 Key: BEANUTILS-374
                 URL: https://issues.apache.org/jira/browse/BEANUTILS-374
             Project: Commons BeanUtils
          Issue Type: Improvement
          Components: ConvertUtils & Converters
         Environment: Java 1.5
            Reporter: Glenn Thompson
            Priority: Minor


The default BooleanConverter will not convert "t" strings to Boolean.  This seems like an oversight.
 
I found a reference to the issue in the mail archives http://www.mailinglistarchive.com/html/commons-dev@jakarta.apache.org/2004-06/msg00640.htm.  But I can't find it in Jira.


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


[jira] Resolved: (BEANUTILS-374) BooleanConverter will not convert t/f

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

Niall Pemberton resolved BEANUTILS-374.
---------------------------------------

    Resolution: Won't Fix

You can do this already by configuring the BooleanConverter:

{code}
        String[] trueValues  = new String[] {"true", "yes", "y", "on", "1", "t"};
        String[] falseValues = new String[] {"false", "no", "n", "off", "0", "f"};
        Converter converter = new BooleanConverter(trueValues, falseValues);
        ConvertUtils.register(converter, Boolean.class);
{code}


> BooleanConverter will not convert t/f
> -------------------------------------
>
>                 Key: BEANUTILS-374
>                 URL: https://issues.apache.org/jira/browse/BEANUTILS-374
>             Project: Commons BeanUtils
>          Issue Type: Improvement
>          Components: ConvertUtils & Converters
>         Environment: Java 1.5
>            Reporter: Glenn Thompson
>            Priority: Minor
>         Attachments: boolean_converter.patch
>
>
> The default BooleanConverter will not convert "t" strings to Boolean.  This seems like an oversight.
>  
> I found a reference to the issue in the mail archives http://www.mailinglistarchive.com/html/commons-dev@jakarta.apache.org/2004-06/msg00640.htm.  But I can't find it in Jira.

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


[jira] Updated: (BEANUTILS-374) BooleanConverter will not convert t/f

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

Francesco Mari updated BEANUTILS-374:
-------------------------------------

    Attachment: boolean_converter.patch

The patch enables boolean conversion for strings "t" and "f".

> BooleanConverter will not convert t/f
> -------------------------------------
>
>                 Key: BEANUTILS-374
>                 URL: https://issues.apache.org/jira/browse/BEANUTILS-374
>             Project: Commons BeanUtils
>          Issue Type: Improvement
>          Components: ConvertUtils & Converters
>         Environment: Java 1.5
>            Reporter: Glenn Thompson
>            Priority: Minor
>         Attachments: boolean_converter.patch
>
>
> The default BooleanConverter will not convert "t" strings to Boolean.  This seems like an oversight.
>  
> I found a reference to the issue in the mail archives http://www.mailinglistarchive.com/html/commons-dev@jakarta.apache.org/2004-06/msg00640.htm.  But I can't find it in Jira.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira