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

copyProperties throws NullPointerException if an IllegalArgumentException is thrown due to a null value parameter for a primitive

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 1.8.0
    • 1.8.1
    • Bean / Property Utils
    • None

    Description

      When using copyProperties from a bean with a Boolean field to a bean with a corresponding boolean field (i.e. a primitive), an IllegalArgumentException is thrown when calling method.invoke. invokeMethod tries to format a user friendly exception string, but fails to check if the value parameter is null before getting it's classname.

      Attachments

        1. PropertyUtilsBean.patch
          0.6 kB
          Eivind Tagseth

        Issue Links

          Activity

            People

              niallp Niall Pemberton
              eivindt Eivind Tagseth
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: