From 7105bb98cf8797082d2b61f0e08a4e5ba0bae8ac Mon Sep 17 00:00:00 2001 From: Phil Race Date: Thu, 21 Nov 2024 04:22:27 +0000 Subject: [PATCH] 8344664: Remove some un-used java/sun.security imports in the java.desktop module Reviewed-by: iris --- .../classes/com/sun/java/swing/plaf/gtk/GTKLookAndFeel.java | 2 -- .../share/classes/com/sun/media/sound/JARSoundbankReader.java | 1 - .../share/classes/com/sun/media/sound/Printer.java | 2 -- src/java.desktop/share/classes/java/awt/Component.java | 1 - src/java.desktop/share/classes/java/awt/Container.java | 2 -- src/java.desktop/share/classes/java/awt/Window.java | 1 - src/java.desktop/share/classes/javax/imageio/ImageIO.java | 2 -- .../share/classes/sun/awt/im/InputMethodContext.java | 1 - .../share/classes/sun/awt/util/ThreadGroupUtils.java | 1 - src/java.desktop/share/classes/sun/font/TrueTypeFont.java | 1 - .../share/classes/sun/java2d/marlin/MarlinUtils.java | 1 - src/java.desktop/unix/classes/sun/awt/UNIXToolkit.java | 4 ---- .../unix/classes/sun/awt/X11InputMethodDescriptor.java | 2 -- 13 files changed, 21 deletions(-) diff --git a/src/java.desktop/share/classes/com/sun/java/swing/plaf/gtk/GTKLookAndFeel.java b/src/java.desktop/share/classes/com/sun/java/swing/plaf/gtk/GTKLookAndFeel.java index a2414da4559..9490dc6bdff 100644 --- a/src/java.desktop/share/classes/com/sun/java/swing/plaf/gtk/GTKLookAndFeel.java +++ b/src/java.desktop/share/classes/com/sun/java/swing/plaf/gtk/GTKLookAndFeel.java @@ -38,7 +38,6 @@ import java.beans.PropertyChangeEvent; import java.beans.PropertyChangeListener; import java.lang.ref.ReferenceQueue; import java.lang.ref.WeakReference; -import java.security.AccessController; import java.util.HashMap; import java.util.Map; @@ -65,7 +64,6 @@ import com.sun.java.swing.plaf.gtk.GTKConstants.PositionType; import com.sun.java.swing.plaf.gtk.GTKConstants.StateType; import sun.awt.SunToolkit; import sun.awt.UNIXToolkit; -import sun.security.action.GetPropertyAction; import sun.swing.AltProcessor; import sun.swing.DefaultLayoutStyle; import sun.swing.MnemonicHandler; diff --git a/src/java.desktop/share/classes/com/sun/media/sound/JARSoundbankReader.java b/src/java.desktop/share/classes/com/sun/media/sound/JARSoundbankReader.java index 4ff72c7040a..8b492fa7782 100644 --- a/src/java.desktop/share/classes/com/sun/media/sound/JARSoundbankReader.java +++ b/src/java.desktop/share/classes/com/sun/media/sound/JARSoundbankReader.java @@ -40,7 +40,6 @@ import javax.sound.midi.Soundbank; import javax.sound.midi.spi.SoundbankReader; import sun.reflect.misc.ReflectUtil; -import sun.security.action.GetBooleanAction; /** * JarSoundbankReader is used to read soundbank object from jar files. diff --git a/src/java.desktop/share/classes/com/sun/media/sound/Printer.java b/src/java.desktop/share/classes/com/sun/media/sound/Printer.java index 40e179b1bd8..af2c3e11988 100644 --- a/src/java.desktop/share/classes/com/sun/media/sound/Printer.java +++ b/src/java.desktop/share/classes/com/sun/media/sound/Printer.java @@ -26,8 +26,6 @@ package com.sun.media.sound; -import sun.security.action.GetPropertyAction; - /** * Printer allows you to set up global debugging status and print * messages accordingly. diff --git a/src/java.desktop/share/classes/java/awt/Component.java b/src/java.desktop/share/classes/java/awt/Component.java index 71618eea95b..36683ff2813 100644 --- a/src/java.desktop/share/classes/java/awt/Component.java +++ b/src/java.desktop/share/classes/java/awt/Component.java @@ -108,7 +108,6 @@ import sun.java2d.SunGraphics2D; import sun.java2d.SunGraphicsEnvironment; import sun.java2d.pipe.Region; import sun.java2d.pipe.hw.ExtendedBufferCapabilities; -import sun.security.action.GetPropertyAction; import sun.swing.SwingAccessor; import sun.util.logging.PlatformLogger; diff --git a/src/java.desktop/share/classes/java/awt/Container.java b/src/java.desktop/share/classes/java/awt/Container.java index 63bd7467d91..b6fbfb808a6 100644 --- a/src/java.desktop/share/classes/java/awt/Container.java +++ b/src/java.desktop/share/classes/java/awt/Container.java @@ -50,7 +50,6 @@ import java.io.PrintWriter; import java.io.Serial; import java.io.Serializable; import java.lang.ref.WeakReference; -import java.security.AccessController; import java.util.ArrayList; import java.util.EventListener; import java.util.HashSet; @@ -67,7 +66,6 @@ import sun.awt.PeerEvent; import sun.awt.SunToolkit; import sun.awt.dnd.SunDropTargetEvent; import sun.java2d.pipe.Region; -import sun.security.action.GetBooleanAction; import sun.util.logging.PlatformLogger; /** diff --git a/src/java.desktop/share/classes/java/awt/Window.java b/src/java.desktop/share/classes/java/awt/Window.java index 9b855739443..f6560fb8e58 100644 --- a/src/java.desktop/share/classes/java/awt/Window.java +++ b/src/java.desktop/share/classes/java/awt/Window.java @@ -70,7 +70,6 @@ import sun.awt.DebugSettings; import sun.awt.SunToolkit; import sun.awt.util.IdentityArrayList; import sun.java2d.pipe.Region; -import sun.security.action.GetPropertyAction; import sun.util.logging.PlatformLogger; /** diff --git a/src/java.desktop/share/classes/javax/imageio/ImageIO.java b/src/java.desktop/share/classes/javax/imageio/ImageIO.java index 316a74a22ea..f085383284e 100644 --- a/src/java.desktop/share/classes/javax/imageio/ImageIO.java +++ b/src/java.desktop/share/classes/javax/imageio/ImageIO.java @@ -34,7 +34,6 @@ import java.io.IOException; import java.io.OutputStream; import java.lang.reflect.Method; import java.net.URL; -import java.security.AccessController; import java.util.Arrays; import java.util.Collections; import java.util.HashSet; @@ -50,7 +49,6 @@ import javax.imageio.spi.ServiceRegistry; import javax.imageio.stream.ImageInputStream; import javax.imageio.stream.ImageOutputStream; import sun.awt.AppContext; -import sun.security.action.GetPropertyAction; /** * A class containing static convenience methods for locating diff --git a/src/java.desktop/share/classes/sun/awt/im/InputMethodContext.java b/src/java.desktop/share/classes/sun/awt/im/InputMethodContext.java index a0f9baa3112..fd165a52f72 100644 --- a/src/java.desktop/share/classes/sun/awt/im/InputMethodContext.java +++ b/src/java.desktop/share/classes/sun/awt/im/InputMethodContext.java @@ -43,7 +43,6 @@ import java.text.AttributedString; import java.text.CharacterIterator; import javax.swing.JFrame; import sun.awt.InputMethodSupport; -import sun.security.action.GetPropertyAction; /** * The InputMethodContext class provides methods that input methods diff --git a/src/java.desktop/share/classes/sun/awt/util/ThreadGroupUtils.java b/src/java.desktop/share/classes/sun/awt/util/ThreadGroupUtils.java index 5d58a1c29d4..6944ba44879 100644 --- a/src/java.desktop/share/classes/sun/awt/util/ThreadGroupUtils.java +++ b/src/java.desktop/share/classes/sun/awt/util/ThreadGroupUtils.java @@ -39,7 +39,6 @@ public final class ThreadGroupUtils { /** * Returns a root thread group. - * Should be called with {@link sun.security.util.SecurityConstants#MODIFY_THREADGROUP_PERMISSION} * * @return a root {@code ThreadGroup} */ diff --git a/src/java.desktop/share/classes/sun/font/TrueTypeFont.java b/src/java.desktop/share/classes/sun/font/TrueTypeFont.java index a44a013b749..8b7f9b95f5c 100644 --- a/src/java.desktop/share/classes/sun/font/TrueTypeFont.java +++ b/src/java.desktop/share/classes/sun/font/TrueTypeFont.java @@ -45,7 +45,6 @@ import java.util.Map; import sun.java2d.Disposer; import sun.java2d.DisposerRecord; -import sun.security.action.GetPropertyAction; /** * TrueTypeFont is not called SFntFont because it is not expected diff --git a/src/java.desktop/share/classes/sun/java2d/marlin/MarlinUtils.java b/src/java.desktop/share/classes/sun/java2d/marlin/MarlinUtils.java index 05ea55f170b..49f5ab613a8 100644 --- a/src/java.desktop/share/classes/sun/java2d/marlin/MarlinUtils.java +++ b/src/java.desktop/share/classes/sun/java2d/marlin/MarlinUtils.java @@ -65,7 +65,6 @@ public final class MarlinUtils { /** * Returns a root thread group. - * Should be called with {@link sun.security.util.SecurityConstants#MODIFY_THREADGROUP_PERMISSION} * * @return a root {@code ThreadGroup} */ diff --git a/src/java.desktop/unix/classes/sun/awt/UNIXToolkit.java b/src/java.desktop/unix/classes/sun/awt/UNIXToolkit.java index 8e224414427..5881ba55ef3 100644 --- a/src/java.desktop/unix/classes/sun/awt/UNIXToolkit.java +++ b/src/java.desktop/unix/classes/sun/awt/UNIXToolkit.java @@ -51,15 +51,11 @@ import java.awt.image.WritableRaster; import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; -import java.security.AccessController; -import java.security.PrivilegedAction; import java.util.Arrays; import sun.awt.X11.XBaseWindow; -import sun.security.action.GetIntegerAction; import com.sun.java.swing.plaf.gtk.GTKConstants.TextDirection; import sun.java2d.opengl.OGLRenderQueue; -import sun.security.action.GetPropertyAction; public abstract class UNIXToolkit extends SunToolkit { diff --git a/src/java.desktop/unix/classes/sun/awt/X11InputMethodDescriptor.java b/src/java.desktop/unix/classes/sun/awt/X11InputMethodDescriptor.java index d0502505dc6..f05419feef4 100644 --- a/src/java.desktop/unix/classes/sun/awt/X11InputMethodDescriptor.java +++ b/src/java.desktop/unix/classes/sun/awt/X11InputMethodDescriptor.java @@ -30,10 +30,8 @@ import java.awt.Image; import java.awt.Toolkit; import java.awt.im.spi.InputMethod; import java.awt.im.spi.InputMethodDescriptor; -import java.security.AccessController; import java.util.Locale; import sun.awt.SunToolkit; -import sun.security.action.GetPropertyAction; /** * Provides sufficient information about an input method