Skip to content

Commit

Permalink
Don’t set invocation return value for void proxy methods.
Browse files Browse the repository at this point in the history
	Change on 2013/11/13 by tball <tball@google.com>
-------------
Created by MOE: http://code.google.com/p/moe-java
MOE_MIGRATED_REVID=56622356
  • Loading branch information
tomball committed Nov 21, 2013
1 parent 1be9420 commit b4e9d40
Showing 1 changed file with 6 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -346,9 +346,12 @@ private static native Class generateProxy(String name, Class[] interfaces,
id javaResult = [handler_ invokeWithId:self
withJavaLangReflectMethod:method
withNSObjectArray:args];
J2ObjcRawValue result;
[[method getReturnType] unboxValue:javaResult toRawValue:&result];
[anInvocation setReturnValue:&result];
IOSClass *returnType = [method getReturnType];
if (returnType != [IOSClass voidClass]) {
J2ObjcRawValue result;
[[method getReturnType] unboxValue:javaResult toRawValue:&result];
[anInvocation setReturnValue:&result];
}
return; // success!
}
}
Expand Down

0 comments on commit b4e9d40

Please sign in to comment.