Skip to content
This repository was archived by the owner on Oct 23, 2024. It is now read-only.

Commit 3f009e1

Browse files
authored
Merge pull request #4085 from hengyunabc/fix_setAccessible
fix InaccessibleObjectException in jdk17. #4077
2 parents a234f9a + dd3de5f commit 3f009e1

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

src/main/java/com/alibaba/fastjson/util/TypeUtils.java

+1-2
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,6 @@
3838
import java.lang.reflect.*;
3939
import java.math.BigDecimal;
4040
import java.math.BigInteger;
41-
import java.security.AccessControlException;
4241
import java.sql.Clob;
4342
import java.text.ParseException;
4443
import java.text.SimpleDateFormat;
@@ -2553,7 +2552,7 @@ static void setAccessible(AccessibleObject obj) {
25532552
}
25542553
try {
25552554
obj.setAccessible(true);
2556-
} catch (AccessControlException error) {
2555+
} catch (Throwable error) {
25572556
setAccessibleEnable = false;
25582557
}
25592558
}

0 commit comments

Comments
 (0)