ForkJoinPool.getAndAddPoolIds should use Unsafe.staticFieldBase

XMLWordPrintable

    • Type: Bug
    • Resolution: Fixed
    • Priority: P4
    • 20
    • Affects Version/s: None
    • Component/s: core-libs

      ForkJoinPool.getAndAddPoolIds passes ForkJoinPool.class to Unsafe.getAndAddInt to write a static field of ForkJoinPool. This assumes that static fields are stored in Class objects, which is the case on HotSpot, but according to the documentation on Unsafe.getAndAddInt, the object returned by Unsafe.staticFieldBase should be called.

            Assignee:
            Alan Bateman
            Reporter:
            Peter Hofer
            Votes:
            0 Vote for this issue
            Watchers:
            13 Start watching this issue

              Created:
              Updated:
              Resolved: