Remove sun.misc.Unsafe.{shouldBeInitialized,ensureClassInitialized}

XMLWordPrintable

    • b16

      Unsafe.{shouldBeInitialized,ensureClassInitialized} are deprecated for removal since JDK 15. It's time to remove them. Lookup.ensureInitialized(Class) was added in Java 15 as a standard API so no need to use these Unsafe.ensureClassInitialized anymore. Unsafe.shouldBeInitialized isn't reliable when multiple threads may initialise the class, users of that method should look at Lookup.ensureInitialized too.

            Assignee:
            Alan Bateman
            Reporter:
            Alan Bateman
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: