You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by "SEBASTIEN LEPAGE (Jira)" <ji...@apache.org> on 2021/12/26 22:22:00 UTC

[jira] [Updated] (BEANUTILS-552) Add new ctor allowing custom BeanIntrospector

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

SEBASTIEN LEPAGE updated BEANUTILS-552:
---------------------------------------
    Description: 
By default, DefaultBeanIntrospector is used as introspector. Turns out, I need to set a stopClass during introspection. Instead of removing DefaultBeanIntrospector instance and then add a new one. I can see from the latest version that PropertyUtilsBean#resetBeanIntrospectors exclude by default class property using SuppressPropertiesBeanIntrospector, I have two suggestions, either:
 * DefaultBeanIntrospector uses Object as a stop class
 * Define a StopClassBeanIntrospector allowing to define a stopClass (or add a new method getStopClass into IntrospectionContext and by default returns Object.class, no breaking change)

It'll be easier to simply, have a new constructor allowing to pass a set of introspectors. Being said, a StopClassBeanIntrospector would be great as well. WDYT?

  was:By default, DefaultBeanIntrospector is used as introspector. Turns out, I need to set a stopClass during introspection. Instead of removing DefaultBeanIntrospector instance and then add a new one. It'll be easier to simply, have a new constructor allowing to pass a set of introspectors. Being said, a StopClassBeanIntrospector would be great as well. WDYT?


> Add new ctor allowing custom BeanIntrospector
> ---------------------------------------------
>
>                 Key: BEANUTILS-552
>                 URL: https://issues.apache.org/jira/browse/BEANUTILS-552
>             Project: Commons BeanUtils
>          Issue Type: Improvement
>          Components: Bean / Property Utils
>    Affects Versions: 1.9.3
>            Reporter: SEBASTIEN LEPAGE
>            Priority: Major
>
> By default, DefaultBeanIntrospector is used as introspector. Turns out, I need to set a stopClass during introspection. Instead of removing DefaultBeanIntrospector instance and then add a new one. I can see from the latest version that PropertyUtilsBean#resetBeanIntrospectors exclude by default class property using SuppressPropertiesBeanIntrospector, I have two suggestions, either:
>  * DefaultBeanIntrospector uses Object as a stop class
>  * Define a StopClassBeanIntrospector allowing to define a stopClass (or add a new method getStopClass into IntrospectionContext and by default returns Object.class, no breaking change)
> It'll be easier to simply, have a new constructor allowing to pass a set of introspectors. Being said, a StopClassBeanIntrospector would be great as well. WDYT?



--
This message was sent by Atlassian Jira
(v8.20.1#820001)