Issue 13 in objenesis: Add Dalvik VM support

11 views
Skip to first unread message

obje...@googlecode.com

unread,
Nov 1, 2010, 3:21:49 AM11/1/10
to objene...@googlegroups.com
Status: New
Owner: ----

New issue 13 by rdama...@gmail.com: Add Dalvik VM support
http://code.google.com/p/objenesis/issues/detail?id=13

Objenesis should support Android's VM, Dalvik.

Instantiating objects in it can be done with the technique described here:
http://stackoverflow.com/questions/3121515/is-it-possible-to-bypass-constructors-when-instantiating-objects-in-android
which in fact is already quite similar to what objenesis uses in other VMs.

I'm willing to try to implement it if you agree.

Thanks

obje...@googlecode.com

unread,
Nov 7, 2010, 9:58:13 AM11/7/10
to objene...@googlegroups.com
Updates:
Status: Accepted

Comment #1 on issue 13 by henri.tremblay: Add Dalvik VM support
http://code.google.com/p/objenesis/issues/detail?id=13

We absolutely agree. If a patch is provided, it will be included in the
next release.

obje...@googlecode.com

unread,
Nov 7, 2010, 10:10:23 AM11/7/10
to objene...@googlegroups.com
Updates:
Labels: Milestone-1.3

Comment #2 on issue 13 by henri.tremblay: Add Dalvik VM support
http://code.google.com/p/objenesis/issues/detail?id=13

(No comment was entered for this change.)

obje...@googlecode.com

unread,
Nov 7, 2010, 12:07:12 PM11/7/10
to objene...@googlegroups.com

Comment #4 on issue 13 by rdama...@gmail.com: Add Dalvik VM support
http://code.google.com/p/objenesis/issues/detail?id=13

I'd have made a patch, but I think this deserves a look from someone who
knows the objenesis code better, since it's very similar to
http://code.google.com/p/objenesis/source/browse/trunk/main/src/org/objenesis/instantiator/basic/ObjectInputStreamInstantiator.java
but I don't really understand what the serialized data put there does. It's
also very similar to
http://code.google.com/p/objenesis/source/browse/trunk/main/src/org/objenesis/instantiator/basic/ObjectStreamClassInstantiator.java
but I don't see the newinstance method for that class in Android (it uses
Harmony afaik).

obje...@googlecode.com

unread,
Dec 14, 2012, 12:15:17 PM12/14/12
to objene...@googlegroups.com

Comment #5 on issue 13 by i...@google.com: Add Dalvik VM support
http://code.google.com/p/objenesis/issues/detail?id=13

I've just sent a handful of patches to objenesis-dev which should let
Objenesis work on Ice Cream Sandwich and Jelly Bean, along with a wrapper
for the TCK to let it run on Android devices or emulators. See
https://groups.google.com/forum/?fromgroups=#!topic/objenesis-dev/I8J3fGGZvUQ .

obje...@googlecode.com

unread,
Jan 8, 2013, 7:44:02 AM1/8/13
to objene...@googlegroups.com
Updates:
Status: Started

Comment #6 on issue 13 by henri.tr...@gmail.com: Add Dalvik VM support
http://code.google.com/p/objenesis/issues/detail?id=13

obje...@googlecode.com

unread,
Jan 18, 2013, 7:56:47 PM1/18/13
to objene...@googlegroups.com
Updates:
Status: Fixed
Owner: henri.tr...@gmail.com

Comment #7 on issue 13 by henri.tr...@gmail.com: Add Dalvik VM support
http://code.google.com/p/objenesis/issues/detail?id=13

Dalvik is now supported and a TCK was added. Many thanks to Ian Parkinson
for his help.

obje...@googlecode.com

unread,
Sep 4, 2013, 6:28:41 PM9/4/13
to objene...@googlegroups.com

Comment #8 on issue 13 by cherry...@gmail.com: Add Dalvik VM support
http://code.google.com/p/objenesis/issues/detail?id=13

This now fails again on Android 4.2! ObjectStreamClass.newInstance now
takes a long instead of an int as its second argument! Arg!

--
You received this message because this project is configured to send all
issue notifications to this address.
You may adjust your notification preferences at:
https://code.google.com/hosting/settings

obje...@googlecode.com

unread,
Sep 4, 2013, 7:10:38 PM9/4/13
to objene...@googlegroups.com

Comment #9 on issue 13 by cherry...@gmail.com: Add Dalvik VM support
http://code.google.com/p/objenesis/issues/detail?id=13

I've confirmed that making a new instantiator strategy identical to the
Android30Instantiator but using long as the 2nd argument to newInstance and
long as the return type from getConstructorId works. The VM version
requiring this can be identified as 1.6.0.

obje...@googlecode.com

unread,
Sep 20, 2013, 9:57:32 AM9/20/13
to objene...@googlegroups.com

Comment #10 on issue 13 by tverb...@intec.ugent.be: Add Dalvik VM support
http://code.google.com/p/objenesis/issues/detail?id=13

I can also confirm that adding an Android40Instantiator for version number
1.6.0 with long type instead of integer works on Android 4.3

Attachments:
Android40Instantiator.java 2.6 KB

obje...@googlecode.com

unread,
Sep 20, 2013, 10:18:57 AM9/20/13
to objene...@googlegroups.com

Comment #11 on issue 13 by henri.tr...@gmail.com: Add Dalvik VM support
http://code.google.com/p/objenesis/issues/detail?id=13

Hi, thank you very much for the feedback. I'm currently putting in place
automated testing to easily verify every platforms. Right after I will
deliver support for version 4.3.

Shouldn't be long.
Reply all
Reply to author
Forward
0 new messages