action2013 / hessdroid

Automatically exported from code.google.com/p/hessdroid
0 stars 0 forks source link

Problem with Locale deserialization #5

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. We are using hessdroid library for android client.
2. When the server sends an object of java.util.Locale then hessdroid
library throws the following exception:

com.caucho.hessian.io.HessianFieldException: 
com.<custom data type having locale as field>.locale:
com.caucho.hessian.io.LocaleHandle 
(com.caucho.hessian.io.LocaleHandle@437aaa60) cannot be assigned to
'java.util.Locale'

3. While debugging we found inside method 
com.caucho.hessian.io.JavaDeserializer.ObjectFieldDeserializer.deserialize()
that the statement
  field.set(obj, value);
throws the exception while setting the Locale field type.

4. We tried to fix this. We changed the access modifier of
com.caucho.hessian.io.LocaleHandle.readResolve() method from private to
public. This resolved the problem.

What is the expected output? What do you see instead?
The Locale object should be properly resolved.

What version of the product are you using? On what operating system?
Checked out source code on April 8, 2010. We are working on Windows XP SP3.

Please provide any additional information below.
Could you please confirm if the fix is appropriate and when can we expect
the new library release?

Thanks
Raju Mahore

Original issue reported on code.google.com by rajumahore on 21 Apr 2010 at 12:40