Incorrectly implemented (and unnecessary) double-checked locking in com.sun.tools.javac.code.Types.arraySuperType()

XMLWordPrintable

    • Type: Bug
    • Resolution: Duplicate
    • Priority: P4
    • None
    • Affects Version/s: 7, 8
    • Component/s: tools

      The double-checked locking implemented in com.sun.tools.javac.code.Types.arraySuperType is broken.

      Although it could be fixed (by for instance making arraySuperType volatile) the question is if the synchronization is necessary to begin with:

          A) Other parts of javac isn't thread-safe
          B) Instances of Type shouldn't be compared referentially, so returning different objects for different invocations shouldn't be a problem to begin with.

            Assignee:
            Unassigned
            Reporter:
            Andreas Lundblad (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: