Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8271737

Only normalize the cached user.dir property once

    XMLWordPrintable

Details

    • Enhancement
    • Status: Resolved
    • P4
    • Resolution: Fixed
    • None
    • 18
    • core-libs
    • None
    • 11
    • b19

    Description

      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.

      Attachments

        Issue Links

          Activity

            People

              eastigeevich Evgeny Astigeevich
              simonis Volker Simonis
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: