Skip to content

Commit

Permalink
Add missing Class.forName static rewrite
Browse files Browse the repository at this point in the history
  • Loading branch information
kennytv committed Mar 21, 2024
1 parent 76bdee4 commit fca2c95
Showing 1 changed file with 1 addition and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ public List<RewriteRule> rules() {
private RewriteRule createClassRule() {
return RewriteRule.forOwner(Class.class, rf -> {
rf.plainStaticRewrite(this.proxy, b -> b
.match("forName").desc("(Ljava/lang/String;)Ljava/lang/Class;")
.match("getField", "getDeclaredField").desc("(Ljava/lang/String;)Ljava/lang/reflect/Field;")
.match("getMethod", "getDeclaredMethod").desc("(Ljava/lang/String;[Ljava/lang/Class;)Ljava/lang/reflect/Method;")
);
Expand Down

0 comments on commit fca2c95

Please sign in to comment.