8307944: ClassFileDumper should only load java.nio.file.Path if enabled

Reviewed-by: rriggs
This commit is contained in:
Mandy Chung 2023-05-30 21:01:12 +00:00
parent 7891de331a
commit de7fd1c306
6 changed files with 109 additions and 92 deletions

View file

@ -31,7 +31,6 @@ import jdk.internal.util.ClassFileDumper;
import sun.security.action.GetPropertyAction;
import java.lang.reflect.ClassFileFormatVersion;
import java.nio.file.Path;
import java.util.Properties;
import static java.lang.invoke.LambdaForm.basicTypeSignature;
@ -98,7 +97,7 @@ class MethodHandleStatics {
props.getProperty("java.lang.invoke.MethodHandleImpl.MAX_ARITY", "255"));
DUMP_CLASS_FILES = ClassFileDumper.getInstance("jdk.invoke.MethodHandle.dumpMethodHandleInternals",
Path.of("DUMP_METHOD_HANDLE_INTERNALS"));
"DUMP_METHOD_HANDLE_INTERNALS");
if (CUSTOMIZE_THRESHOLD < -1 || CUSTOMIZE_THRESHOLD > 127) {
throw newInternalError("CUSTOMIZE_THRESHOLD should be in [-1...127] range");