From f91fb834be9899cb62a0ac709582a222bf3c2470 Mon Sep 17 00:00:00 2001 From: Vladimir Lagunov Date: Wed, 8 Jan 2025 14:00:14 +0100 Subject: [PATCH] wip --- src/java.base/share/classes/java/io/File.java | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/java.base/share/classes/java/io/File.java b/src/java.base/share/classes/java/io/File.java index 8ea328c9bf33..8116ce2ad7ab 100644 --- a/src/java.base/share/classes/java/io/File.java +++ b/src/java.base/share/classes/java/io/File.java @@ -31,11 +31,15 @@ import java.net.URISyntaxException; import java.nio.file.FileStore; import java.nio.file.FileSystems; +import java.nio.file.Files; import java.nio.file.Path; import java.security.SecureRandom; import java.util.ArrayList; import java.util.List; + +import jdk.internal.misc.VM; import jdk.internal.util.StaticProperty; +import sun.security.action.GetPropertyAction; /** * An abstract representation of file and directory pathnames. @@ -168,6 +172,8 @@ public class File */ private static enum PathStatus { INVALID, CHECKED }; + private static final boolean useNIO = GetPropertyAction.privilegedGetBooleanProp("jbr.java.io.use.nio", true, null); + /** * The flag indicating whether the file path is invalid. */