This commit is contained in:
Redkale
2018-06-20 15:48:08 +08:00
parent 0cf64121ae
commit 4cb51ecbe6

View File

@@ -496,8 +496,7 @@ public abstract class ConvertFactory<R extends Reader, W extends Writer> {
} else { } else {
throw new ConvertException("not support the type (" + type + ")"); throw new ConvertException("not support the type (" + type + ")");
} }
decoder = findDecoder(clazz); //此处不能再findDecoder否则type与class不一致, 如: RetResult 和 RetResult<Integer>
if (decoder != null) return decoder;
return createDecoder(type, clazz); return createDecoder(type, clazz);
} }
@@ -583,8 +582,7 @@ public abstract class ConvertFactory<R extends Reader, W extends Writer> {
} else { } else {
throw new ConvertException("not support the type (" + type + ")"); throw new ConvertException("not support the type (" + type + ")");
} }
encoder = findEncoder(clazz); //此处不能再findEncoder否则type与class不一致, 如: RetResult 和 RetResult<Integer>
if (encoder != null) return encoder;
return createEncoder(type, clazz); return createEncoder(type, clazz);
} }