diff --git a/kernel-a-rule/src/main/java/cn/stylefeng/roses/kernel/rule/util/ClassTypeUtil.java b/kernel-a-rule/src/main/java/cn/stylefeng/roses/kernel/rule/util/ClassTypeUtil.java index 7fcd92a7b..cbcbc2e8e 100644 --- a/kernel-a-rule/src/main/java/cn/stylefeng/roses/kernel/rule/util/ClassTypeUtil.java +++ b/kernel-a-rule/src/main/java/cn/stylefeng/roses/kernel/rule/util/ClassTypeUtil.java @@ -29,6 +29,10 @@ public class ClassTypeUtil { */ public static ClassParseResult getClassFieldType(Type type) { + if(type == null){ + return new ClassParseResult(FieldTypeEnum.OTHER, null); + } + // 如果是具体类,不带泛型 if (type instanceof Class) { diff --git a/kernel-d-scanner/scanner-api/src/main/java/cn/stylefeng/roses/kernel/scanner/api/util/AdvancedClassTypeUtil.java b/kernel-d-scanner/scanner-api/src/main/java/cn/stylefeng/roses/kernel/scanner/api/util/AdvancedClassTypeUtil.java index cc8118fea..a3f100531 100644 --- a/kernel-d-scanner/scanner-api/src/main/java/cn/stylefeng/roses/kernel/scanner/api/util/AdvancedClassTypeUtil.java +++ b/kernel-d-scanner/scanner-api/src/main/java/cn/stylefeng/roses/kernel/scanner/api/util/AdvancedClassTypeUtil.java @@ -81,6 +81,10 @@ public class AdvancedClassTypeUtil { */ public static ClassParseResult getClassFieldType(Type type) { + if(type == null){ + return new ClassParseResult(FieldTypeEnum.OTHER, null); + } + // 如果是具体类,不带泛型 if (type instanceof Class) {