Only normalize the cached user.dir property once

XMLWordPrintable

    • Type: Enhancement
    • Resolution: Fixed
    • Priority: P4
    • 18
    • Affects Version/s: None
    • Component/s: core-libs
    • None
    • 11
    • b19

      JDK-8198997 introduced normalization for the cached "user.dir" property in order to avoid "inefficient, repeated normalization".

      However WinNTFileSystem.getUserPath(), the only
      place where the cached and normalized "userDir" value is used, still calls normalize() on each invocation:

      class WinNTFileSystem extends FileSystem {
      ...
          private final String userDir;
      ...
          public WinNTFileSystem() {
      ...
              userDir = normalize(props.getProperty("user.dir"));
        }
      ...
          private String getUserPath() {
      ...
              return normalize(userDir);
          }

      This is not necessary and can be improved.

            Assignee:
            Evgeny Astigeevich
            Reporter:
            Volker Simonis
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: