8193033: remove terminally deprecated sun.misc.Unsafe.defineClass
Reviewed-by: chegar, mchung, alanb
--- a/src/jdk.unsupported/share/classes/sun/misc/Unsafe.java Mon Mar 19 21:52:50 2018 +0000
+++ b/src/jdk.unsupported/share/classes/sun/misc/Unsafe.java Tue Mar 20 09:21:43 2018 -0700
@@ -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 sun.nio.ch.DirectBuffer;
import java.lang.reflect.Field;
-import java.security.ProtectionDomain;
/**
@@ -811,25 +810,6 @@
/// 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>
* For each CP entry, the corresponding CP patch must either be null or have