{
Number value = defaultParseNumber(textStr, JRClassLoader.loadClassForRealName(text.getValueClassName()));
if (value != null)
{
textValue = new NumberTextValue(textStr, value, null);
}
else
{
textValue = getTextValueString(text, textStr);
}
}
else
{
textValue = new NumberTextValue(textStr, null, null);
}
}
else
{
NumberFormat numberFormat = getNumberFormat(getTextFormatFactoryClass(text), pattern, getTextLocale(text));
Number value = null;
if (textStr != null && textStr.length() > 0)
{
value = numberFormat.parse(textStr);
}
textValue = new NumberTextValue(textStr, value, pattern);
}
return textValue;
}