commons-beanutils icon indicating copy to clipboard operation
commons-beanutils copied to clipboard

BEANUTILS-541 - FluentPropertyBeanIntrospector caches corrupted writeMethod (2.x)

Open seregamorph opened this issue 4 years ago • 1 comments
trafficstars

https://issues.apache.org/jira/browse/BEANUTILS-541

There is an issue in FluentPropertyBeanIntrospector (at line 144 for 1.9.3), it caches wrong writeMethod in the static cache of java.beans.Introspector when base class has at least two subclasses. Simple snippet to reproduce can be found in covering Jira541TestCase (revert FluentPropertyBeanIntrospector.java changes locally and you'll see the failure).

It is critical, because wrong information is stored globally unless explicit Introspector.flushCaches (or Introspector.flushFromCaches) is called.

seregamorph avatar Jan 10 '21 10:01 seregamorph

Backported for 1.x in #69

seregamorph avatar Jan 10 '21 13:01 seregamorph