(fc) FileChannel.truncate issues when given size > file size

XMLWordPrintable

    • Type: Bug
    • Resolution: Fixed
    • Priority: P4
    • 8
    • Affects Version/s: None
    • Component/s: core-libs
    • None
    • b65
    • Verified

      As pointed out on the nio-dev list:

      http://mail.openjdk.java.net/pipermail/nio-dev/2012-October/001936.html

      the FileChannel.truncate method doesn't throw any exception when invoked on a file opened for read only and size > size().

      In addition the position isn't changed when truncate is invoked for a size larger than the current size.

            Assignee:
            Alan Bateman
            Reporter:
            Alan Bateman
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: