Mantis - Resin
Viewing Issue Advanced Details
1305 minor always 08-21-06 11:21 08-21-06 13:14
ferg  
ferg  
normal  
closed 3.0.21  
fixed  
none    
none 3.0.22  
0001305: Hessian and construstor with many arguments
(rep by Rick Mann)


In JavaDeserializer.JavaDeserializer(Class cl):

When computing the cost of a constructor, int types are used. One of our constructors has 13 parameters, resulting in an overflow error. That is, the resulting value exceeds the signed MAX_INT, so the result becomes negative (Java really needs unsigned types), and thus more complex constructors get a lower computed cost. I changed the type of cost and bestCost to be long, and that accommodated our constructor, but this approach doesn't scale. Perhaps BigDecimal is better? Or, choose the no-arg constructor directly when found, or don't compute full cost until comparing two constructors with the same number of arguments...many possibilities.


Notes
(0001469)
ferg   
08-21-06 13:14   
hessian/334e