TDI-37596: tExtractDelimitedFields outputs "null" as the errorMessage on

the reject path when schema is BigDecimal
https://jira.talendforge.org/browse/TDI-37596
This commit is contained in:
pyzhou-talend
2016-10-31 10:12:26 +08:00
parent 318dc6407a
commit c391007e34

View File

@@ -231,12 +231,16 @@ public class ParserUtils {
return result.toString();
}
public static BigDecimal parseTo_BigDecimal(String s) {
if (s == null) {
return null;
}
return new BigDecimal(s);
}
public static BigDecimal parseTo_BigDecimal(String s) {
if (s == null) {
return null;
}
try {
return new BigDecimal(s);
} catch (NumberFormatException nfe) {
throw new NumberFormatException("Bad input for BigDecimal.");
}
}
public static routines.system.Document parseTo_Document(String s) throws org.dom4j.DocumentException {
return parseTo_Document(s, false);