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

(fc) Data transfer from FileChannel to itself causes hang in case of overlap

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: P4
    • Resolution: Fixed
    • Affects Version/s: 8u60
    • Fix Version/s: 18
    • Component/s: core-libs
    • Labels:
    • Environment:

      OS X 10.10.5

    • Subcomponent:
    • Resolved In Build:
      b11
    • OS:
      os_x

      Description

      When using transferFrom() on a FileChannel to transfer data from one region of the file to another, the call hangs, if the two regions overlap.

      Test class is attached.

      This should either simply work correctly or lead to an exception.
      If an exception is thrown, the conditions under which it is thrown must be documented in the javadocs.

      I have tested this on OS X only.
      The problem may also occur on other platforms.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              bpb Brian Burkhalter
              Reporter:
              hschreiber Hendrik Schreiber
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: