Uploaded image for project: 'Commons BeanUtils'
  1. Commons BeanUtils
  2. BEANUTILS-553

Introspection on lombok Class set first two letters of property name to uppercase in PropertyDescritor when just the second one was uppercase

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Not A Bug
    • 1.9.4
    • None
    • Bean / Property Utils
    • None
    • jdk1.8.0_141
      lombok 1.18.22

    • Important

    Description

      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:

      @Getter
      @Setter
      public Class MyBean {
        DPropertyType dPropertyName;
      }

      then if we used de methods :

      getPropertyUtils().isReadable(MyBeanInstance,"dPropertyName") or
      getPropertyUtils().isWriteable(MyBeanInstance,"dPropertyName")
      both return false

       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:

      BeanIntrospectionData data = getIntrospectionData(bean.getClass()); 

      with the PropertyDescriptor:

      [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)]] 

      but should be PropertyDescriptor:

      [java.beans.PropertyDescriptor[name=dPropertyName; ......] 

      ?

      Attachments

        Activity

          People

            Unassigned Unassigned
            papurrote edward gallego ruano
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: