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

Cleanup unnecessary casts in Atomic/OrderAccess uses

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Fixed
    • Icon: P4 P4
    • 11
    • 11
    • hotspot
    • None
    • b03
    • generic
    • generic

      Many uses of Atomic and OrderAccess APIs include casts to account for the limited type support formerly provided by those APIs. With the reimplementation of those APIs using templates to generalize the supported types (see JDK-8188813, JDK-8186166, &etc), many of those casts are no longer needed. A cleanup pass to eliminate unnecessary casts would make the code easier to read and maintain.

      The egrep pattern

        "(Atomic|OrderAccess)::.*\(\s*[[:alnum:]_: ]+\s*\*\s*\)"

      finds a lot of relevant calls. It probably doesn't find all calls that could be cleaned up, and there are some false positives, but it's a good starting point.

            kbarrett Kim Barrett
            kbarrett Kim Barrett
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: