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

(spec) File.setReadOnly() may not affect the ability to write to the file

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: P4 P4
    • None
    • 5.0
    • core-libs
    • sparc
    • solaris_9

      The spec of File.setReadOnly() reads:

      After invoking this method the file or directory is guaranteed not to change until it is either deleted or marked to allow write access.

      However, it is discovered that when executing as root in Linux, File.setReadOnly() does not affect the ability to write the file later on even if setReadOnly() returns true. File.canWriter() still returns true on the same file and writing to the file does not throw any exception.

            Unassigned Unassigned
            xwangsunw Xiaozhong Wang (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: