Details
-
Improvement
-
Status: Closed
-
Minor
-
Resolution: Fixed
-
None
-
None
-
Operating System: All
Platform: Other
-
38165
Description
In <<Object org.apache.commons.beanutils.PropertyUtilsBean.invokeMethod(Method
method, Object bean, Object[] values) throws IllegalAccessException,
InvocationTargetException>>
the throw block should rather be:
throw new IllegalArgumentException(
"Cannot invoke " + method.getDeclaringClass().getName() + "."
+ method.getName() + " - " + e.getMessage() + " - found " +
bean.getClass().getName()+ " but expected "
+ (values[0]).getClass().getName());
see also In <<Object org.apache.commons.beanutils.PropertyUtilsBean.invokeMethod(Method
method, Object bean, Object[] values) throws IllegalAccessException,
InvocationTargetException>>
the throw block should rather be:
throw new IllegalArgumentException(
"Cannot invoke " + method.getDeclaringClass().getName() + "."
+ method.getName() + " - " + e.getMessage() + " - found " +
bean.getClass().getName()+ " but expected "
+ (values[0]).getClass().getName());
see also Bug 38163 for the context where this would have helped a lot. for the context where this would have helped a lot.