8034780: Remove used imports

Daniel Fuchs daniel.fuchs at oracle.com
Wed Feb 12 13:28:00 UTC 2014


On 2/12/14 2:19 PM, Alan Bateman wrote:
>
> I need a reviewer for a trivial change to remove a tiny number of unused
> imports. The motive is experimental compilation of the JDK as modules
> rather than one big compilation unit. I've no doubt that there is other
> code that has unused imports but it's not the goal of this exercise to
> identify and remove these. The proposal patch is below.

+1

I had noticed the unused imports in java.lang the other day when
I looked at which packages were using logging - and I was intending
to log an RFE about it :-)

-- daniel

>
> -Alan
>
>
> diff --git a/src/share/classes/java/lang/invoke/MethodHandle.java
> b/src/share/classes/java/lang/invoke/MethodHandle.java
> --- a/src/share/classes/java/lang/invoke/MethodHandle.java
> +++ b/src/share/classes/java/lang/invoke/MethodHandle.java
> @@ -31,8 +31,6 @@
>   import sun.misc.Unsafe;
>
>   import static java.lang.invoke.MethodHandleStatics.*;
> -import java.util.logging.Level;
> -import java.util.logging.Logger;
>
>   /**
>    * A method handle is a typed, directly executable reference to an
> underlying method,
> diff --git a/src/share/classes/java/lang/invoke/SimpleMethodHandle.java
> b/src/share/classes/java/lang/invoke/SimpleMethodHandle.java
> --- a/src/share/classes/java/lang/invoke/SimpleMethodHandle.java
> +++ b/src/share/classes/java/lang/invoke/SimpleMethodHandle.java
> @@ -27,8 +27,6 @@
>
>   import static java.lang.invoke.LambdaForm.*;
>   import static java.lang.invoke.MethodHandleNatives.Constants.*;
> -import java.util.logging.Level;
> -import java.util.logging.Logger;
>
>   /**
>    * A method handle whose behavior is determined only by its LambdaForm.
> diff --git a/src/share/classes/sun/applet/AppletViewerPanel.java
> b/src/share/classes/sun/applet/AppletViewerPanel.java
> --- a/src/share/classes/sun/applet/AppletViewerPanel.java
> +++ b/src/share/classes/sun/applet/AppletViewerPanel.java
> @@ -31,7 +31,6 @@
>   import java.net.MalformedURLException;
>   import java.awt.*;
>   import java.applet.*;
> -import sun.tools.jar.*;




More information about the core-libs-dev mailing list