Convert不再限制setter要求void返回类型
This commit is contained in:
@@ -149,9 +149,10 @@ public class ObjectDecoder<R extends Reader, T> implements Decodeable<R, T> {
|
||||
if (!method.getName().startsWith("set")) {
|
||||
continue;
|
||||
}
|
||||
if (method.getReturnType() != void.class && method.getReturnType() != clazz) {
|
||||
continue;
|
||||
}
|
||||
//setter不再限制要求void返回类型
|
||||
// if (method.getReturnType() != void.class && method.getReturnType() != clazz) {
|
||||
// continue;
|
||||
// }
|
||||
if (factory.isConvertDisabled(method)) {
|
||||
continue;
|
||||
}
|
||||
|
||||
@@ -11,7 +11,6 @@ import java.util.function.*;
|
||||
import static org.redkale.asm.ClassWriter.COMPUTE_FRAMES;
|
||||
import static org.redkale.asm.Opcodes.*;
|
||||
import org.redkale.asm.*;
|
||||
import static org.redkale.asm.Opcodes.*;
|
||||
import org.redkale.util.Attribute;
|
||||
|
||||
/**
|
||||
@@ -430,9 +429,9 @@ public interface Attribute<T, F> {
|
||||
if (!setter.getName().startsWith("set")) {
|
||||
continue;
|
||||
}
|
||||
if (setter.getReturnType() != void.class) {
|
||||
continue;
|
||||
}
|
||||
// if (setter.getReturnType() != void.class) {
|
||||
// continue;
|
||||
// }
|
||||
if (setter.getParameterCount() != 1) {
|
||||
continue;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user