{
if (raw instanceof Date == false && raw instanceof Number == false)
{
throw new ReportDataFactoryException("For parameter " + name + " Expected date, but got " + raw.getClass());
}
final ResourceBundleFactory resourceBundleFactory = context.getResourceBundleFactory();
final SimpleDateFormat dateFormat = new SimpleDateFormat(pattern, resourceBundleFactory.getLocale());
dateFormat.setTimeZone(resourceBundleFactory.getTimeZone());
return dateFormat.format(raw);
}
if (TYPE_INTEGER.equals(type) || TYPE_NUMERIC.equals(type))
{
if (raw instanceof Number == false)