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

Make Sensor deeply immutably thread safe

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: P3
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 11
    • Component/s: core-svc
    • Labels:
      None

      Description

      Google's experimental java race detector doesn't like the Sensor class, despite the use of synchronization. It appears that Sensor instances are published without synchronization. We can fix this by making all Sensor fields final or default-initialized (saving a few bytes of bytecode). Fixes a theoretical race unlikely to cause a problem in practice.

        Attachments

          Activity

            People

            • Assignee:
              martin Martin Buchholz
              Reporter:
              martin Martin Buchholz
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: