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

Replace usages of jdk.internal.misc.Unsafe with MethodHandles.Lookup.defineClass

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: P4
    • Resolution: Fixed
    • Affects Version/s: 9
    • Fix Version/s: 12
    • Component/s: core-libs
    • Labels:
      None

      Description

      Sample of usages:

      Method
          defineClass(String, byte[], int, int, ClassLoader, ProtectionDomain)
      Found usages (5 usages found)
          Production (5 usages found)
              jdk (5 usages found)
                  java.lang.invoke (1 usage found)
                      BoundMethodHandle.java (1 usage found)
                          582UNSAFE.defineClass(className, classFile, 0, classFile.length,
                  java.lang.reflect (1 usage found)
                      Proxy.java (1 usage found)
                          538Class<?> pc = UNSAFE.defineClass(proxyName, proxyClassFile,
                  jdk.internal.reflect (1 usage found)
                      ClassDefiner.java (1 usage found)
                          63return unsafe.defineClass(name, bytes, off, len, newLoader, null);
                  jdk.jfr.internal (1 usage found)
                      SecuritySupport.java (1 usage found)
                          366return unsafe.defineClass(name, bytes, 0, bytes.length, classLoader, null);
                  sun.misc (1 usage found)
                      Unsafe.java (1 usage found)
                          822return theInternalUnsafe.defineClass(name, b, off, len, loader, protectionDomain);

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                mchung Mandy Chung
                Reporter:
                psandoz Paul Sandoz (Inactive)
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: