RFR 8198997: Cache normalized/resolved user.dir property

Brian Burkhalter brian.burkhalter at oracle.com
Wed Mar 21 18:12:17 UTC 2018


On Mar 21, 2018, at 11:08 AM, Alan Bateman <Alan.Bateman at oracle.com> wrote:

> On 21/03/2018 18:02, Brian Burkhalter wrote:
>> Ping …
> I think we're waiting for a new version that will normalize the value of user.dir in the WinNTFileSystem constructor.

That was unclear, at least to me:

--- a/src/java.base/windows/classes/java/io/WinNTFileSystem.java
+++ b/src/java.base/windows/classes/java/io/WinNTFileSystem.java
@@ -48,11 +48,11 @@
     public WinNTFileSystem() {
         Properties props = GetPropertyAction.privilegedGetProperties();
         slash = props.getProperty("file.separator").charAt(0);
         semicolon = props.getProperty("path.separator").charAt(0);
         altSlash = (this.slash == '\\') ? '/' : '\\';
-        userDir = props.getProperty("user.dir");
+        userDir = normalize(props.getProperty("user.dir"));
     }

Thanks,

Brian


More information about the core-libs-dev mailing list