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

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.

        There are no Sub-Tasks for this issue.

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

              Created:
              Updated:
              Resolved: