View Full Version : BigDecimal (UnsafeDecoder) problem

01-17-2012, 02:37 PM

Im using hessian for my server <-> android app communication. On client side (android) Im using http://exadel.org/flamingo hessian client implementation - which is strongly based on caucho implementation (thats why Im posting this thread on this forum).

When I try to send BigDecimal value from server to client (as a result of webservice invocation) i get exception. I dig a little and debug client code and found that this problem is related to UnsafeDecoder which is not avaliable on android platform.

When I run the same code on my computer (standard JDK) everything works fine because BigDecimal values are decoded with UnsafeDecodee. The same code lunched on Android platfrom throws exception because BigDecimals are decoded with JavaDecoder (which tries to instatiate BigDecimal class with String constructor pasing null as argument). I dont know if this issue is related to Android implementations of Hessian client but it can by simply solved by providing specialized coder/decoder classes for BigDecimal class.

I have similar problem with BigInteger class but I havent time to debug it.

Is it possible to add specialized coder/decoder classes for BigDecimal (and maybe few more) in next version of Hessian ?

Daniel Lipski