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

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

    XMLWordPrintable

Details

    • b16

    Description

      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.

      Attachments

        Issue Links

          There are no Sub-Tasks for this issue.

          Activity

            People

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

              Dates

                Created:
                Updated:
                Resolved: