When trying to inspect some of the monitoring and reporting statistics exposed by infinispan via JMX we are getting an error retrieving some of the attributes.
The only objects we are getting errors from are of type org.infinispan.interceptors.impl.CacheMgmtInterceptor
cause NullPointerException and the attribute
causes java.lang.IllegalArgumentException: wrong number of arguments
Debugging the issue it looks to me like the problem is with the way ResourceDMBean is discovering the getters for these attributes. For the first 4 attributes there are setters but no getter methods, so no method is found and we get the NPE. For the last attribute the code in ReflectionUtil.findGetterForFieldUsingReflection() just looks for a method with the correct name without checking the number of arguments, so it is finding the org.infinispan.interceptors.impl.CacheMgmtInterceptor.getStatisticsEnabled(FlagAffectedCommand) method instead of the org.infinispan.interceptors.impl.JmxStatsCommandInterceptor.getStatisticsEnabled() from the superclass.