In SimpleBeanInfoFactory, we currently create a new array PropertyDescriptor array every time getPropertyDescriptors() is invoked on the SimpleBeanInfo created by the factory.
As a minor enhancement, if we precompute the array we can reduce the memory footprint of such BeanInfo instances (since they'll no longer retain a reference to the Collection which in turn retains a reference to a no-longer-needed TreeMap). In addition, repeated invocations of getPropertyDescriptors() will be slightly faster.
In
SimpleBeanInfoFactory, we currently create a new arrayPropertyDescriptorarray every timegetPropertyDescriptors()is invoked on theSimpleBeanInfocreated by the factory.As a minor enhancement, if we precompute the array we can reduce the memory footprint of such
BeanInfoinstances (since they'll no longer retain a reference to theCollectionwhich in turn retains a reference to a no-longer-neededTreeMap). In addition, repeated invocations ofgetPropertyDescriptors()will be slightly faster.