<i18n dev> RFR: 8344061: Remove doPrivileged calls from shared implementation code in the java.desktop module : part 2

Harshitha Onkar honkar at openjdk.org
Fri Nov 15 23:19:47 UTC 2024


On Fri, 15 Nov 2024 19:18:15 GMT, Phil Race <prr at openjdk.org> wrote:

> Update 21 desktop module shared implementation files to remove doPrivileged.
> All the usual tests still pass.

src/java.desktop/share/classes/sun/awt/AppContext.java line 248:

> 246:             new ThreadLocal<AppContext>();
> 247: 
> 248:     //@SuppressWarnings("removal")

`@SuppressWarnings("removal")` is commented out? Probably meant to remove it?

src/java.desktop/share/classes/sun/awt/CausedFocusEvent.java line 73:

> 71:     }
> 72: 
> 73:     //@SuppressWarnings("removal")

Same here - did you mean to remove it?

src/java.desktop/share/classes/sun/awt/FontConfiguration.java line 163:

> 161:         } catch (Exception e) {
> 162:         }
> 163:         return exists.booleanValue();

Looks good since now exists boolean value is returned and doesn't require  return Boolean.FALSE; in catch block.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/22161#discussion_r1844649682
PR Review Comment: https://git.openjdk.org/jdk/pull/22161#discussion_r1844651087
PR Review Comment: https://git.openjdk.org/jdk/pull/22161#discussion_r1844652930


More information about the i18n-dev mailing list