mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-28 23:34:52 +02:00
8193033: remove terminally deprecated sun.misc.Unsafe.defineClass
Reviewed-by: chegar, mchung, alanb
This commit is contained in:
parent
3bd3094c88
commit
cfb102ab89
1 changed files with 1 additions and 21 deletions
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 2000, 2017, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2000, 2018, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
|
@ -33,7 +33,6 @@ import jdk.internal.reflect.Reflection;
|
|||
import sun.nio.ch.DirectBuffer;
|
||||
|
||||
import java.lang.reflect.Field;
|
||||
import java.security.ProtectionDomain;
|
||||
|
||||
|
||||
/**
|
||||
|
@ -810,25 +809,6 @@ public final class Unsafe {
|
|||
|
||||
/// random trusted operations from JNI:
|
||||
|
||||
/**
|
||||
* Tells the VM to define a class, without security checks. By default, the
|
||||
* class loader and protection domain come from the caller's class.
|
||||
*
|
||||
* @deprecated Use {@link java.lang.invoke.MethodHandles.Lookup#defineClass MethodHandles.Lookup#defineClass}
|
||||
* to define a class to the same class loader and in the same runtime package
|
||||
* and {@linkplain java.security.ProtectionDomain protection domain} of a
|
||||
* given {@code Lookup}'s {@linkplain java.lang.invoke.MethodHandles.Lookup#lookupClass() lookup class}.
|
||||
*
|
||||
* @see java.lang.invoke.MethodHandles.Lookup#defineClass(byte[])
|
||||
*/
|
||||
@Deprecated(since="9", forRemoval=true)
|
||||
@ForceInline
|
||||
public Class<?> defineClass(String name, byte[] b, int off, int len,
|
||||
ClassLoader loader,
|
||||
ProtectionDomain protectionDomain) {
|
||||
return theInternalUnsafe.defineClass(name, b, off, len, loader, protectionDomain);
|
||||
}
|
||||
|
||||
/**
|
||||
* Defines a class but does not make it known to the class loader or system dictionary.
|
||||
* <p>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue