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

Make Sensor deeply immutably thread safe

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P3 P3
    • 11
    • None
    • core-svc
    • None

      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.

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

              Created:
              Updated:
              Resolved: