mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-27 06:45:07 +02:00
8209837: Avoid initializing ExpiringCache during bootstrap
Reviewed-by: sundar, forax
This commit is contained in:
parent
9ec15cedd0
commit
5ddac96c10
3 changed files with 39 additions and 21 deletions
|
@ -231,18 +231,16 @@ abstract class FileSystem {
|
|||
|
||||
// Flags for enabling/disabling performance optimizations for file
|
||||
// name canonicalization
|
||||
static boolean useCanonCaches;
|
||||
static boolean useCanonPrefixCache;
|
||||
static final boolean useCanonCaches;
|
||||
static final boolean useCanonPrefixCache;
|
||||
|
||||
private static boolean getBooleanProperty(String prop, boolean defaultVal) {
|
||||
return Boolean.parseBoolean(System.getProperty(prop,
|
||||
String.valueOf(defaultVal)));
|
||||
String value = System.getProperty(prop);
|
||||
return (value != null) ? Boolean.parseBoolean(value) : defaultVal;
|
||||
}
|
||||
|
||||
static {
|
||||
useCanonCaches = getBooleanProperty("sun.io.useCanonCaches",
|
||||
useCanonCaches);
|
||||
useCanonPrefixCache = getBooleanProperty("sun.io.useCanonPrefixCache",
|
||||
useCanonPrefixCache);
|
||||
useCanonCaches = getBooleanProperty("sun.io.useCanonCaches", false);
|
||||
useCanonPrefixCache = useCanonCaches && getBooleanProperty("sun.io.useCanonPrefixCache", false);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue