RFR [9] 8152642: Remove sun.misc.Unsafe dependency from java.lang.reflect.Proxy

Alan Bateman Alan.Bateman at oracle.com
Thu Mar 24 10:55:37 UTC 2016


This looks fine. Once sun.misc is moved to the jdk.unsupported module 
then this type of issue will be caught by build time.

-Alan

On 24/03/2016 10:51, Chris Hegarty wrote:
> Trivially, looks like a minor oversight that inadvertently introduced a
> dependency on sun.misc.Unsafe.
>
> diff --git a/src/java.base/share/classes/java/lang/reflect/Proxy.java b/src/java.base/share/classes/java/lang/reflect/Proxy.java
> --- a/src/java.base/share/classes/java/lang/reflect/Proxy.java
> +++ b/src/java.base/share/classes/java/lang/reflect/Proxy.java
> @@ -48,8 +48,8 @@
>    
>   import jdk.internal.loader.BootLoader;
>   import jdk.internal.module.Modules;
> +import jdk.internal.misc.Unsafe;
>   import jdk.internal.misc.VM;
> -import sun.misc.Unsafe;
>   import sun.reflect.CallerSensitive;
>   import sun.reflect.Reflection;
>   import sun.reflect.misc.ReflectUtil;
>
> -Chris.




More information about the core-libs-dev mailing list