Skip to content

Commit

Permalink
2.1 - fixes issue due to Reflection#registerFilter not null-checking
Browse files Browse the repository at this point in the history
  • Loading branch information
Rongmario committed Feb 17, 2024
1 parent b198048 commit e18ab1c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ plugins {
}

group 'zone.rong'
version '2.0'
version '2.1'

java {
withSourcesJar()
Expand Down
5 changes: 3 additions & 2 deletions src/main/java/zone/rong/imaginebreaker/ImagineBreaker.java
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
import java.lang.reflect.Field;
import java.util.AbstractMap;
import java.util.Collections;
import java.util.HashMap;
import java.util.Map;
import java.util.Set;

Expand Down Expand Up @@ -165,7 +166,7 @@ public static void wipeFieldFilters() {
CLASS$REFLECTION_DATA.setVolatile(clazz, null);
}
}
REFLECTION$FIELD_FILTER_MAP.setVolatile((Object) null);
REFLECTION$FIELD_FILTER_MAP.setVolatile(new HashMap<>());
}

/**
Expand All @@ -181,7 +182,7 @@ public static void wipeMethodFilters() {
CLASS$REFLECTION_DATA.setVolatile(clazz, null);
}
}
REFLECTION$METHOD_FILTER_MAP.setVolatile((Object) null);
REFLECTION$METHOD_FILTER_MAP.setVolatile(new HashMap<>());
}

private static boolean isOpenJ9() {
Expand Down

0 comments on commit e18ab1c

Please sign in to comment.