Re: RFR: 8356594: JSplitPane loses divider location when reopened via JOptionPane.createDialog() [v2]

2025-05-19 Thread Prasanta Sadhukhan
On Tue, 20 May 2025 00:08:45 GMT, Sergey Bylokhov wrote: >> test/jdk/javax/swing/JSplitPane/TestSplitPaneResetDividerLoc.java line 71: >> >>> 69: point = openDialogButton.getLocationOnScreen(); >>> 70: }); >>> 71: robot.mouseMove(point.x, point.y); >> >>

Re: RFR: 8356594: JSplitPane loses divider location when reopened via JOptionPane.createDialog() [v2]

2025-05-19 Thread Prasanta Sadhukhan
> The issue is when a JSplitPane is embedded inside a lazily-initialized panel, > and this panel is displayed using a dialog created via > JOptionPane.createDialog(), the divider location is not preserved when > reopening the dialog. > This is because when we added support for ComponentOrientat

Re: RFR: 8356145: ListEnterExitTest.java fails on macos

2025-05-19 Thread Abhishek Kumar
On Tue, 20 May 2025 04:12:59 GMT, Abhishek Kumar wrote: >> test/jdk/java/awt/List/ListEnterExitTest.java line 90: >> >>> 88: robot.waitForIdle(); >>> 89: robot.delay(100); >>> 90: >> >> I don't really understand why `waitForIdle` and `delay` are needed here at >> all.

Re: RFR: 8356145: ListEnterExitTest.java fails on macos

2025-05-19 Thread Abhishek Kumar
On Mon, 19 May 2025 12:12:22 GMT, Alexey Ivanov wrote: >> Test was failing on macOS 14.7.1 system in CI pipeline. Logged output >> suggests that the mouse exit event is not triggered and thus the test fails. >> Increased number of list items and adjusted the X and Y offset for mouse >> move eve

Re: RFR: 8357226: Remove unnecessary List.indexOf from RepaintManager.removeInvalidComponent

2025-05-19 Thread Sergey Bylokhov
On Mon, 19 May 2025 12:35:13 GMT, Alexey Ivanov wrote: >> ok, then it is fine as is. > > Yet there could be a logical error anyway… `addInvalidComponent` uses > identity comparison when adding a component but `removeInvalidComponent` > relies on `equals` method to remove a component. > > If a

Re: RFR: 8357224: Avoid redundant WeakHashMap.get in Toolkit.removeAWTEventListener

2025-05-19 Thread Sergey Bylokhov
On Wed, 16 Apr 2025 15:07:36 GMT, Andrey Turbanov wrote: > Instead of separate `.get`+`.remove` calls we can call `.remove` and then > compare result with `null` Marked as reviewed by serb (Reviewer). - PR Review: https://git.openjdk.org/jdk/pull/24692#pullrequestreview-2852324895

Re: RFR: 8351907: [XWayland] [OL10] Robot.mousePress() is delivered to wrong place [v3]

2025-05-19 Thread Harshitha Onkar
On Mon, 19 May 2025 23:06:39 GMT, Alexander Zvegintsev wrote: >> The issue is the inability to move the mouse cursor using `java.awt.Robot` >> on Oracle Linux 10 (which has not yet been released). FIY, the OL10 is no >> longer provides an Xorg session, so only Wayland is available. >> It is a

Re: RFR: 8356594: JSplitPane loses divider location when reopened via JOptionPane.createDialog()

2025-05-19 Thread Sergey Bylokhov
On Tue, 20 May 2025 00:08:05 GMT, Sergey Bylokhov wrote: >> The issue is when a JSplitPane is embedded inside a lazily-initialized >> panel, and this panel is displayed using a dialog created via >> JOptionPane.createDialog(), the divider location is not preserved when >> reopening the dialog.

Re: RFR: 8356594: JSplitPane loses divider location when reopened via JOptionPane.createDialog()

2025-05-19 Thread Sergey Bylokhov
On Mon, 19 May 2025 06:06:17 GMT, Prasanta Sadhukhan wrote: > The issue is when a JSplitPane is embedded inside a lazily-initialized panel, > and this panel is displayed using a dialog created via > JOptionPane.createDialog(), the divider location is not preserved when > reopening the dialog.

Integrated: 8355078: java.awt.Color.createContext() uses unnecessary synchronization

2025-05-19 Thread Sergey Bylokhov
On Sun, 20 Apr 2025 08:15:38 GMT, Sergey Bylokhov wrote: > At some point, java.awt.Color.createContext() was marked as synchronized to > support caching of a ColorPaintContext instance. The cache was later removed, > but the synchronized modifier remained. Since there is no shared mutable > st

Re: RFR: 8351907: [XWayland] [OL10] Robot.mousePress() is delivered to wrong place [v2]

2025-05-19 Thread Sergey Bylokhov
On Mon, 19 May 2025 06:17:27 GMT, Alexander Zvegintsev wrote: > I'm not sure if it's really needed, since many tests already depend on the > `java.awt.Robot` itself, CI has a one-time manual task to set up all the > required permissions for the `java.awt.Robot`, so automated tests provide > s

Re: RFR: 8351907: [XWayland] [OL10] Robot.mousePress() is delivered to wrong place [v2]

2025-05-19 Thread Alexander Zvegintsev
On Fri, 16 May 2025 20:45:39 GMT, Alexander Zvegintsev wrote: >> The issue is the inability to move the mouse cursor using `java.awt.Robot` >> on Oracle Linux 10 (which has not yet been released). FIY, the OL10 is no >> longer provides an Xorg session, so only Wayland is available. >> It is a

Re: RFR: 8351907: [XWayland] [OL10] Robot.mousePress() is delivered to wrong place [v3]

2025-05-19 Thread Alexander Zvegintsev
> The issue is the inability to move the mouse cursor using `java.awt.Robot` on > Oracle Linux 10 (which has not yet been released). FIY, the OL10 is no longer > provides an Xorg session, so only Wayland is available. > It is a JCK conformance failure. > > --- > > In our robot implementation,

Re: RFR: 8356594: JSplitPane loses divider location when reopened via JOptionPane.createDialog()

2025-05-19 Thread Alexander Zuev
On Mon, 19 May 2025 06:06:17 GMT, Prasanta Sadhukhan wrote: > The issue is when a JSplitPane is embedded inside a lazily-initialized panel, > and this panel is displayed using a dialog created via > JOptionPane.createDialog(), the divider location is not preserved when > reopening the dialog.

Integrated: 8356844: Missing @Serial annotation for sun.print.CustomOutputBin#serialVersionUID

2025-05-19 Thread Sergey Bylokhov
On Tue, 13 May 2025 08:19:36 GMT, Sergey Bylokhov wrote: > The serialVersionUID field in sun.print.CustomOutputBin is missing the > `@Serial` annotation. This is the only one missing usage of `@Serial` in the > java.desktop module. The class was introduced in > [JDK-8314070](https://bugs.openj

Re: RFR: 8356844: Missing @Serial annotation for sun.print.CustomOutputBin#serialVersionUID [v3]

2025-05-19 Thread Sergey Bylokhov
> The serialVersionUID field in sun.print.CustomOutputBin is missing the > `@Serial` annotation. This is the only one missing usage of `@Serial` in the > java.desktop module. The class was introduced in > [JDK-8314070](https://bugs.openjdk.org/browse/JDK-8314070), after the > `@Serial` annotati

Re: RFR: 8351907: [XWayland] [OL10] Robot.mousePress() is delivered to wrong place [v2]

2025-05-19 Thread Phil Race
On Fri, 16 May 2025 20:45:39 GMT, Alexander Zvegintsev wrote: >> The issue is the inability to move the mouse cursor using `java.awt.Robot` >> on Oracle Linux 10 (which has not yet been released). FIY, the OL10 is no >> longer provides an Xorg session, so only Wayland is available. >> It is a

Re: RFR: 8356844: Missing @Serial annotation for sun.print.CustomOutputBin#serialVersionUID [v2]

2025-05-19 Thread Alexey Ivanov
On Tue, 13 May 2025 20:35:36 GMT, Sergey Bylokhov wrote: >> The serialVersionUID field in sun.print.CustomOutputBin is missing the >> `@Serial` annotation. This is the only one missing usage of `@Serial` in the >> java.desktop module. The class was introduced in >> [JDK-8314070](https://bugs.o

Re: RFR: 8357226: Remove unnecessary List.indexOf from RepaintManager.removeInvalidComponent

2025-05-19 Thread Sergey Bylokhov
On Thu, 24 Apr 2025 09:29:24 GMT, Andrey Turbanov wrote: > No need to call `List.indexOf(Object)` before `List.remove(int)`. Instead we > can call `List.remove(Object)` directly. It's faster and cleaner. > `invalidComponents` is an ArrayList. src/java.desktop/share/classes/javax/swing/RepaintMa

Re: RFR: 8139228: JFileChooser renders file names as HTML document [v2]

2025-05-19 Thread Tejesh R
On Fri, 16 May 2025 19:24:36 GMT, Alexey Ivanov wrote: >> Tejesh R 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 three additional commits >> s

Re: RFR: 8355515: Clarify the purpose of forcePass() and forceFail() methods

2025-05-19 Thread Alexey Ivanov
On Sun, 18 May 2025 13:16:47 GMT, Manukumar V S wrote: >> After reading the description again, I started to wonder which adverb suits >> better: [‘forcibly’](https://en.wiktionary.org/wiki/forcibly) or >> [‘forcefully’](https://en.wiktionary.org/wiki/forcefully). Does any native >> English spe

Re: RFR: 8139228: JFileChooser renders file names as HTML document [v3]

2025-05-19 Thread Tejesh R
> The rendering of the directory names are handled as JLabel w.r.t Look and > feel and also either Details/List view. Though FilePane creates basic > rendering for these two few Look and Feel define their own renderers and also > ComboBox Directory directory name view. Since HTML filtering is no

Re: RFR: 8355515: Clarify the purpose of forcePass() and forceFail() methods [v3]

2025-05-19 Thread Alexey Ivanov
On Mon, 19 May 2025 12:57:43 GMT, Manukumar V S wrote: >> Clarified the purpose of forcePass() and forceFail() methods and recommended >> usage of these methods. >> >> forcePass() contained an incorrect sample; it's addressed by >> [JDK-8355441](https://bugs.openjdk.org/browse/JDK-8355441). >>

Re: RFR: 8355515: Clarify the purpose of forcePass() and forceFail() methods [v3]

2025-05-19 Thread Alexey Ivanov
On Mon, 19 May 2025 12:57:43 GMT, Manukumar V S wrote: >> Clarified the purpose of forcePass() and forceFail() methods and recommended >> usage of these methods. >> >> forcePass() contained an incorrect sample; it's addressed by >> [JDK-8355441](https://bugs.openjdk.org/browse/JDK-8355441). >>

Re: RFR: 8357176: java.awt javadoc code examples still use Applet API

2025-05-19 Thread Alexey Ivanov
On Fri, 16 May 2025 23:04:28 GMT, Phil Race wrote: > Update the some code examples and accompanying images to no longer mention or > display as applets. src/java.desktop/share/classes/java/awt/GridBagLayout.java line 243: > 241: * right-to-left container. > 242: * > 243: * Is it possible

Re: RFR: 8355515: Clarify the purpose of forcePass() and forceFail() methods [v3]

2025-05-19 Thread duke
On Mon, 19 May 2025 12:57:43 GMT, Manukumar V S wrote: >> Clarified the purpose of forcePass() and forceFail() methods and recommended >> usage of these methods. >> >> forcePass() contained an incorrect sample; it's addressed by >> [JDK-8355441](https://bugs.openjdk.org/browse/JDK-8355441). >>

Re: RFR: 8357176: java.awt javadoc code examples still use Applet API

2025-05-19 Thread Alexey Ivanov
On Mon, 19 May 2025 00:04:33 GMT, Sergey Bylokhov wrote: > It seems the new screenshots could be improved by capturing them on a HiDPI > (Retina) display, as the current images appear blurry. And to eliminate > background elements in the corners, it might be better to capture screenshots > of

RFR: 8357224: Avoid redundant WeakHashMap.get in Toolkit.removeAWTEventListener

2025-05-19 Thread Andrey Turbanov
Instead of separate `.get`+`.remove` calls we can call `.remove` and then compare result with `null` - Commit messages: - [PATCH] Avoid redundant WeakHashMap.get in Toolkit.removeAWTEventListener Changes: https://git.openjdk.org/jdk/pull/24692/files Webrev: https://webrevs.openjd

Re: RFR: 8355515: Clarify the purpose of forcePass() and forceFail() methods [v3]

2025-05-19 Thread Manukumar V S
> Clarified the purpose of forcePass() and forceFail() methods and recommended > usage of these methods. > > forcePass() contained an incorrect sample; it's addressed by > [JDK-8355441](https://bugs.openjdk.org/browse/JDK-8355441). > > The description of forceFail() has been expanded, too. > >

Re: RFR: 8357226: Remove unnecessary List.indexOf from RepaintManager.removeInvalidComponent

2025-05-19 Thread Alexey Ivanov
On Tue, 13 May 2025 00:47:09 GMT, Sergey Bylokhov wrote: >> Do you suggest to use `List.indexOf` instead of manual loop? >> https://github.com/openjdk/jdk/blob/375ac6d446332f0763ce294b200143ff63865cf6/src/java.desktop/share/classes/javax/swing/RepaintManager.java#L366-L371 >> >> This loop uses `

Re: RFR: 8356814: LineBreakMeasurer.nextLayout() slower than necessary when no break needed

2025-05-19 Thread Daniel Gredler
On Mon, 12 May 2025 20:35:52 GMT, Daniel Gredler wrote: > `LineBreakMeasurer.nextLayout()` calls `nextOffset()` internally to calculate > the layout limit. When this happens, a `GlyphVector` is created and the > layout engine is invoked to shape the text. The `GlyphVector` is cached in > the r

Re: RFR: 8357224: Avoid redundant WeakHashMap.get in Toolkit.removeAWTEventListener

2025-05-19 Thread Alexey Ivanov
On Mon, 19 May 2025 08:10:42 GMT, Andrey Turbanov wrote: >> src/java.desktop/share/classes/java/awt/Toolkit.java line 1745: >> >>> 1743: synchronized (this) { >>> 1744: SelectiveAWTEventListener selectiveListener = >>> 1745: listener2SelectiveListener.remove(l

Re: RFR: 8357224: Avoid redundant WeakHashMap.get in Toolkit.removeAWTEventListener

2025-05-19 Thread Alexey Ivanov
On Wed, 16 Apr 2025 15:07:36 GMT, Andrey Turbanov wrote: > Instead of separate `.get`+`.remove` calls we can call `.remove` and then > compare result with `null` Marked as reviewed by aivanov (Reviewer). - PR Review: https://git.openjdk.org/jdk/pull/24692#pullrequestreview-2850572

Re: RFR: 8356145: ListEnterExitTest.java fails on macos

2025-05-19 Thread Alexey Ivanov
On Mon, 19 May 2025 08:15:29 GMT, Abhishek Kumar wrote: > Test was failing on macOS 14.7.1 system in CI pipeline. Logged output > suggests that the mouse exit event is not triggered and thus the test fails. > Increased number of list items and adjusted the X and Y offset for mouse move > events

Integrated: 8356966: java/awt/Graphics2D/DrawString/IgnoredWhitespaceTest.java fails on Linux after JDK-8350203

2025-05-19 Thread Daniel Gredler
On Wed, 14 May 2025 17:45:54 GMT, Daniel Gredler wrote: > If the new test (`IgnoredWhitespaceTest`) runs on a system with Type1 > physical fonts, it fails because the Type1 handling of ignorable whitespace > characters does not match the behavior of the TrueType and macOS glyph > mappers. > >

Re: RFR: 8356145: ListEnterExitTest.java fails on macos

2025-05-19 Thread Jayathirth D V
On Mon, 19 May 2025 08:15:29 GMT, Abhishek Kumar wrote: > Test was failing on macOS 14.7.1 system in CI pipeline. Logged output > suggests that the mouse exit event is not triggered and thus the test fails. > Increased number of list items and adjusted the X and Y offset for mouse move > events

Re: RFR: 8355515: Clarify the purpose of forcePass() and forceFail() methods

2025-05-19 Thread Alexey Ivanov
On Sun, 18 May 2025 13:16:47 GMT, Manukumar V S wrote: > > After reading the description again, I started to wonder which adverb suits > > better: [‘forcibly’](https://en.wiktionary.org/wiki/forcibly) or > > [‘forcefully’](https://en.wiktionary.org/wiki/forcefully). Does any native > > English

Re: RFR: 8356145: ListEnterExitTest.java fails on macos

2025-05-19 Thread Abhishek Kumar
On Mon, 19 May 2025 08:15:29 GMT, Abhishek Kumar wrote: > Test was failing on macOS 14.7.1 system in CI pipeline. Logged output > suggests that the mouse exit event is not triggered and thus the test fails. > Increased number of list items and adjusted the X and Y offset for mouse move > events

Re: RFR: 8356966: java/awt/Graphics2D/DrawString/IgnoredWhitespaceTest.java fails on Linux after JDK-8350203 [v3]

2025-05-19 Thread duke
On Thu, 15 May 2025 17:20:06 GMT, Daniel Gredler wrote: >> If the new test (`IgnoredWhitespaceTest`) runs on a system with Type1 >> physical fonts, it fails because the Type1 handling of ignorable whitespace >> characters does not match the behavior of the TrueType and macOS glyph >> mappers.

Re: RFR: 8357226: Remove unnecessary List.indexOf from RepaintManager.removeInvalidComponent

2025-05-19 Thread Andrey Turbanov
On Wed, 30 Apr 2025 03:33:36 GMT, Sergey Bylokhov wrote: >> Simplified how? > > the loop over invalidComponents Do you suggest to use `List.indexOf` instead of manual loop? https://github.com/openjdk/jdk/blob/375ac6d446332f0763ce294b200143ff63865cf6/src/java.desktop/share/classes/javax/swing/Rep

Re: RFR: 8357226: Remove unnecessary List.indexOf from RepaintManager.removeInvalidComponent

2025-05-19 Thread Sergey Bylokhov
On Wed, 30 Apr 2025 07:23:06 GMT, Andrey Turbanov wrote: >> the loop over invalidComponents > > Do you suggest to use `List.indexOf` instead of manual loop? > https://github.com/openjdk/jdk/blob/375ac6d446332f0763ce294b200143ff63865cf6/src/java.desktop/share/classes/javax/swing/RepaintManager.jav

Re: RFR: 8357226: Remove unnecessary List.indexOf from RepaintManager.removeInvalidComponent

2025-05-19 Thread Sergey Bylokhov
On Tue, 29 Apr 2025 14:09:51 GMT, Andrey Turbanov wrote: >> src/java.desktop/share/classes/javax/swing/RepaintManager.java line 394: >> >>> 392: } >>> 393: if (invalidComponents != null) { >>> 394: invalidComponents.remove(component); >> >> I guess the `addInvalidCom

Re: RFR: 8357226: Remove unnecessary List.indexOf from RepaintManager.removeInvalidComponent

2025-05-19 Thread Andrey Turbanov
On Mon, 28 Apr 2025 23:48:04 GMT, Sergey Bylokhov wrote: >> No need to call `List.indexOf(Object)` before `List.remove(int)`. Instead we >> can call `List.remove(Object)` directly. It's faster and cleaner. >> `invalidComponents` is an ArrayList. > > src/java.desktop/share/classes/javax/swing/Rep

RFR: 8357226: Remove unnecessary List.indexOf from RepaintManager.removeInvalidComponent

2025-05-19 Thread Andrey Turbanov
No need to call `List.indexOf(Object)` before `List.remove(int)`. Instead we can call `List.remove(Object)` directly. It's faster and cleaner. `invalidComponents` is an ArrayList. - Commit messages: - [PATCH] Remove unnecessary List.indexOf key from RepaintManager.removeInvalidComp

Re: RFR: 8357224: Avoid redundant WeakHashMap.get in Toolkit.removeAWTEventListener

2025-05-19 Thread Sergey Bylokhov
On Wed, 16 Apr 2025 15:07:36 GMT, Andrey Turbanov wrote: > Instead of separate `.get`+`.remove` calls we can call `.remove` and then > compare result with `null` src/java.desktop/share/classes/java/awt/Toolkit.java line 1745: > 1743: synchronized (this) { > 1744: SelectiveA

RFR: 8356145: ListEnterExitTest.java fails on macos

2025-05-19 Thread Abhishek Kumar
Test was failing on macOS 14.7.1 system in CI pipeline. Logged output suggests that the mouse exit event is not triggered and thus the test fails. Increased number of list items and adjusted the X and Y offset for mouse move events, so the mouse pointer will be within the frame and added robot de

Re: RFR: 8357224: Avoid redundant WeakHashMap.get in Toolkit.removeAWTEventListener

2025-05-19 Thread Andrey Turbanov
On Wed, 14 May 2025 18:52:55 GMT, Sergey Bylokhov wrote: >> Instead of separate `.get`+`.remove` calls we can call `.remove` and then >> compare result with `null` > > src/java.desktop/share/classes/java/awt/Toolkit.java line 1745: > >> 1743: synchronized (this) { >> 1744: S

Re: RFR: 8357224: Avoid redundant WeakHashMap.get in Toolkit.removeAWTEventListener

2025-05-19 Thread Chen Liang
On Wed, 16 Apr 2025 15:07:36 GMT, Andrey Turbanov wrote: > Instead of separate `.get`+`.remove` calls we can call `.remove` and then > compare result with `null` Makes sense. This map is private, and its value is always non-null (only one other put site), so I believe things are fine here. Le

Integrated: 8356846: Remove unnecessary List.contains key from TIFFDirectory.removeTagSet

2025-05-19 Thread Andrey Turbanov
On Wed, 23 Apr 2025 08:38:17 GMT, Andrey Turbanov wrote: > There is no need to call List.contains before List.remove call. > `tagSets` - is an ArrayList. This pull request has now been integrated. Changeset: 2fb3329d Author:Andrey Turbanov URL: https://git.openjdk.org/jdk/commit/2fb