【8.3.0】【scanner】判断数字类型,排除掉Long

master
stylefeng 2024-08-25 23:37:14 +08:00
parent 3968027576
commit 8beffddd40
1 changed files with 7 additions and 2 deletions

View File

@ -124,9 +124,14 @@ public class ClassTypeUtil {
*/
public static boolean validateNumericTypeFlag(Class<?> clazz) {
// 排除掉Long类型前端不识别Long类型
if (clazz == Long.class || clazz == long.class) {
return false;
}
// 如果是原始类型
if (clazz.isPrimitive()) {
return clazz == byte.class || clazz == short.class || clazz == int.class || clazz == long.class || clazz == float.class || clazz == double.class;
else if (clazz.isPrimitive()) {
return clazz == byte.class || clazz == short.class || clazz == int.class || clazz == float.class || clazz == double.class;
}
// 如果是包装类型