Re: RFR: 8346581: JRadioButton/ButtonGroupFocusTest.java fails in CI on Linux

2025-01-09 Thread Alexey Ivanov
On Thu, 9 Jan 2025 18:57:28 GMT, Damon Nguyen wrote: >> **Problem:** >> >> The `javax/swing/JRadioButton/ButtonGroupFocus/ButtonGroupFocusTest.java` >> test fails in CI on Linux. >> >> The focus is on _Button 2_ instead of _Button 4_. >> >> **Root cause:** >> >> The additional logging reveal

Re: RFR: 8346581: JRadioButton/ButtonGroupFocusTest.java fails in CI on Linux

2025-01-09 Thread Alexey Ivanov
On Thu, 9 Jan 2025 18:52:58 GMT, Damon Nguyen wrote: >> **Problem:** >> >> The `javax/swing/JRadioButton/ButtonGroupFocus/ButtonGroupFocusTest.java` >> test fails in CI on Linux. >> >> The focus is on _Button 2_ instead of _Button 4_. >> >> **Root cause:** >> >> The additional logging reveal

Re: RFR: 8346036: Unnecessary Hashtable usage in javax.swing.text.html.parser.Entity

2025-01-09 Thread Alexey Ivanov
On Thu, 9 Jan 2025 12:44:14 GMT, ExE Boss wrote: >> src/java.desktop/share/classes/javax/swing/text/html/parser/Entity.java line >> 2: >> >>> 1: /* >>> 2: * Copyright (c) 1998, 2024, Oracle and/or its affiliates. All rights >>> reserved. >> >> Needs to be updated to 2025? > > Leaving this as

RFR: 8346581: JRadioButton/ButtonGroupFocusTest.java fails in CI on Linux

2025-01-08 Thread Alexey Ivanov
**Problem:** The `javax/swing/JRadioButton/ButtonGroupFocus/ButtonGroupFocusTest.java` test fails in CI on Linux. The focus is on _Button 2_ instead of _Button 4_. **Root cause:** The additional logging revealed, an expected `KEY_PRESS` event. The test uses `Robot` API to press the Tab key an

Re: RFR: JDK-8344907 : NullPointerException in Win32ShellFolder2.getSystemIcon when "icon" is null [v4]

2025-01-08 Thread Alexey Ivanov
On Wed, 8 Jan 2025 19:10:59 GMT, Harshitha Onkar wrote: >> Win32ShellFolder2.getSystemIcon() can result in NPE if icon is null. Sanity >> null checks have been added. >> >> >> long hIcon = getSystemIcon(iconType.getIconID()); //Can return null >> Image icon = makeIcon(hIcon); // returns null i

Re: RFR: 8346887: DrawFocusRect() may cause an assertion failure

2025-01-08 Thread Alexey Ivanov
On Wed, 8 Jan 2025 16:36:07 GMT, Dmitry Markov wrote: > On Windows debug build execution of `DrawFocusRect()` may cause an assertion > failure. In particular if a component, which is going to gain a focus, has > zero size, the function returns `0` because focus rectangle is empty. > > It is ne

Re: RFR: JDK-8344907 : NullPointerException in Win32ShellFolder2.getSystemIcon when "icon" is null [v3]

2025-01-08 Thread Alexey Ivanov
On Tue, 7 Jan 2025 20:33:50 GMT, Harshitha Onkar wrote: >> Win32ShellFolder2.getSystemIcon() can result in NPE if icon is null. Sanity >> null checks have been added. >> >> >> long hIcon = getSystemIcon(iconType.getIconID()); //Can return null >> Image icon = makeIcon(hIcon); // returns null i

Re: RFR: 8346953: Remove unnecessary @SuppressWarnings annotations (client, #2)

2025-01-07 Thread Alexey Ivanov
On Mon, 6 Jan 2025 16:55:17 GMT, Alexander Zvegintsev wrote: > Looks good, I also checked that it builds on all platforms. I also did it. And I found the changeset had been integrated when I got back to it. - PR Comment: https://git.openjdk.org/jdk/pull/22906#issuecomment-2576334

Re: RFR: 8346036: Unnecessary Hashtable usage in javax.swing.text.html.parser.Entity

2025-01-07 Thread Alexey Ivanov
On Fri, 1 Nov 2024 14:02:52 GMT, Andrey Turbanov wrote: > The Hashtable `javax.swing.text.html.parser.Entity#entityTypes` is modified > only within `` block. > We can replace it with immutable map to avoid Hashtable synchronization > overhead. > Similar to what we did in #21825. Looks good to

Re: RFR: 8282862: AwtWindow::SetIconData leaks old icon handles if an exception is detected [v3]

2025-01-07 Thread Alexey Ivanov
On Tue, 7 Jan 2025 19:37:24 GMT, Rajat Mahajan wrote: >> **Issue:** >> AwtWindow::SetIconData leaks the old icon handles in hOldIcon and hOldIconSm >> if CreateIconFromRaster raises an exception. Additionally, an exception is >> checked only after the first call to CreateIconFromRaster. >> >>

Re: RFR: 8339728 : [Accessibility, Windows, JAWS] Bug in the getKeyChar method of the AccessBridge class [v6]

2025-01-06 Thread Alexey Ivanov
On Mon, 6 Jan 2025 07:09:23 GMT, Abhishek Kumar wrote: >> For a JMenuItem with a shortcut like _Ctrl + Comma_, the `getKeyChar` method >> of the `AccessBridge` class cuts the _Comma_ text to the first character and >> hence transfers `C (instead of Comma)` via the `AccessBridge` API. For a >>

Re: RFR: 8339728 : [Accessibility, Windows, JAWS] Bug in the getKeyChar method of the AccessBridge class [v6]

2025-01-06 Thread Alexey Ivanov
On Mon, 6 Jan 2025 07:09:23 GMT, Abhishek Kumar wrote: >> For a JMenuItem with a shortcut like _Ctrl + Comma_, the `getKeyChar` method >> of the `AccessBridge` class cuts the _Comma_ text to the first character and >> hence transfers `C (instead of Comma)` via the `AccessBridge` API. For a >>

Re: RFR: 8334644 : Automate javax/print/attribute/PageRangesException.java [v2]

2025-01-06 Thread Alexey Ivanov
On Mon, 6 Jan 2025 05:43:19 GMT, Renjith Kannath Pariyangad wrote: >> Hi All, >> >> I have updated the test and made it automation friendly. Please review and >> let me know your suggestions > > Renjith Kannath Pariyangad has updated the pull request incrementally with > one additional commit

Re: RFR: 8346260: Test "javax/swing/JOptionPane/bug4174551.java" failed because the font size of message "Hi 24" is not set to 24 in Nimbus LookAndFeel [v2]

2025-01-03 Thread Alexey Ivanov
On Fri, 3 Jan 2025 15:02:13 GMT, Prasanta Sadhukhan wrote: > > I wonder if such a customisation is supported. Synth and Nimbus don't > > always use the `UIMaganager` to set the defaults. Perhaps, these > > Look-and-Feels should be excluded from this test. > > On the other hand, Swing usually a

Re: RFR: 8346260: Test "javax/swing/JOptionPane/bug4174551.java" failed because the font size of message "Hi 24" is not set to 24 in Nimbus LookAndFeel [v2]

2025-01-03 Thread Alexey Ivanov
On Fri, 3 Jan 2025 15:01:17 GMT, Prasanta Sadhukhan wrote: >> "OptionPane.buttonFont" and "OptionPane.messageFont" property are ignored >> for Nimbus L&F as for Nimbus, lookup calls initiated by >> BasicOptionPaneUI#configureButton and >> BasicOptionPaneUI#configureMessageLabel, were redirect

Re: RFR: 8339728 : [Accessibility, Windows, JAWS] Bug in the getKeyChar method of the AccessBridge class [v3]

2025-01-03 Thread Alexey Ivanov
On Thu, 2 Jan 2025 05:31:34 GMT, Abhishek Kumar wrote: >> For a JMenuItem with a shortcut like _Ctrl + Comma_, the `getKeyChar` method >> of the `AccessBridge` class cuts the _Comma_ text to the first character and >> hence transfers `C (instead of Comma)` via the `AccessBridge` API. For a >>

Re: RFR: 8346036: Unnecessary Hashtable usage in javax.swing.text.html.parser.Entity

2025-01-03 Thread Alexey Ivanov
On Fri, 1 Nov 2024 14:02:52 GMT, Andrey Turbanov wrote: > The Hashtable `javax.swing.text.html.parser.Entity#entityTypes` is modified > only within `` block. > We can replace it with immutable map to avoid Hashtable synchronization > overhead. > Similar to what we did in #21825. This looks goo

Re: RFR: 8346260: Test "javax/swing/JOptionPane/bug4174551.java" failed because the font size of message "Hi 24" is not set to 24 in Nimbus LookAndFeel

2025-01-03 Thread Alexey Ivanov
On Fri, 3 Jan 2025 03:01:48 GMT, Prasanta Sadhukhan wrote: > "OptionPane.buttonFont" and "OptionPane.messageFont" property are ignored for > Nimbus L&F as for Nimbus, lookup calls initiated by > BasicOptionPaneUI#configureButton and > BasicOptionPaneUI#configureMessageLabel, were redirected v

Re: RFR: 8346846 : Open source PageRangesException.java test

2025-01-03 Thread Alexey Ivanov
On Fri, 3 Jan 2025 04:47:41 GMT, Renjith Kannath Pariyangad wrote: > Hi All, > > I have updated the test and made it automation friendly. Please review and > let me know your suggestions Use [JDK-8334644](https://bugs.openjdk.org/browse/JDK-8334644) as the bug id for this PR. I've closed [J

Re: RFR: 8346846 : Open source PageRangesException.java test

2025-01-03 Thread Alexey Ivanov
On Fri, 3 Jan 2025 04:47:41 GMT, Renjith Kannath Pariyangad wrote: > Hi All, > > I have updated the test and made it automation friendly. Please review and > let me know your suggestions Looks good to me except for minor comments. test/jdk/javax/print/attribute/PageRangesException.java line

Re: RFR: JDK-8344907 : NullPointerException in Win32ShellFolder2.getSystemIcon when "icon" is null [v2]

2024-12-24 Thread Alexey Ivanov
On Mon, 23 Dec 2024 20:31:30 GMT, Harshitha Onkar wrote: > Do I retain or remove ` hIcon != 0L` check here ? Since now `hIcon != 0` is > being checked before calling `mmakeIcon()`. I'm for keeping it. Not calling a method is faster than calling it and returning immediately because a preconditi

Re: RFR: JDK-8344907 : NullPointerException in Win32ShellFolder2.getSystemIcon when "icon" is null [v2]

2024-12-24 Thread Alexey Ivanov
On Mon, 23 Dec 2024 20:31:13 GMT, Harshitha Onkar wrote: >> Win32ShellFolder2.getSystemIcon() can result in NPE if icon is null. Sanity >> null checks have been added. >> >> >> long hIcon = getSystemIcon(iconType.getIconID()); //Can return null >> Image icon = makeIcon(hIcon); // returns null

Re: RFR: JDK-8344907 : NullPointerException in Win32ShellFolder2.getSystemIcon when "icon" is null [v2]

2024-12-24 Thread Alexey Ivanov
On Tue, 24 Dec 2024 12:29:39 GMT, Alexey Ivanov wrote: >> Harshitha Onkar has updated the pull request incrementally with one >> additional commit since the last revision: >> >> hIcon check added > > src/java.desktop/windows/classes/sun/awt/shell/Win32

Re: RFR: 8345538: Robot.mouseMove doesn't clamp bounds on macOS when trying to move mouse off screen [v3]

2024-12-20 Thread Alexey Ivanov
On Fri, 20 Dec 2024 19:22:35 GMT, Alisen Chung wrote: >> @aivanov-jdk >> I see your point. But I'm running into NPE at >> `MouseInfo.getPointerInfo().getLocation()` without the fix as well (dual >> monitor, extended display setup) >> >> Is it expected of MouseInfo.getPointerInfo() to return n

Re: RFR: 8345538: Robot.mouseMove doesn't clamp bounds on macOS when trying to move mouse off screen [v3]

2024-12-20 Thread Alexey Ivanov
On Fri, 20 Dec 2024 21:09:28 GMT, Alexey Ivanov wrote: >> Now I ran the test on macOS Sequoia 15.1.1. With the current `Robot` >> implementation, it's able to move mouse across both displays. With Alisen's >> updated implementation, the coordinates ar

Re: RFR: 8345538: Robot.mouseMove doesn't clamp bounds on macOS when trying to move mouse off screen [v4]

2024-12-20 Thread Alexey Ivanov
On Fri, 20 Dec 2024 19:36:20 GMT, Alisen Chung wrote: >> Currently on macOS when mouseMove is given an offscreen coordinate to move >> the mouse to, mouseMove will physically clamp to the edge of the screen, but >> if you try to grab the mouse location immediately after by using >> MouseInfo.g

Re: RFR: 8345538: Robot.mouseMove doesn't clamp bounds on macOS when trying to move mouse off screen [v3]

2024-12-20 Thread Alexey Ivanov
On Fri, 20 Dec 2024 20:59:52 GMT, Alexey Ivanov wrote: >>> Displays: 2 Placement: Side-by-side, with the bottom edge aligned as below >>> >>> >> src="https://private-user-images.githubusercontent.com/95945681/397856615-7ea5be

Re: RFR: 8345538: Robot.mouseMove doesn't clamp bounds on macOS when trying to move mouse off screen [v3]

2024-12-20 Thread Alexey Ivanov
On Fri, 20 Dec 2024 20:51:09 GMT, Phil Race wrote: >> I ran it on Windows, sorry I should've said it explicitly. > >> Displays: 2 Placement: Side-by-side, with the bottom edge aligned as below >> >> > src="https://private-user-images.githubusercontent.com/95945681/397856615-7ea5be69-989f-42b5-ac

Re: RFR: 8345538: Robot.mouseMove doesn't clamp bounds on macOS when trying to move mouse off screen [v3]

2024-12-20 Thread Alexey Ivanov
On Fri, 20 Dec 2024 20:42:05 GMT, Harshitha Onkar wrote: >>> For me, the test _without the fix_ prints >>> >>> ``` >>> Current mouse location: java.awt.Point[x=0,y=200] >>> ``` >>> >>> The mouse cursor moves to 200, 200 and then to 0, 200 on the screen. >> >> >> What platform ? Alisen did say

Re: RFR: 8345538: Robot.mouseMove doesn't clamp bounds on macOS when trying to move mouse off screen [v3]

2024-12-20 Thread Alexey Ivanov
On Fri, 20 Dec 2024 19:48:24 GMT, Phil Race wrote: >> Is the current behaviour even a bug? >> [`Robot.mouseMove`](https://docs.oracle.com/en/java/javase/23/docs/api/java.desktop/java/awt/Robot.html#mouseMove(int,int)) >> says nothing about invalid coordinates. >> >>> @aivanov-jdk I see your po

Re: RFR: 8345538: Robot.mouseMove doesn't clamp bounds on macOS when trying to move mouse off screen [v3]

2024-12-20 Thread Alexey Ivanov
On Fri, 20 Dec 2024 19:27:14 GMT, Alisen Chung wrote: > > I wonder if this is even a bug in `Robot`. > > I think it makes sense for Robot to clamp mouseMove so that > MouseInfo.getPointerInfo() will never return these junk coordinates, but I > understand what you mean since the clamping (or up

Re: RFR: 8345538: Robot.mouseMove doesn't clamp bounds on macOS when trying to move mouse off screen [v3]

2024-12-20 Thread Alexey Ivanov
On Fri, 20 Dec 2024 19:30:22 GMT, Harshitha Onkar wrote: >> Interesting. Does this also happen after the fix with Robot clamping >> coordinates in shared code? > > Yes, I'm running into NPE without as well as with the fix. Is the current behaviour even a bug? [`Robot.mouseMove`](https://docs.o

Re: RFR: 8345538: Robot.mouseMove doesn't clamp bounds on macOS when trying to move mouse off screen [v3]

2024-12-20 Thread Alexey Ivanov
On Tue, 17 Dec 2024 20:46:54 GMT, Alisen Chung wrote: >> Currently on macOS when mouseMove is given an offscreen coordinate to move >> the mouse to, mouseMove will physically clamp to the edge of the screen, but >> if you try to grab the mouse location immediately after by using >> MouseInfo.g

Re: RFR: 8345538: Robot.mouseMove doesn't clamp bounds on macOS when trying to move mouse off screen [v3]

2024-12-20 Thread Alexey Ivanov
On Fri, 20 Dec 2024 00:47:18 GMT, Harshitha Onkar wrote: > For this test you can add a null check before calling .getLocation() for > sanity (although multimonitor setup is not the case for CI runs) If `Robot.mouseMove` is expected to limit mouse to the valid (virtual screen) coordinates, `Mou

Re: RFR: 8345538: Robot.mouseMove doesn't clamp bounds on macOS when trying to move mouse off screen [v3]

2024-12-20 Thread Alexey Ivanov
On Tue, 17 Dec 2024 18:48:43 GMT, Phil Race wrote: >> src/java.desktop/share/classes/java/awt/Robot.java line 225: >> >>> 223: //peer.mouseMove(x, y); >>> 224: peer.mouseMove(Math.min(Math.max(x, screenBounds.x), >>> screenBounds.x + screenBounds.width), >>> 225:

Re: RFR: 8346324: javax/swing/JScrollBar/4865918/bug4865918.java fails in CI [v4]

2024-12-18 Thread Alexey Ivanov
On Wed, 18 Dec 2024 12:55:50 GMT, Prasanta Sadhukhan wrote: >> javax/swing/JScrollBar/4865918/bug4865918.java fails in CI citing >> >> java.lang.RuntimeException: The scrollbar block increment is incorrect >> at bug4865918.main(bug4865918.java:60) >> >> Seems like scrollbar is not in focus wh

Re: RFR: 8346324: javax/swing/JScrollBar/4865918/bug4865918.java fails in CI [v3]

2024-12-18 Thread Alexey Ivanov
On Wed, 18 Dec 2024 06:55:12 GMT, Prasanta Sadhukhan wrote: >> javax/swing/JScrollBar/4865918/bug4865918.java fails in CI citing >> >> java.lang.RuntimeException: The scrollbar block increment is incorrect >> at bug4865918.main(bug4865918.java:60) >> >> Seems like scrollbar is not in focus wh

Re: RFR: 8344059: Remove doPrivileged calls from windows platform sources in the java.desktop module [v7]

2024-12-17 Thread Alexey Ivanov
On Mon, 9 Dec 2024 21:57:35 GMT, Eirik Bjørsnøs wrote: >> Prasanta Sadhukhan has updated the pull request incrementally with two >> additional commits since the last revision: >> >> - Fix to getBoolean >> - FIx Boolean.getBoolean > > src/java.desktop/windows/classes/sun/awt/windows/WPathGraph

Re: RFR: JDK-8344907 : NullPointerException in Win32ShellFolder2.getSystemIcon when "icon" is null

2024-12-17 Thread Alexey Ivanov
On Tue, 17 Dec 2024 17:04:10 GMT, Alexander Zuev wrote: >>> > Although `icon != null` check is not strictly required here due to `hIcon >>> > != 0` check, added it as sanity check and to be consistent with other >>> > locations in Win32ShellFolder2.java where makeIcon() is called (which is >>>

Re: RFR: JDK-8344907 : NullPointerException in Win32ShellFolder2.getSystemIcon when "icon" is null

2024-12-17 Thread Alexey Ivanov
On Tue, 17 Dec 2024 14:19:41 GMT, Alexey Ivanov wrote: >> src/java.desktop/windows/classes/sun/awt/shell/Win32ShellFolder2.java line >> 1220: >> >>> 1218: Image icon = makeIcon(hIcon); >>> 1219: if (icon != null &&

Re: RFR: JDK-8344907 : NullPointerException in Win32ShellFolder2.getSystemIcon when "icon" is null

2024-12-17 Thread Alexey Ivanov
On Tue, 17 Dec 2024 04:01:18 GMT, Alexander Zuev wrote: >> Win32ShellFolder2.getSystemIcon() can result in NPE if icon is null. Sanity >> null checks have been added. >> >> >> long hIcon = getSystemIcon(iconType.getIconID()); //Can return null >> Image icon = makeIcon(hIcon); // returns null i

Re: RFR: JDK-8344907 : NullPointerException in Win32ShellFolder2.getSystemIcon when "icon" is null

2024-12-17 Thread Alexey Ivanov
On Tue, 17 Dec 2024 00:03:32 GMT, Harshitha Onkar wrote: >> Win32ShellFolder2.getSystemIcon() can result in NPE if icon is null. Sanity >> null checks have been added. >> >> >> long hIcon = getSystemIcon(iconType.getIconID()); //Can return null >> Image icon = makeIcon(hIcon); // returns null

Re: RFR: JDK-8344907 : NullPointerException in Win32ShellFolder2.getSystemIcon when "icon" is null

2024-12-17 Thread Alexey Ivanov
On Mon, 16 Dec 2024 23:49:58 GMT, Harshitha Onkar wrote: > Win32ShellFolder2.getSystemIcon() can result in NPE if icon is null. Sanity > null checks have been added. > > > long hIcon = getSystemIcon(iconType.getIconID()); //Can return null > Image icon = makeIcon(hIcon); // returns null if the

Re: RFR: 8346324: javax/swing/JScrollBar/4865918/bug4865918.java fails in CI

2024-12-17 Thread Alexey Ivanov
On Tue, 17 Dec 2024 07:44:11 GMT, Prasanta Sadhukhan wrote: > javax/swing/JScrollBar/4865918/bug4865918.java fails in CI citing > > java.lang.RuntimeException: The scrollbar block increment is incorrect > at bug4865918.main(bug4865918.java:60) > > Seems like scrollbar is not in focus when mou

Re: RFR: 8342096: Popup menus that request focus are not shown on Linux with Wayland

2024-12-13 Thread Alexey Ivanov
On Fri, 13 Dec 2024 04:16:06 GMT, Alexander Zvegintsev wrote: > The previous [JDK-8319103](https://bugs.openjdk.org/browse/JDK-8319103) fix > was not complete. > > The case where a menu item with a focusable component was not a direct child > of a window was missing(failing the `if (window ==

Re: Where to submit a bug to A11Y and AWT for people to take a look at?

2024-12-11 Thread Alexey Ivanov
Hi Phil, Both JDK-8342869 and JDK-8342870 [1][2] which correspond to the PRs have subcomponent set to javax.accessibility, which is correct. Do you mean that these bugs need to be assigned to someone from clientlibs? In Oracle? Do you mean Julian needs to submit new bugs and leave them unas

Re: RFR: 8345876: Update nativeAddAtIndex comment to match the code [v2]

2024-12-11 Thread Alexey Ivanov
On Wed, 11 Dec 2024 09:13:06 GMT, Saagar Jha wrote: >> 8345876: Update nativeAddAtIndex comment to match the code > > Saagar Jha has updated the pull request with a new target base due to a merge > or a rebase. The incremental webrev excludes the unrelated changes brought in > by the merge/reba

Re: RFR: 8345876: Update nativeAddAtIndex comment to match the code [v2]

2024-12-11 Thread Alexey Ivanov
On Wed, 11 Dec 2024 09:13:48 GMT, Saagar Jha wrote: > Oops I guess I wasn't supposed to rebase on top of master. Sorry :( You must never use `git rebase` for a branch being reviewed. All your commits get new hashes as the result of the rebase operation, therefore all the comments become orphan

Re: RFR: 8345876: Update nativeAddAtIndex comment to match the code

2024-12-10 Thread Alexey Ivanov
On Sat, 7 Dec 2024 04:41:01 GMT, Saagar Jha wrote: > 8345876: Update nativeAddAtIndex comment to match the code Marked as reviewed by aivanov (Reviewer). src/java.desktop/macosx/native/libawt_lwawt/awt/CMenuBar.m line 1: > 1: /* Please update the copyright line: - * Copyright (c) 2011, 2018

Re: RFR: 8345616: Unnecessary Hashtable usage in javax.swing.text.html.parser.Element

2024-12-06 Thread Alexey Ivanov
On Fri, 1 Nov 2024 13:32:07 GMT, Andrey Turbanov wrote: > The Hashtable `javax.swing.text.html.parser.Element#contentTypes` is > initialized only within `` block. > We can replace it with immutable map to avoid Hashtable `synchronized` > overhead. Marked as reviewed by aivanov (Reviewer). ---

Re: RFR: 8334581: Remove no-arg constructor BasicSliderUI()

2024-12-06 Thread Alexey Ivanov
On Fri, 6 Dec 2024 06:37:28 GMT, Prasanta Sadhukhan wrote: > The no-arg constructor BasicSliderUI() was added accidentally. It should be > removed. > > [JDK-8334580](https://bugs.openjdk.org/browse/JDK-8334580) deprecates the > BasicSliderUI() constructor, and this follow-up is to remove the

Re: RFR: 8345398: Avoid redundant Properties.containsKey call in Cursor.getSystemCustomCursor [v2]

2024-12-04 Thread Alexey Ivanov
On Wed, 4 Dec 2024 14:51:14 GMT, Andrey Turbanov wrote: >> `Properties` doesn't allow `null` values. >> We can replace containsKey+getProperty with getProperty+null check. >> It's clearer and a bit faster. > > Andrey Turbanov has updated the pull request incrementally with one > additional commi

Integrated: 8340580: Characters in Document diagrams not in the middle

2024-12-04 Thread Alexey Ivanov
On Wed, 4 Dec 2024 15:40:31 GMT, Alexey Ivanov wrote: > This is a continuation to #20376, it moves the text in > `Document-{insert,remove}.svg` down by 0.5 pixel. > > This change makes the text centred in the boxes. > > Here are quotes from > https://github.com/o

RFR: 8340580: Characters in Document diagrams not in the middle

2024-12-04 Thread Alexey Ivanov
This is a continuation to #20376, it moves the text in `Document-{insert,remove}.svg` down by 0.5 pixel. This change makes the text centred in the boxes. Here are quotes from https://github.com/openjdk/jdk/pull/20376#issuecomment-2353728939 and https://github.com/openjdk/jdk/pull/20376#issueco

Integrated: 8341982: Simplify JButton/bug4323121.java

2024-12-04 Thread Alexey Ivanov
On Fri, 11 Oct 2024 18:20:52 GMT, Alexey Ivanov wrote: > The test `javax/swing/JButton/bug4323121.java` contains lots of unused > methods. > > I removed all the unused methods by extending `MouseAdapter`. > > I use `CountDownLatch` to synchronise actions in the test. &

Re: RFR: 8345398: Avoid redundant Properties.containsKey call in Cursor.getSystemCustomCursor

2024-12-04 Thread Alexey Ivanov
On Tue, 3 Dec 2024 18:02:45 GMT, Andrey Turbanov wrote: >> src/java.desktop/share/classes/java/awt/Cursor.java line 303: >> >>> 301: String key= prefix + DOT_FILE_SUFFIX; >>> 302: >>> 303: String fileName = >>> systemCustomCursorProperties.getProperty(key); >> >> Y

Re: RFR: 8345398: Avoid redundant Properties.containsKey call in Cursor.getSystemCustomCursor

2024-12-04 Thread Alexey Ivanov
On Fri, 1 Nov 2024 13:08:54 GMT, Andrey Turbanov wrote: > `Properties` doesn't allow `null` values. > We can replace containsKey+getProperty with getProperty+null check. > It's clearer and a bit faster. Anyway, it looks good to me. Messing around with `final` doesn't bring much value. However,

Re: RFR: 8324491: Keyboard layout did not keep it state if it was changed when dialog is active

2024-12-03 Thread Alexey Ivanov
On Wed, 27 Nov 2024 12:47:29 GMT, Dmitry Markov wrote: > If AWT/Swing app displays several windows and an user changes the keyboard > layout and then closes the focused window, the app does not keep the keyboard > layout changes. > > It is necessary to sync currentLocale and Windows keyboard l

Re: RFR: 8345398: Avoid redundant Properties.containsKey call in Cursor.getSystemCustomCursor

2024-12-03 Thread Alexey Ivanov
On Fri, 1 Nov 2024 13:08:54 GMT, Andrey Turbanov wrote: > `Properties` doesn't allow `null` values. > We can replace containsKey+getProperty with getProperty+null check. > It's clearer and a bit faster. src/java.desktop/share/classes/java/awt/Cursor.java line 303: > 301: String key

Integrated: 8337287: Update image in javax.swing.text.Document.insert

2024-12-03 Thread Alexey Ivanov
On Mon, 29 Jul 2024 13:43:42 GMT, Alexey Ivanov wrote: > This changeset updates the image in the documentation for the > `Document.insert` method. The image in `Document.remove` was updated by > [JDK-4622866](https://bugs.openjdk.org/browse/JDK-4622866) in PR #15701. > > Now t

Integrated: 8342602: Remove JButton/PressedButtonRightClickTest test

2024-12-03 Thread Alexey Ivanov
On Fri, 18 Oct 2024 16:41:43 GMT, Alexey Ivanov wrote: > The `javax/swing/JButton/PressedButtonRightClickTest.java` test that was > added by [JDK-8049069](https://bugs.openjdk.org/browse/JDK-8049069) fully > duplicates an existing test `javax/swing/JButton/bug4490179.java`. > &g

Re: RFR: 8343418: Unnecessary Hashtable usage in CSS.htmlAttrToCssAttrMap [v4]

2024-12-02 Thread Alexey Ivanov
On Tue, 12 Nov 2024 20:28:55 GMT, Andrey Turbanov wrote: >> If a thread-safe implementation is not needed, it is recommended to use >> HashMap instead of legacy synchronized Hashtable. >> Map `CSS.htmlAttrToCssAttrMap` is modified only within static initialization >> block and then only `get`

Re: RFR: 8341982: Simplify JButton/bug4323121.java [v8]

2024-12-02 Thread Alexey Ivanov
On Fri, 18 Oct 2024 22:36:33 GMT, Sergey Bylokhov wrote: >> This test follows the same pattern that I used in >> https://github.com/openjdk/jdk/pull/21474: >> >> https://github.com/openjdk/jdk/pull/21474/files#diff-2a8cee50408407d7e24de4cb85f0921cfc5db7c215d3b29cf101a4050323e9a9R92 > >> To ensu

Re: RFR: 8339524: Clean up a few ExtendedRobot tests [v9]

2024-11-22 Thread Alexey Ivanov
On Tue, 19 Nov 2024 21:35:25 GMT, Alisen Chung wrote: >> Cleaning up tests building ExtendedRobot that shouldn't be. > > Alisen Chung has updated the pull request incrementally with one additional > commit since the last revision: > > fix imports Looks good to me except for adding `robot.del

Re: RFR: 8343977: Convert java/awt/TextArea/TextAreaCursorTest/HoveringAndDraggingTest to main [v2]

2024-11-22 Thread Alexey Ivanov
On Thu, 21 Nov 2024 17:47:34 GMT, Damon Nguyen wrote: >> I didn't get? > > Usually an empty newline at the end is used. If I get @DamonGuy correctly, all the files are supposed to end with a blank line, more accurately with `\n` LF character. If the file doesn't, Git and `diff` display a warni

Re: RFR: 8343977: Convert java/awt/TextArea/TextAreaCursorTest/HoveringAndDraggingTest to main [v3]

2024-11-22 Thread Alexey Ivanov
On Tue, 19 Nov 2024 05:34:20 GMT, Tejesh R wrote: >> The test is supposed to be problem listed on macos & Linux but the Problem >> list points to the .java file instead of the .html file. >> Hence converting >> java/awt/TextArea/TextAreaCursorTest/HoveringAndDraggingTest to main which >> would

Re: RFR: 8338571: [TestBug] DefaultCloseOperation.java test not working as expected wrt instruction after JDK-8325851 fix

2024-11-20 Thread Alexey Ivanov
On Wed, 18 Sep 2024 13:23:32 GMT, Sharath TN wrote: > Fixed test and fix is working fine. > > Fix > testUI(DefaultCloseOperation::createUI) will create PassfailJFrame test > windows when test starts. > > PassFailJFrame.addTestWindow(testFrame); > PassFailJFrame.addTestWindow(testDialog); > >

Re: RFR: 8344060: Remove doPrivileged calls from shared implementation code in the java.desktop module : part 1 [v6]

2024-11-20 Thread Alexey Ivanov
On Wed, 20 Nov 2024 04:18:53 GMT, Prasanta Sadhukhan wrote: >> Since JEP 486 : Permanently Disable the Security Manager >> [https://bugs.openjdk.org/browse/JDK-8338625] is now integrated, calls to >> java.security.AccessController.doPrivileged are obsolete and can be removed. >> >> This PR tak

Integrated: 8342508: Use latch in BasicMenuUI/bug4983388.java instead of delay

2024-11-19 Thread Alexey Ivanov
On Fri, 18 Oct 2024 15:12:06 GMT, Alexey Ivanov wrote: > Use a `CountDownLatch` in > `javax/swing/plaf/basic/BasicMenuUI/4983388/bug4983388.java` instead of delay. > > The latch provides a direct way to synchronise EDT and main thread, the test > will finish quicker. > &

Re: RFR: 8344061: Remove doPrivileged calls from shared implementation code in the java.desktop module : part 2 [v4]

2024-11-19 Thread Alexey Ivanov
On Mon, 18 Nov 2024 22:41:19 GMT, Phil Race wrote: >> Update 21 desktop module shared implementation files to remove doPrivileged. >> All the usual tests still pass. > > Phil Race has updated the pull request incrementally with one additional > commit since the last revision: > > v Marked as

Re: RFR: 8344060: Remove doPrivileged calls from shared implementation code in the java.desktop module : part 1 [v5]

2024-11-19 Thread Alexey Ivanov
On Tue, 19 Nov 2024 03:20:21 GMT, Prasanta Sadhukhan wrote: >> Since JEP 486 : Permanently Disable the Security Manager >> [https://bugs.openjdk.org/browse/JDK-8338625] is now integrated, calls to >> java.security.AccessController.doPrivileged are obsolete and can be removed. >> >> This PR tak

Re: RFR: JDK-8344058 : Remove doPrivileged calls from macos platform sources in the java.desktop module

2024-11-18 Thread Alexey Ivanov
On Fri, 15 Nov 2024 18:45:11 GMT, Harshitha Onkar wrote: > Post JEP-486 (Permanently Disable the Security Manager) cleanup. > Calls to java.security.AccessController.doPrivileged are obsolete thus > removed in this PR. > > This PR addresses removal of AccessController.doPrivileged() calls from

Re: RFR: 8344059: Remove doPrivileged calls from windows platform sources in the java.desktop module [v7]

2024-11-18 Thread Alexey Ivanov
On Mon, 18 Nov 2024 20:02:07 GMT, Phil Race wrote: >> src/java.desktop/windows/classes/sun/awt/windows/WPathGraphics.java line 102: >> >>> 100: >>> 101: if (textLayoutStr != null) { >>> 102: useGDITextLayout = Boolean.getBoolean(textLayoutStr); >> >> This line seems wrong:

Re: RFR: 8343977: Convert java/awt/TextArea/TextAreaCursorTest/HoveringAndDraggingTest to main [v2]

2024-11-18 Thread Alexey Ivanov
On Mon, 18 Nov 2024 17:30:38 GMT, Damon Nguyen wrote: >> Tejesh R has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Instructions modified for macosx > > test/jdk/java/awt/TextArea/TextAreaCursorTest/HoveringAndDraggingTest.java > line 52:

Re: RFR: 8339524: Clean up a few ExtendedRobot tests [v6]

2024-11-18 Thread Alexey Ivanov
On Fri, 15 Nov 2024 21:04:10 GMT, Harshitha Onkar wrote: >> Alisen Chung has updated the pull request incrementally with two additional >> commits since the last revision: >> >> - EOF newline ActionEventTest >> - revert ActionEventTest > > test/jdk/javax/swing/JInternalFrame/6725409/bug672540

Re: RFR: 8339524: Clean up a few ExtendedRobot tests [v8]

2024-11-18 Thread Alexey Ivanov
On Mon, 18 Nov 2024 19:44:01 GMT, Alisen Chung wrote: >> Cleaning up tests building ExtendedRobot that shouldn't be. > > Alisen Chung has updated the pull request incrementally with one additional > commit since the last revision: > > import to avoid full qualified names Changes requested by

Re: RFR: 8344060: Remove doPrivileged calls from shared implementation code in the java.desktop module : part 1 [v4]

2024-11-18 Thread Alexey Ivanov
On Mon, 18 Nov 2024 03:09:13 GMT, Prasanta Sadhukhan wrote: >> Since JEP 486 : Permanently Disable the Security Manager >> [https://bugs.openjdk.org/browse/JDK-8338625] is now integrated, calls to >> java.security.AccessController.doPrivileged are obsolete and can be removed. >> >> This PR tak

Re: RFR: 8344061: Remove doPrivileged calls from shared implementation code in the java.desktop module : part 2 [v3]

2024-11-18 Thread Alexey Ivanov
On Sun, 17 Nov 2024 20:59:29 GMT, Phil Race wrote: >> Update 21 desktop module shared implementation files to remove doPrivileged. >> All the usual tests still pass. > > Phil Race has updated the pull request incrementally with one additional > commit since the last revision: > > 8344061 Cha

Re: RFR: 8344059: Remove doPrivileged calls from windows platform sources in the java.desktop module [v7]

2024-11-18 Thread Alexey Ivanov
On Sun, 17 Nov 2024 06:50:30 GMT, Prasanta Sadhukhan wrote: >> Since JEP 486 : Permanently Disable the Security Manager >> [https://bugs.openjdk.org/browse/JDK-8338625] is now integrated, calls to >> java.security.AccessController.doPrivileged are obsolete and can be removed. >> >> This PR ta

Re: RFR: 8339524: Clean up a few ExtendedRobot tests [v2]

2024-11-14 Thread Alexey Ivanov
On Thu, 14 Nov 2024 19:15:05 GMT, Alisen Chung wrote: > > > I will migrate some ExtendedRobot methods to Robot > > > > > > Are you saying you'll add _new public_ methods to `java.awt.Robot`? > > Yes, I will be adding new public methods to Robot in this PR #20846 You referenced this same PR.

Re: RFR: JDK-8343219 : Manual clientlibs test failures after SM removal

2024-11-13 Thread Alexey Ivanov
On Wed, 13 Nov 2024 00:42:45 GMT, Harshitha Onkar wrote: > Following tests are deleted as part of post-SM Removal (JEP 486) cleanup. > > 1. java/awt/print/PrinterJob/CheckPrivilege.java - Deleted. The test is to > verify if printing code does necessary doPrivilege() calls when SM is > installe

Re: RFR: 8342098: Write a test to compare the images [v8]

2024-11-13 Thread Alexey Ivanov
On Wed, 13 Nov 2024 09:48:14 GMT, Naveen Narayanan wrote: >> This testcase checks for the following: >> >> 1. An image is drawn on the screen and a portion of it is captured using a >> Robot. It is tested by comparing whether the captured image is same as the >> source image. >> >> Testing:

Re: RFR: 8342098: Write a test to compare the images [v6]

2024-11-13 Thread Alexey Ivanov
On Wed, 13 Nov 2024 13:03:18 GMT, Naveen Narayanan wrote: > I do agree, > This looks more readable. > Just kept it as the finishing changes since existing code formatter in IDE > will auto wrap it again. > This change we do manually & avoid Java Code Style Formatter. It depends on your ID

Re: RFR: 8342098: Write a test to compare the images [v2]

2024-11-13 Thread Alexey Ivanov
On Wed, 13 Nov 2024 14:29:25 GMT, Naveen Narayanan wrote: > > The test passes with 100% scale, but fails with 200% scaling. I see the > > captured image is slightly blurred at letter edges. Is this related to > > color profile ? > > Yes No, it is not related to color profile at all—it's relat

Re: RFR: 8342098: Write a test to compare the images [v6]

2024-11-12 Thread Alexey Ivanov
On Wed, 30 Oct 2024 14:53:43 GMT, Alexey Ivanov wrote: >> Naveen Narayanan has updated the pull request incrementally with one >> additional commit since the last revision: >> >> 8342098: Updated review comments > > test/jdk/java/awt/Robot/ScreenCaptureRo

Re: RFR: 8342098: Write a test to compare the images [v7]

2024-11-12 Thread Alexey Ivanov
On Thu, 31 Oct 2024 15:45:59 GMT, Naveen Narayanan wrote: >> This testcase checks for the following: >> >> 1. An image is drawn on the screen and a portion of it is captured using a >> Robot. It is tested by comparing whether the captured image is same as the >> source image. >> >> Testing:

Re: RFR: 8338411: Implement JEP 486: Permanently Disable the Security Manager [v11]

2024-11-12 Thread Alexey Ivanov
On Tue, 12 Nov 2024 14:44:55 GMT, Sean Mullan wrote: >> This is the implementation of JEP 486: Permanently Disable the Security >> Manager. See [JEP 486](https://openjdk.org/jeps/486) for more details. The >> [CSR](https://bugs.openjdk.org/browse/JDK-8338412) describes in detail the >> main ch

Re: RFR: 8338411: Implement JEP 486: Permanently Disable the Security Manager [v11]

2024-11-12 Thread Alexey Ivanov
On Tue, 12 Nov 2024 15:02:12 GMT, Sean Mullan wrote: >> I can add it back if it is more convenient and readable to have the `@see` >> tag. > > This can be taken care of later after integration. Agreed! - PR Review Comment: https://git.openjdk.org/jdk/pull/21498#discussion_r1838282

Re: RFR: 8343418: Unnecessary Hashtable usage in CSS.htmlAttrToCssAttrMap [v3]

2024-11-12 Thread Alexey Ivanov
On Wed, 6 Nov 2024 06:40:52 GMT, Andrey Turbanov wrote: >> If a thread-safe implementation is not needed, it is recommended to use >> HashMap instead of legacy synchronized Hashtable. >> Map `CSS.htmlAttrToCssAttrMap` is modified only within static initialization >> block and then only `get` m

Re: RFR: 8342541: Exclude List/KeyEventsTest/KeyEventsTest.java from running on macOS [v3]

2024-11-12 Thread Alexey Ivanov
On Tue, 12 Nov 2024 05:07:51 GMT, Renjith Kannath Pariyangad wrote: >> Hi Reviewers, >> >> I have added the test tag **@requires os.family != "mac"** and updated >> section with new format. >> Removed OSX check condition form the code. >> >> Please review and let me know your suggestions if

Re: RFR: 8338411: Implement JEP 486: Permanently Disable the Security Manager [v3]

2024-11-11 Thread Alexey Ivanov
On Fri, 8 Nov 2024 21:01:57 GMT, Phil Race wrote: >>> I'd not looked at this test before but when I do the thing I noticed is >>> that createPrivateValue is no longer used. But I don't see a problem with >>> keeping the rest of the test. >> >> @prrace Do I understand correctly that _“`createPr

Re: RFR: 8338411: Implement JEP 486: Permanently Disable the Security Manager [v9]

2024-11-08 Thread Alexey Ivanov
On Tue, 29 Oct 2024 17:06:08 GMT, Harshitha Onkar wrote: >> src/java.desktop/share/classes/java/awt/MouseInfo.java line 68: >> >>> 66: * @throws SecurityException if a security manager exists and its >>> 67: *{@code checkPermission} method doesn't allow the >>> operation >

Re: RFR: 8277240: java/awt/Graphics2D/ScaledTransform/ScaledTransform.java dialog does not get disposed [v2]

2024-11-08 Thread Alexey Ivanov
On Thu, 7 Nov 2024 22:14:13 GMT, Phil Race wrote: >> This test has had reports of failures over the years notably on Linux. >> I think the large number of XVisuals may have something to do with it. >> I've updated it quite a bit and limited the number of dialogs it creates - >> we really don't n

Re: RFR: 8283664: Remove jtreg tag manual=yesno for java/awt/print/PrinterJob/PrintTextTest.java [v7]

2024-11-07 Thread Alexey Ivanov
On Thu, 7 Nov 2024 17:49:22 GMT, Daniel Gredler wrote: >> There are multiple issue with this test case >> 1) Parser error due to yesno in @run main/manual=yesno >> 2) User can only compare the UI rendering and compare with the print out. >> User can't mark the test as pass or fail due to pass or

Re: RFR: 8283664: Remove jtreg tag manual=yesno for java/awt/print/PrinterJob/PrintTextTest.java [v6]

2024-11-07 Thread Alexey Ivanov
On Thu, 7 Nov 2024 00:22:05 GMT, Daniel Gredler wrote: >> There are multiple issue with this test case >> 1) Parser error due to yesno in @run main/manual=yesno >> 2) User can only compare the UI rendering and compare with the print out. >> User can't mark the test as pass or fail due to pass or

Re: RFR: 8283664: Remove jtreg tag manual=yesno for java/awt/print/PrinterJob/PrintTextTest.java [v5]

2024-11-07 Thread Alexey Ivanov
On Thu, 7 Nov 2024 16:59:01 GMT, Daniel Gredler wrote: > This last whitespace feedback came through after the bug was marked as ready > for integration, and it looks like the fix then triggered a requirement for > re-reviews in the system. Any change except for clean merging with master requir

Re: RFR: 8283664: Remove jtreg tag manual=yesno for java/awt/print/PrinterJob/PrintTextTest.java [v6]

2024-11-07 Thread Alexey Ivanov
On Thu, 7 Nov 2024 00:22:05 GMT, Daniel Gredler wrote: >> There are multiple issue with this test case >> 1) Parser error due to yesno in @run main/manual=yesno >> 2) User can only compare the UI rendering and compare with the print out. >> User can't mark the test as pass or fail due to pass or

Re: RFR: 8283664: Remove jtreg tag manual=yesno for java/awt/print/PrinterJob/PrintTextTest.java [v5]

2024-11-07 Thread Alexey Ivanov
On Thu, 7 Nov 2024 00:19:03 GMT, Daniel Gredler wrote: >> test/jdk/java/awt/print/PrinterJob/PrintTextTest.java line 289: >> >>> 287: Graphics2D g2d = (Graphics2D)g; >>> 288: g2d.translate(pf.getImageableX(), pf.getImageableY()); >>> 289: g.drawString(page+"

Re: RFR: 8277240: java/awt/Graphics2D/ScaledTransform/ScaledTransform.java dialog does not get disposed

2024-11-07 Thread Alexey Ivanov
On Wed, 6 Nov 2024 23:59:24 GMT, Phil Race wrote: > This test has had reports of failures over the years notably on Linux. > I think the large number of XVisuals may have something to do with it. > I've updated it quite a bit and limited the number of dialogs it creates - we > really don't need

Re: RFR: 8342602: Remove JButton/PressedButtonRightClickTest test [v2]

2024-11-06 Thread Alexey Ivanov
s, I'm removing `PressedButtonRightClickTest.java`. Alexey Ivanov has updated the pull request with a new target base due to a merge or a rebase. The incremental webrev excludes the unrelated changes brought in by the merge/rebase. The pull request contains two additional commits since the last revision: - Merge maste

<    1   2   3   4   5   6   7   8   9   10   >