From 07c79a558d28cde4e469a8f34d3ffaad23cc7277 Mon Sep 17 00:00:00 2001 From: weiwensangsang Date: Sat, 2 Nov 2019 21:36:24 +0800 Subject: [PATCH] Update PoiWriteTest.java --- .../com/alibaba/easyexcel/test/temp/poi/PoiWriteTest.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/test/java/com/alibaba/easyexcel/test/temp/poi/PoiWriteTest.java b/src/test/java/com/alibaba/easyexcel/test/temp/poi/PoiWriteTest.java index 3a70d0d4..1586d1cc 100644 --- a/src/test/java/com/alibaba/easyexcel/test/temp/poi/PoiWriteTest.java +++ b/src/test/java/com/alibaba/easyexcel/test/temp/poi/PoiWriteTest.java @@ -7,6 +7,7 @@ import java.lang.reflect.ParameterizedType; import java.lang.reflect.Type; import java.util.regex.Pattern; +import com.alibaba.fastjson.util.ParameterizedTypeImpl; import org.apache.poi.ss.formula.functions.T; import org.apache.poi.xssf.streaming.SXSSFCell; import org.apache.poi.xssf.streaming.SXSSFRow; @@ -20,7 +21,6 @@ import org.slf4j.LoggerFactory; import com.alibaba.excel.metadata.CellData; import com.alibaba.fastjson.JSON; -import sun.reflect.generics.reflectiveObjects.ParameterizedTypeImpl; /** * 测试poi @@ -118,7 +118,7 @@ public class PoiWriteTest { Type[] tArgs = pType.getActualTypeArguments(); // 获得泛型类型的泛型参数(实际类型参数) ParameterizedTypeImpl c = (ParameterizedTypeImpl)pType.getActualTypeArguments()[0]; - Class ttt = c.getRawType(); + Class ttt = c.getClass(); System.out.println(ttt); } else { System.out.println("出错!!!"); @@ -145,7 +145,7 @@ public class PoiWriteTest { Type[] tArgs = pType.getActualTypeArguments(); // 获得泛型类型的泛型参数(实际类型参数) ParameterizedTypeImpl c = (ParameterizedTypeImpl)pType.getActualTypeArguments()[0]; - Class ttt = c.getRawType(); + Class ttt = c.getClass(); System.out.println(ttt); } else { System.out.println("出错!!!");