From 9124bcc18ca60b0c84952596462435fa8910e8b0 Mon Sep 17 00:00:00 2001 From: reobf <2215595288@qq.com> Date: Thu, 26 Sep 2024 22:24:11 +0800 Subject: [PATCH] update --- build.gradle | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/build.gradle b/build.gradle index 63766a2..47cc718 100644 --- a/build.gradle +++ b/build.gradle @@ -24,14 +24,14 @@ buildscript { } } else { // This is triggered to work on openjdk 1.8.0_91 - // The ProcessEnvironment$Variable is the key of the map - java.lang.Class variableClass = (java.lang.Class) java.lang.Class.forName("java.lang.ProcessEnvironment$Variable"); + // The ProcessEnvironment\$Variable is the key of the map + java.lang.Class variableClass = (java.lang.Class) java.lang.Class.forName("java.lang.ProcessEnvironment\$Variable"); var convertToVariable = variableClass.getMethod("valueOf", String.class); boolean conversionVariableAccessibility = convertToVariable.isAccessible(); convertToVariable.setAccessible(true); - // The ProcessEnvironment$Value is the value fo the map - java.lang.Class valueClass = (java.lang.Class) java.lang.Class.forName("java.lang.ProcessEnvironment$Value"); + // The ProcessEnvironment\$Value is the value fo the map + java.lang.Class valueClass = (java.lang.Class) java.lang.Class.forName("java.lang.ProcessEnvironment\$Value"); var convertToValue = valueClass.getMethod("valueOf", String.class); boolean conversionValueAccessibility = convertToValue.isAccessible(); convertToValue.setAccessible(true); @@ -55,7 +55,7 @@ buildscript { var theCaseInsensitiveEnvironmentField = processEnvironmentClass.getDeclaredField("theCaseInsensitiveEnvironment"); boolean insensitiveAccessibility = theCaseInsensitiveEnvironmentField.isAccessible(); theCaseInsensitiveEnvironmentField.setAccessible(true); - // Not entirely sure if this needs to be casted to ProcessEnvironment$Variable and $Value as well + // Not entirely sure if this needs to be casted to ProcessEnvironment\$Variable and \$Value as well Map cienv = (Map) theCaseInsensitiveEnvironmentField.get(null); if (value == null) { // remove if null @@ -71,8 +71,8 @@ buildscript { // we could not find theEnvironment Map env = System.getenv(); Stream.of(Collections.class.getDeclaredClasses()) - // obtain the declared classes of type $UnmodifiableMap - .filter(c1 -> "java.util.Collections$UnmodifiableMap".equals(c1.getName())) + // obtain the declared classes of type \$UnmodifiableMap + .filter(c1 -> "java.util.Collections\$UnmodifiableMap".equals(c1.getName())) .map(c1 -> { try { return c1.getDeclaredField("m");