jdk/src/jdk.unsupported/share/classes/sun/misc/Unsafe.java
changeset 45635 56b0672b0070
parent 45518 4a116dd82fb5
equal deleted inserted replaced
45536:7ebbcd3c853f 45635:56b0672b0070
   811     /// random trusted operations from JNI:
   811     /// random trusted operations from JNI:
   812 
   812 
   813     /**
   813     /**
   814      * Tells the VM to define a class, without security checks.  By default, the
   814      * Tells the VM to define a class, without security checks.  By default, the
   815      * class loader and protection domain come from the caller's class.
   815      * class loader and protection domain come from the caller's class.
       
   816      *
       
   817      * @deprecated Use {@link java.lang.invoke.MethodHandles.Lookup#defineClass MethodHandles.Lookup#defineClass}
       
   818      * to define a class to the same class loader and in the same runtime package
       
   819      * and {@linkplain java.security.ProtectionDomain protection domain} of a
       
   820      * given {@code Lookup}'s {@linkplain java.lang.invoke.MethodHandles.Lookup#lookupClass() lookup class}.
       
   821      *
   816      * @see java.lang.invoke.MethodHandles.Lookup#defineClass(byte[])
   822      * @see java.lang.invoke.MethodHandles.Lookup#defineClass(byte[])
   817      */
   823      */
       
   824     @Deprecated(since="9", forRemoval=true)
   818     @ForceInline
   825     @ForceInline
   819     public Class<?> defineClass(String name, byte[] b, int off, int len,
   826     public Class<?> defineClass(String name, byte[] b, int off, int len,
   820                                 ClassLoader loader,
   827                                 ClassLoader loader,
   821                                 ProtectionDomain protectionDomain) {
   828                                 ProtectionDomain protectionDomain) {
   822         return theInternalUnsafe.defineClass(name, b, off, len, loader, protectionDomain);
   829         return theInternalUnsafe.defineClass(name, b, off, len, loader, protectionDomain);