8344419: Use StaticProperty in some JDK classes
Reviewed-by: alanb, rriggs
This commit is contained in:
parent
3e509c8bd1
commit
fc2da15bce
@ -39,6 +39,7 @@ import java.util.Objects;
|
||||
import java.util.stream.Stream;
|
||||
|
||||
import jdk.internal.access.SharedSecrets;
|
||||
import jdk.internal.util.StaticProperty;
|
||||
|
||||
public class CDS {
|
||||
// Must be in sync with cdsConfig.hpp
|
||||
@ -275,7 +276,7 @@ public class CDS {
|
||||
listFile.delete();
|
||||
}
|
||||
dumpClassList(listFileName);
|
||||
String jdkHome = System.getProperty("java.home");
|
||||
String jdkHome = StaticProperty.javaHome();
|
||||
String classPath = System.getProperty("java.class.path");
|
||||
List<String> cmds = new ArrayList<String>();
|
||||
cmds.add(jdkHome + File.separator + "bin" + File.separator + "java"); // java
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2017, 2022, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2017, 2024, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -47,6 +47,7 @@ import java.util.zip.ZipInputStream;
|
||||
|
||||
import static java.nio.charset.StandardCharsets.UTF_8;
|
||||
|
||||
import jdk.internal.util.StaticProperty;
|
||||
import sun.security.ssl.SSLLogger;
|
||||
|
||||
/**
|
||||
@ -209,7 +210,7 @@ class DomainName {
|
||||
new PrivilegedAction<>() {
|
||||
@Override
|
||||
public InputStream run() {
|
||||
File f = new File(System.getProperty("java.home"),
|
||||
File f = new File(StaticProperty.javaHome(),
|
||||
"lib/security/public_suffix_list.dat");
|
||||
try {
|
||||
return new FileInputStream(f);
|
||||
|
Loading…
Reference in New Issue
Block a user