Re: Some logic clarifications in com.opensymphony.xwork2.conversion.impl.XWorkBasicConverter#doConvertToNumber(Map,Object,Class)

2012-02-08 Thread Maurizio Cucchiara
> > Could existing uses be relying on the exceptions being thrown when doing > a new BigDecimal("")? There is no doubt that changing the order of instanceof/nullity check the outcome is different. As you yourself pointed out new BigDecimal("") throws a NumberFormatException. AFAIU the toType take

Some logic clarifications in com.opensymphony.xwork2.conversion.impl.XWorkBasicConverter#doConvertToNumber(Map,Object,Class)

2012-02-08 Thread Jason Pyeron
Looking over the beginning snipet if (toType == BigDecimal.class) { return new BigDecimal((String) value); } else if (toType == BigInteger.class) { return new BigInteger((String) value); } else if (toType.isPrimitive()) {