diff --git a/src/main/java/com/robot/translator/core/Translator.java b/src/main/java/com/robot/translator/core/Translator.java index 4a379fd..4d090ec 100644 --- a/src/main/java/com/robot/translator/core/Translator.java +++ b/src/main/java/com/robot/translator/core/Translator.java @@ -69,7 +69,7 @@ public static List parse(List origins, Class... classes) { if (origins.size() == 0) { return origins; } - classes = (classes.length != 0) ? classes : new Class[]{origins.get(0).getClass()}; + classes = (classes.length != 0 && classes[0] != void.class) ? classes : new Class[]{origins.get(0).getClass()}; // 获取bo中需要翻译的属性 List translateFieldList = Arrays.stream(classes)