Skip to content

Commit 3b17f01

Browse files
wetool19wenshao
authored andcommitted
修复 #1613 问题,当方法名为get开头,返回值为void类型时报ArrayIndexOutOfBoundsException 的问题
1 parent 0dd214c commit 3b17f01

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

core/src/main/java/com/alibaba/fastjson2/writer/ObjectWriterCreatorASM.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -283,7 +283,7 @@ boolean record = BeanUtils.isRecord(objectClass);
283283

284284
Class<?> returnType = method.getReturnType();
285285
// skip function
286-
if (isFunction(returnType)) {
286+
if (isFunction(returnType) || returnType == Void.TYPE) {
287287
return;
288288
}
289289

0 commit comments

Comments
 (0)