From 1522300ff6a08ccde7a9e4ca36c515032fa296d9 Mon Sep 17 00:00:00 2001 From: Michael Yang Date: Sun, 11 Aug 2024 16:46:41 +0800 Subject: [PATCH] fix: NPE in TableInfoFactory.java --- .../java/com/mybatisflex/core/table/TableInfoFactory.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/mybatis-flex-core/src/main/java/com/mybatisflex/core/table/TableInfoFactory.java b/mybatis-flex-core/src/main/java/com/mybatisflex/core/table/TableInfoFactory.java index b5fcc532..c0f5c32a 100644 --- a/mybatis-flex-core/src/main/java/com/mybatisflex/core/table/TableInfoFactory.java +++ b/mybatis-flex-core/src/main/java/com/mybatisflex/core/table/TableInfoFactory.java @@ -173,7 +173,9 @@ public class TableInfoFactory { ParameterizedType parameterizedType = (ParameterizedType) type; Type rawType = parameterizedType.getRawType(); Type[] typeArguments = parameterizedType.getActualTypeArguments(); - adjustTypeArguments(mapperClass, actualTypeArguments, typeArguments); + if (actualTypeArguments != null && actualTypeArguments.length > 0) { + adjustTypeArguments(mapperClass, actualTypeArguments, typeArguments); + } if (rawType == BaseMapper.class) { // 找到了 if (typeArguments[0] instanceof Class) {