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

Unnecessary Garbage Objects in Class PropertyUtilsBean

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 1.8.0-BETA
    • 1.8.0
    • Bean / Property Utils
    • None

    Description

      In class PropertyUtilsBean there are several places where the following statement is called:

      Object value = invokeMethod(readMethod, bean, new Object[0]);

      The statement could be replace with the following statement, whithout creating the unused Object array (as we know invoke will be called of a method without method parameters):

      Object value = invokeMethod(readMethod, bean, null);

      Attachments

        1. PropertyUtilsBean_EmptyObjectArray_Patch.txt
          3 kB
          Stefan Wohlgemuth
        2. profiling.png
          45 kB
          Stefan Wohlgemuth

        Activity

          People

            Unassigned Unassigned
            s.wohlgemuth Stefan Wohlgemuth
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: