commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ujjwala Kulkarni" <>
Subject Posssible bug in Betwixt alpha
Date Tue, 22 Jul 2003 23:01:20 GMT
Hi , 


I guess , when user calls method beanReader.parse(file) , the  ‘update’ of class org.apache.commons.betwixt.expression.MethodUpdater
 gets called. 


I observed that if the data types are java.util.Date , int the attributes are not getting
converted to the required data type and hence I get the InvalidArgumentExcetion as the default
attribute type passed is ‘String’ 


If the date is java.sql.Date then there is no problem but if it is java.util.Date type then
I get this exception. One possible cause is that these data types do not have constructors
accepting String as only argument. 


e.g java.util.Date  has deprecated new Date(String) constructor. 

And the Interger can not be converted to int like  new int(String)  the code 


“newValue = ConvertUtils.convert( (String) newValue, valueType );”  will always fail to
convert to int or java.util.Date. 


Attaching the log file where I modified MethodUpdater and the log file I got. In theMethodUpdater
, I have put some statements with ‘UJ’ so you will see the log has those debug statements.




View raw message