Use java.lang.Object ctor on CallbackInfoReturnable for array, fixes #83

This commit is contained in:
Mumfrey committed 2015-12-19 00:05:02 +00:00
1 parent b134940a19
commit 769aac51e8
2 files changed
+3 -3

No files matched your search

@@ -118,7 +118,7 @@ public class CallbackInfo implements Cancellable {
return CallbackInfo.getConstructorDescriptor();
}
if (returnType.getSort() == Type.OBJECT) {
if (returnType.getSort() == Type.OBJECT || returnType.getSort() == Type.ARRAY) {
return String.format("(%sZ%s)V", CallbackInfo.STRING, CallbackInfo.OBJECT);
}
@@ -124,7 +124,7 @@ public class CallbackInfoReturnable<R> extends CallbackInfo {
// CHECKSTYLE:ON
static String getReturnAccessor(Type returnType) {
if (returnType.getSort() == Type.OBJECT) {
if (returnType.getSort() == Type.OBJECT || returnType.getSort() == Type.ARRAY) {
return "getReturnValue";
}
@@ -132,7 +132,7 @@ public class CallbackInfoReturnable<R> extends CallbackInfo {
}
static String getReturnDescriptor(Type returnType) {
if (returnType.getSort() == Type.OBJECT) {
if (returnType.getSort() == Type.OBJECT || returnType.getSort() == Type.ARRAY) {
return String.format("()%s", CallbackInfo.OBJECT);
}