[infinispan-dev] BeanUtils.getterMethod

Sanne Grinovero sanne at infinispan.org
Wed Aug 3 14:39:19 EDT 2011


Hello all,
could anybody explain why the ComponentRegistry is performing the
following operation ?

The method
AbstractComponentRegistry#getFromConfiguration(Class<T>)

which invokes:
org.infinispan.util.BeanUtils.getterMethod(Class, Class)

and this one throws thousands of NoSuchMethodException if you have a
rather large number of caches to see if it can find a matching
element, and seems to slow down startup significantly in some cases.

Throwing such an exception seems to be expected since it's inspecting
Configuration.class (statically!) - it always returns null.
I've tried to remove all those methods and short-circuit a nicely
performing "return null": not a single test failed.

(No test failed -> useless code, or missing tests)

Shall I remove the code?

Cheers,
Sanne


More information about the infinispan-dev mailing list