PropertyUtils.setProperty(targetBean, beanPropertyName, targetValue);
}
catch (IllegalArgumentException e)
{
throw new ApplicationRuntimeException(
"Application error: could not set '" + targetValue + "' (type "
+ (targetValue != null ? targetValue.getClass().getName() : "null") + ") for property "
+ beanPropertyName + " of class " + targetBean.getClass().getName()
+ ": illegal argument supplied", e);
}
catch (Exception e)
{
throw new ApplicationRuntimeException("Application error: could not set " + targetValue + " for property "
+ beanPropertyName + " of class " + targetBean.getClass().getName(), e);
}
}