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

Make field in RandomAccessFile final

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Fixed
    • Icon: P5 P5
    • 21
    • None
    • core-libs
    • None
    • b02

      The reference field `fd` is never updated even though the fields of the `FieldDescriptor` actually referenced is updated by native code (e.g. `open0()`). This allows the `fd` field to be declared `final` which might unlock some performance capabilities. Also, it makes the intent more clear and improves visibility across threads (such as GC threads).

      There is also a switch that could be modernised.

            pminborg Per-Ake Minborg
            pminborg Per-Ake Minborg
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: