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

Simplify checking of boolean file attributes

    XMLWordPrintable

Details

    • b27

    Description

      We currently get boolean attributes in bulk and call something like this to get to a particular attribute:

      (fs.getBooleanAttributes(f) & FileSystem.BA_EXISTS) != 0

      By instead providing a utility that takes the attribute value, we can simplify the logic at call-sites a bit:

      fs.getBooleanAttribute(f, FileSystem.BA_EXISTS)

      This also allows for an optimization since UnixFileSystem.getBooleanAttributes slices out and read the BA_HIDDEN bit from the name.

      Attachments

        Activity

          People

            redestad Claes Redestad
            redestad Claes Redestad
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: