On Wed, 13 Nov 2024 23:19:32 GMT, Phil Race <[email protected]> wrote:

> This is the first of a number of PRs to remove doPrivileged uses in client 
> libraries.
> These calls are obsolete dead code after JEP 486.
> 
> I have run all our automated tests, including JCK tests, and manually tested 
> SwingSet.
> 
> One thing I might have missed in a couple of cases is that it seems that 
> javac doesn't seem to notice if you leave an un-needed 
> SuppressWarnings("removal") annotation. 
> 
> As per the bug report I am limiting (as much as I can) what I touch here to 
> be just the immediate consequences of removing doPrivileged calls. These 
> changes are plenty enough as it is.

src/java.desktop/share/classes/javax/swing/SwingPaintEventDispatcher.java line 
36:

> 34: import sun.awt.event.IgnorePaintEvent;
> 35: import sun.security.action.GetBooleanAction;
> 36: import sun.security.action.GetPropertyAction;

You can also remove the now-unused import of `AccessController` from this file 
as a follow-up.

-------------

PR Review Comment: https://git.openjdk.org/jdk/pull/22090#discussion_r1842782459

Reply via email to