yong-hu / objenesis

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

AndroidInstantiator not working for Gingerbread #18

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
Try to use AndroidInstantiator on Gingerbread devices

What is the expected output? What do you see instead?
Instantiator fails with "NoSuchMethodException"

What version of the product are you using? On what operating system?
Version 1.3 on Android Gingerbread device

Please provide any additional information below.
Exception is thrown because on Gingerbread ObjectStreamClass doesn't have 
"newInstance" method. This can be fixed by using ObjectInputStream that have 
also a "newInstance" method only for Gingerbread devices.

Also I noticed that recently ObjectStreamClass have changed signature for 
"newInstance" with a Long second parameter (for supporting newer 64bit VMs), so 
maybe you should change AndroidInstantiator to support also this new signature.

Original issue reported on code.google.com by Da...@path.com on 11 Jun 2013 at 11:59

GoogleCodeExporter commented 9 years ago
I have also experienced this issue on Gingerbread. The easiest way to reproduce 
is to run Objenesis tests: 
http://objenesis.googlecode.com/files/objenesis-tck-android-1.3.apk

Original comment by qert...@gmail.com on 12 Jul 2013 at 12:19

GoogleCodeExporter commented 9 years ago

Original comment by henri.tr...@gmail.com on 21 Jul 2013 at 11:53

GoogleCodeExporter commented 9 years ago

Original comment by henri.tr...@gmail.com on 21 Jul 2013 at 11:54

GoogleCodeExporter commented 9 years ago

Original comment by henri.tr...@gmail.com on 14 Aug 2013 at 11:43