edward gallego ruano created BEANUTILS-553:
----------------------------------------------
Summary: Introspection on lombok Class set first two letters of
property name to uppercase in PropertyDescritor when just the second one was
uppercase
Key: BEANUTILS-553
URL: https://issues.apache.org/jira/browse/BEANUTILS-553
Project: Commons BeanUtils
Issue Type: Bug
Components: Bean / Property Utils
Affects Versions: 1.9.4
Environment: jdk1.8.0_141
lombok 1.18.22
Reporter: edward gallego ruano
with Bean instance from a lombok class the Introspection set first two letters
of property name to uppercase in PropertyDescritor when just the second one was
uppercase:
ej:
{code:java}
@Getter
@Setter
public Class MyBean {
DPropertyType dPropertyName;
}{code}
then if we used de methods :
{code:java}
getPropertyUtils().isReadable(MyBeanInstance,"dPropertyName") or
getPropertyUtils().isWriteable(MyBeanInstance,"dPropertyName")
both return false{code}
the Beans Specification paragraph 8.8 say :
??"...However to support the occasional use of all??
??upper-case names, we check if the first two characters of the name are both
upper case and if??
??so leave it alone."??
but the Instrospection inside those methods return data:
{code:java}
BeanIntrospectionData data = getIntrospectionData(bean.getClass()); {code}
with the PropertyDescriptor:
{code:java}
[java.beans.PropertyDescriptor[name=DPropertyName; propertyType=class
my.package.DPropertyType ; readMethod=public my.package.DPropertyType
my.package.MyBean.getDPropertyName(); writeMethod=public void
my.package.MyBean.setDPropertyName(my.package.DPropertyType)]] {code}
but should be PropertyDescriptor:
{code:java}
[java.beans.PropertyDescriptor[name=dPropertyName; ......] {code}
?
--
This message was sent by Atlassian Jira
(v8.20.7#820007)