konveyor / rulesets

Collections of static code analysis rules
Apache License 2.0
1 stars 25 forks source link

Create rules for bean property determination #138

Open jmle opened 1 month ago

jmle commented 1 month ago

According to the migration guide:

The core container performs basic bean property determination without java.beans.Introspector by default. For full backwards compatibility with 5.3.x in case of sophisticated JavaBeans usage, specify the following content in a META-INF/spring.factories file which enables 5.3-style full java.beans.Introspector usage: org.springframework.beans.BeanInfoFactory=org.springframework.beans.ExtendedBeanInfoFactory

Investigate and create rules if necessary.

In the rule description and message, try to be as verbose and clear as possible. Code examples are always welcome and useful. Feel free to use markdown syntax for these.

konveyor-ci-bot[bot] commented 1 month ago

This issue is currently awaiting triage. If contributors determine this is a relevant issue, they will accept it by applying the triage/accepted label and provide further guidance. The triage/accepted label can be added by org members.

jmle commented 4 weeks ago

In Spring 5 and earlier versions, Spring relied on java.beans.Introspector for certain advanced cases of bean handling, such as working with custom BeanInfo implementations or handling non-standard JavaBeans. This allowed Spring to analyze a bean’s properties using the introspection mechanisms provided by the JavaBeans API.

This rule could look for BeanInfo implementations or usage. Maybe make it a potential rule. The solution is simple, just follow the migration guide and add the config.