From 0814909139735ea4c7648e755630fd49da7be059 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=B8=A9=E7=BB=8D=E9=94=A6?= Date: Wed, 20 Apr 2022 13:26:23 +0800 Subject: [PATCH] Revert "fix InaccessibleObjectException in jdk17. #4077" --- pom.xml | 14 ++++---------- .../java/com/alibaba/fastjson/util/TypeUtils.java | 3 ++- 2 files changed, 6 insertions(+), 11 deletions(-) diff --git a/pom.xml b/pom.xml index 617dab5430..2507e155ee 100644 --- a/pom.xml +++ b/pom.xml @@ -2,15 +2,9 @@ 4.0.0 - - org.sonatype.oss - oss-parent - 9 - - - com.taobao.arthas + com.alibaba fastjson - 1.2.80-fix + 1.2.80 jar fastjson @@ -21,8 +15,8 @@ 4.13.1 - false - false + true + true UTF-8 1.5 diff --git a/src/main/java/com/alibaba/fastjson/util/TypeUtils.java b/src/main/java/com/alibaba/fastjson/util/TypeUtils.java index 0fb8964193..cc1ea4ef09 100644 --- a/src/main/java/com/alibaba/fastjson/util/TypeUtils.java +++ b/src/main/java/com/alibaba/fastjson/util/TypeUtils.java @@ -38,6 +38,7 @@ import java.lang.reflect.*; import java.math.BigDecimal; import java.math.BigInteger; +import java.security.AccessControlException; import java.sql.Clob; import java.text.ParseException; import java.text.SimpleDateFormat; @@ -2552,7 +2553,7 @@ static void setAccessible(AccessibleObject obj) { } try { obj.setAccessible(true); - } catch (Throwable error) { + } catch (AccessControlException error) { setAccessibleEnable = false; } }