struts-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Maurizio Cucchiara <>
Subject Re: Some logic clarifications in com.opensymphony.xwork2.conversion.impl.XWorkBasicConverter#doConvertToNumber(Map<String, Object>,Object,Class)
Date Wed, 08 Feb 2012 18:10:13 GMT
> 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
AFAIU the toType takes the precedence over the value itself.
Sounds like: if you want a BigDecimal and you provide a wrong value, you
will get an exception.

I could be wrong as I took a very quick look at the source code.
Did you check if there is a test which illustrates the expected behavior?

Twitter     :
G+          :
Linkedin    :

Maurizio Cucchiara

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message