On Fri, 28 Mar 2025 16:26:44 GMT, Mikhail Yankelevich 
<myankelev...@openjdk.org> wrote:

>> Renjith Kannath Pariyangad has updated the pull request incrementally with 
>> one additional commit since the last revision:
>> 
>>   Updated copyright year
>
> test/jdk/javax/swing/Popup/TaskbarPositionTest.java line 81:
> 
>> 79:     private static JPopupMenu popupMenu;
>> 80:     private static JPanel panel;
>> 81:     private static Robot robot;
> 
> Do you think it would be better to have Robot initialisation in this way? IMO 
> it will make the robot final, so there is no way to overwrite it in the 
> future as well as it would be easier to debug and not be initialised in the 
> main method of the class. 
> 
>     private static final Robot robot;
> 
>     static {
>         try {
>             robot = new Robot();
>         } catch (AWTException e) {
>             throw new RuntimeException(e);
>         }
>     }

Since its a test, I didn't expect any override of this class in future, my 
intention is add this feature with minimal change.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/24286#discussion_r2022719145

Reply via email to