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.
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.
- relates to
-
JDK-8186166 Generalize Atomic::cmpxchg with templates
-
- Resolved
-
-
JDK-8188813 Generalize OrderAccess to use templates
-
- Resolved
-