Uploaded image for project: 'Harmony'
  1. Harmony
  2. HARMONY-6116 [classlib] improve performance of java.io.File
  3. HARMONY-6125

[classlib][luni] - remove duplicated security check in File.list

    XMLWordPrintableJSON

Details

    • Sub-task
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 5.0M8
    • 5.0M10
    • Classlib
    • None

    Description

      in the list implementation:

      SecurityManager security = System.getSecurityManager();
      if (security != null)

      { security.checkRead(path); }

      if (!isDirectory() || !canRead())

      { return null; }

      isDirectory and canRead also check security by security.checkRead, it's unnecessary and time cost. I'll attach patch to fix this.

      Attachments

        1. File.list.refactor.diff
          3 kB
          Regis Xu

        Activity

          People

            Unassigned Unassigned
            regis_xu Regis Xu
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: