kshchepanovskyi / protostuff-googlecode-exported

Automatically exported from code.google.com/p/protostuff

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Support for newing object instances on Android 4.3+ devices

GoogleCodeExporter opened this issue · comments

Since Android 4.3_r0.9 the methodId argument in the method 
ObjectStreamClass::newInstance() has changed from type int to long:
newInstance(Class<?> instantiationClass, int methodId);
newInstance(Class<?> instantiationClass, long methodId);

This patch fixes crashes when using protostuff-runtime-md on Android 4.3+ 
devices and keeps supporting older Android versions which still use the int 
type as an argument.

Original issue reported on code.google.com by eedz...@gmail.com on 26 Feb 2014 at 1:20

Attachments:

I somehow missed this.  Thanks for the patch.
I modified it a little bit to remove duplication.
https://github.com/protostuff/protostuff/commit/9181b01f32d0600b0c0e95d401c6dfd2
d272e139

Original comment by david.yu...@gmail.com on 28 Sep 2014 at 7:36

  • Changed state: Accepted
Update (fix bug 4am):
https://github.com/protostuff/protostuff/commit/3b4bd0db7da077adfe4c25a78ec8e828
01e024bb

Original comment by david.yu...@gmail.com on 28 Sep 2014 at 8:05