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

(fc) FileChannel.lock creates a FileKey containing two long index values, they could be stored as int values

XMLWordPrintable

    • b02
    • generic
    • windows

      A DESCRIPTION OF THE PROBLEM :
      https://github.com/openjdk/jdk/blob/9e570105c30a6e462d08931e2010cef9cd5a6031/src/java.base/windows/classes/sun/nio/ch/FileKey.java stores nFileIndexHigh and nFileIndexLow as longs. However, the Windows API declares these fields as 32-bit DWORDs. Therefore, this class is wasting half the storage for those fields, and should store them as int.


            bpb Brian Burkhalter
            webbuggrp Webbug Group
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved: