RFR 8198997: Cache normalized/resolved user.dir property

Alan Bateman Alan.Bateman at oracle.com
Wed Mar 21 18:36:26 UTC 2018


On 21/03/2018 18:12, Brian Burkhalter wrote:
>
> 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"));
>   }
>
That looks right.  I assume there's no test for this as it's never been 
supported to change user.dir on the command line.

-Alan


More information about the core-libs-dev mailing list