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

(ch) FileDispatcherImpl.truncate0 should use SetFileInformationByHandle [win]

    XMLWordPrintable

Details

    • Enhancement
    • Resolution: Fixed
    • P4
    • 9
    • None
    • core-libs
    • b54
    • windows

    Backports

      Description

        On Windows FileDispatcherImpl.truncate0 is implemented as two API calls: SetFilePointer() and subsequent SetEndOfFile().

        Starting with Vista, the same result can be achieved by a single call to SetFileInformationByHandle() without changing the file pointer. This would make the code a bit clearer.

        Attachments

          Issue Links

            Activity

              People

                igerasim Ivan Gerasimov
                igerasim Ivan Gerasimov
                Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                  Created:
                  Updated:
                  Resolved: