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

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

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P4 P4
    • 8
    • None
    • 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.

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

              Created:
              Updated:
              Resolved: