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

[beanutils] MappedPropertyDescriptor broken

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Cannot Reproduce
    • None
    • None
    • Bean / Property Utils
    • None
    • Operating System: All
      Platform: All

    • 23383

    Description

      When trying to create a MappedPropertyDescriptor for a mapped property with an
      "invalid" setter method, an IntrospectionException is thrown. E.g. I have a
      class with the methods:

      getProperty(String):Property
      setProperty(String, Value):void

      Since MappedPropertyDescriptor#findMethod(Class, String, int, Class[]) returns
      that "invalid" setter method MappedPropertyDescriptor#findMappedPropertyType
      fails. It would be nice for MappedPropertyDescriptor to ignore "invalid" setter
      methods.

      After some debugging I found that
      MappedPropertyDescriptor#internalFindMethod(Class, String, int, Class[]) calls
      MappedPropertyDescriptor#internalFindMethod(Class, String, int) for the class'
      interfaces. So it misses the parameter which specifies the method's argument
      classes. I think the way it's meant to be is to use
      MappedPropertyDescriptor#internalFindMethod(Class, String, int, Class[]) for
      that call, too.

      Attachments

        Activity

          People

            Unassigned Unassigned
            daniel.spilker@hamburg.de Daniel Spilker
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: