InvocationHandlerAdapter says the ios implementation is based on https://github.com/crittercism/dexmaker
Comparing these two:
It looks like dexmaker creates a parallel set of methods and routes calls through 'ProxyBuilder.callSuper'. The j2objc version seems to simply call the method provided, which seems to result in the recursion.
I'm still pretty light on objc proxied classes, so if spy should work and this is just a bug, I'll file something with a simple example.
Figured I'd ask before I get any deeper into the rabbit hole.
public class CheckMockTest
{
@Test public void mockingTypes() {
CheckMock mockMock = mock(CheckMock.class);
mockMock.writeThings();
CheckMock spyMock = spy(new CheckMock());
spyMock.writeThings();
}
public static class CheckMock
{
public void writeThings()
{
System.out.println("Hello");
}
}
}