On Fri, 15 Nov 2024 10:26:28 GMT, Glavo <d...@openjdk.org> wrote:

>> Prasanta Sadhukhan has updated the pull request incrementally with one 
>> additional commit since the last revision:
>> 
>>   Remove Suppresswarning
>
> src/java.desktop/share/classes/sun/swing/SwingUtilities2.java line 1708:
> 
>> 1706:         return (UIDefaults.LazyValue) (table) -> {
>> 1707:             byte[] buffer = enablePrivileges ?
>> 1708:                     getIconBytes(baseClass, rootClass, imageFile)
> 
> Suggestion:
> 
>             byte[] buffer = getIconBytes(baseClass, rootClass, imageFile);
> 
> 
> Maybe you could move the method body to `makeIcon(Class<?>, Class<?>, String)`

This enablePrivileges param is interesting and obsolete.
Either here or in an immediate follow-on we should get rid of it.
I'm inclined to do it in a small follow-on, not here.
javax.swing.LookAndFeel.makeIcon(.) is the only place that calls
 SwingUtilities2.makeIcon_Unprivileged so it won't be hard.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/22133#discussion_r1844416602

Reply via email to