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

Incorrect double-checked locking in Types.arraySuperType()

    XMLWordPrintable

Details

    • b15

    Description

      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.

      Attachments

        Issue Links

          Activity

            People

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

              Dates

                Created:
                Updated:
                Resolved: