On Fri, 5 Sep 2025 18:45:59 GMT, Damon Nguyen <[email protected]> wrote:
>> When testing jtreg manual tests, some tests were out of date. This PR is an
>> attempt at updating the test and automating it.
>>
>> `MouseDraggedOriginatedByScrollBarTest.java` works as expected when compared
>> to native apps and outputs drag events even when the mouse pointer is
>> dragged off of the scrollbar and window altogether. Events should still
>> fire, but the previous instructions may make this confusing since it reads
>> as if no events should be output to the textarea at all.
>
> Damon Nguyen has updated the pull request incrementally with one additional
> commit since the last revision:
>
> Update with final var and loop increment
Changes requested by aivanov (Reviewer).
test/jdk/java/awt/List/MouseDraggedOriginatedByScrollBarTest.java line 47:
> 45: private static Frame frame;
> 46: private static volatile Point loc;
> 47: private static volatile List list;
Suggestion:
private static List list;
There's no reason for `list` to be volatile.
test/jdk/java/awt/List/MouseDraggedOriginatedByScrollBarTest.java line 53:
> 51: public static void main(String[] args) throws Exception {
> 52: try {
> 53: createUI();
Should `createUI` be called on EDT?
test/jdk/java/awt/List/MouseDraggedOriginatedByScrollBarTest.java line 85:
> 83: @Override
> 84: public void mouseDragged(MouseEvent me){
> 85: System.out.println(me.toString());
Suggestion:
System.out.println(me);
`.toString()` is redundant for `println`.
test/jdk/java/awt/List/MouseDraggedOriginatedByScrollBarTest.java line 93:
> 91: new MouseAdapter() {
> 92: public void mousePressed(MouseEvent me) {
> 93: System.out.println(me.toString());
Suggestion:
System.out.println(me);
-------------
PR Review: https://git.openjdk.org/jdk/pull/26636#pullrequestreview-3196160889
PR Review Comment: https://git.openjdk.org/jdk/pull/26636#discussion_r2330001941
PR Review Comment: https://git.openjdk.org/jdk/pull/26636#discussion_r2330000948
PR Review Comment: https://git.openjdk.org/jdk/pull/26636#discussion_r2329996596
PR Review Comment: https://git.openjdk.org/jdk/pull/26636#discussion_r2329998506