Closed GoogleCodeExporter closed 9 years ago
Hi, mmmh so Objenesis doesn't always work on Dalvik, that should have been
expected.
I think a workaround would be to pass an exception instance or to use an answer
that creates an exception.
Original comment by brice.du...@gmail.com
on 23 Oct 2012 at 8:20
The workaround suits me perfectly.
As it comes to what I experienced, it appears that ReflectionFactory is not
available on Dalvik. Perhaps some more explanatory information should be passed
in here.
Nevertheless, this submission should help if anyone comes across same issue.
Original comment by tomasz.p...@gmail.com
on 23 Oct 2012 at 9:18
This is expected from sun.* packages. Objenesis is using JVM specific/internal
implementation.
You should also report an issue on the dexmaker project.
Original comment by brice.du...@gmail.com
on 23 Oct 2012 at 9:40
There it is:
http://code.google.com/p/dexmaker/issues/detail?id=17
Original comment by tomasz.p...@gmail.com
on 23 Oct 2012 at 10:47
Cool, thanks for reporting :)
Original comment by brice.du...@gmail.com
on 23 Oct 2012 at 11:16
Original comment by brice.du...@gmail.com
on 19 Dec 2012 at 10:59
Original comment by brice.du...@gmail.com
on 8 Jan 2013 at 4:50
Objenesis 1.3 will probably have some code that will work on Dalvik. Progress
is ongoing, thanks to Henri Tremblay and Ian Parkinson, maybe others as well :
https://groups.google.com/forum/?fromgroups=#!topic/objenesis-dev/I8J3fGGZvUQ
Original comment by brice.du...@gmail.com
on 8 Jan 2013 at 4:55
@tomasz Objenesis 1.3 is out could you check if that's working ?
Original comment by brice.du...@gmail.com
on 28 Jan 2013 at 11:40
Well, I've just had a chance to try, but this stopped me (see the attached
file). Scary, isn't it? It's the first time I'm seeing anything like this.
Original comment by tomasz.p...@gmail.com
on 15 Feb 2013 at 10:51
Attachments:
I'm not an Android dev, but dalvik is complaining it doesn't find the Mockito
classes in the APK, maybe there's something wrong there to look at first. If
this is not the problem then ... more time will be needed to see what's going
on.
Original comment by brice.du...@gmail.com
on 15 Feb 2013 at 1:06
It appears that my whole dev environment suddenly became pretty much unstable.
If I get it to work soon, I'll check the latest Objenesis.
Original comment by tomasz.p...@gmail.com
on 15 Feb 2013 at 1:22
In my case issue occurs only if I use exception class as parameter for
doThrow():
doThrow(MyException.class).when(myMock).myMethod() --- error
When I replace exception class to direct exception instance error disappear:
doThrow(new MyException()).when(myMock).myMethod() --- pass
Original comment by roman.gr...@gmail.com
on 24 Sep 2013 at 3:00
I'm merging this issue in 414 because this is due to the old objenesis lib, now
that Objenesis has shown code working on dalvik, i think it's time to upgrade
Original comment by brice.du...@gmail.com
on 4 Dec 2013 at 3:51
Original issue reported on code.google.com by
tomasz.p...@gmail.com
on 23 Oct 2012 at 7:03