diff --git a/build.gradle b/build.gradle index 8234cf0..9678c45 100644 --- a/build.gradle +++ b/build.gradle @@ -5,7 +5,7 @@ plugins { } group 'zone.rong' -version '2.0' +version '2.1' java { withSourcesJar() diff --git a/src/main/java/zone/rong/imaginebreaker/ImagineBreaker.java b/src/main/java/zone/rong/imaginebreaker/ImagineBreaker.java index a5441f0..bd388c8 100644 --- a/src/main/java/zone/rong/imaginebreaker/ImagineBreaker.java +++ b/src/main/java/zone/rong/imaginebreaker/ImagineBreaker.java @@ -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; @@ -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<>()); } /** @@ -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() {