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

Incorrect double-checked locking in Types.arraySuperType()

XMLWordPrintable

    • b15

      In Types.arraySuperType(), SonarCloud reports:
       Remove this dangerous instance of double-checked locking.

      Indeed, the `arraySuperType` is not `volatile`, while `IntersectionClassType` has non-`final` fields (both in itself and in superclasses). This is an incorrect DCL.

            shade Aleksey Shipilev
            shade Aleksey Shipilev
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: