mirror of
https://github.com/LegacyModdingMC/UniMix.git
synced 2026-11-21 03:22:17 +00:00
Use java.lang.Object ctor on CallbackInfoReturnable for array, fixes #83
This commit is contained in:
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);
|
||||
}
|
||||
|
||||
|
||||
+2
-2
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user