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

Commit

Permalink
Merge pull request #4085 from hengyunabc/fix_setAccessible
Browse files Browse the repository at this point in the history
fix InaccessibleObjectException in jdk17. #4077
  • Loading branch information
wenshao authored Apr 20, 2022
2 parents a234f9a + dd3de5f commit 3f009e1
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/main/java/com/alibaba/fastjson/util/TypeUtils.java
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@
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;
Expand Down Expand Up @@ -2553,7 +2552,7 @@ static void setAccessible(AccessibleObject obj) {
}
try {
obj.setAccessible(true);
} catch (AccessControlException error) {
} catch (Throwable error) {
setAccessibleEnable = false;
}
}
Expand Down

0 comments on commit 3f009e1

Please sign in to comment.