You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by "Evgeni (JIRA)" <ji...@apache.org> on 2009/09/09 17:44:58 UTC

[jira] Updated: (BEANUTILS-364) PropertyUtils.copyProperties() does not reads Boolean getters starting with "is" (for example: isReadable())

     [ https://issues.apache.org/jira/browse/BEANUTILS-364?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Evgeni updated BEANUTILS-364:
-----------------------------

    Description: 
_PropertyUtils_ uses _PropertyUtilsBean_ which uses it's _getPropertyDescriptors(class)_ to get _descriptors_ array.
\\This method internally uses _java.beans.Introspector_ which has following problem:
{quote}java.lang.Boolean isSomeProperty(){quote}
is not recognized as getter for _someProperty_, however it does recognize:
{quote}boolean isSomeProperty(){quote}
or
{quote}java.lang.Boolean getSomeProperty(){quote}
This creates a problem if you use Autoboxing/Unboxing (JDK 1.5)

I suggest add some processing to _getPropertyDescriptors(class)_  to workaround _java.beans.Introspector_'s problem.

  was:
_PropertyUtils_ uses _PropertyUtilsBean_ which uses it's _getPropertyDescriptors(class)_ to get _descriptors_ array.
\\This method internally uses _java.beans.Introspector_ which has following problem:
{quote}java.lang.Boolean isSomeProperty(){quote}
is not recognized as getter for _someProperty_
it does recognize:
{quote}boolean isSomeProperty(){quote}
or
{quote}java.lang.Boolean getSomeProperty(){quote}
This creates a problem if you use Autoboxing/Unboxing (JDK 1.5)

I suggest add some processing to _getPropertyDescriptors(class)_  to workaround _java.beans.Introspector_'s problem.


> PropertyUtils.copyProperties() does not reads Boolean getters starting with "is" (for example: isReadable())
> ------------------------------------------------------------------------------------------------------------
>
>                 Key: BEANUTILS-364
>                 URL: https://issues.apache.org/jira/browse/BEANUTILS-364
>             Project: Commons BeanUtils
>          Issue Type: Bug
>          Components: Bean / Property Utils
>    Affects Versions: 1.7.0, 1.8.0-BETA, 1.8.0
>         Environment: JDK 1.5
>            Reporter: Evgeni
>
> _PropertyUtils_ uses _PropertyUtilsBean_ which uses it's _getPropertyDescriptors(class)_ to get _descriptors_ array.
> \\This method internally uses _java.beans.Introspector_ which has following problem:
> {quote}java.lang.Boolean isSomeProperty(){quote}
> is not recognized as getter for _someProperty_, however it does recognize:
> {quote}boolean isSomeProperty(){quote}
> or
> {quote}java.lang.Boolean getSomeProperty(){quote}
> This creates a problem if you use Autoboxing/Unboxing (JDK 1.5)
> I suggest add some processing to _getPropertyDescriptors(class)_  to workaround _java.beans.Introspector_'s problem.

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