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

BeanUtils.cloneBean fails to clone DynaBeans

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 1.6.1
    • None
    • None
    • None
    • Operating System: All
      Platform: PC

    • 19850

    Description

      commons-beanutils-1.6.1
      Trying to clone a bean with BeanUtils.cloneBean(Object) causes a
      NullPointerException. I think the bean in this case should be instanciated
      from the DynaClass such as:

      Object newBean = null;
      if (bean instanceof DynaBean)

      { newBean = ((DynaBean) bean).getDynaClass().newInstance(); }

      else

      { newBean = bean.getClass().newInstance(); }

      Regards

      Attachments

        Activity

          People

            Unassigned Unassigned
            romain.guay@mrn.gouv.qc.ca Romain Guay
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: