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

(fc) transferFrom does not throw NonReadableChannelException when target is size 0 and non-readable

    XMLWordPrintable

Details

    • b112
    • generic
    • generic
    • Verified

    Description

      transferFrom(ReadableByteChannel,long,long) does not throw NonReadableChannelException if the target is a FileChannel that is not readable and the file size is 0. If the file size is > 0 then NonReadableChannelException is thrown as expected.

      This is a regression in jdk7-b109 and arises because the updated implementation does not attempt to mmap the target file when it is 0 bytes. It causes the following JCK test to fail:

      api/java_nio/channels/FileChannel/index.html#Methods[FileChannel0024]

      This bug was originally reported via 6984182 along with other failures but these other failures do not appear to be JDK issues.

      Attachments

        Issue Links

          Activity

            People

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

              Dates

                Created:
                Updated:
                Resolved:
                Imported:
                Indexed: