From 909a44605ce8a0c1b619ab998cf6d0178aad7151 Mon Sep 17 00:00:00 2001 From: weiwensangsang Date: Tue, 5 Nov 2019 17:51:32 +0800 Subject: [PATCH] Revert "Update PoiWriteTest.java" This reverts commit 07c79a558d28cde4e469a8f34d3ffaad23cc7277. --- .../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 1586d1c..3a70d0d 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,7 +7,6 @@ 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; @@ -21,6 +20,7 @@ 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.getClass(); + Class ttt = c.getRawType(); 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.getClass(); + Class ttt = c.getRawType(); System.out.println(ttt); } else { System.out.println("出错!!!");