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

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

XMLWordPrintable

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

        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.

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

                Created:
                Updated:
                Resolved: