RFR: 8328560: java/awt/event/MouseEvent/ClickDuringKeypress/ClickDuringKeypress.java imports Applet [v2]

Phil Race prr at openjdk.org
Wed Mar 20 23:45:31 UTC 2024


On Wed, 20 Mar 2024 17:57:30 GMT, Alexander Zvegintsev <azvegint at openjdk.org> wrote:

>> Phil Race has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   8328560
>
> test/jdk/java/awt/event/MouseEvent/ClickDuringKeypress/ClickDuringKeypress.java line 24:
> 
>> 22:  */
>> 23: 
>> 24: import java.awt.AWTException;
> 
> Suggestion:
> 
> 
> Unused

right not needed now

> test/jdk/java/awt/event/MouseEvent/ClickDuringKeypress/ClickDuringKeypress.java line 34:
> 
>> 32: import java.awt.event.WindowAdapter;
>> 33: import java.awt.event.WindowEvent;
>> 34: import java.awt.event.WindowEvent;
> 
> Suggestion:
> 
> import java.awt.event.WindowEvent;

fixed

> test/jdk/java/awt/event/MouseEvent/ClickDuringKeypress/ClickDuringKeypress.java line 54:
> 
>> 52:    static volatile Frame frame;
>> 53:    static volatile Robot robot;
>> 54:    static final ClickDuringKeypress clicker = new ClickDuringKeypress();
> 
> On the other hand, we can get rid of the instantiation of this class and MouseListener empty methods overrides by simply adding this:
> 
> 
> frame.addMouseListener(new MouseAdapter() {
>           @Override
>           public void mouseClicked(MouseEvent e) {
>               System.out.println(e.toString());
>               clicked = true;
>               lastClickCount = e.getClickCount();
>           }
>       });
> 
> 
> Either way, I'm fine with it.

I thought about doing something like this .. but decided to stop the creep of changes.
So I'll leave it.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/18386#discussion_r1533047651
PR Review Comment: https://git.openjdk.org/jdk/pull/18386#discussion_r1533047213
PR Review Comment: https://git.openjdk.org/jdk/pull/18386#discussion_r1533048464


More information about the client-libs-dev mailing list