From dnguyen at openjdk.org Tue Apr 1 02:43:19 2025 From: dnguyen at openjdk.org (Damon Nguyen) Date: Tue, 1 Apr 2025 02:43:19 GMT Subject: RFR: 8353324: Clean up of comments and import after 8319192 In-Reply-To: References: Message-ID: On Mon, 31 Mar 2025 22:56:14 GMT, Phil Race wrote: > Somehow I did not commit these changes when fixing JDK-8319192 Confirmed that the code changes do not require importing URLClassLoader. Looks straightforward and safe to me. ------------- Marked as reviewed by dnguyen (Committer). PR Review: https://git.openjdk.org/jdk/pull/24339#pullrequestreview-2730944649 From dnguyen at openjdk.org Tue Apr 1 02:46:26 2025 From: dnguyen at openjdk.org (Damon Nguyen) Date: Tue, 1 Apr 2025 02:46:26 GMT Subject: RFR: 8288471: java/awt/ScrollPane/bug8077409Test.java is unstable and fails intermittently in CI In-Reply-To: References: Message-ID: On Fri, 28 Mar 2025 11:09:03 GMT, Manukumar V S wrote: > java/awt/ScrollPane/bug8077409Test.java is unstable and fails intermittently in CI, especially in MacOS machines. > Also the frame created in this test is not disposed which may interfere with other tests. > > Fix: > Some stabilisations added and the frame is disposed properly. > > Testing: > Tested 100 times per platform(macosx-x64,macosx-aarch64,windows-x64,linux-x64) and got all PASS. test/jdk/java/awt/ScrollPane/bug8077409Test.java line 102: > 100: } else if (keyEvent.getKeyCode() == KeyEvent.VK_2) { > 101: obj.repaint(); > 102: } else if (keyEvent.getKeyCode() == KeyEvent.VK_DOWN) { These look like non-standard indents/spacing as well. Typically 4 spaces are used. test/jdk/java/awt/ScrollPane/bug8077409Test.java line 129: > 127: robot.waitForIdle(); > 128: robot.delay(300); > 129: if(y != obj.pane.getComponent(0).getLocation().y){ Since it was mentioned in a separate review comment, this would also need some edits. Suggestion: if (y != obj.pane.getComponent(0).getLocation().y) { ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/24292#discussion_r2022048145 PR Review Comment: https://git.openjdk.org/jdk/pull/24292#discussion_r2022048582 From kizune at openjdk.org Tue Apr 1 07:33:07 2025 From: kizune at openjdk.org (Alexander Zuev) Date: Tue, 1 Apr 2025 07:33:07 GMT Subject: RFR: 8353324: Clean up of comments and import after 8319192 In-Reply-To: References: Message-ID: On Mon, 31 Mar 2025 22:56:14 GMT, Phil Race wrote: > Somehow I did not commit these changes when fixing JDK-8319192 Marked as reviewed by kizune (Reviewer). ------------- PR Review: https://git.openjdk.org/jdk/pull/24339#pullrequestreview-2731741670 From rkannathpari at openjdk.org Tue Apr 1 11:16:01 2025 From: rkannathpari at openjdk.org (Renjith Kannath Pariyangad) Date: Tue, 1 Apr 2025 11:16:01 GMT Subject: RFR: 8353138: Screen capture for test TaskbarPositionTest.java, failure case [v2] In-Reply-To: References: Message-ID: > Hi Reviewers, > > Added screen capture in case of test failure using Robot. > > Please review and let me know your suggestion if any. Renjith Kannath Pariyangad has updated the pull request incrementally with one additional commit since the last revision: Updated copyright year ------------- Changes: - all: https://git.openjdk.org/jdk/pull/24286/files - new: https://git.openjdk.org/jdk/pull/24286/files/9cd59259..cec51c11 Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=24286&range=01 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=24286&range=00-01 Stats: 1 line in 1 file changed: 0 ins; 0 del; 1 mod Patch: https://git.openjdk.org/jdk/pull/24286.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/24286/head:pull/24286 PR: https://git.openjdk.org/jdk/pull/24286 From rkannathpari at openjdk.org Tue Apr 1 11:33:55 2025 From: rkannathpari at openjdk.org (Renjith Kannath Pariyangad) Date: Tue, 1 Apr 2025 11:33:55 GMT Subject: RFR: 8353138: Screen capture for test TaskbarPositionTest.java, failure case [v2] In-Reply-To: References: Message-ID: On Fri, 28 Mar 2025 16:28:48 GMT, Mikhail Yankelevich 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 223: > >> 221: ImageIO.write(image,"png", new File("Screenshot.png")); >> 222: } catch (IOException e) { >> 223: e.printStackTrace(); > > I'm not sure it's the best idea to hide the error and just print it into stdout. Wouldn't it be better to just throw the error, what do you think? I don't think its a good idea 1. IOException was not the original intention of this test and its only for additional information 2. If we throw the error we will miss the actual exception, potentially that was the next instruction. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/24286#discussion_r2022672989 From rkannathpari at openjdk.org Tue Apr 1 12:05:17 2025 From: rkannathpari at openjdk.org (Renjith Kannath Pariyangad) Date: Tue, 1 Apr 2025 12:05:17 GMT Subject: RFR: 8353138: Screen capture for test TaskbarPositionTest.java, failure case [v2] In-Reply-To: References: Message-ID: On Fri, 28 Mar 2025 16:26:44 GMT, Mikhail Yankelevich 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 From prr at openjdk.org Tue Apr 1 18:18:33 2025 From: prr at openjdk.org (Phil Race) Date: Tue, 1 Apr 2025 18:18:33 GMT Subject: RFR: 8353309: Open source several Swing text tests Message-ID: <5ZdH5CTaGKCfpRX2ONaNPRZ2pzSjAJWLvDk9jxRxOZI=.a58a4c8c-ca7e-4fc6-8ec5-177acd1edc91@github.com> Open source several Swing text / html related regression tests. ------------- Commit messages: - 8353309 Changes: https://git.openjdk.org/jdk/pull/24364/files Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=24364&range=00 Issue: https://bugs.openjdk.org/browse/JDK-8353309 Stats: 576 lines in 13 files changed: 576 ins; 0 del; 0 mod Patch: https://git.openjdk.org/jdk/pull/24364.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/24364/head:pull/24364 PR: https://git.openjdk.org/jdk/pull/24364 From prr at openjdk.org Tue Apr 1 18:42:45 2025 From: prr at openjdk.org (Phil Race) Date: Tue, 1 Apr 2025 18:42:45 GMT Subject: RFR: 8353320: Open source more Swing text tests Message-ID: Swing text related tests being moved to open source. ------------- Commit messages: - 8353320 Changes: https://git.openjdk.org/jdk/pull/24365/files Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=24365&range=00 Issue: https://bugs.openjdk.org/browse/JDK-8353320 Stats: 417 lines in 9 files changed: 417 ins; 0 del; 0 mod Patch: https://git.openjdk.org/jdk/pull/24365.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/24365/head:pull/24365 PR: https://git.openjdk.org/jdk/pull/24365 From prr at openjdk.org Tue Apr 1 18:45:17 2025 From: prr at openjdk.org (Phil Race) Date: Tue, 1 Apr 2025 18:45:17 GMT Subject: Integrated: 8353324: Clean up of comments and import after 8319192 In-Reply-To: References: Message-ID: On Mon, 31 Mar 2025 22:56:14 GMT, Phil Race wrote: > Somehow I did not commit these changes when fixing JDK-8319192 This pull request has now been integrated. Changeset: 68914908 Author: Phil Race URL: https://git.openjdk.org/jdk/commit/6891490892cc0405882658e067d587ffe5401a6d Stats: 4 lines in 1 file changed: 0 ins; 4 del; 0 mod 8353324: Clean up of comments and import after 8319192 Reviewed-by: dnguyen, kizune ------------- PR: https://git.openjdk.org/jdk/pull/24339 From bpb at openjdk.org Tue Apr 1 20:52:25 2025 From: bpb at openjdk.org (Brian Burkhalter) Date: Tue, 1 Apr 2025 20:52:25 GMT Subject: RFR: 5043343: FileImageInputStream and FileImageOutputStream do not properly track streamPos for RandomAccessFile In-Reply-To: References: Message-ID: On Sat, 29 Mar 2025 04:20:06 GMT, Phil Race wrote: > LGTM but off-line I'll send some additional testing suggestions, to be 99.9% vs 99% sure The change passed the suggestions on the usual platforms. ------------- PR Comment: https://git.openjdk.org/jdk/pull/24283#issuecomment-2770652531 From bpb at openjdk.org Tue Apr 1 21:08:18 2025 From: bpb at openjdk.org (Brian Burkhalter) Date: Tue, 1 Apr 2025 21:08:18 GMT Subject: Integrated: 5043343: FileImageInputStream and FileImageOutputStream do not properly track streamPos for RandomAccessFile In-Reply-To: References: Message-ID: <_0JRjWEB8_37VwVwvSUcGMpQZP9oF86jBuO48Zinqws=.228dee57-9d6d-4c0a-b104-7bb458a5554f@github.com> On Thu, 27 Mar 2025 22:13:00 GMT, Brian Burkhalter wrote: > In the respective constructors, set the value of the initial stream position to the current file position. This pull request has now been integrated. Changeset: afcad8ca Author: Brian Burkhalter URL: https://git.openjdk.org/jdk/commit/afcad8ca61ac74e988da18edef44ba846b7a4e8a Stats: 112 lines in 3 files changed: 110 ins; 0 del; 2 mod 5043343: FileImageInputStream and FileImageOutputStream do not properly track streamPos for RandomAccessFile Reviewed-by: prr ------------- PR: https://git.openjdk.org/jdk/pull/24283 From prr at openjdk.org Tue Apr 1 23:32:56 2025 From: prr at openjdk.org (Phil Race) Date: Tue, 1 Apr 2025 23:32:56 GMT Subject: RFR: 8352997: Open source several Swing JTabbedPane tests Message-ID: open sourcing some Swing JTabbedPane tests ------------- Commit messages: - 8352997 - 8352997 Changes: https://git.openjdk.org/jdk/pull/24370/files Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=24370&range=00 Issue: https://bugs.openjdk.org/browse/JDK-8352997 Stats: 470 lines in 6 files changed: 470 ins; 0 del; 0 mod Patch: https://git.openjdk.org/jdk/pull/24370.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/24370/head:pull/24370 PR: https://git.openjdk.org/jdk/pull/24370 From azvegint at openjdk.org Wed Apr 2 01:10:20 2025 From: azvegint at openjdk.org (Alexander Zvegintsev) Date: Wed, 2 Apr 2025 01:10:20 GMT Subject: RFR: 8352997: Open source several Swing JTabbedPane tests In-Reply-To: References: Message-ID: <5Hg_C5XjiunIFlXU-Wm7Dpkhbun9HpXitMU9E3NVoXw=.a7635c2c-3e19-4130-847b-62dafa38eb9b@github.com> On Tue, 1 Apr 2025 23:24:57 GMT, Phil Race wrote: > open sourcing some Swing JTabbedPane tests Marked as reviewed by azvegint (Reviewer). ------------- PR Review: https://git.openjdk.org/jdk/pull/24370#pullrequestreview-2734328177 From serb at openjdk.org Wed Apr 2 03:33:23 2025 From: serb at openjdk.org (Sergey Bylokhov) Date: Wed, 2 Apr 2025 03:33:23 GMT Subject: RFR: 8353320: Open source more Swing text tests In-Reply-To: References: Message-ID: On Tue, 1 Apr 2025 18:34:22 GMT, Phil Race wrote: > Swing text related tests being moved to open source. Marked as reviewed by serb (Reviewer). ------------- PR Review: https://git.openjdk.org/jdk/pull/24365#pullrequestreview-2734572719 From serb at openjdk.org Wed Apr 2 03:33:19 2025 From: serb at openjdk.org (Sergey Bylokhov) Date: Wed, 2 Apr 2025 03:33:19 GMT Subject: RFR: 8353309: Open source several Swing text tests In-Reply-To: <5ZdH5CTaGKCfpRX2ONaNPRZ2pzSjAJWLvDk9jxRxOZI=.a58a4c8c-ca7e-4fc6-8ec5-177acd1edc91@github.com> References: <5ZdH5CTaGKCfpRX2ONaNPRZ2pzSjAJWLvDk9jxRxOZI=.a58a4c8c-ca7e-4fc6-8ec5-177acd1edc91@github.com> Message-ID: On Tue, 1 Apr 2025 18:13:09 GMT, Phil Race wrote: > Open source several Swing text / html related regression tests. Marked as reviewed by serb (Reviewer). ------------- PR Review: https://git.openjdk.org/jdk/pull/24364#pullrequestreview-2734572428 From serb at openjdk.org Wed Apr 2 03:34:25 2025 From: serb at openjdk.org (Sergey Bylokhov) Date: Wed, 2 Apr 2025 03:34:25 GMT Subject: RFR: 8352997: Open source several Swing JTabbedPane tests In-Reply-To: References: Message-ID: On Tue, 1 Apr 2025 23:24:57 GMT, Phil Race wrote: > open sourcing some Swing JTabbedPane tests Marked as reviewed by serb (Reviewer). ------------- PR Review: https://git.openjdk.org/jdk/pull/24370#pullrequestreview-2734573633 From serb at openjdk.org Wed Apr 2 04:05:16 2025 From: serb at openjdk.org (Sergey Bylokhov) Date: Wed, 2 Apr 2025 04:05:16 GMT Subject: RFR: 8347826: Introspector shows wrong method list after 8071693 [v9] In-Reply-To: References: <1NkNNs9RxXcHMphPbjjO94h1o_ZlN_aII_o_0vN1HvA=.c50df7ab-836e-4077-92ca-47e0207b4913@github.com> Message-ID: <7O8KdrlCHC5w_iaP_QAscKoICF4JqCX1G66X4bEXUq0=.918a1dae-799d-4796-a70e-d70a00175ec6@github.com> On Thu, 27 Mar 2025 08:12:00 GMT, Roman Marchenko wrote: >Should getMethodDescriptors() return static methods defined in the interfaces the class extends? Yes, I think it should return static methods as well, similar to how it works for classes. >If yes, should it recursively find static methods defined in interfaces? For example, the test scenario 1 defines static int getStaticValue() in A1 interface hidden in the inheritance chain. Should it be included to the method descriptor list? For classes, this approach returns all static methods up to Object.class, with one exception - when a subclass "overrides" a static method from a parent class. Interfaces should follow a similar logic. - In case of a clash with a class method, the class version should take precedence. (Is it better for compatibility?) - If the same method appears in multiple interfaces within the same hierarchy, the version from the most specific sub-interface should be selected. - If the method appears in interfaces from different hierarchies, either version can be returned. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/23443#discussion_r2024031331 From serb at openjdk.org Wed Apr 2 04:09:12 2025 From: serb at openjdk.org (Sergey Bylokhov) Date: Wed, 2 Apr 2025 04:09:12 GMT Subject: RFR: 8353002: Remove unnecessary Windows version check in WTaskbarPeer In-Reply-To: <0Exo7te9jSfTV_Sp1g5Laz0eohfQeLAN3s_s-gISDq4=.55dc9bad-be0f-49c6-ae80-e1d5d3770a16@github.com> References: <0Exo7te9jSfTV_Sp1g5Laz0eohfQeLAN3s_s-gISDq4=.55dc9bad-be0f-49c6-ae80-e1d5d3770a16@github.com> Message-ID: <6Ab-_geMNquSVZ-SGpY0bOhOnuQNuUgX5uluPA2qvxk=.514131a9-cba5-4540-b443-6f3c9a7e8f8f@github.com> On Fri, 28 Mar 2025 20:55:57 GMT, Daniel Gredler wrote: >> src/java.desktop/windows/classes/sun/awt/windows/WTaskbarPeer.java line 46: >> >>> 44: private static synchronized void init() { >>> 45: if (!initExecuted) { >>> 46: supported = ShellFolder.invoke(() -> nativeInit()); >> >> I wonder what will happen if I start `java.exe` on a system with Windows Vista which doesn't support these features. >> >> If the native code returns an error, then it's fine. >> >> I ask this question not only out of curiosity but also because it looks like people run Java apps on Windows versions before Windows 10. We had to implement fallback for older versions of Windows in [JDK-8321151](https://bugs.openjdk.org/browse/JDK-8321151). > > Interesting, thanks for the link! > > One issue I see with [JDK-8294427](https://bugs.openjdk.org/browse/JDK-8294427) is that it didn't work all the way back to the original Windows 10 release, which conflicts with the [Oracle compatibility matrix](https://www.oracle.com/java/technologies/javase-subscription/documentation.html#sysconfig). > > But besides that, I'm surprised that a fix was implemented and tested targeting Windows 7 compatibility. Is there a different OpenJDK compatibility matrix that I should be aware of? If not, what were the criteria dictating that Windows 7 compatibility be maintained (at least in 2023)? The biggest issue with [JDK-8294427](https://bugs.openjdk.org/browse/JDK-8294427) is that it was backported to older updates, including JDK 11, which is still in use on legacy systems. I think it's reasonable to assume that JDK 25 is supported on Windows 7 and later. However, it would be good to add a notice in JBS stating that it should not be backported. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/24287#discussion_r2024033903 From serb at openjdk.org Wed Apr 2 04:19:19 2025 From: serb at openjdk.org (Sergey Bylokhov) Date: Wed, 2 Apr 2025 04:19:19 GMT Subject: RFR: 8353138: Screen capture for test TaskbarPositionTest.java, failure case [v2] In-Reply-To: References: Message-ID: On Tue, 1 Apr 2025 11:16:01 GMT, Renjith Kannath Pariyangad wrote: >> Hi Reviewers, >> >> Added screen capture in case of test failure using Robot. >> >> Please review and let me know your suggestion if any. > > Renjith Kannath Pariyangad has updated the pull request incrementally with one additional commit since the last revision: > > Updated copyright year Marked as reviewed by serb (Reviewer). ------------- PR Review: https://git.openjdk.org/jdk/pull/24286#pullrequestreview-2734616420 From serb at openjdk.org Wed Apr 2 06:29:08 2025 From: serb at openjdk.org (Sergey Bylokhov) Date: Wed, 2 Apr 2025 06:29:08 GMT Subject: RFR: 8352407: PixelInterleavedSampleModel with unused components throws RasterFormatException: Incorrect pixel stride [v2] In-Reply-To: References: Message-ID: <0IkJpQYFv_3lUjxKvd1T0EqtOeO4wN5XYEX1pJFf6Pc=.0eac5063-1b53-461b-8bc8-ca1320147a5a@github.com> On Wed, 19 Mar 2025 13:06:56 GMT, Nikita Gubarkov wrote: >> 8352407: PixelInterleavedSampleModel with unused components throws RasterFormatException: Incorrect pixel stride > > Nikita Gubarkov has updated the pull request incrementally with one additional commit since the last revision: > > The previous approach was wrong for non-pixel interleaving. > > Just align the buffer size to the pixel stride instead, should be better. src/java.desktop/share/classes/java/awt/image/ComponentSampleModel.java line 285: > 283: // Align to the pixel stride. > 284: size = (size + pixelStride - 1) / pixelStride * pixelStride; > 285: Some thoughts I?d like to mention to ensure I understand the problem: This method should return the number of bytes required to store the image with given parameters?width, height, pixel stride, and scanline. It seems that the calculation could follow this approach: **starting offset + pointer to the last pixel + pixelStride** Is that a correct assumption? I have doubts that the logic in this method actually calculates the size properly, especially this line: int val = pixelStride * (width - 1); size += val; It seems like it should be: int val = pixelStride + pixelStride * (width - 1); or simply: int val = pixelStride * width; Or am I missing something? ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/24111#discussion_r2024148158 From ngubarkov at openjdk.org Wed Apr 2 07:50:31 2025 From: ngubarkov at openjdk.org (Nikita Gubarkov) Date: Wed, 2 Apr 2025 07:50:31 GMT Subject: RFR: 8352407: PixelInterleavedSampleModel with unused components throws RasterFormatException: Incorrect pixel stride [v2] In-Reply-To: <0IkJpQYFv_3lUjxKvd1T0EqtOeO4wN5XYEX1pJFf6Pc=.0eac5063-1b53-461b-8bc8-ca1320147a5a@github.com> References: <0IkJpQYFv_3lUjxKvd1T0EqtOeO4wN5XYEX1pJFf6Pc=.0eac5063-1b53-461b-8bc8-ca1320147a5a@github.com> Message-ID: <7PoUZmVaNchLPzKKv-Y2Kb3K2iTCIwF_GBxWgYOeSj8=.7c57eb44-10de-4e95-9fea-07ea39ed53ee@github.com> On Wed, 2 Apr 2025 06:26:13 GMT, Sergey Bylokhov wrote: >> Nikita Gubarkov has updated the pull request incrementally with one additional commit since the last revision: >> >> The previous approach was wrong for non-pixel interleaving. >> >> Just align the buffer size to the pixel stride instead, should be better. > > src/java.desktop/share/classes/java/awt/image/ComponentSampleModel.java line 285: > >> 283: // Align to the pixel stride. >> 284: size = (size + pixelStride - 1) / pixelStride * pixelStride; >> 285: > > Some thoughts I?d like to mention to ensure I understand the problem: > > This method should return the number of bytes required to store the image with given parameters?width, height, pixel stride, and scanline. It seems that the calculation could follow this approach: > > **starting offset + pointer to the last pixel + pixelStride** > > Is that a correct assumption? > > I have doubts that the logic in this method actually calculates the size properly, especially this line: > > > int val = pixelStride * (width - 1); > size += val; > > It seems like it should be: > > int val = pixelStride + pixelStride * (width - 1); > > or simply: > > int val = pixelStride * width; > > Or am I missing something? As I understand, an important thing here is that this calculation needs to be correct for any kind of pixel/scanline/band interleaving. What if our channels are stored separately (complete image of only R followed by complete image of G and so on) - your formula would only work if we change "**pointer to the last pixel**" -> "**pointer to the last band of the last pixel**". But then it would be wrong for the pixel-interleaving case (RGBA for each pixel stored together), because adding `pixelStride=4` to the "**last band of the last pixel**" would actually be 3 bytes more than needed. The idea of the current approach, as I understand it is that we find the last band of the first pixel, be it 3 for pixel-interleaved RGBA, or 30000 for band-interleaved image, and then add 1 to it, meaning the size sufficient to fit that last band: int size = maxBandOff + 1; At this point we can already fit the first pixel, so what's left is to fit the remaining first scanline (hence `width - 1`): int val = pixelStride * (width - 1); size += val; And the remaining rows (hence `height - 1`): val = scanlineStride * (height - 1); size += val; ### This gets us to our subject: As current calculation only considers used bands by finding `maxBandOff`, it doesn't really care when we have pixel interleaving and `pixelStride > numBands`, it will happily cut any unused space at the end of the last pixel, thus causing various problems when we just want to, say, make an RGBx (`pixelStride=4`, `bandOffsets = {0, 1, 2}`) raster. In my approach I just fixed that space which was cut by the previous calculation by aligning the size up to `pixelStride`. Not that I find this particularly elegant, but it seems to work and not cause regressions in non-pixel interleaved variants. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/24111#discussion_r2024265636 From perini.davide at dpsoftware.org Wed Apr 2 09:00:57 2025 From: perini.davide at dpsoftware.org (Davide Perini) Date: Wed, 02 Apr 2025 11:00:57 +0200 Subject: [Jpackage + Wix] How to run exe files after installation from installed directory? Message-ID: <92c37dac111f1f1931022b89c6fc4c9e@dpsoftware.org> As subject. I created an exe installare using jpackage and wix but there is no option during the installation process to run the application once the installation is finished. Is it possible to run the app once installation finished? If yes, how? This is important because I would like to launch the installation in silent mode "for the auto update" feature. Thanks Davide -------------- next part -------------- An HTML attachment was scrubbed... URL: From rmarchenko at openjdk.org Wed Apr 2 09:45:29 2025 From: rmarchenko at openjdk.org (Roman Marchenko) Date: Wed, 2 Apr 2025 09:45:29 GMT Subject: RFR: 8347826: Introspector shows wrong method list after 8071693 [v9] In-Reply-To: <7O8KdrlCHC5w_iaP_QAscKoICF4JqCX1G66X4bEXUq0=.918a1dae-799d-4796-a70e-d70a00175ec6@github.com> References: <1NkNNs9RxXcHMphPbjjO94h1o_ZlN_aII_o_0vN1HvA=.c50df7ab-836e-4077-92ca-47e0207b4913@github.com> <7O8KdrlCHC5w_iaP_QAscKoICF4JqCX1G66X4bEXUq0=.918a1dae-799d-4796-a70e-d70a00175ec6@github.com> Message-ID: On Wed, 2 Apr 2025 04:01:25 GMT, Sergey Bylokhov wrote: >> @mrserb >> >>> getMethodDescriptors() returns all methods of the class, **including static ones**, but static methods are not considered properties >> >> I'd like to clarify the behavior: >> >> - Should `getMethodDescriptors()` return static methods defined in the interfaces the class extends? >> - If yes, should it recursively find static methods defined in interfaces? For example, the test scenario 1 defines `static int getStaticValue()` in `A1` interface hidden in the inheritance chain. Should it be included to the method descriptor list? > >>Should getMethodDescriptors() return static methods defined in the interfaces the class extends? > > Yes, I think it should return static methods as well, similar to how it works for classes. > >>If yes, should it recursively find static methods defined in interfaces? For example, the test scenario 1 defines static int getStaticValue() in A1 interface hidden in the inheritance chain. Should it be included to the method descriptor list? > > For classes, this approach returns all static methods up to Object.class, with one exception - when a subclass "overrides" a static method from a parent class. Interfaces should follow a similar logic. > > - In case of a clash with a class method, the class version should take precedence. (Is it better for compatibility?) > - If the same method appears in multiple interfaces within the same hierarchy, the version from the most specific sub-interface should be selected. > - If the method appears in interfaces from different hierarchies, either version can be returned. Implemented. Could you review new version? ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/23443#discussion_r2024472470 From rmarchenko at openjdk.org Wed Apr 2 10:03:43 2025 From: rmarchenko at openjdk.org (Roman Marchenko) Date: Wed, 2 Apr 2025 10:03:43 GMT Subject: RFR: 8347826: Introspector shows wrong method list after 8071693 [v11] In-Reply-To: References: Message-ID: > Fixed `com.sun.beans.introspect.MethodInfo#MethodOrder` to make `Introspector.addMethod()` working properly when filtering methods out. > > Also, after PR discussion, added the approptiate test cases with corresponding fixes in MethodInfo.java and PropertyInfo.java. > > --------- > `getMethodDescriptors()` returns descriptors of public methods of a class and its parent classes, including default methods defined in interfaces. The result doesn't include methods which were declared and not implemented, bridge methods, or methods which were overriden in subclasses. > > `getPropertyDescriptors()` returns descriptors of methods which were identified as getters or setters. As there can be the only method getter/setter per property, the following rules are applied when choosing a getter/setter: > > * Getters/setters for the same property defined (not necessarily overriden) in subclasses have higher precedence. > * If there are getters/setters for the same property defined in the same class and argument types are assignable one to another, the method with the Least Common Supertype has the lower priority. If argument types are not assignable, the result is undefined (any method will be chosen). > * Gettters/setters declared and not implemented are not considered. Roman Marchenko has updated the pull request incrementally with one additional commit since the last revision: Implementing new requirements ------------- Changes: - all: https://git.openjdk.org/jdk/pull/23443/files - new: https://git.openjdk.org/jdk/pull/23443/files/4f29444a..cd00cee2 Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=23443&range=10 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=23443&range=09-10 Stats: 31 lines in 3 files changed: 27 ins; 0 del; 4 mod Patch: https://git.openjdk.org/jdk/pull/23443.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/23443/head:pull/23443 PR: https://git.openjdk.org/jdk/pull/23443 From dgredler at openjdk.org Wed Apr 2 10:32:09 2025 From: dgredler at openjdk.org (Daniel Gredler) Date: Wed, 2 Apr 2025 10:32:09 GMT Subject: RFR: 8353002: Remove unnecessary Windows version check in WTaskbarPeer In-Reply-To: <6Ab-_geMNquSVZ-SGpY0bOhOnuQNuUgX5uluPA2qvxk=.514131a9-cba5-4540-b443-6f3c9a7e8f8f@github.com> References: <0Exo7te9jSfTV_Sp1g5Laz0eohfQeLAN3s_s-gISDq4=.55dc9bad-be0f-49c6-ae80-e1d5d3770a16@github.com> <6Ab-_geMNquSVZ-SGpY0bOhOnuQNuUgX5uluPA2qvxk=.514131a9-cba5-4540-b443-6f3c9a7e8f8f@github.com> Message-ID: On Wed, 2 Apr 2025 04:05:52 GMT, Sergey Bylokhov wrote: >> Interesting, thanks for the link! >> >> One issue I see with [JDK-8294427](https://bugs.openjdk.org/browse/JDK-8294427) is that it didn't work all the way back to the original Windows 10 release, which conflicts with the [Oracle compatibility matrix](https://www.oracle.com/java/technologies/javase-subscription/documentation.html#sysconfig). >> >> But besides that, I'm surprised that a fix was implemented and tested targeting Windows 7 compatibility. Is there a different OpenJDK compatibility matrix that I should be aware of? If not, what were the criteria dictating that Windows 7 compatibility be maintained (at least in 2023)? > > The biggest issue with [JDK-8294427](https://bugs.openjdk.org/browse/JDK-8294427) is that it was backported to older updates, including JDK 11, which is still in use on legacy systems. I think it's reasonable to assume that JDK 25 is supported on Windows 7 and later. However, it would be good to add a notice in JBS stating that it should not be backported. Ah, that makes sense -- so the gray area here are releases which technically do not currently support these older Windows versions, but did originally when they were first released, and we don't want to break that compatibility. I've added a backporting note in JBS, as suggested. Is there a label I should add in JBS as well? @aivanov-jdk Does that make sense / work for you as well? @mrserb I'm assuming you meant "I think it's reasonable to assume that JDK 25 is supported on Windows ~~7~~ **10** and later", is that right? ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/24287#discussion_r2024550414 From serb at openjdk.org Wed Apr 2 11:28:00 2025 From: serb at openjdk.org (Sergey Bylokhov) Date: Wed, 2 Apr 2025 11:28:00 GMT Subject: RFR: 8352407: PixelInterleavedSampleModel with unused components throws RasterFormatException: Incorrect pixel stride [v2] In-Reply-To: <7PoUZmVaNchLPzKKv-Y2Kb3K2iTCIwF_GBxWgYOeSj8=.7c57eb44-10de-4e95-9fea-07ea39ed53ee@github.com> References: <0IkJpQYFv_3lUjxKvd1T0EqtOeO4wN5XYEX1pJFf6Pc=.0eac5063-1b53-461b-8bc8-ca1320147a5a@github.com> <7PoUZmVaNchLPzKKv-Y2Kb3K2iTCIwF_GBxWgYOeSj8=.7c57eb44-10de-4e95-9fea-07ea39ed53ee@github.com> Message-ID: On Wed, 2 Apr 2025 07:47:43 GMT, Nikita Gubarkov wrote: >The idea of the current approach, as I understand it is that we find the last band of the first pixel, be it 3 for pixel-interleaved RGBA, or 30000 for band-interleaved image, and then add 1 to it, meaning the size sufficient to fit that last band: >int size = maxBandOff + 1; >At this point we can already fit the first pixel, so what's left is to fit the remaining first scanline (hence width - 1): This looks suspicious. Let's try calculating the size or pointer to the last pixel using the formula: "starting offset + pointer to the last pixel + pixelStride" but in reverse order. // This moves the pointer to the start of the last row. size = scanlineStride * (height - 1); // This moves the pointer to the start of the last pixel in the last row. size += pixelStride * (width - 1); **Note**: At this point, the size is not necessarily aligned to pixelStride because scanlineStride may include a gap larger than pixelStride at the end. Now, we need to account for the last pixel in the last row. In a theoretical case where the offset is 0, simply adding pixelStride one more time would be sufficient. However, in our case, we add maxBandOff + 1, which seems odd since maxBandOff represents the offset of the largest component, placing it somewhere within the pixelStride. To fix this, we should actually add the second part of the pixelStride only if maxBandOff is smaller than pixelStride. btw, I'm not sure why we can't use the first component instead of the last one: int minBandOff = bandOffsets[0]; for (int i = 1; i < bandOffsets.length; i++) { minBandOff = Math.min(minBandOff, bandOffsets[i]); } long size = 0; if (minBandOff >= 0) size += minBandOff; if (pixelStride > 0) size += pixelStride * width; if (scanlineStride > 0) size += scanlineStride * (height - 1); return (int) size; ...Still investigating this. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/24111#discussion_r2024628842 From serb at openjdk.org Wed Apr 2 12:28:54 2025 From: serb at openjdk.org (Sergey Bylokhov) Date: Wed, 2 Apr 2025 12:28:54 GMT Subject: RFR: 8352407: PixelInterleavedSampleModel with unused components throws RasterFormatException: Incorrect pixel stride [v2] In-Reply-To: References: <0IkJpQYFv_3lUjxKvd1T0EqtOeO4wN5XYEX1pJFf6Pc=.0eac5063-1b53-461b-8bc8-ca1320147a5a@github.com> <7PoUZmVaNchLPzKKv-Y2Kb3K2iTCIwF_GBxWgYOeSj8=.7c57eb44-10de-4e95-9fea-07ea39ed53ee@github.com> Message-ID: <9t4GmM3f624NKzcRzc1I4m-jDABNjukX93uJiEge0Bs=.b3a8c0f9-cd9c-4f61-9d80-700e5d37fcc7@github.com> On Wed, 2 Apr 2025 11:25:09 GMT, Sergey Bylokhov wrote: >> As I understand, an important thing here is that this calculation needs to be correct for any kind of pixel/scanline/band interleaving. >> What if our channels are stored separately (complete image of only R followed by complete image of G and so on) - your formula would only work if we change "**pointer to the last pixel**" -> "**pointer to the last band of the last pixel**". But then it would be wrong for the pixel-interleaving case (RGBA for each pixel stored together), because adding `pixelStride=4` to the "**last band of the last pixel**" would actually be 3 bytes more than needed. >> >> The idea of the current approach, as I understand it is that we find the last band of the first pixel, be it 3 for pixel-interleaved RGBA, or 30000 for band-interleaved image, and then add 1 to it, meaning the size sufficient to fit that last band: >> >> int size = maxBandOff + 1; >> >> At this point we can already fit the first pixel, so what's left is to fit the remaining first scanline (hence `width - 1`): >> >> int val = pixelStride * (width - 1); >> size += val; >> >> And the remaining rows (hence `height - 1`): >> >> val = scanlineStride * (height - 1); >> size += val; >> >> >> ### This gets us to our subject: >> >> As current calculation only considers used bands by finding `maxBandOff`, it doesn't really care when we have pixel interleaving and `pixelStride > numBands`, it will happily cut any unused space at the end of the last pixel, thus causing various problems when we just want to, say, make an RGBx (`pixelStride=4`, `bandOffsets = {0, 1, 2}`) raster. >> >> In my approach I just fixed that space which was cut by the previous calculation by aligning the size up to `pixelStride`. Not that I find this particularly elegant, but it seems to work and not cause regressions in non-pixel interleaved variants. > >>The idea of the current approach, as I understand it is that we find the last band of the first pixel, be it 3 for pixel-interleaved RGBA, or 30000 for band-interleaved image, and then add 1 to it, meaning the size sufficient to fit that last band: >>int size = maxBandOff + 1; >>At this point we can already fit the first pixel, so what's left is to fit the remaining first scanline (hence width - 1): > > This looks suspicious. Let's try calculating the size or pointer to the last pixel using the formula: > "starting offset + pointer to the last pixel + pixelStride" but in reverse order. > > // This moves the pointer to the start of the last row. > size = scanlineStride * (height - 1); > // This moves the pointer to the start of the last pixel in the last row. > size += pixelStride * (width - 1); > > **Note**: At this point, the size is not necessarily aligned to pixelStride because scanlineStride may include a gap larger than pixelStride at the end. > > Now, we need to account for the last pixel in the last row. In a theoretical case where the offset is 0, simply adding pixelStride one more time would be sufficient. > > However, in our case, we add maxBandOff + 1, which seems odd since maxBandOff represents the offset of the largest component, placing it somewhere within the pixelStride. > > To fix this, we should actually add the second part of the pixelStride only if maxBandOff is smaller than pixelStride. > > btw, I'm not sure why we can't use the first component instead of the last one: > > > int minBandOff = bandOffsets[0]; > for (int i = 1; i < bandOffsets.length; i++) { > minBandOff = Math.min(minBandOff, bandOffsets[i]); > } > > long size = 0; > > if (minBandOff >= 0) > size += minBandOff; > if (pixelStride > 0) > size += pixelStride * width; > if (scanlineStride > 0) > size += scanlineStride * (height - 1); > return (int) size; > > > ...Still investigating this. Or maybe we should modify the code that relies on the current size? Why does our code work fine when skipping the end of the scanline in cases where there is a gap, but it cannot skip the pixelStride when there is a gap as well? ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/24111#discussion_r2024716514 From ngubarkov at openjdk.org Wed Apr 2 12:28:54 2025 From: ngubarkov at openjdk.org (Nikita Gubarkov) Date: Wed, 2 Apr 2025 12:28:54 GMT Subject: RFR: 8352407: PixelInterleavedSampleModel with unused components throws RasterFormatException: Incorrect pixel stride [v2] In-Reply-To: <9t4GmM3f624NKzcRzc1I4m-jDABNjukX93uJiEge0Bs=.b3a8c0f9-cd9c-4f61-9d80-700e5d37fcc7@github.com> References: <0IkJpQYFv_3lUjxKvd1T0EqtOeO4wN5XYEX1pJFf6Pc=.0eac5063-1b53-461b-8bc8-ca1320147a5a@github.com> <7PoUZmVaNchLPzKKv-Y2Kb3K2iTCIwF_GBxWgYOeSj8=.7c57eb44-10de-4e95-9fea-07ea39ed53ee@github.com> <9t4GmM3f624NKzcRzc1I4m-jDABNjukX93uJiEge0Bs=.b3a8c0f9-cd9c-4f61-9d80-700e5d37fcc7@github.com> Message-ID: On Wed, 2 Apr 2025 12:24:54 GMT, Sergey Bylokhov wrote: >>>The idea of the current approach, as I understand it is that we find the last band of the first pixel, be it 3 for pixel-interleaved RGBA, or 30000 for band-interleaved image, and then add 1 to it, meaning the size sufficient to fit that last band: >>>int size = maxBandOff + 1; >>>At this point we can already fit the first pixel, so what's left is to fit the remaining first scanline (hence width - 1): >> >> This looks suspicious. Let's try calculating the size or pointer to the last pixel using the formula: >> "starting offset + pointer to the last pixel + pixelStride" but in reverse order. >> >> // This moves the pointer to the start of the last row. >> size = scanlineStride * (height - 1); >> // This moves the pointer to the start of the last pixel in the last row. >> size += pixelStride * (width - 1); >> >> **Note**: At this point, the size is not necessarily aligned to pixelStride because scanlineStride may include a gap larger than pixelStride at the end. >> >> Now, we need to account for the last pixel in the last row. In a theoretical case where the offset is 0, simply adding pixelStride one more time would be sufficient. >> >> However, in our case, we add maxBandOff + 1, which seems odd since maxBandOff represents the offset of the largest component, placing it somewhere within the pixelStride. >> >> To fix this, we should actually add the second part of the pixelStride only if maxBandOff is smaller than pixelStride. >> >> btw, I'm not sure why we can't use the first component instead of the last one: >> >> >> int minBandOff = bandOffsets[0]; >> for (int i = 1; i < bandOffsets.length; i++) { >> minBandOff = Math.min(minBandOff, bandOffsets[i]); >> } >> >> long size = 0; >> >> if (minBandOff >= 0) >> size += minBandOff; >> if (pixelStride > 0) >> size += pixelStride * width; >> if (scanlineStride > 0) >> size += scanlineStride * (height - 1); >> return (int) size; >> >> >> ...Still investigating this. > > Or maybe we should modify the code that relies on the current size? > > Why does our code work fine when skipping the end of the scanline in cases where there is a gap, but it cannot skip the pixelStride when there is a gap as well? > why we can't use the first component instead of the last one We definitely cannot do that because of the band-interleaved case: imagine if there are like 10000 bytes of red samples followed by another 10000 bytes of green samples - with `pixelStride=1` and `scanlineStride=100` if we take the first component offset (0), our calculated size would only fit the red channel. In your calculations using "starting offset + pointer to the last pixel + pixelStride", you assume only pixel-interleaved variant, but this calculation would break with other interleaving modes. Actually, for pixel-interleaved layout there is a simple commonly-used formula, like: `size = startingOffset + scanlineStride * height`. But the problem is that we don't really know the `startingOffset`, we only know offsets of the individual components, which leads to the other issue... > the size is not necessarily aligned to pixelStride because scanlineStride may include a gap larger than pixelStride at the end. Good point, and because of the way `pixelStride` and `scanlineStride` are formulated (offsets between same-band samples of the adjacent pixels/scanlines), they don't tell us anything about the alignment. And moreover, in the case of unused components, where our `bandOffsets` don't fully fill the `pixelStride`, there is an ambiguity: Consider `bandOffsets = {1, 2, 3}` and `pixelStride=4`, is that a `xRGB` layout with `startingOffset=0`, or `RGBx` with `startingOffset=1`? The answer is - we don't have enough info as far as I'm concerned... ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/24111#discussion_r2024717944 From ngubarkov at openjdk.org Wed Apr 2 12:44:24 2025 From: ngubarkov at openjdk.org (Nikita Gubarkov) Date: Wed, 2 Apr 2025 12:44:24 GMT Subject: RFR: 8352407: PixelInterleavedSampleModel with unused components throws RasterFormatException: Incorrect pixel stride [v2] In-Reply-To: References: <0IkJpQYFv_3lUjxKvd1T0EqtOeO4wN5XYEX1pJFf6Pc=.0eac5063-1b53-461b-8bc8-ca1320147a5a@github.com> <7PoUZmVaNchLPzKKv-Y2Kb3K2iTCIwF_GBxWgYOeSj8=.7c57eb44-10de-4e95-9fea-07ea39ed53ee@github.com> <9t4GmM3f624NKzcRzc1I4m-jDABNjukX93uJiEge0Bs=.b3a8c0f9-cd9c-4f61-9d80-700e5d37fcc7@github.com> Message-ID: On Wed, 2 Apr 2025 12:25:52 GMT, Nikita Gubarkov wrote: >> Or maybe we should modify the code that relies on the current size? >> >> Why does our code work fine when skipping the end of the scanline in cases where there is a gap, but it cannot skip the pixelStride when there is a gap as well? > >> why we can't use the first component instead of the last one > > We definitely cannot do that because of the band-interleaved case: imagine if there are like 10000 bytes of red samples followed by another 10000 bytes of green samples - with `pixelStride=1` and `scanlineStride=100` if we take the first component offset (0), our calculated size would only fit the red channel. > > In your calculations using "starting offset + pointer to the last pixel + pixelStride", you assume only pixel-interleaved variant, but this calculation would break with other interleaving modes. Actually, for pixel-interleaved layout there is a simple commonly-used formula, like: `size = startingOffset + scanlineStride * height`. But the problem is that we don't really know the `startingOffset`, we only know offsets of the individual components, which leads to the other issue... > >> the size is not necessarily aligned to pixelStride because scanlineStride may include a gap larger than pixelStride at the end. > > Good point, and because of the way `pixelStride` and `scanlineStride` are formulated (offsets between same-band samples of the adjacent pixels/scanlines), they don't tell us anything about the alignment. And moreover, in the case of unused components, where our `bandOffsets` don't fully fill the `pixelStride`, there is an ambiguity: > Consider `bandOffsets = {1, 2, 3}` and `pixelStride=4`, is that a `xRGB` layout with `startingOffset=0`, or `RGBx` with `startingOffset=1`? The answer is - we don't have enough info as far as I'm concerned... I see a way to deal with this problem though - we don't have to deal with the ambiguity, but just allocate enough memory to be on the safe side no matter the interpretation of the layout - with the example I provided earlier `bandOffsets = {1, 2, 3}` and `pixelStride=4`, just allocate 1 extra byte at the end to prevent out-of-bounds access in any case. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/24111#discussion_r2024744939 From ngubarkov at openjdk.org Wed Apr 2 13:14:01 2025 From: ngubarkov at openjdk.org (Nikita Gubarkov) Date: Wed, 2 Apr 2025 13:14:01 GMT Subject: RFR: 8352407: PixelInterleavedSampleModel with unused components throws RasterFormatException: Incorrect pixel stride [v2] In-Reply-To: References: <0IkJpQYFv_3lUjxKvd1T0EqtOeO4wN5XYEX1pJFf6Pc=.0eac5063-1b53-461b-8bc8-ca1320147a5a@github.com> <7PoUZmVaNchLPzKKv-Y2Kb3K2iTCIwF_GBxWgYOeSj8=.7c57eb44-10de-4e95-9fea-07ea39ed53ee@github.com> <9t4GmM3f624NKzcRzc1I4m-jDABNjukX93uJiEge0Bs=.b3a8c0f9-cd9c-4f61-9d80-700e5d37fcc7@github.com> Message-ID: On Wed, 2 Apr 2025 12:41:04 GMT, Nikita Gubarkov wrote: >>> why we can't use the first component instead of the last one >> >> We definitely cannot do that because of the band-interleaved case: imagine if there are like 10000 bytes of red samples followed by another 10000 bytes of green samples - with `pixelStride=1` and `scanlineStride=100` if we take the first component offset (0), our calculated size would only fit the red channel. >> >> In your calculations using "starting offset + pointer to the last pixel + pixelStride", you assume only pixel-interleaved variant, but this calculation would break with other interleaving modes. Actually, for pixel-interleaved layout there is a simple commonly-used formula, like: `size = startingOffset + scanlineStride * height`. But the problem is that we don't really know the `startingOffset`, we only know offsets of the individual components, which leads to the other issue... >> >>> the size is not necessarily aligned to pixelStride because scanlineStride may include a gap larger than pixelStride at the end. >> >> Good point, and because of the way `pixelStride` and `scanlineStride` are formulated (offsets between same-band samples of the adjacent pixels/scanlines), they don't tell us anything about the alignment. And moreover, in the case of unused components, where our `bandOffsets` don't fully fill the `pixelStride`, there is an ambiguity: >> Consider `bandOffsets = {1, 2, 3}` and `pixelStride=4`, is that a `xRGB` layout with `startingOffset=0`, or `RGBx` with `startingOffset=1`? The answer is - we don't have enough info as far as I'm concerned... > > I see a way to deal with this problem though - we don't have to deal with the ambiguity, but just allocate enough memory to be on the safe side no matter the interpretation of the layout - with the example I provided earlier `bandOffsets = {1, 2, 3}` and `pixelStride=4`, just allocate 1 extra byte at the end to prevent out-of-bounds access in any case. > Or maybe we should modify the code that relies on the current size? I have mixed feelings about that. It sounds logical "mathematically", so to speak, but in practice there are assumptions other code often relies on, which are so natural, that breaking them would be like shooting ourselves in the foot. This follows the same logic as C struct layout: unused padding is considered an integral part of the struct layout and its size - we can always `memcpy` a struct with its `sizeof` without calculating the position of the last byte which actually holds meaningful data. Following this: 1. `pixelStride` equals to the size of the pixel - it must always be resident in memory together with any padding it includes 2. `scanlineStride` equals to the size of the scanline - it must always be resident in memory together with any padding it includes 3. Derived from the latter: `dataSize >= height * scanlineStride` - yes, we could have unused space in the end of the scanline, but it is often assumed that we can copy the whole image with just `height * scanlineStride` without worrying about the last scanline ruining our day. I find this logic very natural and convenient, that's why I think we need to fix the size calculation and not its usage. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/24111#discussion_r2024798193 From ngubarkov at openjdk.org Wed Apr 2 13:31:51 2025 From: ngubarkov at openjdk.org (Nikita Gubarkov) Date: Wed, 2 Apr 2025 13:31:51 GMT Subject: RFR: 8352407: PixelInterleavedSampleModel with unused components throws RasterFormatException: Incorrect pixel stride [v2] In-Reply-To: References: <0IkJpQYFv_3lUjxKvd1T0EqtOeO4wN5XYEX1pJFf6Pc=.0eac5063-1b53-461b-8bc8-ca1320147a5a@github.com> <7PoUZmVaNchLPzKKv-Y2Kb3K2iTCIwF_GBxWgYOeSj8=.7c57eb44-10de-4e95-9fea-07ea39ed53ee@github.com> <9t4GmM3f624NKzcRzc1I4m-jDABNjukX93uJiEge0Bs=.b3a8c0f9-cd9c-4f61-9d80-700e5d37fcc7@github.com> Message-ID: On Wed, 2 Apr 2025 13:09:46 GMT, Nikita Gubarkov wrote: >> I see a way to deal with this problem though - we don't have to deal with the ambiguity, but just allocate enough memory to be on the safe side no matter the interpretation of the layout - with the example I provided earlier `bandOffsets = {1, 2, 3}` and `pixelStride=4`, just allocate 1 extra byte at the end to prevent out-of-bounds access in any case. > >> Or maybe we should modify the code that relies on the current size? > > I have mixed feelings about that. It sounds logical "mathematically", so to speak, but in practice there are assumptions other code often relies on, which are so natural, that breaking them would be like shooting ourselves in the foot. > > This follows the same logic as C struct layout: unused padding is considered an integral part of the struct layout and its size - we can always `memcpy` a struct with its `sizeof` without calculating the position of the last byte which actually holds meaningful data. > Following this: > 1. `pixelStride` equals to the size of the pixel - it must always be resident in memory together with any padding it includes > 2. `scanlineStride` equals to the size of the scanline - it must always be resident in memory together with any padding it includes > 3. Derived from the latter: `dataSize >= height * scanlineStride` - yes, we could have unused space in the end of the scanline, but it is often assumed that we can copy the whole image with just `height * scanlineStride` without worrying about the last scanline ruining our day. > > I find this logic very natural and convenient, that's why I think we need to fix the size calculation and not its usage. Please see the related PR: https://github.com/openjdk/jdk/pull/24378 It tries to solve the similar problem of calculating pixel-aligned starting offset from given band offsets, so this discussion also applies there. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/24111#discussion_r2024833503 From abhiscxk at openjdk.org Wed Apr 2 15:02:53 2025 From: abhiscxk at openjdk.org (Abhishek Kumar) Date: Wed, 2 Apr 2025 15:02:53 GMT Subject: RFR: 8352966: Opensource Several Font related tests - Batch 2 Message-ID: Font related Applet tests are converted to manual and open sourced. ------------- Commit messages: - Applet test converted to manual and open sourced Changes: https://git.openjdk.org/jdk/pull/24381/files Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=24381&range=00 Issue: https://bugs.openjdk.org/browse/JDK-8352966 Stats: 623 lines in 5 files changed: 623 ins; 0 del; 0 mod Patch: https://git.openjdk.org/jdk/pull/24381.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/24381/head:pull/24381 PR: https://git.openjdk.org/jdk/pull/24381 From alexey.semenyuk at oracle.com Wed Apr 2 15:28:34 2025 From: alexey.semenyuk at oracle.com (Alexey Semenyuk) Date: Wed, 2 Apr 2025 11:28:34 -0400 Subject: [Jpackage + Wix] How to run exe files after installation from installed directory? In-Reply-To: References: <92c37dac111f1f1931022b89c6fc4c9e@dpsoftware.org> Message-ID: <623d97c7-0e4b-4680-8008-59b41c030958@oracle.com> Hi Davide, jpackage doesn't provide built-in support to run just installed application. However, it can build an installer from custom WiX sources. ?You can use the default main WiX source from [1] (assume you use jpackage from jdk21) and adjust it to suit your needs. Solutions to automatically run an .exe file after installation are discussed at [2]. ?Say you have your custom "main.wxs" saved in "custom" directory, then run your jpackage command line with extra "--resource-dir custom" arguments. This will force jpackage to use your custom main WiX source "main.wxs" from the "custom" directory instead of the default one. [1] https://github.com/openjdk/jdk21u-dev/blob/master/src/jdk.jpackage/windows/classes/jdk/jpackage/internal/resources/main.wxs [2] https://stackoverflow.com/questions/19271862/wix-how-to-run-exe-files-after-installation-from-installed-directory - Alexey > As subject. > I created an exe installare using jpackage and wix but there is no > option during the installation process to run the application once the > installation is finished. > > Is it possible to run the app once installation finished? > > If yes, how? > This is important because I would like to launch the installation in > silent mode "for the auto update" feature. > > > Thanks > Davide > -------------- next part -------------- An HTML attachment was scrubbed... URL: From aivanov at openjdk.org Wed Apr 2 16:16:51 2025 From: aivanov at openjdk.org (Alexey Ivanov) Date: Wed, 2 Apr 2025 16:16:51 GMT Subject: RFR: 8353309: Open source several Swing text tests In-Reply-To: <5ZdH5CTaGKCfpRX2ONaNPRZ2pzSjAJWLvDk9jxRxOZI=.a58a4c8c-ca7e-4fc6-8ec5-177acd1edc91@github.com> References: <5ZdH5CTaGKCfpRX2ONaNPRZ2pzSjAJWLvDk9jxRxOZI=.a58a4c8c-ca7e-4fc6-8ec5-177acd1edc91@github.com> Message-ID: On Tue, 1 Apr 2025 18:13:09 GMT, Phil Race wrote: > Open source several Swing text / html related regression tests. Changes requested by aivanov (Reviewer). test/jdk/javax/swing/text/BoxView/BaselineTest.java line 114: > 112: doc.insertString(doc.getLength(), " Large Size Text ", set); > 113: } catch (BadLocationException ble) { > 114: } `BadLocationException` is not expected. If it occurs, the test should fail. To avoid adding throws clauses, `BadLocationException` should be re-thrown wrapped in `RuntimeException`. test/jdk/javax/swing/text/BoxView/BaselineTest.java line 119: > 117: } > 118: > 119: class PaintLabel extends JLabel { Could you please move all the supporting classes `PaintLabel`, `CustomComponentView`, `CustomEditorKit` into the main test class `BaselineTest` as static nested classes. This greatly simplifies working with test in IDE, there'll be no duplicate classes. test/jdk/javax/swing/text/html/FormView/4473401/bug4473401.java line 51: > 49: """; > 50: > 51: static volatile JEditorPane jep; There's no need for the `volatile` modifier. `JEditorPane` is created on EDT, the `hyperlinkUpdate` listener is called on EDT. test/jdk/javax/swing/text/html/FormView/4473401/bug4473401.java line 67: > 65: jep.setPage(file.toURL()); > 66: } catch (Exception e) { > 67: } If an exception occurs, the test is unusable. The exception should be wrapped into `RuntimeException` and re-thrown. test/jdk/javax/swing/text/html/FormView/4473401/bug4473401.java line 76: > 74: public void hyperlinkUpdate(HyperlinkEvent e) { > 75: if (e instanceof FormSubmitEvent) { > 76: jep.setText("If you see this page the test PASSED"); Does it mean, the test is semi-automatic, and you can call `PassFailJFrame.forcePass()` in this case? test/jdk/javax/swing/text/html/FormView/4473401/frameset.html line 11: > 9: > 10: > 11: Having a blank line in the end of the file, that is ending the file with `\n`, is recommended, though not required. test/jdk/javax/swing/text/html/FormView/bug4529702.java line 56: > 54: public static void main(String[] args) throws Exception { > 55: PassFailJFrame.builder() > 56: .title(" Test Instructions") `"Test Instructions"` is the default title, or rather ` - Test Instructions` when run with jtreg, thus it can be omitted. ------------- PR Review: https://git.openjdk.org/jdk/pull/24364#pullrequestreview-2736844154 PR Review Comment: https://git.openjdk.org/jdk/pull/24364#discussion_r2025156716 PR Review Comment: https://git.openjdk.org/jdk/pull/24364#discussion_r2025161080 PR Review Comment: https://git.openjdk.org/jdk/pull/24364#discussion_r2025169641 PR Review Comment: https://git.openjdk.org/jdk/pull/24364#discussion_r2025167183 PR Review Comment: https://git.openjdk.org/jdk/pull/24364#discussion_r2025165536 PR Review Comment: https://git.openjdk.org/jdk/pull/24364#discussion_r2025172107 PR Review Comment: https://git.openjdk.org/jdk/pull/24364#discussion_r2025174815 From aivanov at openjdk.org Wed Apr 2 16:20:50 2025 From: aivanov at openjdk.org (Alexey Ivanov) Date: Wed, 2 Apr 2025 16:20:50 GMT Subject: RFR: 8353309: Open source several Swing text tests In-Reply-To: <5ZdH5CTaGKCfpRX2ONaNPRZ2pzSjAJWLvDk9jxRxOZI=.a58a4c8c-ca7e-4fc6-8ec5-177acd1edc91@github.com> References: <5ZdH5CTaGKCfpRX2ONaNPRZ2pzSjAJWLvDk9jxRxOZI=.a58a4c8c-ca7e-4fc6-8ec5-177acd1edc91@github.com> Message-ID: On Tue, 1 Apr 2025 18:13:09 GMT, Phil Race wrote: > Open source several Swing text / html related regression tests. test/jdk/javax/swing/text/html/FrameSetView/4890934/bug4890934.java line 63: > 61: jep.setPage(file.toURL()); > 62: } catch (Exception e) { > 63: } The test should fail if any exception occurs, silently ignoring the exception isn't good. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/24364#discussion_r2025182445 From aivanov at openjdk.org Wed Apr 2 16:28:55 2025 From: aivanov at openjdk.org (Alexey Ivanov) Date: Wed, 2 Apr 2025 16:28:55 GMT Subject: RFR: 8353320: Open source more Swing text tests In-Reply-To: References: Message-ID: On Tue, 1 Apr 2025 18:34:22 GMT, Phil Race wrote: > Swing text related tests being moved to open source. Changes requested by aivanov (Reviewer). test/jdk/javax/swing/text/html/FrameView/4463014/bug4463014.java line 47: > 45: static JFrame createUI() { > 46: > 47: JFrame frame = new JFrame("bug4463014"); Suggestion: """; static JFrame createUI() { JFrame frame = new JFrame("bug4463014"); Add a blank line to separate the instructions from code. A blank line as the first line of a method is redundant. test/jdk/javax/swing/text/html/FrameView/4463014/bug4463014.java line 57: > 55: jep.setPage(file.toURL()); > 56: } catch (Exception e) { > 57: } Suggestion: } catch (Exception e) { thrown new RuntimeException(e); } The test should fail if an exception occurs. test/jdk/javax/swing/text/html/FrameView/4463014/frameset.html line 11: > 9: > 10: > 11: A blank line in the end of file? test/jdk/javax/swing/text/html/HTMLEditorKit/bug4102068.java line 26: > 24: /* @test > 25: * @bug 4102068 > 26: * @summary Tests that JTextPane with HTMLEditorKit handles the HEAD tag properly The summary doesn't match the instructions. The test verifies if the cursor for text and for hyperlinks can be changed, doesn't it? test/jdk/javax/swing/text/html/HTMLEditorKit/bug4198022.java line 26: > 24: /* @test > 25: * @bug 4198022 > 26: * @summary Tests that JTextPane with HTMLEditorKit handles the HEAD tag properly The summary doesn't match the instructions. test/jdk/javax/swing/text/html/HTMLEditorKit/bug4245401.java line 61: > 59: kit.read(new StringReader(text), doc, 0); > 60: } catch (Exception e) { > 61: } If an exception occurs, the test should fail; the exception shouldn't be *silently* ignored. ------------- PR Review: https://git.openjdk.org/jdk/pull/24365#pullrequestreview-2736880616 PR Review Comment: https://git.openjdk.org/jdk/pull/24365#discussion_r2025179293 PR Review Comment: https://git.openjdk.org/jdk/pull/24365#discussion_r2025183319 PR Review Comment: https://git.openjdk.org/jdk/pull/24365#discussion_r2025184554 PR Review Comment: https://git.openjdk.org/jdk/pull/24365#discussion_r2025188226 PR Review Comment: https://git.openjdk.org/jdk/pull/24365#discussion_r2025190368 PR Review Comment: https://git.openjdk.org/jdk/pull/24365#discussion_r2025192199 From rmahajan at openjdk.org Wed Apr 2 17:39:03 2025 From: rmahajan at openjdk.org (Rajat Mahajan) Date: Wed, 2 Apr 2025 17:39:03 GMT Subject: RFR: 8351884: Refactor bug8033699.java test code Message-ID: Details: Refactored code as requested in the Bug description. Tested and verified the test passes. ------------- Commit messages: - 8351884: Refactor bug8033699.java test code - 8351884: Refactor bug8033699.java test code Changes: https://git.openjdk.org/jdk/pull/24384/files Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=24384&range=00 Issue: https://bugs.openjdk.org/browse/JDK-8351884 Stats: 68 lines in 1 file changed: 31 ins; 3 del; 34 mod Patch: https://git.openjdk.org/jdk/pull/24384.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/24384/head:pull/24384 PR: https://git.openjdk.org/jdk/pull/24384 From serb at openjdk.org Wed Apr 2 18:30:50 2025 From: serb at openjdk.org (Sergey Bylokhov) Date: Wed, 2 Apr 2025 18:30:50 GMT Subject: RFR: 8352407: PixelInterleavedSampleModel with unused components throws RasterFormatException: Incorrect pixel stride [v2] In-Reply-To: References: <0IkJpQYFv_3lUjxKvd1T0EqtOeO4wN5XYEX1pJFf6Pc=.0eac5063-1b53-461b-8bc8-ca1320147a5a@github.com> <7PoUZmVaNchLPzKKv-Y2Kb3K2iTCIwF_GBxWgYOeSj8=.7c57eb44-10de-4e95-9fea-07ea39ed53ee@github.com> <9t4GmM3f624NKzcRzc1I4m-jDABNjukX93uJiEge0Bs=.b3a8c0f9-cd9c-4f61-9d80-700e5d37fcc7@github.com> Message-ID: On Wed, 2 Apr 2025 13:28:53 GMT, Nikita Gubarkov wrote: >>> Or maybe we should modify the code that relies on the current size? >> >> I have mixed feelings about that. It sounds logical "mathematically", so to speak, but in practice there are assumptions other code often relies on, which are so natural, that breaking them would be like shooting ourselves in the foot. >> >> This follows the same logic as C struct layout: unused padding is considered an integral part of the struct layout and its size - we can always `memcpy` a struct with its `sizeof` without calculating the position of the last byte which actually holds meaningful data. >> Following this: >> 1. `pixelStride` equals to the size of the pixel - it must always be resident in memory together with any padding it includes >> 2. `scanlineStride` equals to the size of the scanline - it must always be resident in memory together with any padding it includes >> 3. Derived from the latter: `dataSize >= height * scanlineStride` - yes, we could have unused space in the end of the scanline, but it is often assumed that we can copy the whole image with just `height * scanlineStride` without worrying about the last scanline ruining our day. >> >> I find this logic very natural and convenient, that's why I think we need to fix the size calculation and not its usage. > > Please see the related PR: https://github.com/openjdk/jdk/pull/24378 > It tries to solve the similar problem of calculating pixel-aligned starting offset from given band offsets, so this discussion also applies there. >We definitely cannot do that because of the band-interleaved case: imagine if there are like 10000 bytes of red samples followed by another 10000 bytes of green samples - with pixelStride=1 and scanlineStride=100 if we take the first component offset (0), our calculated size would only fit the red channel. That?s exactly what I?m missing right now. A concrete code example would make this clearer - please add a test case for this scenario. Also, is it possible for pixelStride to be smaller than maxBandOff? At least for PixelInterleavedSampleModel, it seems like this should be rejected. >Consider bandOffsets = {1, 2, 3} and pixelStride=4, is that a xRGB layout with startingOffset=0, or RGBx with startingOffset=1? The answer is - we don't have enough info as far as I'm concerned... Regarding the layout: - {0, 1, 2} with pixelStride=4: RGB pixel, then a gap - {1, 2, 3} with pixelStride=4: A gap, then the RGB pixel - {0, 2, 3} with pixelStride=4: R, then a gap, then GB And so on... So the starting offset of the first pixelStride is always 0 and then we have an offset of the first component? >earlier bandOffsets = {1, 2, 3} and pixelStride=4, just allocate 1 extra byte at the end to prevent out-of-bounds access in any case. But you don?t need to allocate an extra byte - it should already be aligned to 4 bytes since the pixel data is positioned at the "end" of the pixelStride. >This follows the same logic as C struct layout: unused padding is considered an integral part of the struct layout and its size - we can always memcpy a struct with its sizeof without calculating the position of the last byte which actually holds meaningful data. - Some images have gaps between pixels and rows where the gaps "may" contain unrelated data and should not be touched - Others, like BI.TYPE_INT_RGB, have padding where memcpy works safely. >Derived from the latter: dataSize >= height * scanlineStride - yes, we could have unused space in the end of the scanline, but it is often assumed that we can copy the whole image with just height * scanlineStride without worrying about the last scanline ruining our day. The assumption that dataSize >= height * scanlineStride is not universally valid. There are three distinct cases we handle: - No gaps ? One blit for the whole image. - Gaps between lines ? One blit per line (looping over height). - Gaps between pixels ? One blit per pixel (nested loops over width and height). This logic is already implemented in various places, such as native loops, cmm, and ogl. Even if we adjust the size calculation here, the "processing" code still needs to follow the same handling logic, since I am not sure it is possible to check that all possible implementations will have `size==height * scanlineStride`. Regardless of the decision we make, the check that caused the exception - pixelStride > data.length - is too strict. It should instead verify the actual size of the pixel without considering the gap. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/24111#discussion_r2025376233 From prr at openjdk.org Wed Apr 2 19:29:50 2025 From: prr at openjdk.org (Phil Race) Date: Wed, 2 Apr 2025 19:29:50 GMT Subject: RFR: 8353309: Open source several Swing text tests In-Reply-To: References: <5ZdH5CTaGKCfpRX2ONaNPRZ2pzSjAJWLvDk9jxRxOZI=.a58a4c8c-ca7e-4fc6-8ec5-177acd1edc91@github.com> Message-ID: <-rcUWY_Jl2IT9LYmAfPhdCO6bKcQO-ansbRzuOQcik4=.33e7ea09-d712-4e0d-abd4-9bd2a6829528@github.com> On Wed, 2 Apr 2025 16:02:45 GMT, Alexey Ivanov wrote: >> Open source several Swing text / html related regression tests. > > test/jdk/javax/swing/text/BoxView/BaselineTest.java line 114: > >> 112: doc.insertString(doc.getLength(), " Large Size Text ", set); >> 113: } catch (BadLocationException ble) { >> 114: } > > `BadLocationException` is not expected. If it occurs, the test should fail. To avoid adding throws clauses, `BadLocationException` should be re-thrown wrapped in `RuntimeException`. That was existing but I can change it. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/24364#discussion_r2025460480 From prr at openjdk.org Wed Apr 2 19:30:43 2025 From: prr at openjdk.org (Phil Race) Date: Wed, 2 Apr 2025 19:30:43 GMT Subject: RFR: 8353320: Open source more Swing text tests [v2] In-Reply-To: References: Message-ID: <8ZDojhcsnoBVGsFjEkNNBnX9ZOQHP22oC4B9F_qz0kk=.9c232427-adc1-4307-9252-2d198845bde0@github.com> > Swing text related tests being moved to open source. Phil Race has updated the pull request incrementally with one additional commit since the last revision: 8353320 ------------- Changes: - all: https://git.openjdk.org/jdk/pull/24365/files - new: https://git.openjdk.org/jdk/pull/24365/files/cccd3959..9d540f04 Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=24365&range=01 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=24365&range=00-01 Stats: 5 lines in 4 files changed: 2 ins; 1 del; 2 mod Patch: https://git.openjdk.org/jdk/pull/24365.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/24365/head:pull/24365 PR: https://git.openjdk.org/jdk/pull/24365 From prr at openjdk.org Wed Apr 2 19:30:46 2025 From: prr at openjdk.org (Phil Race) Date: Wed, 2 Apr 2025 19:30:46 GMT Subject: RFR: 8353320: Open source more Swing text tests [v2] In-Reply-To: References: Message-ID: On Wed, 2 Apr 2025 16:15:58 GMT, Alexey Ivanov wrote: >> Phil Race has updated the pull request incrementally with one additional commit since the last revision: >> >> 8353320 > > test/jdk/javax/swing/text/html/FrameView/4463014/bug4463014.java line 47: > >> 45: static JFrame createUI() { >> 46: >> 47: JFrame frame = new JFrame("bug4463014"); > > Suggestion: > > """; > > static JFrame createUI() { > JFrame frame = new JFrame("bug4463014"); > > Add a blank line to separate the instructions from code. > > A blank line as the first line of a method is redundant. ok > test/jdk/javax/swing/text/html/FrameView/4463014/frameset.html line 11: > >> 9: >> 10: >> 11: > > A blank line in the end of file? Not that I can see .. even doing a binary dump, and I didn't edit this file at all, I just moved it from closed to open. > test/jdk/javax/swing/text/html/HTMLEditorKit/bug4102068.java line 26: > >> 24: /* @test >> 25: * @bug 4102068 >> 26: * @summary Tests that JTextPane with HTMLEditorKit handles the HEAD tag properly > > The summary doesn't match the instructions. > > The test verifies if the cursor for text and for hyperlinks can be changed, doesn't it? fixed > test/jdk/javax/swing/text/html/HTMLEditorKit/bug4198022.java line 26: > >> 24: /* @test >> 25: * @bug 4198022 >> 26: * @summary Tests that JTextPane with HTMLEditorKit handles the HEAD tag properly > > The summary doesn't match the instructions. fixed > test/jdk/javax/swing/text/html/HTMLEditorKit/bug4245401.java line 61: > >> 59: kit.read(new StringReader(text), doc, 0); >> 60: } catch (Exception e) { >> 61: } > > If an exception occurs, the test should fail; the exception shouldn't be *silently* ignored. Not something I added but I can re-throw as RTE. I verified that will cause the test to fail. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/24365#discussion_r2025432528 PR Review Comment: https://git.openjdk.org/jdk/pull/24365#discussion_r2025440658 PR Review Comment: https://git.openjdk.org/jdk/pull/24365#discussion_r2025446503 PR Review Comment: https://git.openjdk.org/jdk/pull/24365#discussion_r2025451162 PR Review Comment: https://git.openjdk.org/jdk/pull/24365#discussion_r2025457256 From prr at openjdk.org Wed Apr 2 19:39:54 2025 From: prr at openjdk.org (Phil Race) Date: Wed, 2 Apr 2025 19:39:54 GMT Subject: RFR: 8353309: Open source several Swing text tests In-Reply-To: References: <5ZdH5CTaGKCfpRX2ONaNPRZ2pzSjAJWLvDk9jxRxOZI=.a58a4c8c-ca7e-4fc6-8ec5-177acd1edc91@github.com> Message-ID: On Wed, 2 Apr 2025 16:04:31 GMT, Alexey Ivanov wrote: >> Open source several Swing text / html related regression tests. > > test/jdk/javax/swing/text/BoxView/BaselineTest.java line 119: > >> 117: } >> 118: >> 119: class PaintLabel extends JLabel { > > Could you please move all the supporting classes `PaintLabel`, `CustomComponentView`, `CustomEditorKit` into the main test class `BaselineTest` as static nested classes. > > This greatly simplifies working with test in IDE, there'll be no duplicate classes. I guess I can but I don't know where you are seeing duplicate classes. > test/jdk/javax/swing/text/html/FormView/4473401/bug4473401.java line 51: > >> 49: """; >> 50: >> 51: static volatile JEditorPane jep; > > There's no need for the `volatile` modifier. `JEditorPane` is created on EDT, the `hyperlinkUpdate` listener is called on EDT. ok > test/jdk/javax/swing/text/html/FormView/4473401/bug4473401.java line 67: > >> 65: jep.setPage(file.toURL()); >> 66: } catch (Exception e) { >> 67: } > > If an exception occurs, the test is unusable. The exception should be wrapped into `RuntimeException` and re-thrown. ok ... > test/jdk/javax/swing/text/html/FormView/4473401/frameset.html line 11: > >> 9: >> 10: >> 11: > > Having a blank line in the end of the file, that is ending the file with `\n`, is recommended, though not required. I'm just moving these files. I don't see a problem here. > test/jdk/javax/swing/text/html/FormView/bug4529702.java line 56: > >> 54: public static void main(String[] args) throws Exception { >> 55: PassFailJFrame.builder() >> 56: .title(" Test Instructions") > > `"Test Instructions"` is the default title, or rather ` - Test Instructions` when run with jtreg, thus it can be omitted. ok > test/jdk/javax/swing/text/html/FrameSetView/4890934/bug4890934.java line 63: > >> 61: jep.setPage(file.toURL()); >> 62: } catch (Exception e) { >> 63: } > > The test should fail if any exception occurs, silently ignoring the exception isn't good. updated ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/24364#discussion_r2025467805 PR Review Comment: https://git.openjdk.org/jdk/pull/24364#discussion_r2025470309 PR Review Comment: https://git.openjdk.org/jdk/pull/24364#discussion_r2025469734 PR Review Comment: https://git.openjdk.org/jdk/pull/24364#discussion_r2025470894 PR Review Comment: https://git.openjdk.org/jdk/pull/24364#discussion_r2025472514 PR Review Comment: https://git.openjdk.org/jdk/pull/24364#discussion_r2025473107 From prr at openjdk.org Wed Apr 2 19:47:09 2025 From: prr at openjdk.org (Phil Race) Date: Wed, 2 Apr 2025 19:47:09 GMT Subject: RFR: 8353309: Open source several Swing text tests [v2] In-Reply-To: <5ZdH5CTaGKCfpRX2ONaNPRZ2pzSjAJWLvDk9jxRxOZI=.a58a4c8c-ca7e-4fc6-8ec5-177acd1edc91@github.com> References: <5ZdH5CTaGKCfpRX2ONaNPRZ2pzSjAJWLvDk9jxRxOZI=.a58a4c8c-ca7e-4fc6-8ec5-177acd1edc91@github.com> Message-ID: > Open source several Swing text / html related regression tests. Phil Race has updated the pull request incrementally with one additional commit since the last revision: 8353309 ------------- Changes: - all: https://git.openjdk.org/jdk/pull/24364/files - new: https://git.openjdk.org/jdk/pull/24364/files/d6293fa6..1a265aa9 Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=24364&range=01 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=24364&range=00-01 Stats: 63 lines in 4 files changed: 13 ins; 12 del; 38 mod Patch: https://git.openjdk.org/jdk/pull/24364.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/24364/head:pull/24364 PR: https://git.openjdk.org/jdk/pull/24364 From prr at openjdk.org Wed Apr 2 19:47:09 2025 From: prr at openjdk.org (Phil Race) Date: Wed, 2 Apr 2025 19:47:09 GMT Subject: RFR: 8353309: Open source several Swing text tests [v2] In-Reply-To: References: <5ZdH5CTaGKCfpRX2ONaNPRZ2pzSjAJWLvDk9jxRxOZI=.a58a4c8c-ca7e-4fc6-8ec5-177acd1edc91@github.com> Message-ID: On Wed, 2 Apr 2025 16:07:18 GMT, Alexey Ivanov wrote: >> Phil Race has updated the pull request incrementally with one additional commit since the last revision: >> >> 8353309 > > test/jdk/javax/swing/text/html/FormView/4473401/bug4473401.java line 76: > >> 74: public void hyperlinkUpdate(HyperlinkEvent e) { >> 75: if (e instanceof FormSubmitEvent) { >> 76: jep.setText("If you see this page the test PASSED"); > > Does it mean, the test is semi-automatic, and you can call `PassFailJFrame.forcePass()` in this case? I don't think so. The sequence is the user presses the buttom, the event is received here which calls an API to set text and then the user has to visually verify that the text was displayed. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/24364#discussion_r2025476443 From ngubarkov at openjdk.org Wed Apr 2 20:15:58 2025 From: ngubarkov at openjdk.org (Nikita Gubarkov) Date: Wed, 2 Apr 2025 20:15:58 GMT Subject: RFR: 8352407: PixelInterleavedSampleModel with unused components throws RasterFormatException: Incorrect pixel stride [v2] In-Reply-To: References: <0IkJpQYFv_3lUjxKvd1T0EqtOeO4wN5XYEX1pJFf6Pc=.0eac5063-1b53-461b-8bc8-ca1320147a5a@github.com> <7PoUZmVaNchLPzKKv-Y2Kb3K2iTCIwF_GBxWgYOeSj8=.7c57eb44-10de-4e95-9fea-07ea39ed53ee@github.com> <9t4GmM3f624NKzcRzc1I4m-jDABNjukX93uJiEge0Bs=.b3a8c0f9-cd9c-4f61-9d80-700e5d37fcc7@github.com> Message-ID: On Wed, 2 Apr 2025 18:28:07 GMT, Sergey Bylokhov wrote: > please add a test case for this scenario Sure, gonna look into it. > is it possible for pixelStride to be smaller than maxBandOff? Surprisingly, yes! Band offsets are arbitrary, even for `PixelInterleavedSampleModel`, the only restriction is that `maxBandOff - minBandOff <= pixelStride` **(which is wrong btw, there should be < instead)** - [see here](https://github.com/openjdk/jdk/blob/209e72d311234c8279289172dab2cbb255e4fed9/src/java.desktop/share/classes/java/awt/image/PixelInterleavedSampleModel.java#L94). That's where the ambiguity I mentioned comes from - the code doesn't assume any specific starting offset and we cannot expect band offsets to always be in `[0, pixelStride)` range. Therefore, whenever there is an unused padding at the beginning or end of the pixel, this creates some wiggle. Let's imagine we have some weird non-zero starting offset: x x x x x R G B x R G B x R G B x x x x x Knowing that `pixelStride=4` we might split it like this: x x x x | x R G B | x R G B | x R G B | x x x x x Or like this: x x x x x | R G B x | R G B x | R G B x | x x x x Both could be correct and there doesn't seem to be any other info, which could allow us to determine this unambiguously. This "real starting pixel offset" is implicitly assumed, when working with [known types in native code](https://github.com/openjdk/jdk/blob/209e72d311234c8279289172dab2cbb255e4fed9/src/java.desktop/share/classes/sun/awt/image/BufImgSurfaceData.java#L319), but is explicitly stored nowhere. _This is all theoretical though, I have never seen a pixel-interleaved image with a non-zero starting offset._ ### Regarding the `pixelStride` and `scanlineStride` I am reading the documentation for [SurfaceDataRasInfo](https://github.com/openjdk/jdk/blob/209e72d311234c8279289172dab2cbb255e4fed9/src/java.desktop/share/native/libawt/java2d/SurfaceData.h#L71): > Valid memory locations are required at: `*(pixeltype *) (((char *)rasBase) + y * scanStride + x * pixelStride)` for each x, y pair such that (bounds.x1 <= x < bounds.x2) and (bounds.y1 <= y < bounds.y2). So it doesn't require the end of the last scanline to be resident in memory, however `pixeltype` is not defined there, so it's hard to tell whether it's assumed that `sizeof(pixeltype) == pixelStride`, or that this question was considered at all. I am using a little thought experiment to figure this out: Imagine that we want to copy image data from a given `SurfaceDataRasInfo sdri`. 1. We iterate through scanlines from 0 to `sdri.bounds.y2 - srdi.bounds.y1` 2. Our scanline may have padding in the end, which may not be resident, so we cannot copy whole `scanlineStride` - so we copy `pixelStride * (sdri.bounds.x2 - srdi.bounds.x1)` instead. 3. But what if our last pixel also contains padding, which is not resident? Then we would have to repeat the [same procedure](https://github.com/openjdk/jdk/blob/130b0cdaa6604da47a893e5425547acf3d5253f4/src/java.desktop/share/classes/java/awt/image/ComponentSampleModel.java#L247) with finding the last used component and so on. But the problem with this is that there is no such info in `SurfaceDataRasInfo`, which could allow us figure out, which components are really used and which bytes are just padding. Moreover, `SurfaceDataRasInfo` doesn't even have a total `size` field, so we can't even clamp our copy range to some boundary. This leads me to conclusion that we indeed need to enforce whole `pixelStride` to be resident, including padding, but we should not do the same with `scanlineStride`, as explicitly mentioned in the `SurfaceDataRasInfo` documentation. > the check that caused the exception - pixelStride > data.length - is too strict This check looks weird to me because it's not clear, which rule exactly it enforces. However in its current form it was useful, because it caught an issue with something that was implicitly assumed, but not really enforced. I mean, I don't know... I would probably vote for leaving the check as is. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/24111#discussion_r2025517596 From serb at openjdk.org Wed Apr 2 21:23:52 2025 From: serb at openjdk.org (Sergey Bylokhov) Date: Wed, 2 Apr 2025 21:23:52 GMT Subject: RFR: 8339561: The test/jdk/java/awt/Paint/ListRepaint.java may fail after JDK-8327401 [v6] In-Reply-To: References: Message-ID: On Fri, 7 Mar 2025 01:56:41 GMT, Sergey Bylokhov wrote: >> Several tests modified by https://github.com/openjdk/jdk/pull/19339 have been tweaked, see inline comments. >> >> Notes: >> * We have a few XXXRepaint.java tests and in this patch, I updated all of them to follow the change added to the ListRepaint.java >> >> @azvegint @aivanov-jdk please take a look. > > Sergey Bylokhov has updated the pull request incrementally with one additional commit since the last revision: > > drop null check keep open ------------- PR Comment: https://git.openjdk.org/jdk/pull/20861#issuecomment-2773770494 From honkar at openjdk.org Wed Apr 2 22:10:13 2025 From: honkar at openjdk.org (Harshitha Onkar) Date: Wed, 2 Apr 2025 22:10:13 GMT Subject: RFR: JDK-8346465 : Add a check in setData() to restrict the update of Built-In ICC_Profiles [v21] In-Reply-To: References: Message-ID: > Built-in Profiles are singleton objects and if the user happens to modify this shared profile object via setData() then the modified version of the profile is returned each time the same built-in profile is requested via getInstance(). > > It is good to protect Built-in profiles from such direct modification by adding BuiltIn profile check in `setData()` such that **only copies** of Built-In profiles are allowed to be updated. > > With the proposed fix, if Built-In profile is updated using `.setData()` it throws _**IAE - "BuiltIn profile cannot be modified"**_ > > There are no restrictions on creating copies of BuiltIn profile and then modifying it, but what is being restricted with this fix is - the direct modification of the shared BuiltIn profile instance. > > Applications which need a modified version of the ICC Profile should instead do the following: > > > byte[] profileData = ICC_Profile.getData() // get the byte array representation of BuiltIn- profile > ICCProfile newProfile = ICC_Profile.getInstance(profileData) // create a new profile > newProfile.setData() // to modify and customize the profile > > > Following existing tests are modified to update a copy of Built-In profile. > > - java/awt/color/ICC_Profile/SetHeaderInfo.java > - java/awt/color/ICC_ProfileSetNullDataTest.java > - sun/java2d/cmm/ProfileOp/SetDataTest.java Harshitha Onkar has updated the pull request incrementally with one additional commit since the last revision: added test cases to read .icc, updated test code ------------- Changes: - all: https://git.openjdk.org/jdk/pull/23606/files - new: https://git.openjdk.org/jdk/pull/23606/files/c32ed9b1..0fe58a9a Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=23606&range=20 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=23606&range=19-20 Stats: 287 lines in 4 files changed: 165 ins; 122 del; 0 mod Patch: https://git.openjdk.org/jdk/pull/23606.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/23606/head:pull/23606 PR: https://git.openjdk.org/jdk/pull/23606 From honkar at openjdk.org Wed Apr 2 22:14:56 2025 From: honkar at openjdk.org (Harshitha Onkar) Date: Wed, 2 Apr 2025 22:14:56 GMT Subject: RFR: JDK-8346465 : Add a check in setData() to restrict the update of Built-In ICC_Profiles [v11] In-Reply-To: References: Message-ID: On Mon, 3 Mar 2025 17:12:31 GMT, Alexey Ivanov wrote: >> Harshitha Onkar has updated the pull request incrementally with one additional commit since the last revision: >> >> doc update > > @mrserb You may want to take a look. @aivanov-jdk As per our discussion I have updated the test code. Please re-review. Moved profile creation and testing into separate methods - prepareTestProfile(), testProfile() Added 2 more cases which tests reading .icc files that were serialized on older version of JDK. @mrserb Can you please re-review the updated test. ------------- PR Comment: https://git.openjdk.org/jdk/pull/23606#issuecomment-2773847085 From honkar at openjdk.org Wed Apr 2 22:20:53 2025 From: honkar at openjdk.org (Harshitha Onkar) Date: Wed, 2 Apr 2025 22:20:53 GMT Subject: RFR: JDK-8346465 : Add a check in setData() to restrict the update of Built-In ICC_Profiles [v21] In-Reply-To: References: Message-ID: <_vJdzMm0y7xWJc09OO1upLImSYmuimC7KIGRMEwlt9s=.81beb043-a5ef-4b98-bab6-02f0f0d9c4dc@github.com> On Wed, 2 Apr 2025 22:10:13 GMT, Harshitha Onkar wrote: >> Built-in Profiles are singleton objects and if the user happens to modify this shared profile object via setData() then the modified version of the profile is returned each time the same built-in profile is requested via getInstance(). >> >> It is good to protect Built-in profiles from such direct modification by adding BuiltIn profile check in `setData()` such that **only copies** of Built-In profiles are allowed to be updated. >> >> With the proposed fix, if Built-In profile is updated using `.setData()` it throws _**IAE - "BuiltIn profile cannot be modified"**_ >> >> There are no restrictions on creating copies of BuiltIn profile and then modifying it, but what is being restricted with this fix is - the direct modification of the shared BuiltIn profile instance. >> >> Applications which need a modified version of the ICC Profile should instead do the following: >> >> >> byte[] profileData = ICC_Profile.getData() // get the byte array representation of BuiltIn- profile >> ICCProfile newProfile = ICC_Profile.getInstance(profileData) // create a new profile >> newProfile.setData() // to modify and customize the profile >> >> >> Following existing tests are modified to update a copy of Built-In profile. >> >> - java/awt/color/ICC_Profile/SetHeaderInfo.java >> - java/awt/color/ICC_ProfileSetNullDataTest.java >> - sun/java2d/cmm/ProfileOp/SetDataTest.java > > Harshitha Onkar has updated the pull request incrementally with one additional commit since the last revision: > > added test cases to read .icc, updated test code test/jdk/java/awt/color/ICC_Profile/BuiltInProfileCheck/BuiltInProfileCheck.java line 103: > 101: // empty case block > 102: // no further processing of testProfile required in these 2 cases. > 103: } I could move this to a if block before switch and simply return but since switch-case is used I thought to keep all the cases at one place. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/23606#discussion_r2025676168 From honkar at openjdk.org Wed Apr 2 22:36:13 2025 From: honkar at openjdk.org (Harshitha Onkar) Date: Wed, 2 Apr 2025 22:36:13 GMT Subject: RFR: JDK-8346465 : Add a check in setData() to restrict the update of Built-In ICC_Profiles [v22] In-Reply-To: References: Message-ID: <9S_w6gnfAlcdsoQviN_kIwZoYzQeAZ2E9APx-ikccuk=.19fa2146-fb05-4687-9b21-cd979bbdced3@github.com> > Built-in Profiles are singleton objects and if the user happens to modify this shared profile object via setData() then the modified version of the profile is returned each time the same built-in profile is requested via getInstance(). > > It is good to protect Built-in profiles from such direct modification by adding BuiltIn profile check in `setData()` such that **only copies** of Built-In profiles are allowed to be updated. > > With the proposed fix, if Built-In profile is updated using `.setData()` it throws _**IAE - "BuiltIn profile cannot be modified"**_ > > There are no restrictions on creating copies of BuiltIn profile and then modifying it, but what is being restricted with this fix is - the direct modification of the shared BuiltIn profile instance. > > Applications which need a modified version of the ICC Profile should instead do the following: > > > byte[] profileData = ICC_Profile.getData() // get the byte array representation of BuiltIn- profile > ICCProfile newProfile = ICC_Profile.getInstance(profileData) // create a new profile > newProfile.setData() // to modify and customize the profile > > > Following existing tests are modified to update a copy of Built-In profile. > > - java/awt/color/ICC_Profile/SetHeaderInfo.java > - java/awt/color/ICC_ProfileSetNullDataTest.java > - sun/java2d/cmm/ProfileOp/SetDataTest.java Harshitha Onkar has updated the pull request incrementally with one additional commit since the last revision: single case type ------------- Changes: - all: https://git.openjdk.org/jdk/pull/23606/files - new: https://git.openjdk.org/jdk/pull/23606/files/0fe58a9a..71a125c6 Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=23606&range=21 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=23606&range=20-21 Stats: 10 lines in 1 file changed: 0 ins; 0 del; 10 mod Patch: https://git.openjdk.org/jdk/pull/23606.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/23606/head:pull/23606 PR: https://git.openjdk.org/jdk/pull/23606 From serb at openjdk.org Thu Apr 3 05:29:54 2025 From: serb at openjdk.org (Sergey Bylokhov) Date: Thu, 3 Apr 2025 05:29:54 GMT Subject: RFR: 8352407: PixelInterleavedSampleModel with unused components throws RasterFormatException: Incorrect pixel stride [v2] In-Reply-To: References: <0IkJpQYFv_3lUjxKvd1T0EqtOeO4wN5XYEX1pJFf6Pc=.0eac5063-1b53-461b-8bc8-ca1320147a5a@github.com> <7PoUZmVaNchLPzKKv-Y2Kb3K2iTCIwF_GBxWgYOeSj8=.7c57eb44-10de-4e95-9fea-07ea39ed53ee@github.com> <9t4GmM3f624NKzcRzc1I4m-jDABNjukX93uJiEge0Bs=.b3a8c0f9-cd9c-4f61-9d80-700e5d37fcc7@github.com> Message-ID: On Wed, 2 Apr 2025 20:12:48 GMT, Nikita Gubarkov wrote: > > is it possible for pixelStride to be smaller than maxBandOff? > > Surprisingly, yes! Band offsets are arbitrary, even for `PixelInterleavedSampleModel`, the only restriction is that `maxBandOff - minBandOff <= pixelStride` But isn't it essentially the same thing? It just shifts the "pixelStride" window in one direction or another. > Both could be correct and there doesn't seem to be any other info, which could allow us to determine this unambiguously. This "real starting pixel offset" is implicitly assumed, when working with [known types in native code](https://github.com/openjdk/jdk/blob/209e72d311234c8279289172dab2cbb255e4fed9/src/java.desktop/share/classes/sun/awt/image/BufImgSurfaceData.java#L319), but is explicitly stored nowhere. It depends on where and when the ColorModel/SampleModel/Raster were created. If the raster was created by our code and we can determine the starting offsets, and if we can confirm that the gaps are safe to read, then we could set some flags. These flags could be recognized by the pipelines to enable fast-path optimizations. Just one example: private static BufferedImage makeCustom3BYTE_BGR() { ColorSpace cs = ColorSpace.getInstance(ColorSpace.CS_sRGB); int[] nBits = {8, 8, 8}; int[] bOffs = {2, 1, 0}; ColorModel colorModel = new ComponentColorModel(cs, nBits, false, false, Transparency.OPAQUE, DataBuffer.TYPE_BYTE); PixelInterleavedSampleModel sm = new PixelInterleavedSampleModel(DataBuffer.TYPE_BYTE, 2, 1, 400, 4000, bOffs); WritableRaster raster = Raster.createWritableRaster(sm, null); System.out.println("raster.getDataBuffer().getSize() = " + raster.getDataBuffer().getSize()); return new BufferedImage(colorModel, raster, true, null); } BufferedImage bi = new BufferedImage(3000, 3000, TYPE_INT_ARGB); BufferedImage src = makeCustom3BYTE_BGR(); Graphics2D g2d = bi.createGraphics(); g2d.setTransform(new AffineTransform()); g2d.drawImage(src, 0, 0, null); g2d.dispose(); The size of the image is "403", meaning it does not include the gap after the last pixel data. Now, if we attempt to blit this into various pipelines, we may encounter different slow/fast paths: - CMM code will bail out since such formats are not supported. - OGL/Metal code [supports](https://github.com/openjdk/jdk/blob/b01026abaab0b65f9ec0920d66a8ff1fa868d351/src/java.desktop/share/native/common/java2d/opengl/OGLBlitLoops.c#L409C40-L409C51) gaps in scanlines but does not support gaps between pixels. As a result, the slow path will be used via an intermediate ARGB_PRE surface. - Native loops will also bail out, falling back to the most [generic java implementation](https://github.com/openjdk/jdk/blob/b01026abaab0b65f9ec0920d66a8ff1fa868d351/src/java.desktop/share/classes/sun/java2d/loops/CustomComponent.java#L144). In this particular case, we can probably optimize the handling, but how should we deal with similar random rasters we might encounter? getDataElements/setDataElements is the only solution similar to OpaqueCopyArgbToAny? >But what if our last pixel also contains padding, which is not resident? Then we would have to repeat the [same procedure](https://github.com/openjdk/jdk/blob/130b0cdaa6604da47a893e5425547acf3d5253f4/src/java.desktop/share/classes/java/awt/image/ComponentSampleModel.java#L247) with finding the last used component and so on. Yes, that is how it is usually implemented. When creating a surface, image, or raster, validation is performed, and specific flags are set(like pixel data format + all offsets). Then, in the pipeline, a blit operation can be registered for such an image with the given flag and a known destination. This blit operation will know how to handle pixel data properly while skipping any gaps. >But the problem with this is that there is no such info in SurfaceDataRasInfo, which could allow us figure out, which components are really used and which bytes are just padding. Moreover, SurfaceDataRasInfo doesn't even have a total size field, so we can't even clamp our copy range to some boundary. It seems that, as of now, we simply don't have generic native loops that support pixel gaps. However, for known formats, there are many specialized loops, and that information is stored not in SurfaceDataRasInfo but in various macro-based [loops](https://github.com/openjdk/jdk/blob/b01026abaab0b65f9ec0920d66a8ff1fa868d351/src/java.desktop/share/native/libawt/java2d/loops/IntRgb.h#L38). ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/24111#discussion_r2026221415 From serb at openjdk.org Thu Apr 3 06:11:48 2025 From: serb at openjdk.org (Sergey Bylokhov) Date: Thu, 3 Apr 2025 06:11:48 GMT Subject: RFR: 8352407: PixelInterleavedSampleModel with unused components throws RasterFormatException: Incorrect pixel stride [v2] In-Reply-To: References: <0IkJpQYFv_3lUjxKvd1T0EqtOeO4wN5XYEX1pJFf6Pc=.0eac5063-1b53-461b-8bc8-ca1320147a5a@github.com> <7PoUZmVaNchLPzKKv-Y2Kb3K2iTCIwF_GBxWgYOeSj8=.7c57eb44-10de-4e95-9fea-07ea39ed53ee@github.com> <9t4GmM3f624NKzcRzc1I4m-jDABNjukX93uJiEge0Bs=.b3a8c0f9-cd9c-4f61-9d80-700e5d37fcc7@github.com> Message-ID: On Thu, 3 Apr 2025 05:27:23 GMT, Sergey Bylokhov wrote: >>> please add a test case for this scenario >> >> Sure, gonna look into it. >> >>> is it possible for pixelStride to be smaller than maxBandOff? >> >> Surprisingly, yes! Band offsets are arbitrary, even for `PixelInterleavedSampleModel`, the only restriction is that `maxBandOff - minBandOff <= pixelStride` **(which is wrong btw, there should be < instead)** - [see here](https://github.com/openjdk/jdk/blob/209e72d311234c8279289172dab2cbb255e4fed9/src/java.desktop/share/classes/java/awt/image/PixelInterleavedSampleModel.java#L94). >> >> That's where the ambiguity I mentioned comes from - the code doesn't assume any specific starting offset and we cannot expect band offsets to always be in `[0, pixelStride)` range. Therefore, whenever there is an unused padding at the beginning or end of the pixel, this creates some wiggle. Let's imagine we have some weird non-zero starting offset: >> >> x x x x x R G B x R G B x R G B x x x x x >> >> Knowing that `pixelStride=4` we might split it like this: >> >> x x x x | x R G B | x R G B | x R G B | x x x x x >> >> Or like this: >> >> x x x x x | R G B x | R G B x | R G B x | x x x x >> >> Both could be correct and there doesn't seem to be any other info, which could allow us to determine this unambiguously. This "real starting pixel offset" is implicitly assumed, when working with [known types in native code](https://github.com/openjdk/jdk/blob/209e72d311234c8279289172dab2cbb255e4fed9/src/java.desktop/share/classes/sun/awt/image/BufImgSurfaceData.java#L319), but is explicitly stored nowhere. >> >> _This is all theoretical though, I have never seen a pixel-interleaved image with a non-zero starting offset._ >> >> ### Regarding the `pixelStride` and `scanlineStride` >> >> I am reading the documentation for [SurfaceDataRasInfo](https://github.com/openjdk/jdk/blob/209e72d311234c8279289172dab2cbb255e4fed9/src/java.desktop/share/native/libawt/java2d/SurfaceData.h#L71): >>> Valid memory locations are required at: >> `*(pixeltype *) (((char *)rasBase) + y * scanStride + x * pixelStride)` >> for each x, y pair such that (bounds.x1 <= x < bounds.x2) and (bounds.y1 <= y < bounds.y2). >> >> So it doesn't require the end of the last scanline to be resident in memory, however `pixeltype` is not defined there, so it's hard to tell whether it's assumed that `sizeof(pixeltype) == pixelStride`, or that this question was considered at all. I am using a little thought experiment to figure this out: >> >> Imagine that we want to copy image data from a gi... > >> > is it possible for pixelStride to be smaller than maxBandOff? >> >> Surprisingly, yes! Band offsets are arbitrary, even for `PixelInterleavedSampleModel`, the only restriction is that `maxBandOff - minBandOff <= pixelStride` > > But isn't it essentially the same thing? It just shifts the "pixelStride" window in one direction or another. > >> Both could be correct and there doesn't seem to be any other info, which could allow us to determine this unambiguously. This "real starting pixel offset" is implicitly assumed, when working with [known types in native code](https://github.com/openjdk/jdk/blob/209e72d311234c8279289172dab2cbb255e4fed9/src/java.desktop/share/classes/sun/awt/image/BufImgSurfaceData.java#L319), but is explicitly stored nowhere. > > It depends on where and when the ColorModel/SampleModel/Raster were created. If the raster was created by our code and we can determine the starting offsets, and if we can confirm that the gaps are safe to read, then we could set some flags(JDK-8353542). These flags could be recognized by the pipelines to enable fast-path optimizations. > > Just one example: > > private static BufferedImage makeCustom3BYTE_BGR() { > ColorSpace cs = ColorSpace.getInstance(ColorSpace.CS_sRGB); > int[] nBits = {8, 8, 8}; > int[] bOffs = {2, 1, 0}; > ColorModel colorModel = new ComponentColorModel(cs, nBits, false, false, > Transparency.OPAQUE, > DataBuffer.TYPE_BYTE); > > PixelInterleavedSampleModel sm = > new PixelInterleavedSampleModel(DataBuffer.TYPE_BYTE, > 2, 1, 400, 4000, bOffs); > WritableRaster raster = Raster.createWritableRaster(sm, null); > > System.out.println("raster.getDataBuffer().getSize() = " + raster.getDataBuffer().getSize()); > return new BufferedImage(colorModel, raster, true, null); > } > > BufferedImage bi = new BufferedImage(3000, 3000, TYPE_INT_ARGB); > BufferedImage src = makeCustom3BYTE_BGR(); > Graphics2D g2d = bi.createGraphics(); > g2d.setTransform(new AffineTransform()); > g2d.drawImage(src, 0, 0, null); > g2d.dispose(); > > > The size of the image is "403", meaning it does not include the gap after the last pixel data. > > Now, if we attempt to blit this into various pipelines, we may encounter different slow/fast paths: > > - CMM code will bail out since such formats are not suppor... Probably, the changes similar to https://github.com/openjdk/jdk/pull/24378 will help in some cases. However, for the generic case with random rasters, it will be necessary to determine whether the gaps at the end of the image are actually stored in the raster or not. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/24111#discussion_r2026271718 From ngubarkov at openjdk.org Thu Apr 3 06:38:53 2025 From: ngubarkov at openjdk.org (Nikita Gubarkov) Date: Thu, 3 Apr 2025 06:38:53 GMT Subject: RFR: 8352407: PixelInterleavedSampleModel with unused components throws RasterFormatException: Incorrect pixel stride [v2] In-Reply-To: References: <0IkJpQYFv_3lUjxKvd1T0EqtOeO4wN5XYEX1pJFf6Pc=.0eac5063-1b53-461b-8bc8-ca1320147a5a@github.com> <7PoUZmVaNchLPzKKv-Y2Kb3K2iTCIwF_GBxWgYOeSj8=.7c57eb44-10de-4e95-9fea-07ea39ed53ee@github.com> <9t4GmM3f624NKzcRzc1I4m-jDABNjukX93uJiEge0Bs=.b3a8c0f9-cd9c-4f61-9d80-700e5d37fcc7@github.com> Message-ID: On Thu, 3 Apr 2025 06:09:03 GMT, Sergey Bylokhov wrote: >>> > is it possible for pixelStride to be smaller than maxBandOff? >>> >>> Surprisingly, yes! Band offsets are arbitrary, even for `PixelInterleavedSampleModel`, the only restriction is that `maxBandOff - minBandOff <= pixelStride` >> >> But isn't it essentially the same thing? It just shifts the "pixelStride" window in one direction or another. >> >>> Both could be correct and there doesn't seem to be any other info, which could allow us to determine this unambiguously. This "real starting pixel offset" is implicitly assumed, when working with [known types in native code](https://github.com/openjdk/jdk/blob/209e72d311234c8279289172dab2cbb255e4fed9/src/java.desktop/share/classes/sun/awt/image/BufImgSurfaceData.java#L319), but is explicitly stored nowhere. >> >> It depends on where and when the ColorModel/SampleModel/Raster were created. If the raster was created by our code and we can determine the starting offsets, and if we can confirm that the gaps are safe to read, then we could set some flags. These flags could be recognized by the pipelines to enable fast-path optimizations. >> >> Just one example: >> >> private static BufferedImage makeCustom3BYTE_BGR() { >> ColorSpace cs = ColorSpace.getInstance(ColorSpace.CS_sRGB); >> int[] nBits = {8, 8, 8}; >> int[] bOffs = {2, 1, 0}; >> ColorModel colorModel = new ComponentColorModel(cs, nBits, false, false, >> Transparency.OPAQUE, >> DataBuffer.TYPE_BYTE); >> >> PixelInterleavedSampleModel sm = >> new PixelInterleavedSampleModel(DataBuffer.TYPE_BYTE, >> 2, 1, 400, 4000, bOffs); >> WritableRaster raster = Raster.createWritableRaster(sm, null); >> >> System.out.println("raster.getDataBuffer().getSize() = " + raster.getDataBuffer().getSize()); >> return new BufferedImage(colorModel, raster, true, null); >> } >> >> BufferedImage bi = new BufferedImage(3000, 3000, TYPE_INT_ARGB); >> BufferedImage src = makeCustom3BYTE_BGR(); >> Graphics2D g2d = bi.createGraphics(); >> g2d.setTransform(new AffineTransform()); >> g2d.drawImage(src, 0, 0, null); >> g2d.dispose(); >> >> >> The size of the image is "403", meaning it does not include the gap after the last pixel data. >> >> Now, if we attempt to blit this into various pipelines, we may encounter different slow/fast pat... > > Probably, the changes similar to https://github.com/openjdk/jdk/pull/24378 will help in some cases. However, for the generic case with random rasters, it will be necessary to determine whether the gaps at the end of the image are actually stored in the raster or not. > as of now, we simply don't have generic native loops that support pixel gaps That was kinda what I was actually implementing in Vulkan when I faced this issue. I just accepted any pixel-interleaved surface with 4-byte stride and assumed that I can blit it directly. Just because the stride is 4 bytes, I know I can copy the whole scanline in one go into a matching Vulkan format, like B8G8R8A8_UNORM, and I can handle any component order (including missing alpha channel) with simple swizzling. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/24111#discussion_r2026301933 From serb at openjdk.org Thu Apr 3 07:34:49 2025 From: serb at openjdk.org (Sergey Bylokhov) Date: Thu, 3 Apr 2025 07:34:49 GMT Subject: RFR: 8352407: PixelInterleavedSampleModel with unused components throws RasterFormatException: Incorrect pixel stride [v2] In-Reply-To: References: <0IkJpQYFv_3lUjxKvd1T0EqtOeO4wN5XYEX1pJFf6Pc=.0eac5063-1b53-461b-8bc8-ca1320147a5a@github.com> <7PoUZmVaNchLPzKKv-Y2Kb3K2iTCIwF_GBxWgYOeSj8=.7c57eb44-10de-4e95-9fea-07ea39ed53ee@github.com> <9t4GmM3f624NKzcRzc1I4m-jDABNjukX93uJiEge0Bs=.b3a8c0f9-cd9c-4f61-9d80-700e5d37fcc7@github.com> Message-ID: On Thu, 3 Apr 2025 06:36:04 GMT, Nikita Gubarkov wrote: >I just accepted any pixel-interleaved surface with 4-byte stride and assumed that I can blit it directly. So you implemented logic similar to [this one](https://github.com/openjdk/jdk/blob/bd74922157230c866802b4c5269da81e872525aa/src/java.desktop/share/native/libawt/java2d/loops/LoopMacros.h#L847). I haven?t found yet whether we have logic to fall back to a "generic Java loop" if the gap is not stored in the array and that memcpy fails. If we?re missing this, we should either: - Add the fallback, - Implement another version of the loop that handles the tail, or - Update the current ISOSCALE_BLIT. A similar approach could be implemented for Vulkan as well. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/24111#discussion_r2026378715 From serb at openjdk.org Thu Apr 3 08:36:03 2025 From: serb at openjdk.org (Sergey Bylokhov) Date: Thu, 3 Apr 2025 08:36:03 GMT Subject: RFR: 8347826: Introspector shows wrong method list after 8071693 [v11] In-Reply-To: References: Message-ID: On Wed, 2 Apr 2025 10:03:43 GMT, Roman Marchenko wrote: >> Fixed `com.sun.beans.introspect.MethodInfo#MethodOrder` to make `Introspector.addMethod()` working properly when filtering methods out. >> >> Also, after PR discussion, added the approptiate test cases with corresponding fixes in MethodInfo.java and PropertyInfo.java. >> >> --------- >> `getMethodDescriptors()` returns descriptors of public methods of a class and its parent classes, including default and static methods defined in interfaces. The result doesn't include methods which were declared and not implemented, bridge methods, or methods which were overriden in subclasses. >> >> When a subclass "overrides" a static method from a parent class `getMethodDescriptors()` behaves as follows: >> >> - In case of a clash with a class method, the class version will take precedence rather than interface's one. >> - If the same method appears in multiple classes/interfaces within the same hierarchy, the version from the most specific sub-interface will be selected. >> - If the method appears in classes/interfaces from different hierarchies, the result is undefined, either version can be returned. >> >> `getPropertyDescriptors()` returns descriptors of methods which were identified as getters or setters. As there can be the only method getter/setter per property, the following rules are applied when choosing a getter/setter: >> >> * Getters/setters for the same property defined (not necessarily overriden) in subclasses have higher precedence. >> * If there are getters/setters for the same property defined in the same class and argument types are assignable one to another, the method with the Least Common Supertype has the lower priority. If argument types are not assignable, the result is undefined (any method will be chosen). >> * Gettters/setters declared and not implemented are not considered. > > Roman Marchenko has updated the pull request incrementally with one additional commit since the last revision: > > Implementing new requirements src/java.desktop/share/classes/com/sun/beans/introspect/MethodInfo.java line 111: > 109: > 110: // Add methods inherited from interfaces > 111: Queue> ifaceQueue = new LinkedList<>(List.of(type.getInterfaces())); Please check if the performance of ArrayDeque it might(should) be faster? ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/23443#discussion_r2026483196 From rmarchenko at openjdk.org Thu Apr 3 09:21:38 2025 From: rmarchenko at openjdk.org (Roman Marchenko) Date: Thu, 3 Apr 2025 09:21:38 GMT Subject: RFR: 8347826: Introspector shows wrong method list after 8071693 [v12] In-Reply-To: References: Message-ID: <0645YLoDLjcLbjQxBs3QFCFVvenQjAeJlZANZ0hay_8=.e50b8551-4a2f-4cc5-b910-5f5544beb1f7@github.com> > Fixed `com.sun.beans.introspect.MethodInfo#MethodOrder` to make `Introspector.addMethod()` working properly when filtering methods out. > > Also, after PR discussion, added the approptiate test cases with corresponding fixes in MethodInfo.java and PropertyInfo.java. > > --------- > `getMethodDescriptors()` returns descriptors of public methods of a class and its parent classes, including default and static methods defined in interfaces. The result doesn't include methods which were declared and not implemented, bridge methods, or methods which were overriden in subclasses. > > When a subclass "overrides" a static method from a parent class `getMethodDescriptors()` behaves as follows: > > - In case of a clash with a class method, the class version will take precedence rather than interface's one. > - If the same method appears in multiple classes/interfaces within the same hierarchy, the version from the most specific sub-interface will be selected. > - If the method appears in classes/interfaces from different hierarchies, the result is undefined, either version can be returned. > > `getPropertyDescriptors()` returns descriptors of methods which were identified as getters or setters. As there can be the only method getter/setter per property, the following rules are applied when choosing a getter/setter: > > * Getters/setters for the same property defined (not necessarily overriden) in subclasses have higher precedence. > * If there are getters/setters for the same property defined in the same class and argument types are assignable one to another, the method with the Least Common Supertype has the lower priority. If argument types are not assignable, the result is undefined (any method will be chosen). > * Gettters/setters declared and not implemented are not considered. Roman Marchenko has updated the pull request incrementally with one additional commit since the last revision: Fixing review comments ------------- Changes: - all: https://git.openjdk.org/jdk/pull/23443/files - new: https://git.openjdk.org/jdk/pull/23443/files/cd00cee2..980ebde5 Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=23443&range=11 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=23443&range=10-11 Stats: 8 lines in 1 file changed: 1 ins; 2 del; 5 mod Patch: https://git.openjdk.org/jdk/pull/23443.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/23443/head:pull/23443 PR: https://git.openjdk.org/jdk/pull/23443 From rmarchenko at openjdk.org Thu Apr 3 09:21:38 2025 From: rmarchenko at openjdk.org (Roman Marchenko) Date: Thu, 3 Apr 2025 09:21:38 GMT Subject: RFR: 8347826: Introspector shows wrong method list after 8071693 [v11] In-Reply-To: References: Message-ID: On Thu, 3 Apr 2025 08:33:20 GMT, Sergey Bylokhov wrote: >> Roman Marchenko has updated the pull request incrementally with one additional commit since the last revision: >> >> Implementing new requirements > > src/java.desktop/share/classes/com/sun/beans/introspect/MethodInfo.java line 111: > >> 109: >> 110: // Add methods inherited from interfaces >> 111: Queue> ifaceQueue = new LinkedList<>(List.of(type.getInterfaces())); > > Please check if the performance of ArrayDeque it might(should) be faster? Yes, you're right. Fixed. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/23443#discussion_r2026562204 From ngubarkov at openjdk.org Thu Apr 3 09:30:53 2025 From: ngubarkov at openjdk.org (Nikita Gubarkov) Date: Thu, 3 Apr 2025 09:30:53 GMT Subject: RFR: 8352407: PixelInterleavedSampleModel with unused components throws RasterFormatException: Incorrect pixel stride [v2] In-Reply-To: References: <0IkJpQYFv_3lUjxKvd1T0EqtOeO4wN5XYEX1pJFf6Pc=.0eac5063-1b53-461b-8bc8-ca1320147a5a@github.com> <7PoUZmVaNchLPzKKv-Y2Kb3K2iTCIwF_GBxWgYOeSj8=.7c57eb44-10de-4e95-9fea-07ea39ed53ee@github.com> <9t4GmM3f624NKzcRzc1I4m-jDABNjukX93uJiEge0Bs=.b3a8c0f9-cd9c-4f61-9d80-700e5d37fcc7@github.com> Message-ID: On Thu, 3 Apr 2025 07:32:24 GMT, Sergey Bylokhov wrote: >>> as of now, we simply don't have generic native loops that support pixel gaps >> >> That was kinda what I was actually implementing in Vulkan when I faced this issue. I just accepted any pixel-interleaved surface with 4-byte stride and assumed that I can blit it directly. Just because the stride is 4 bytes, I know I can copy the whole scanline in one go into a matching Vulkan format, like B8G8R8A8_UNORM, and I can handle any component order (including missing alpha channel) with simple swizzling. > >>I just accepted any pixel-interleaved surface with 4-byte stride and assumed that I can blit it directly. > > So you implemented logic similar to [this one](https://github.com/openjdk/jdk/blob/bd74922157230c866802b4c5269da81e872525aa/src/java.desktop/share/native/libawt/java2d/loops/LoopMacros.h#L847). > > I haven?t found yet whether we have logic to fall back to a "generic Java loop" if the gap is not stored in the array and that memcpy fails. If we?re missing this, we should either: > > - Add the fallback, > - Implement another version of the loop that handles the tail, or > - Update the current ISOSCALE_BLIT. > > A similar approach could be implemented for Vulkan as well. I get the idea. Actually, my Vulkan blit routines know the component order (needed for swizzling anyway), so instead of copying `scanlineStride` or `width * pixelStride`, I can copy `(width - 1) * pixelStride + maxBandOffset + 1` (I don't like breaking the alignment at the end, but anyway). However, supporting the gap at the end of the pixel seems like a lot of burden to me - not all current code seems to consider this possibility and for the future code it's too easy to get wrong. Some side thoughts: I think we rely on predefined formats and loops too much. As I already mentioned, `SurfaceDataRasInfo` doesn't have info about its bands and doesn't even have a total size. We rely on specific loops registered for specific surface types, which only works well when we created those surfaces by ourselves. Example: I profiled Intellij IDEA to see which blit loops are often used there and noticed that icons are loaded as 4-byte RGBA images. See the issue? That's a `TYPE_CUSTOM` image with some generic `SurfaceType` - it doesn't have native raster ops initialized, so it can only go through a generic software loop! That's how I came to https://github.com/openjdk/jdk/pull/24378. So what I was trying to do with that Vulkan work is to make it more generic - register loops for more generic surface types and dynamically inspect their properties to see whether we can actually do an optimal blit. And given that 99% of the time those are 3/4-bytes per pixel RGBA/ARGB/BGR/etc., it's very easy to generalize, but we don't seem to have enough flexibility for that. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/24111#discussion_r2026575943 From aivanov at openjdk.org Thu Apr 3 11:20:05 2025 From: aivanov at openjdk.org (Alexey Ivanov) Date: Thu, 3 Apr 2025 11:20:05 GMT Subject: RFR: 8353138: Screen capture for test TaskbarPositionTest.java, failure case [v2] In-Reply-To: References: Message-ID: On Tue, 1 Apr 2025 11:16:01 GMT, Renjith Kannath Pariyangad wrote: >> Hi Reviewers, >> >> Added screen capture in case of test failure using Robot. >> >> Please review and let me know your suggestion if any. > > Renjith Kannath Pariyangad has updated the pull request incrementally with one additional commit since the last revision: > > Updated copyright year Changes requested by aivanov (Reviewer). test/jdk/javax/swing/Popup/TaskbarPositionTest.java line 218: > 216: > 217: // for debugging purpose, saves screen capture when test fails. > 218: private static void saveScreenCapture(Rectangle bounds) { The comment is redundant. I propose to move this method to the bottom of the class ? it's the least important piece of code in the entire test class. Modify the `saveScreenCapture` method to save a screenshot of all the screens. test/jdk/javax/swing/Popup/TaskbarPositionTest.java line 221: > 219: BufferedImage image = robot.createScreenCapture(bounds); > 220: try { > 221: ImageIO.write(image,"png", new File("Screenshot.png")); Suggestion: ImageIO.write(image, "png", new File("Screenshot.png")); Space after the comma. test/jdk/javax/swing/Popup/TaskbarPositionTest.java line 234: > 232: saveScreenCapture(checkBounds); > 233: throw new RuntimeException("Popup not visible"); > 234: } I don't really like this approach, you're modifying several places where an exception can be thrown, but there are other places. I suggest adding a catch section into the `main` method: robot.waitForIdle(); } catch (Throwable t) { saveScreenCapture(screens); throw t; } finally { SwingUtilities.invokeAndWait(() -> { This way you capture screenshot in one place and it automatically covers *all the cases* where an error is thrown, which avoids adding explicit calls to save the screenshots. You may pass `robot` too. I think you should make a screenshot of all the screens. ------------- PR Review: https://git.openjdk.org/jdk/pull/24286#pullrequestreview-2739457459 PR Review Comment: https://git.openjdk.org/jdk/pull/24286#discussion_r2026773666 PR Review Comment: https://git.openjdk.org/jdk/pull/24286#discussion_r2026774176 PR Review Comment: https://git.openjdk.org/jdk/pull/24286#discussion_r2026768384 From aivanov at openjdk.org Thu Apr 3 11:20:06 2025 From: aivanov at openjdk.org (Alexey Ivanov) Date: Thu, 3 Apr 2025 11:20:06 GMT Subject: RFR: 8353138: Screen capture for test TaskbarPositionTest.java, failure case [v2] In-Reply-To: References: Message-ID: On Fri, 28 Mar 2025 16:34:59 GMT, Mikhail Yankelevich 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 78: > >> 76: public class TaskbarPositionTest implements ActionListener { >> 77: >> 78: private static JFrame frame; > > Nit: I don't think `* @run main TaskbarPositionTest` is needed. But it's fine as it is too, don't have any strong feelings It may not work without explicit `@run` because the test contains `@build` tags. `@run` is implied if there are no other commands, such as `@compile` or `@build`, but it's not the case in this test. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/24286#discussion_r2026779725 From aivanov at openjdk.org Thu Apr 3 11:20:06 2025 From: aivanov at openjdk.org (Alexey Ivanov) Date: Thu, 3 Apr 2025 11:20:06 GMT Subject: RFR: 8353138: Screen capture for test TaskbarPositionTest.java, failure case [v2] In-Reply-To: References: Message-ID: On Tue, 1 Apr 2025 12:02:49 GMT, Renjith Kannath Pariyangad wrote: >> 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. I agree with Renjith. If you call `saveScreenCapture` once in the `main` method as I suggest, you can pass `robot` to `saveScreenCapture`, in which case `robot` can remain local variable. >> test/jdk/javax/swing/Popup/TaskbarPositionTest.java line 223: >> >>> 221: ImageIO.write(image,"png", new File("Screenshot.png")); >>> 222: } catch (IOException e) { >>> 223: e.printStackTrace(); >> >> I'm not sure it's the best idea to hide the error and just print it into stdout. Wouldn't it be better to just throw the error, what do you think? > > I don't think its a good idea > 1. IOException was not the original intention of this test and its only for additional information > 2. If we throw the error we will miss the actual exception, potentially that was the next instruction. Yes, we don't care about `IOException`, it can occur only after the test already failed, and it's important to preserve the original exception. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/24286#discussion_r2026772299 PR Review Comment: https://git.openjdk.org/jdk/pull/24286#discussion_r2026769752 From aivanov at openjdk.org Thu Apr 3 11:27:58 2025 From: aivanov at openjdk.org (Alexey Ivanov) Date: Thu, 3 Apr 2025 11:27:58 GMT Subject: RFR: 8352966: Opensource Several Font related tests - Batch 2 In-Reply-To: References: Message-ID: On Wed, 2 Apr 2025 14:55:53 GMT, Abhishek Kumar wrote: > Font related Applet tests are converted to manual and open sourced. Marked as reviewed by aivanov (Reviewer). ------------- PR Review: https://git.openjdk.org/jdk/pull/24381#pullrequestreview-2739512832 From dgredler at openjdk.org Thu Apr 3 11:28:23 2025 From: dgredler at openjdk.org (Daniel Gredler) Date: Thu, 3 Apr 2025 11:28:23 GMT Subject: RFR: 8353230: Emoji rendering regression after JDK-8208377 Message-ID: <-N8_d2SHcl-h9yG8t6-WKGF_nGLJZQTu4ymMD2oPGrg=.651c8251-b235-4681-b82a-4ee680eb6593@github.com> It looks like this regression actually fits into a longer series of fixes / regressions in this area: - [JDK-4517298](https://bugs.openjdk.org/browse/JDK-4517298) fixed metrics for zero-width characters, but broke some ligatures / glyph substitutions - [JDK-7017058](https://bugs.openjdk.org/browse/JDK-7017058) fixed the ligatures / glyph substitutions, but broke some zero-width metrics - [JDK-8208377](https://bugs.openjdk.org/browse/JDK-8208377) fixed some metrics and rendering for zero-width characters, but broke some ligatures / glyph substitutions - Now, with this PR, we aim to fix the ligatures without re-breaking zero-width metrics and display We have two different types of use cases pulling `CharToGlyphMapper` in two different directions: the users who need raw, untransformed glyph info, and the users who need normalized / transformed glyph info. It looks to me like, in the current code base, the only `CharToGlyphMapper` user which requires raw font data is HarfBuzz (explicitly confirmed with the HarfBuzz team here: https://github.com/harfbuzz/harfbuzz/discussions/5234). The regression mechanism at play here is that the HarfBuzz font callbacks are currently providing HarfBuzz with transformed glyph info (e.g. ZWJ -> INVISIBLE_GLYPH_ID), which prevents HarfBuzz from recognizing and applying the correct font GSUB substitutions (which involve ZWJ). In order to fix this without (yet again) breaking metrics and display behavior elsewhere, I've added two methods to `CharToGlyphMapper` which provide access to raw glyph info, to be used by the HarfBuzz font callbacks: `charToGlyphRaw(int)` and `charToVariationGlyphRaw(int)`. Note two intricacies related to `CompositeGlyphMapper`: 1. We need to be careful to only cache raw (untransformed) values, to avoid conflicts between requests for a raw version of a glyph and a transformed version of the same glyph. Another option would have been two separate caches, but I don't think that's necessary. 2. Consumers who are using `CompositeGlyphMapper.SLOTMASK` to check glyph slots (e.g. `FontRunIterator` and `CTextPipe`) will "see" invisible glyphs as having come from slot 0. This isn't new, and I think it's OK, but something to be aware of. The glyph cache handling in `CCharToGlyphMapper` (for macOS) also requires care to avoid mixing value types. Please also note that I'm not sure if the tweak to `sunFont.c` is being tested, since FFM is being used by default for HarfBuzz integration. (Is there a plan to remove the JNI version soon?) This PR includes a self-contained regression test. It includes a small font created just for this test, which exercises the ligature / glyph substitution infrastructure. The font tests, including the new regression test, all pass locally on Linux, Windows and macOS (`make test TEST="jtreg:test/jdk/java/awt/font"`). Interestingly, the changes for JDK-7017058 (mentioned above) included a test (`ZWJLigatureTest`) which I think would have caught this last regression, but it depends on optional Windows fonts which I guess do not exist on any commonly-used test infrastructure. This should not be an issue with the new test, since it does not depend on any external fonts. ------------- Commit messages: - Finish macOS implementation - Differentiate CharToGlyphMapper users who want raw vs normalized glyph info Changes: https://git.openjdk.org/jdk/pull/24412/files Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=24412&range=00 Issue: https://bugs.openjdk.org/browse/JDK-8353230 Stats: 305 lines in 10 files changed: 229 ins; 27 del; 49 mod Patch: https://git.openjdk.org/jdk/pull/24412.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/24412/head:pull/24412 PR: https://git.openjdk.org/jdk/pull/24412 From aivanov at openjdk.org Thu Apr 3 11:29:50 2025 From: aivanov at openjdk.org (Alexey Ivanov) Date: Thu, 3 Apr 2025 11:29:50 GMT Subject: RFR: 8353320: Open source more Swing text tests [v2] In-Reply-To: <8ZDojhcsnoBVGsFjEkNNBnX9ZOQHP22oC4B9F_qz0kk=.9c232427-adc1-4307-9252-2d198845bde0@github.com> References: <8ZDojhcsnoBVGsFjEkNNBnX9ZOQHP22oC4B9F_qz0kk=.9c232427-adc1-4307-9252-2d198845bde0@github.com> Message-ID: On Wed, 2 Apr 2025 19:30:43 GMT, Phil Race wrote: >> Swing text related tests being moved to open source. > > Phil Race has updated the pull request incrementally with one additional commit since the last revision: > > 8353320 Marked as reviewed by aivanov (Reviewer). ------------- PR Review: https://git.openjdk.org/jdk/pull/24365#pullrequestreview-2739517479 From aivanov at openjdk.org Thu Apr 3 11:29:52 2025 From: aivanov at openjdk.org (Alexey Ivanov) Date: Thu, 3 Apr 2025 11:29:52 GMT Subject: RFR: 8353320: Open source more Swing text tests [v2] In-Reply-To: References: Message-ID: On Wed, 2 Apr 2025 19:24:19 GMT, Phil Race wrote: >> test/jdk/javax/swing/text/html/HTMLEditorKit/bug4245401.java line 61: >> >>> 59: kit.read(new StringReader(text), doc, 0); >>> 60: } catch (Exception e) { >>> 61: } >> >> If an exception occurs, the test should fail; the exception shouldn't be *silently* ignored. > > Not something I added but I can re-throw as RTE. I verified that will cause the test to fail. Thank you. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/24365#discussion_r2026802880 From aivanov at openjdk.org Thu Apr 3 11:43:53 2025 From: aivanov at openjdk.org (Alexey Ivanov) Date: Thu, 3 Apr 2025 11:43:53 GMT Subject: RFR: 8353309: Open source several Swing text tests [v2] In-Reply-To: References: <5ZdH5CTaGKCfpRX2ONaNPRZ2pzSjAJWLvDk9jxRxOZI=.a58a4c8c-ca7e-4fc6-8ec5-177acd1edc91@github.com> Message-ID: On Wed, 2 Apr 2025 19:47:09 GMT, Phil Race wrote: >> Open source several Swing text / html related regression tests. > > Phil Race has updated the pull request incrementally with one additional commit since the last revision: > > 8353309 Marked as reviewed by aivanov (Reviewer). ------------- PR Review: https://git.openjdk.org/jdk/pull/24364#pullrequestreview-2739552627 From aivanov at openjdk.org Thu Apr 3 11:54:54 2025 From: aivanov at openjdk.org (Alexey Ivanov) Date: Thu, 3 Apr 2025 11:54:54 GMT Subject: RFR: 8353309: Open source several Swing text tests [v2] In-Reply-To: References: <5ZdH5CTaGKCfpRX2ONaNPRZ2pzSjAJWLvDk9jxRxOZI=.a58a4c8c-ca7e-4fc6-8ec5-177acd1edc91@github.com> Message-ID: On Wed, 2 Apr 2025 19:32:32 GMT, Phil Race wrote: >> test/jdk/javax/swing/text/BoxView/BaselineTest.java line 119: >> >>> 117: } >>> 118: >>> 119: class PaintLabel extends JLabel { >> >> Could you please move all the supporting classes `PaintLabel`, `CustomComponentView`, `CustomEditorKit` into the main test class `BaselineTest` as static nested classes. >> >> This greatly simplifies working with test in IDE, there'll be no duplicate classes. > > I guess I can but I don't know where you are seeing duplicate classes. Now that we use a flat layout for tests, marking a folder as a *test source* folder may result in duplicate classes if any of the tests in the current folder or another test source folder with tests has classes with the same name. It makes running tests from IDE impossible because the test classes fail to compile. This issue often occurs with `Sysout` standard test machinery (that we're slowly getting rid of by replacing with `PassFailJFrame`) and other cases? The chance of getting such conflicts / duplicate class names is significantly reduced if all the supporting classes are nested inside the main test class. >> test/jdk/javax/swing/text/html/FormView/4473401/bug4473401.java line 76: >> >>> 74: public void hyperlinkUpdate(HyperlinkEvent e) { >>> 75: if (e instanceof FormSubmitEvent) { >>> 76: jep.setText("If you see this page the test PASSED"); >> >> Does it mean, the test is semi-automatic, and you can call `PassFailJFrame.forcePass()` in this case? > > I don't think so. The sequence is the user presses the buttom, the event is received here which calls an API to set text and then the user has to visually verify that the text was displayed. Yeah, makes sense. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/24364#discussion_r2026835526 PR Review Comment: https://git.openjdk.org/jdk/pull/24364#discussion_r2026839497 From rkannathpari at openjdk.org Thu Apr 3 12:38:47 2025 From: rkannathpari at openjdk.org (Renjith Kannath Pariyangad) Date: Thu, 3 Apr 2025 12:38:47 GMT Subject: RFR: 8353138: Screen capture for test TaskbarPositionTest.java, failure case [v3] In-Reply-To: References: Message-ID: > Hi Reviewers, > > Added screen capture in case of test failure using Robot. > > Please review and let me know your suggestion if any. Renjith Kannath Pariyangad has updated the pull request incrementally with one additional commit since the last revision: Updated based on suggesion ------------- Changes: - all: https://git.openjdk.org/jdk/pull/24286/files - new: https://git.openjdk.org/jdk/pull/24286/files/cec51c11..b5dc54a2 Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=24286&range=02 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=24286&range=01-02 Stats: 15 lines in 1 file changed: 4 ins; 5 del; 6 mod Patch: https://git.openjdk.org/jdk/pull/24286.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/24286/head:pull/24286 PR: https://git.openjdk.org/jdk/pull/24286 From aivanov at openjdk.org Thu Apr 3 13:10:55 2025 From: aivanov at openjdk.org (Alexey Ivanov) Date: Thu, 3 Apr 2025 13:10:55 GMT Subject: RFR: 8353138: Screen capture for test TaskbarPositionTest.java, failure case [v3] In-Reply-To: References: Message-ID: On Thu, 3 Apr 2025 12:38:47 GMT, Renjith Kannath Pariyangad wrote: >> Hi Reviewers, >> >> Added screen capture in case of test failure using Robot. >> >> Please review and let me know your suggestion if any. > > Renjith Kannath Pariyangad has updated the pull request incrementally with one additional commit since the last revision: > > Updated based on suggesion Changes requested by aivanov (Reviewer). test/jdk/javax/swing/Popup/TaskbarPositionTest.java line 223: > 221: } catch (IOException e) { > 222: e.printStackTrace(); > 223: } It's not quite what I wanted to see? private static void saveScreenCapture(Robot robot, GraphicsDevice[] screens) { for (int i = 0; i < screens.length; i++) { Rectangle bounds = screens[i].getDefaultConfiguration() .getBounds(); BufferedImage image = robot.createScreenCapture(bounds); try { ImageIO.write(image, "png", new File("Screenshot" + i + ".png")); } catch (IOException e) { e.printStackTrace(); } } } ------------- PR Review: https://git.openjdk.org/jdk/pull/24286#pullrequestreview-2739774588 PR Review Comment: https://git.openjdk.org/jdk/pull/24286#discussion_r2026955609 From aivanov at openjdk.org Thu Apr 3 13:10:56 2025 From: aivanov at openjdk.org (Alexey Ivanov) Date: Thu, 3 Apr 2025 13:10:56 GMT Subject: RFR: 8353138: Screen capture for test TaskbarPositionTest.java, failure case [v3] In-Reply-To: References: Message-ID: On Thu, 3 Apr 2025 13:04:22 GMT, Alexey Ivanov wrote: >> Renjith Kannath Pariyangad has updated the pull request incrementally with one additional commit since the last revision: >> >> Updated based on suggesion > > test/jdk/javax/swing/Popup/TaskbarPositionTest.java line 223: > >> 221: } catch (IOException e) { >> 222: e.printStackTrace(); >> 223: } > > It's not quite what I wanted to see? > > > private static void saveScreenCapture(Robot robot, GraphicsDevice[] screens) { > for (int i = 0; i < screens.length; i++) { > Rectangle bounds = screens[i].getDefaultConfiguration() > .getBounds(); > BufferedImage image = robot.createScreenCapture(bounds); > try { > ImageIO.write(image, "png", > new File("Screenshot" + i + ".png")); > } catch (IOException e) { > e.printStackTrace(); > } > } > } And `screens` variable already exits in `main`. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/24286#discussion_r2026961940 From aivanov at openjdk.org Thu Apr 3 13:14:49 2025 From: aivanov at openjdk.org (Alexey Ivanov) Date: Thu, 3 Apr 2025 13:14:49 GMT Subject: RFR: 8353138: Screen capture for test TaskbarPositionTest.java, failure case [v2] In-Reply-To: References: Message-ID: On Thu, 3 Apr 2025 11:12:39 GMT, Alexey Ivanov wrote: > I propose moving this method to the bottom of the class ? it's the least important piece of code in the entire test class. I'm still for moving `saveScreenCapture` to the bottom of the class. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/24286#discussion_r2026969188 From aivanov at openjdk.org Thu Apr 3 13:52:51 2025 From: aivanov at openjdk.org (Alexey Ivanov) Date: Thu, 3 Apr 2025 13:52:51 GMT Subject: RFR: 8224968: javax/swing/JColorChooser/Test6827032.java times out in Windows 10 In-Reply-To: <3MCr_BXtTLAnt1pEMH0dW96FXrIMeout345TMUw04Ts=.e0ec91be-0211-4485-8edd-4325c6ed589d@github.com> References: <3MCr_BXtTLAnt1pEMH0dW96FXrIMeout345TMUw04Ts=.e0ec91be-0211-4485-8edd-4325c6ed589d@github.com> Message-ID: On Fri, 28 Feb 2025 15:42:51 GMT, Alexey Ivanov wrote: > **Problem:** > > The test hangs intermittently when run on Windows. (In some cases, handling the timeout takes 2 hours.) > > Thread dump shows no AWT threads, yet jtreg harness still waits for the test thread to finish, in particular it waits for [`StreamCopier`](https://github.com/openjdk/jtreg/blob/759946dedbafa423552851ecb98bc3bb8dcf30ec/src/share/classes/com/sun/javatest/regtest/exec/ProcessCommand.java#L279-L281). See `threaddump.log` attached to the bug and [my comment](https://bugs.openjdk.org/browse/JDK-8224968?focusedId=14757188&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-14757188) for more details. > > **Fix, or Workaround:** > > Drag mouse for a short while. > > In my testing on CI, the `javax/swing/JColorChooser/Test6827032.java` failed on Windows *3 times* out of 6 runs with 20 repeats (`JTREG=REPEAT_COUNT=20`) without the fix. > > There have been no failures after the fix in 10 runs with 20 repeats. This needs more investigation? I can see the same thread dumps in the CI where the test gets stuck in AWT shutdown. ------------- PR Comment: https://git.openjdk.org/jdk/pull/23846#issuecomment-2775859211 From rkannathpari at openjdk.org Thu Apr 3 14:34:08 2025 From: rkannathpari at openjdk.org (Renjith Kannath Pariyangad) Date: Thu, 3 Apr 2025 14:34:08 GMT Subject: RFR: 8353138: Screen capture for test TaskbarPositionTest.java, failure case [v4] In-Reply-To: References: Message-ID: <6MAFNKeTyjON1NpElNjUov8j_pu8hFaCiesjKXnpnCY=.95f16025-2791-4a3b-b841-673ddf06ee98@github.com> > Hi Reviewers, > > Added screen capture in case of test failure using Robot. > > Please review and let me know your suggestion if any. Renjith Kannath Pariyangad has updated the pull request incrementally with one additional commit since the last revision: Updated screen capture function ------------- Changes: - all: https://git.openjdk.org/jdk/pull/24286/files - new: https://git.openjdk.org/jdk/pull/24286/files/b5dc54a2..fd8f1f0a Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=24286&range=03 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=24286&range=02-03 Stats: 11 lines in 1 file changed: 4 ins; 0 del; 7 mod Patch: https://git.openjdk.org/jdk/pull/24286.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/24286/head:pull/24286 PR: https://git.openjdk.org/jdk/pull/24286 From aivanov at openjdk.org Thu Apr 3 14:54:04 2025 From: aivanov at openjdk.org (Alexey Ivanov) Date: Thu, 3 Apr 2025 14:54:04 GMT Subject: RFR: 8353138: Screen capture for test TaskbarPositionTest.java, failure case [v4] In-Reply-To: <6MAFNKeTyjON1NpElNjUov8j_pu8hFaCiesjKXnpnCY=.95f16025-2791-4a3b-b841-673ddf06ee98@github.com> References: <6MAFNKeTyjON1NpElNjUov8j_pu8hFaCiesjKXnpnCY=.95f16025-2791-4a3b-b841-673ddf06ee98@github.com> Message-ID: On Thu, 3 Apr 2025 14:34:08 GMT, Renjith Kannath Pariyangad wrote: >> Hi Reviewers, >> >> Added screen capture in case of test failure using Robot. >> >> Please review and let me know your suggestion if any. > > Renjith Kannath Pariyangad has updated the pull request incrementally with one additional commit since the last revision: > > Updated screen capture function Looks good to me except for the redundant comment before `saveScreenCapture`. I'd also move the `saveScreenCapture` method to the very bottom of the test because it's the least important piece of code. test/jdk/javax/swing/Popup/TaskbarPositionTest.java line 216: > 214: } > 215: > 216: // for debugging purpose, saves screen capture when test fails. I'm strongly for removing the comment, it adds no value. ------------- Marked as reviewed by aivanov (Reviewer). PR Review: https://git.openjdk.org/jdk/pull/24286#pullrequestreview-2740181476 PR Review Comment: https://git.openjdk.org/jdk/pull/24286#discussion_r2027176409 From abhiscxk at openjdk.org Thu Apr 3 17:00:08 2025 From: abhiscxk at openjdk.org (Abhishek Kumar) Date: Thu, 3 Apr 2025 17:00:08 GMT Subject: Integrated: 8352966: Opensource Several Font related tests - Batch 2 In-Reply-To: References: Message-ID: On Wed, 2 Apr 2025 14:55:53 GMT, Abhishek Kumar wrote: > Font related Applet tests are converted to manual and open sourced. This pull request has now been integrated. Changeset: db087268 Author: Abhishek Kumar URL: https://git.openjdk.org/jdk/commit/db08726884d90f9139db5d30ee4d36d88c288a06 Stats: 623 lines in 5 files changed: 623 ins; 0 del; 0 mod 8352966: Opensource Several Font related tests - Batch 2 Reviewed-by: aivanov ------------- PR: https://git.openjdk.org/jdk/pull/24381 From prr at openjdk.org Thu Apr 3 19:51:59 2025 From: prr at openjdk.org (Phil Race) Date: Thu, 3 Apr 2025 19:51:59 GMT Subject: RFR: 8352922: Refactor client classes javadoc to use @throws instead of @exception In-Reply-To: References: Message-ID: On Wed, 26 Mar 2025 01:49:31 GMT, Sergey Bylokhov wrote: > Prevailing JDK coding practices use @throws rather than @exception. > Refactored javadoc in client code to follow this convention, similar requests in the past https://github.com/openjdk/jdk/pull/7675 and https://github.com/openjdk/jdk/pull/7644. Marked as reviewed by prr (Reviewer). ------------- PR Review: https://git.openjdk.org/jdk/pull/24239#pullrequestreview-2740979832 From prr at openjdk.org Thu Apr 3 20:04:01 2025 From: prr at openjdk.org (Phil Race) Date: Thu, 3 Apr 2025 20:04:01 GMT Subject: RFR: 8352638: Enhance code consistency: java.desktop/windows In-Reply-To: <5qm_Hyp98_iQNlGpxru_EapE3rVlCfTTqVTWyF4zlzI=.450e15f8-7a75-44c2-8916-abd44426566d@github.com> References: <5qm_Hyp98_iQNlGpxru_EapE3rVlCfTTqVTWyF4zlzI=.450e15f8-7a75-44c2-8916-abd44426566d@github.com> Message-ID: On Sat, 22 Mar 2025 00:49:25 GMT, Sergey Bylokhov wrote: > The `java.desktop` module currently lacks proper use of the `@Override` annotation for methods and the `final` modifier for classes. While similar changes were previously made in the [JavaSound](https://github.com/openjdk/jdk/commit/e0c7d59246cf36644d494eced76e4b9d96ff1ded#diff-ae3e5f9c40fe25ef03e7a89844de174ef5c15e6179d769e2a4bcb7e73688c9b5) (and some of the classes on demand), these changes are not as critical now due to the new jdk "encapsulation", but they are still useful for improving code consistency. > > To make the code review process easier I have made the following changes: > > 1. I chose `java.desktop/windows` as the starting package because it contains a relatively small number of classes > 2. The public API was not affected so there is no need to worry about a CSR > 3. In a few places I removed the `final` modifier from methods since they were already defined in final classes > > Note: I will submit additional patches in this area later because: > > 1. Only lines with `@Override` and `final` were modified to keep the diff clear - header dates were not updated (that could be covered by one patch similar to [this](https://bugs.openjdk.org/browse/JDK-8345797)) > 2. I skipped adding `@Override` for anonymous classes > > Any feedback or suggestions are welcome! > > Here is a [link](https://patch-diff.githubusercontent.com/raw/openjdk/jdk/pull/24170.diff) to a simple diff file, it might be more convenient for reviewing the changes. > > To download the diff file and filter only the modified lines you can use the following script: > > > curl -s https://patch-diff.githubusercontent.com/raw/openjdk/jdk/pull/24170.diff -o d.txt && grep -E '^+|^-' d.txt > > > The build was successful, and I ran all the open jtreg tests without issues. But it's possible that some closed tests may be affected by these changes. It would be good to verify this by mach5 to ensure everything works as expected. The github UI is un-usable with this many files. So commenting here. The pattern below seems odd. What is the point of the protected modifier on a final class ? On a final method of a protected class, that I can see .. but this looks odd. - protected class FilterComboBoxModel extends AbstractListModel implements ComboBoxModel, + protected final class FilterComboBoxModel extends AbstractListModel implements ComboBoxModel, - protected class DirectoryComboBoxModel extends AbstractListModel implements ComboBoxModel { + protected final class DirectoryComboBoxModel extends AbstractListModel implements ComboBoxModel { ------------- PR Comment: https://git.openjdk.org/jdk/pull/24170#issuecomment-2776795601 From prr at openjdk.org Thu Apr 3 20:17:02 2025 From: prr at openjdk.org (Phil Race) Date: Thu, 3 Apr 2025 20:17:02 GMT Subject: RFR: 8315113: Print request Chromaticity.MONOCHROME attribute does not work on macOS [v6] In-Reply-To: References: Message-ID: On Fri, 21 Mar 2025 15:42:29 GMT, GennadiyKrivoshein wrote: >> This update allows users to print with grayscale using color printers. >> Actually, it is not possible to use the "Monochrome" option from the "Color Appearance" panel. Also Chromaticity.MONOCHROME can't be used to print grayscale on color printers ([JDK-8315113](https://bugs.openjdk.org/browse/JDK-8315113)). >> >> **Fix description** >> When a printer supports color printing and a user adds Chromaticity.MONOCHROME attribute to a PrintRequestAttributeSet, then the final printing raster is transformed to the grayscale color using java.awt.image.ColorConvertOp. When the job is a PostScript job, then the "setColor" and "setPaint" methods of the Graphics are overridden, and user colors (paints) are transformed to the grayscale form using the new proxy class GrayscaleProxyGraphics2D. >> >> This approach is assumed to be platform, CUPS, and IPP protocol independent. >> >> **Tests** >> The fix was tested on Ubuntu 22.04 and MacOS 12.6.1. > > GennadiyKrivoshein has updated the pull request incrementally with one additional commit since the last revision: > > Use PassFailJFrame for test. > Move GrayscaleProxyGraphics2D.java to the shared classes. > Update copyright year. LGTM. @prsadhuk pls be the required 2nd reviewer ------------- Marked as reviewed by prr (Reviewer). PR Review: https://git.openjdk.org/jdk/pull/21930#pullrequestreview-2741029248 From honkar at openjdk.org Thu Apr 3 20:33:58 2025 From: honkar at openjdk.org (Harshitha Onkar) Date: Thu, 3 Apr 2025 20:33:58 GMT Subject: RFR: 8352997: Open source several Swing JTabbedPane tests In-Reply-To: References: Message-ID: On Tue, 1 Apr 2025 23:24:57 GMT, Phil Race wrote: > open sourcing some Swing JTabbedPane tests test/jdk/javax/swing/JTabbedPane/bug4273320.java line 57: > 55: > 56: TabbedPaneUI ui = tabs.getUI(); > 57: Rectangle origSize = ui.getTabBounds(tabs, 0); On EDT ? test/jdk/javax/swing/JTabbedPane/bug4287268.java line 59: > 57: Point point = jtp.getLocationOnScreen(); > 58: int width = jtp.getWidth(); > 59: int height = jtp.getHeight(); Might be good to wrap it in EDT. It was the following `getComponentBounds()` method that @azvegint suggested we move to Util (since we use it across multiple tests), but it does create a dependency on Util class. Rectangle jtpLoc = Util.invokeOnEDT(() -> getComponentBounds(jtp)); private static Rectangle getComponentBounds(Component component) { Point locationOnScreen = component.getLocationOnScreen(); Dimension size = component.getSize(); return new Rectangle(locationOnScreen, size); } ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/24370#discussion_r2027692877 PR Review Comment: https://git.openjdk.org/jdk/pull/24370#discussion_r2027691580 From prr at openjdk.org Thu Apr 3 20:55:49 2025 From: prr at openjdk.org (Phil Race) Date: Thu, 3 Apr 2025 20:55:49 GMT Subject: RFR: 8352997: Open source several Swing JTabbedPane tests In-Reply-To: References: Message-ID: On Thu, 3 Apr 2025 20:25:37 GMT, Harshitha Onkar wrote: >> open sourcing some Swing JTabbedPane tests > > test/jdk/javax/swing/JTabbedPane/bug4273320.java line 57: > >> 55: >> 56: TabbedPaneUI ui = tabs.getUI(); >> 57: Rectangle origSize = ui.getTabBounds(tabs, 0); > > On EDT ? I don't think it is needed here because the UI is stable and so access should be safe. > test/jdk/javax/swing/JTabbedPane/bug4287268.java line 59: > >> 57: Point point = jtp.getLocationOnScreen(); >> 58: int width = jtp.getWidth(); >> 59: int height = jtp.getHeight(); > > Might be good to wrap it in EDT. > > It was the following `getComponentBounds()` method that @azvegint suggested we move to Util (since we use it across multiple tests), but it does create a dependency on Util class. > > > Rectangle jtpLoc = Util.invokeOnEDT(() -> > getComponentBounds(jtp)); > > private static Rectangle getComponentBounds(Component component) { > Point locationOnScreen = component.getLocationOnScreen(); > Dimension size = component.getSize(); > return new Rectangle(locationOnScreen, size); > } As I said when it was discussed, I like to avoid dependencies just for the sake of a few lines of code. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/24370#discussion_r2027726025 PR Review Comment: https://git.openjdk.org/jdk/pull/24370#discussion_r2027724096 From honkar at openjdk.org Thu Apr 3 21:33:47 2025 From: honkar at openjdk.org (Harshitha Onkar) Date: Thu, 3 Apr 2025 21:33:47 GMT Subject: RFR: 8352997: Open source several Swing JTabbedPane tests In-Reply-To: References: Message-ID: On Tue, 1 Apr 2025 23:24:57 GMT, Phil Race wrote: > open sourcing some Swing JTabbedPane tests Marked as reviewed by honkar (Reviewer). ------------- PR Review: https://git.openjdk.org/jdk/pull/24370#pullrequestreview-2741217448 From honkar at openjdk.org Thu Apr 3 21:33:48 2025 From: honkar at openjdk.org (Harshitha Onkar) Date: Thu, 3 Apr 2025 21:33:48 GMT Subject: RFR: 8352997: Open source several Swing JTabbedPane tests In-Reply-To: References: Message-ID: On Thu, 3 Apr 2025 20:51:03 GMT, Phil Race wrote: >> test/jdk/javax/swing/JTabbedPane/bug4287268.java line 59: >> >>> 57: Point point = jtp.getLocationOnScreen(); >>> 58: int width = jtp.getWidth(); >>> 59: int height = jtp.getHeight(); >> >> Might be good to wrap it in EDT. >> >> It was the following `getComponentBounds()` method that @azvegint suggested we move to Util (since we use it across multiple tests), but it does create a dependency on Util class. >> >> >> Rectangle jtpLoc = Util.invokeOnEDT(() -> >> getComponentBounds(jtp)); >> >> private static Rectangle getComponentBounds(Component component) { >> Point locationOnScreen = component.getLocationOnScreen(); >> Dimension size = component.getSize(); >> return new Rectangle(locationOnScreen, size); >> } > > As I said when it was discussed, I like to avoid dependencies just for the sake of a few lines of code. Yes, I agree it does create extra dependency if Util is used. Without using Util, is it good to obtain JTabbedPane's location and size on EDT for stability? ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/24370#discussion_r2027769090 From prr at openjdk.org Thu Apr 3 21:34:50 2025 From: prr at openjdk.org (Phil Race) Date: Thu, 3 Apr 2025 21:34:50 GMT Subject: RFR: 8353002: Remove unnecessary Windows version check in WTaskbarPeer In-Reply-To: References: Message-ID: On Fri, 28 Mar 2025 09:41:22 GMT, Daniel Gredler wrote: > WTaskbarPeer contains a check as to whether the current Windows version is Windows 7 or later. The current minimum supported version is Windows 10, so this is no longer needed. > > There didn't seem to be a public test exercising this code, so I also added a basic Taskbar sanity test. Marked as reviewed by prr (Reviewer). ------------- PR Review: https://git.openjdk.org/jdk/pull/24287#pullrequestreview-2741219234 From prr at openjdk.org Thu Apr 3 21:34:51 2025 From: prr at openjdk.org (Phil Race) Date: Thu, 3 Apr 2025 21:34:51 GMT Subject: RFR: 8353002: Remove unnecessary Windows version check in WTaskbarPeer In-Reply-To: References: <0Exo7te9jSfTV_Sp1g5Laz0eohfQeLAN3s_s-gISDq4=.55dc9bad-be0f-49c6-ae80-e1d5d3770a16@github.com> <6Ab-_geMNquSVZ-SGpY0bOhOnuQNuUgX5uluPA2qvxk=.514131a9-cba5-4540-b443-6f3c9a7e8f8f@github.com> Message-ID: On Wed, 2 Apr 2025 10:29:00 GMT, Daniel Gredler wrote: >> The biggest issue with [JDK-8294427](https://bugs.openjdk.org/browse/JDK-8294427) is that it was backported to older updates, including JDK 11, which is still in use on legacy systems. I think it's reasonable to assume that JDK 25 is supported on Windows 7 and later. However, it would be good to add a notice in JBS stating that it should not be backported. > > Ah, that makes sense -- so the gray area here are releases which technically do not currently support these older Windows versions, but did originally when they were first released, and we don't want to break that compatibility. > > I've added a backporting note in JBS, as suggested. Is there a label I should add in JBS as well? > > @aivanov-jdk Does that make sense / work for you as well? > > @mrserb I'm assuming you meant "I think it's reasonable to assume that JDK 25 is supported on Windows ~~7~~ **10** and later", is that right? FYI Microsoft still support some updates of Windows 7 .. if you pay them enough, but they do NOT support the earliest updates of Windows 10. So Windows 7 is more relevant today than early Windows 10 versions. Looking at adoption numbers might tell you a similar story. JDK 25 will ship before Windows 10 leaves mainline support - and it'll also have a long tail on the latest versions. But Windows Vista isn't something I care about for JDK 25, although "not crashing" would be nice :-) And yes, the backporting was the big issue with that other fix. Plus that the impact was huge. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/24287#discussion_r2027771338 From prr at openjdk.org Thu Apr 3 22:09:49 2025 From: prr at openjdk.org (Phil Race) Date: Thu, 3 Apr 2025 22:09:49 GMT Subject: RFR: 8350203: [macos] Newlines and tabs are not ignored when drawing text to a Graphics2D object In-Reply-To: References: Message-ID: <94St1A3gBjIul0Dmml5foH-pNXU6SSG2KDwkTbVTwVk=.58c221af-588c-4042-b7ba-cfe8049b5140@github.com> On Mon, 10 Mar 2025 20:37:57 GMT, Harshitha Onkar wrote: >> Good news: it looks like it was possible to resolve the `0xFFFF` conflict on the HarfBuzz side by adjusting the HarfBuzz internal representation of AAT deleted glyphs. Amazingly quick turnaround from @behdad! I think we'll want to put this PR on hold until the next HarfBuzz upgrade. How often are dependencies like HarfBuzz upgraded? I saw we just completed one today, coincidentally. > > @gredler Yes, JDK harfbuzz was just upgraded to v10.4.0 - https://github.com/openjdk/jdk/pull/23910. > > @prrace Do we consider patching the fix from upstream (https://github.com/harfbuzz/harfbuzz/pull/5119) for this upgrade or can it wait till the next time harfbuzz is upgraded on jdk ? @honkar-jdk pls remember we need an updated harfbuzz for this PR to proceed. ------------- PR Comment: https://git.openjdk.org/jdk/pull/23665#issuecomment-2777100754 From honkar at openjdk.org Thu Apr 3 22:14:50 2025 From: honkar at openjdk.org (Harshitha Onkar) Date: Thu, 3 Apr 2025 22:14:50 GMT Subject: RFR: 8350203: [macos] Newlines and tabs are not ignored when drawing text to a Graphics2D object In-Reply-To: References: Message-ID: <5mfWz8FHdIhs-j2Hn6q9NwomFhabKffMB9omJfE9phw=.d50f285c-32f4-4f8e-a428-98d3a8680e65@github.com> On Mon, 10 Mar 2025 20:37:57 GMT, Harshitha Onkar wrote: >> Good news: it looks like it was possible to resolve the `0xFFFF` conflict on the HarfBuzz side by adjusting the HarfBuzz internal representation of AAT deleted glyphs. Amazingly quick turnaround from @behdad! I think we'll want to put this PR on hold until the next HarfBuzz upgrade. How often are dependencies like HarfBuzz upgraded? I saw we just completed one today, coincidentally. > > @gredler Yes, JDK harfbuzz was just upgraded to v10.4.0 - https://github.com/openjdk/jdk/pull/23910. > > @prrace Do we consider patching the fix from upstream (https://github.com/harfbuzz/harfbuzz/pull/5119) for this upgrade or can it wait till the next time harfbuzz is upgraded on jdk ? > @honkar-jdk pls remember we need an updated harfbuzz for this PR to proceed. Noted. Thank you for the reminder. ------------- PR Comment: https://git.openjdk.org/jdk/pull/23665#issuecomment-2777107624 From serb at openjdk.org Fri Apr 4 00:08:49 2025 From: serb at openjdk.org (Sergey Bylokhov) Date: Fri, 4 Apr 2025 00:08:49 GMT Subject: RFR: 8352638: Enhance code consistency: java.desktop/windows In-Reply-To: References: <5qm_Hyp98_iQNlGpxru_EapE3rVlCfTTqVTWyF4zlzI=.450e15f8-7a75-44c2-8916-abd44426566d@github.com> Message-ID: On Thu, 3 Apr 2025 20:01:21 GMT, Phil Race wrote: >The pattern below seems odd. What is the point of the protected modifier on a final class ? This(and similar) logic was copied from [Metal](https://github.com/openjdk/jdk/blob/57df89c46449a19bb626fee2ea01c868e6dfb712/src/java.desktop/share/classes/javax/swing/plaf/metal/MetalFileChooserUI.java#L1164) L&F, where this and similar classes are protected and part of the public API. I can certainly change that, but it would make the review process even more difficult. However, this change would at least demonstrate that the class is not subclassed, allowing us to adjust the access level later. This question is actually applicable to many "protected" methods in the updated classes. ------------- PR Comment: https://git.openjdk.org/jdk/pull/24170#issuecomment-2777245492 From rkannathpari at openjdk.org Fri Apr 4 03:15:48 2025 From: rkannathpari at openjdk.org (Renjith Kannath Pariyangad) Date: Fri, 4 Apr 2025 03:15:48 GMT Subject: RFR: 8353138: Screen capture for test TaskbarPositionTest.java, failure case [v5] In-Reply-To: References: Message-ID: > Hi Reviewers, > > Added screen capture in case of test failure using Robot. > > Please review and let me know your suggestion if any. Renjith Kannath Pariyangad has updated the pull request incrementally with one additional commit since the last revision: Moved new function to bottom ------------- Changes: - all: https://git.openjdk.org/jdk/pull/24286/files - new: https://git.openjdk.org/jdk/pull/24286/files/fd8f1f0a..3cd8068c Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=24286&range=04 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=24286&range=03-04 Stats: 27 lines in 1 file changed: 13 ins; 14 del; 0 mod Patch: https://git.openjdk.org/jdk/pull/24286.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/24286/head:pull/24286 PR: https://git.openjdk.org/jdk/pull/24286 From tr at openjdk.org Fri Apr 4 07:26:26 2025 From: tr at openjdk.org (Tejesh R) Date: Fri, 4 Apr 2025 07:26:26 GMT Subject: RFR: 8139228: JFileChooser renders file names as HTML document Message-ID: 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 not taken care in any of these renderers, JLabel renders them as HTML document if nothing is set or specified. The fix is to get "html.disable" property from JFileChooser and set the same to JLabel component which renders and set Directory name. Hence applications can either enable/disable this property and control HTML rendering of directory name. ------------- Commit messages: - Fix + Manual test Changes: https://git.openjdk.org/jdk/pull/24439/files Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=24439&range=00 Issue: https://bugs.openjdk.org/browse/JDK-8139228 Stats: 108 lines in 7 files changed: 106 ins; 0 del; 2 mod Patch: https://git.openjdk.org/jdk/pull/24439.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/24439/head:pull/24439 PR: https://git.openjdk.org/jdk/pull/24439 From rkannathpari at openjdk.org Fri Apr 4 08:45:22 2025 From: rkannathpari at openjdk.org (Renjith Kannath Pariyangad) Date: Fri, 4 Apr 2025 08:45:22 GMT Subject: RFR: 8353138: Screen capture for test TaskbarPositionTest.java, failure case [v6] In-Reply-To: References: Message-ID: > Hi Reviewers, > > Added screen capture in case of test failure using Robot. > > Please review and let me know your suggestion if any. Renjith Kannath Pariyangad has updated the pull request incrementally with one additional commit since the last revision: Fixed spacing ------------- Changes: - all: https://git.openjdk.org/jdk/pull/24286/files - new: https://git.openjdk.org/jdk/pull/24286/files/3cd8068c..a24b531c Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=24286&range=05 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=24286&range=04-05 Stats: 1 line in 1 file changed: 0 ins; 0 del; 1 mod Patch: https://git.openjdk.org/jdk/pull/24286.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/24286/head:pull/24286 PR: https://git.openjdk.org/jdk/pull/24286 From aivanov at openjdk.org Fri Apr 4 11:27:56 2025 From: aivanov at openjdk.org (Alexey Ivanov) Date: Fri, 4 Apr 2025 11:27:56 GMT Subject: RFR: 8353138: Screen capture for test TaskbarPositionTest.java, failure case [v6] In-Reply-To: References: Message-ID: On Fri, 4 Apr 2025 08:45:22 GMT, Renjith Kannath Pariyangad wrote: >> Hi Reviewers, >> >> Added screen capture in case of test failure using Robot. >> >> Please review and let me know your suggestion if any. > > Renjith Kannath Pariyangad has updated the pull request incrementally with one additional commit since the last revision: > > Fixed spacing I'd rather move it below the `main` method. But it's fine? ------------- Marked as reviewed by aivanov (Reviewer). PR Review: https://git.openjdk.org/jdk/pull/24286#pullrequestreview-2742672158 From psadhukhan at openjdk.org Fri Apr 4 13:58:04 2025 From: psadhukhan at openjdk.org (Prasanta Sadhukhan) Date: Fri, 4 Apr 2025 13:58:04 GMT Subject: RFR: 8352684: Opensource JInternalFrame tests - series1 Message-ID: Few JIntenalFrame tests are opensourced ------------- Commit messages: - 8352684: Opensource JInternalFrame tests - series1 Changes: https://git.openjdk.org/jdk/pull/24447/files Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=24447&range=00 Issue: https://bugs.openjdk.org/browse/JDK-8352684 Stats: 304 lines in 4 files changed: 304 ins; 0 del; 0 mod Patch: https://git.openjdk.org/jdk/pull/24447.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/24447/head:pull/24447 PR: https://git.openjdk.org/jdk/pull/24447 From mark.reinhold at oracle.com Fri Apr 4 13:37:11 2025 From: mark.reinhold at oracle.com (Mark Reinhold) Date: Fri, 4 Apr 2025 13:37:11 +0000 Subject: New candidate JEP: 504: Remove the Applet API Message-ID: <20250404133709.BCA6580E6E1@eggemoggin.niobe.net> https://openjdk.org/jeps/504 Summary: Remove the Applet API, which was deprecated for removal in JDK 17 (2021). It is obsolete because neither recent JDK releases nor current web browsers support applets. - Mark From honkar at openjdk.org Fri Apr 4 17:45:12 2025 From: honkar at openjdk.org (Harshitha Onkar) Date: Fri, 4 Apr 2025 17:45:12 GMT Subject: RFR: JDK-8353201 : Open source Swing Tooltip tests - Set 2 Message-ID: Open sourced the following ToolTipManager tests- - javax/swing/ToolTipManager/bug4250178.java - javax/swing/ToolTipManager/bug4294808.java - javax/swing/ToolTipManager/bug6178004.java ------------- Commit messages: - Tooltip sets Changes: https://git.openjdk.org/jdk/pull/24453/files Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=24453&range=00 Issue: https://bugs.openjdk.org/browse/JDK-8353201 Stats: 282 lines in 3 files changed: 282 ins; 0 del; 0 mod Patch: https://git.openjdk.org/jdk/pull/24453.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/24453/head:pull/24453 PR: https://git.openjdk.org/jdk/pull/24453 From honkar at openjdk.org Fri Apr 4 18:15:40 2025 From: honkar at openjdk.org (Harshitha Onkar) Date: Fri, 4 Apr 2025 18:15:40 GMT Subject: RFR: JDK-8353201 : Open source Swing Tooltip tests - Set 2 [v2] In-Reply-To: References: Message-ID: > Open sourced the following ToolTipManager tests- > > - javax/swing/ToolTipManager/bug4250178.java > - javax/swing/ToolTipManager/bug4294808.java > - javax/swing/ToolTipManager/bug6178004.java Harshitha Onkar has updated the pull request incrementally with one additional commit since the last revision: instruction update ------------- Changes: - all: https://git.openjdk.org/jdk/pull/24453/files - new: https://git.openjdk.org/jdk/pull/24453/files/478ca002..52a23bd7 Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=24453&range=01 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=24453&range=00-01 Stats: 4 lines in 1 file changed: 0 ins; 1 del; 3 mod Patch: https://git.openjdk.org/jdk/pull/24453.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/24453/head:pull/24453 PR: https://git.openjdk.org/jdk/pull/24453 From prr at openjdk.org Fri Apr 4 18:16:03 2025 From: prr at openjdk.org (Phil Race) Date: Fri, 4 Apr 2025 18:16:03 GMT Subject: Integrated: 8353309: Open source several Swing text tests In-Reply-To: <5ZdH5CTaGKCfpRX2ONaNPRZ2pzSjAJWLvDk9jxRxOZI=.a58a4c8c-ca7e-4fc6-8ec5-177acd1edc91@github.com> References: <5ZdH5CTaGKCfpRX2ONaNPRZ2pzSjAJWLvDk9jxRxOZI=.a58a4c8c-ca7e-4fc6-8ec5-177acd1edc91@github.com> Message-ID: On Tue, 1 Apr 2025 18:13:09 GMT, Phil Race wrote: > Open source several Swing text / html related regression tests. This pull request has now been integrated. Changeset: 31a6de2e Author: Phil Race URL: https://git.openjdk.org/jdk/commit/31a6de2e743923c92e976d5f5536120736d56029 Stats: 577 lines in 13 files changed: 577 ins; 0 del; 0 mod 8353309: Open source several Swing text tests Reviewed-by: aivanov, serb ------------- PR: https://git.openjdk.org/jdk/pull/24364 From prr at openjdk.org Fri Apr 4 18:20:03 2025 From: prr at openjdk.org (Phil Race) Date: Fri, 4 Apr 2025 18:20:03 GMT Subject: Integrated: 8353320: Open source more Swing text tests In-Reply-To: References: Message-ID: On Tue, 1 Apr 2025 18:34:22 GMT, Phil Race wrote: > Swing text related tests being moved to open source. This pull request has now been integrated. Changeset: 74c2d8f4 Author: Phil Race URL: https://git.openjdk.org/jdk/commit/74c2d8f41bbb770e959a77ae1ce468162d68beaf Stats: 387 lines in 9 files changed: 387 ins; 0 del; 0 mod 8353320: Open source more Swing text tests Reviewed-by: aivanov, serb ------------- PR: https://git.openjdk.org/jdk/pull/24365 From prr at openjdk.org Fri Apr 4 18:22:01 2025 From: prr at openjdk.org (Phil Race) Date: Fri, 4 Apr 2025 18:22:01 GMT Subject: Integrated: 8352997: Open source several Swing JTabbedPane tests In-Reply-To: References: Message-ID: On Tue, 1 Apr 2025 23:24:57 GMT, Phil Race wrote: > open sourcing some Swing JTabbedPane tests This pull request has now been integrated. Changeset: 9fcb06f9 Author: Phil Race URL: https://git.openjdk.org/jdk/commit/9fcb06f9340f4f8f5bf2b74d0c4007f237625a72 Stats: 470 lines in 6 files changed: 470 ins; 0 del; 0 mod 8352997: Open source several Swing JTabbedPane tests Reviewed-by: azvegint, serb, honkar ------------- PR: https://git.openjdk.org/jdk/pull/24370 From prr at openjdk.org Fri Apr 4 18:23:53 2025 From: prr at openjdk.org (Phil Race) Date: Fri, 4 Apr 2025 18:23:53 GMT Subject: RFR: 8351110: ImageIO.write for JPEG can write corrupt JPEG for certain thumbnail dimensions [v4] In-Reply-To: References: Message-ID: On Wed, 12 Mar 2025 18:23:12 GMT, Jeremy Wood wrote: >> JPEG segments can only be 65535-bytes long. (The marker length is expressed as 2 bytes.) The problem in this ticket is that we were writing more than 65535 bytes to a segment, which later caused parsing errors when we tried to read the file back. >> >> This includes 2 changes: >> >> 1. We now clip the thumbnail width/height to fit within the available marker. We were already constraining the width & height to a max of 255. (Because the width & height are expressed as 1 byte.) So this new clipping is similar to something we were already doing, and we issue the same WARNING_THUMB_CLIPPED warning to the writer. (Does this require a CSR?) >> >> 2. This adds a bounds check to `write2bytes`. IMO the bigger problem in this ticket was the `ImageIO.write(..)` caller thought they ended up with a valid JPEG. (We were violating the "do no harm / lose no data" doctrine.) Now if something like this ever comes up again: writing will fail with an IIOException. Technically you can argue this change is unnecessary because the new clipping avoids this error condition, but IMO including this safety net is an overall good thing to keep. If anyone disagrees I'm OK with removing it. >> >> Separately: >> I included (and reversed) a commit in this branch that provides an alternate solution. That commit anticipates the overflow problem and switches to a JPEG-encoded thumbnail. From an end user perspective this "just works": they get a (slightly lossly) thumbnail of the original dimensions. But I assume it would be more controversial compared to the clipping approach, since the clipping approach has a strong precedent in this codebase. > > Jeremy Wood has updated the pull request incrementally with two additional commits since the last revision: > > - 8351110: adding a few clarifying comments > - 8351110: changing `catch` statement to support assertEquals's Error Testing looks good ------------- Marked as reviewed by prr (Reviewer). PR Review: https://git.openjdk.org/jdk/pull/23920#pullrequestreview-2743803137 From azvegint at openjdk.org Fri Apr 4 18:38:52 2025 From: azvegint at openjdk.org (Alexander Zvegintsev) Date: Fri, 4 Apr 2025 18:38:52 GMT Subject: RFR: JDK-8353201 : Open source Swing Tooltip tests - Set 2 [v2] In-Reply-To: References: Message-ID: <8dLcAO72BmJhiZZhPRgPJUQq0HBE2kBAa7xvM_queL8=.05ea471c-5207-4284-bb81-50e3a2bac237@github.com> On Fri, 4 Apr 2025 18:15:40 GMT, Harshitha Onkar wrote: >> Open sourced the following ToolTipManager tests- >> >> - javax/swing/ToolTipManager/bug4250178.java >> - javax/swing/ToolTipManager/bug4294808.java >> - javax/swing/ToolTipManager/bug6178004.java > > Harshitha Onkar has updated the pull request incrementally with one additional commit since the last revision: > > instruction update Marked as reviewed by azvegint (Reviewer). ------------- PR Review: https://git.openjdk.org/jdk/pull/24453#pullrequestreview-2743830439 From prr at openjdk.org Fri Apr 4 18:43:48 2025 From: prr at openjdk.org (Phil Race) Date: Fri, 4 Apr 2025 18:43:48 GMT Subject: RFR: 8352638: Enhance code consistency: java.desktop/windows In-Reply-To: References: <5qm_Hyp98_iQNlGpxru_EapE3rVlCfTTqVTWyF4zlzI=.450e15f8-7a75-44c2-8916-abd44426566d@github.com> Message-ID: On Fri, 4 Apr 2025 00:06:20 GMT, Sergey Bylokhov wrote: > > The pattern below seems odd. What is the point of the protected modifier on a final class ? > > This(and similar) logic was copied from [Metal](https://github.com/openjdk/jdk/blob/57df89c46449a19bb626fee2ea01c868e6dfb712/src/java.desktop/share/classes/javax/swing/plaf/metal/MetalFileChooserUI.java#L1164) L&F, where this and similar classes are protected and part of the public API. > > I can certainly change that, but it would make the review process even more difficult. However, this change would at least demonstrate that the class is not subclassed, allowing us to adjust the access level later. This question is actually applicable to many "protected" methods in the updated classes. OK .. let me do a test run. I don't expect any problems but it is so mind-numbing looking at these changes that I'd like to be sure. ------------- PR Comment: https://git.openjdk.org/jdk/pull/24170#issuecomment-2779497194 From prr at openjdk.org Fri Apr 4 18:55:29 2025 From: prr at openjdk.org (Phil Race) Date: Fri, 4 Apr 2025 18:55:29 GMT Subject: RFR: 8353475: Open source two Swing DefaultCaret tests Message-ID: Open source two Swing caret related tests. ------------- Commit messages: - 8353475 Changes: https://git.openjdk.org/jdk/pull/24455/files Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=24455&range=00 Issue: https://bugs.openjdk.org/browse/JDK-8353475 Stats: 134 lines in 2 files changed: 134 ins; 0 del; 0 mod Patch: https://git.openjdk.org/jdk/pull/24455.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/24455/head:pull/24455 PR: https://git.openjdk.org/jdk/pull/24455 From aivanov at openjdk.org Fri Apr 4 19:12:51 2025 From: aivanov at openjdk.org (Alexey Ivanov) Date: Fri, 4 Apr 2025 19:12:51 GMT Subject: RFR: 8351110: ImageIO.write for JPEG can write corrupt JPEG for certain thumbnail dimensions [v4] In-Reply-To: References: Message-ID: <05SR4-1QBrqzhVZYcnQ8pWRandFDG9qNUFyFIU3qtPY=.6ca82582-a39b-49d9-9aa8-c3d782f4756f@github.com> On Wed, 12 Mar 2025 18:23:12 GMT, Jeremy Wood wrote: >> JPEG segments can only be 65535-bytes long. (The marker length is expressed as 2 bytes.) The problem in this ticket is that we were writing more than 65535 bytes to a segment, which later caused parsing errors when we tried to read the file back. >> >> This includes 2 changes: >> >> 1. We now clip the thumbnail width/height to fit within the available marker. We were already constraining the width & height to a max of 255. (Because the width & height are expressed as 1 byte.) So this new clipping is similar to something we were already doing, and we issue the same WARNING_THUMB_CLIPPED warning to the writer. (Does this require a CSR?) >> >> 2. This adds a bounds check to `write2bytes`. IMO the bigger problem in this ticket was the `ImageIO.write(..)` caller thought they ended up with a valid JPEG. (We were violating the "do no harm / lose no data" doctrine.) Now if something like this ever comes up again: writing will fail with an IIOException. Technically you can argue this change is unnecessary because the new clipping avoids this error condition, but IMO including this safety net is an overall good thing to keep. If anyone disagrees I'm OK with removing it. >> >> Separately: >> I included (and reversed) a commit in this branch that provides an alternate solution. That commit anticipates the overflow problem and switches to a JPEG-encoded thumbnail. From an end user perspective this "just works": they get a (slightly lossly) thumbnail of the original dimensions. But I assume it would be more controversial compared to the clipping approach, since the clipping approach has a strong precedent in this codebase. > > Jeremy Wood has updated the pull request incrementally with two additional commits since the last revision: > > - 8351110: adding a few clarifying comments > - 8351110: changing `catch` statement to support assertEquals's Error Changes requested by aivanov (Reviewer). src/java.desktop/share/classes/com/sun/imageio/plugins/jpeg/JFIFMarkerSegment.java line 383: > 381: if (thumbWidth * thumbHeight > maxArea) { > 382: writer.warningOccurred(JPEGImageWriter.WARNING_THUMB_CLIPPED); > 383: double scale = Math.sqrt( ((double)maxArea) / (double)(thumbWidth * thumbHeight)); Does it make sense to add a space before the closing parenthesis? For consistency with the opening one; or remove these spaces just inside the method call parentheses. Suggestion: double scale = Math.sqrt( ((double)maxArea) / (double)(thumbWidth * thumbHeight) ); test/jdk/javax/imageio/plugins/jpeg/WriteJPEGThumbnailTest.java line 66: > 64: boolean b2 = new WriteJPEGThumbnailTest(100, 219).run(); > 65: if (!(b1 && b2)) > 66: System.err.println("Test failed"); Suggestion: if (!(b1 && b2)) { System.err.println("Test failed"); throw new Error("Test failed"); } Always use braces, even for one-line statement. You must throw an exception, otherwise the test will never fail from jtreg point of view. jdk> ./build/windows-x86_64-server-release/jdk/bin/java -jar ../jtreg/lib/jtreg.jar \ -w:./build/jtwork -nr -v \ test/jdk/javax/imageio/plugins/jpeg/WriteJPEGThumbnailTest.java runner starting test: javax/imageio/plugins/jpeg/WriteJPEGThumbnailTest.java runner finished test: javax/imageio/plugins/jpeg/WriteJPEGThumbnailTest.java Passed. Execution successful Test results: passed: 1 And I don't have your fix. test/jdk/javax/imageio/plugins/jpeg/WriteJPEGThumbnailTest.java line 86: > 84: } finally { > 85: jpegData = byteOut.toByteArray(); > 86: } Does it have to be in the `finally` block? You can assign `jpegData` outside of the `try` block. If an exception is thrown in `try`, the method stops executing and assigning to `jpegData` makes no sense. test/jdk/javax/imageio/plugins/jpeg/WriteJPEGThumbnailTest.java line 104: > 102: } > 103: System.out.println("\tTest passed"); > 104: } catch(Throwable e) { Suggestion: } catch (Throwable e) { test/jdk/javax/imageio/plugins/jpeg/WriteJPEGThumbnailTest.java line 142: > 140: g.fillRect(0,900,100,100); > 141: g.setColor(Color.magenta); > 142: g.fillRect(900,900,100,100); Spaces after commas, upper-case color constants: Suggestion: g.setColor(Color.RED); g.fillRect(0, 0, 100, 100); g.setColor(Color.GREEN); g.fillRect(900, 0, 900, 100); g.setColor(Color.ORANGE); g.fillRect(0, 900, 100, 100); g.setColor(Color.MAGENTA); g.fillRect(900, 900, 100, 100); test/jdk/javax/imageio/plugins/jpeg/WriteJPEGThumbnailTest.java line 152: > 150: while(readers.hasNext()) { > 151: reader = readers.next(); > 152: if(reader.canReadRaster()) { Suggestion: while (readers.hasNext()) { reader = readers.next(); if (reader.canReadRaster()) { ------------- PR Review: https://git.openjdk.org/jdk/pull/23920#pullrequestreview-2743856146 PR Review Comment: https://git.openjdk.org/jdk/pull/23920#discussion_r2029289420 PR Review Comment: https://git.openjdk.org/jdk/pull/23920#discussion_r2029310112 PR Review Comment: https://git.openjdk.org/jdk/pull/23920#discussion_r2029297962 PR Review Comment: https://git.openjdk.org/jdk/pull/23920#discussion_r2029303202 PR Review Comment: https://git.openjdk.org/jdk/pull/23920#discussion_r2029301961 PR Review Comment: https://git.openjdk.org/jdk/pull/23920#discussion_r2029302608 From aivanov at openjdk.org Fri Apr 4 19:16:52 2025 From: aivanov at openjdk.org (Alexey Ivanov) Date: Fri, 4 Apr 2025 19:16:52 GMT Subject: RFR: 8351110: ImageIO.write for JPEG can write corrupt JPEG for certain thumbnail dimensions [v4] In-Reply-To: <05SR4-1QBrqzhVZYcnQ8pWRandFDG9qNUFyFIU3qtPY=.6ca82582-a39b-49d9-9aa8-c3d782f4756f@github.com> References: <05SR4-1QBrqzhVZYcnQ8pWRandFDG9qNUFyFIU3qtPY=.6ca82582-a39b-49d9-9aa8-c3d782f4756f@github.com> Message-ID: On Fri, 4 Apr 2025 19:09:20 GMT, Alexey Ivanov wrote: >> Jeremy Wood has updated the pull request incrementally with two additional commits since the last revision: >> >> - 8351110: adding a few clarifying comments >> - 8351110: changing `catch` statement to support assertEquals's Error > > test/jdk/javax/imageio/plugins/jpeg/WriteJPEGThumbnailTest.java line 66: > >> 64: boolean b2 = new WriteJPEGThumbnailTest(100, 219).run(); >> 65: if (!(b1 && b2)) >> 66: System.err.println("Test failed"); > > Suggestion: > > if (!(b1 && b2)) { > System.err.println("Test failed"); > throw new Error("Test failed"); > } > > Always use braces, even for one-line statement. > > You **must throw an exception**, otherwise the test will never fail from jtreg point of view. > > > jdk> ./build/windows-x86_64-server-release/jdk/bin/java -jar ../jtreg/lib/jtreg.jar \ > -w:./build/jtwork -nr -v \ > test/jdk/javax/imageio/plugins/jpeg/WriteJPEGThumbnailTest.java > runner starting test: javax/imageio/plugins/jpeg/WriteJPEGThumbnailTest.java > runner finished test: javax/imageio/plugins/jpeg/WriteJPEGThumbnailTest.java > Passed. Execution successful > Test results: passed: 1 > > And I don't have your fix. The WriteJPEGThumbnailTest.jtr says, the test failed: ----------System.out:(3/74)---------- Testing thumbnail 100x218... Test passed Testing thumbnail 100x219... ----------System.err:(15/1153)---------- javax.imageio.IIOException: Unsupported JPEG process: SOF type 0xc8 at ... at WriteJPEGThumbnailTest.run(WriteJPEGThumbnailTest.java:92) at WriteJPEGThumbnailTest.main(WriteJPEGThumbnailTest.java:64) at ... Test failed ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/23920#discussion_r2029314805 From honkar at openjdk.org Fri Apr 4 19:43:20 2025 From: honkar at openjdk.org (Harshitha Onkar) Date: Fri, 4 Apr 2025 19:43:20 GMT Subject: RFR: JDK-8353486 : Open source Swing Tests - Set 4 Message-ID: Open-sourced the following Swing tests: 1. javax/swing/JFileChooser/bug4464774.java 2. javax/swing/JFileChooser/bug4522756.java 3. javax/swing/JFileChooser/bug4759934.java 4. javax/swing/JFileChooser/bug4943900.java 5. javax/swing/JOptionPane/bug4194862.java ------------- Commit messages: - Swing tests Set4 Changes: https://git.openjdk.org/jdk/pull/24456/files Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=24456&range=00 Issue: https://bugs.openjdk.org/browse/JDK-8353486 Stats: 508 lines in 5 files changed: 508 ins; 0 del; 0 mod Patch: https://git.openjdk.org/jdk/pull/24456.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/24456/head:pull/24456 PR: https://git.openjdk.org/jdk/pull/24456 From prr at openjdk.org Fri Apr 4 20:35:07 2025 From: prr at openjdk.org (Phil Race) Date: Fri, 4 Apr 2025 20:35:07 GMT Subject: RFR: 8353589: Open source a few Swing menu-related tests Message-ID: Open source a few tests related to Swing menus. ------------- Commit messages: - 8353589 Changes: https://git.openjdk.org/jdk/pull/24457/files Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=24457&range=00 Issue: https://bugs.openjdk.org/browse/JDK-8353589 Stats: 297 lines in 3 files changed: 297 ins; 0 del; 0 mod Patch: https://git.openjdk.org/jdk/pull/24457.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/24457/head:pull/24457 PR: https://git.openjdk.org/jdk/pull/24457 From honkar at openjdk.org Fri Apr 4 20:43:45 2025 From: honkar at openjdk.org (Harshitha Onkar) Date: Fri, 4 Apr 2025 20:43:45 GMT Subject: RFR: JDK-8353486 : Open source Swing Tests - Set 4 [v2] In-Reply-To: References: Message-ID: <57D7KGkIDtC2kCWtaXOVc8Pm2hLTASCPyyJnICngoUk=.19804310-f80a-4df7-b1f4-5754fd5be64c@github.com> > Open-sourced the following Swing tests: > > 1. javax/swing/JFileChooser/bug4464774.java > 2. javax/swing/JFileChooser/bug4522756.java > 3. javax/swing/JFileChooser/bug4759934.java > 4. javax/swing/JFileChooser/bug4943900.java > 5. javax/swing/JOptionPane/bug4194862.java Harshitha Onkar has updated the pull request incrementally with two additional commits since the last revision: - JOptionPane changes - review changes ------------- Changes: - all: https://git.openjdk.org/jdk/pull/24456/files - new: https://git.openjdk.org/jdk/pull/24456/files/be62d059..491a6428 Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=24456&range=01 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=24456&range=00-01 Stats: 30 lines in 3 files changed: 5 ins; 18 del; 7 mod Patch: https://git.openjdk.org/jdk/pull/24456.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/24456/head:pull/24456 PR: https://git.openjdk.org/jdk/pull/24456 From honkar at openjdk.org Fri Apr 4 21:03:50 2025 From: honkar at openjdk.org (Harshitha Onkar) Date: Fri, 4 Apr 2025 21:03:50 GMT Subject: RFR: 8353589: Open source a few Swing menu-related tests In-Reply-To: References: Message-ID: On Fri, 4 Apr 2025 20:30:50 GMT, Phil Race wrote: > Open source a few tests related to Swing menus. LGTM other than minor inline comments. test/jdk/javax/swing/JPopupMenu/bug4187004.java line 98: > 96: } > 97: > 98: Extra newlines can be removed. test/jdk/javax/swing/JPopupMenu/bug4530303.java line 29: > 27: * @build PassFailJFrame > 28: * @summary Tests JPopupMenu.pack() > 29: * @key headful `@key headful` redundant for manual tests ------------- Marked as reviewed by honkar (Reviewer). PR Review: https://git.openjdk.org/jdk/pull/24457#pullrequestreview-2744094693 PR Review Comment: https://git.openjdk.org/jdk/pull/24457#discussion_r2029428892 PR Review Comment: https://git.openjdk.org/jdk/pull/24457#discussion_r2029428455 From honkar at openjdk.org Fri Apr 4 21:10:53 2025 From: honkar at openjdk.org (Harshitha Onkar) Date: Fri, 4 Apr 2025 21:10:53 GMT Subject: RFR: 8353475: Open source two Swing DefaultCaret tests In-Reply-To: References: Message-ID: On Fri, 4 Apr 2025 18:50:48 GMT, Phil Race wrote: > Open source two Swing caret related tests. test/jdk/javax/swing/text/DefaultCaret/PaintTest.java line 26: > 24: /* > 25: * @test > 26: * @bug 4785160 bugID was probably updated by mistake. It should be 4193062 ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/24455#discussion_r2029434559 From duke at openjdk.org Fri Apr 4 21:16:08 2025 From: duke at openjdk.org (Jeremy Wood) Date: Fri, 4 Apr 2025 21:16:08 GMT Subject: RFR: 8351110: ImageIO.write for JPEG can write corrupt JPEG for certain thumbnail dimensions [v5] In-Reply-To: References: Message-ID: > JPEG segments can only be 65535-bytes long. (The marker length is expressed as 2 bytes.) The problem in this ticket is that we were writing more than 65535 bytes to a segment, which later caused parsing errors when we tried to read the file back. > > This includes 2 changes: > > 1. We now clip the thumbnail width/height to fit within the available marker. We were already constraining the width & height to a max of 255. (Because the width & height are expressed as 1 byte.) So this new clipping is similar to something we were already doing, and we issue the same WARNING_THUMB_CLIPPED warning to the writer. (Does this require a CSR?) > > 2. This adds a bounds check to `write2bytes`. IMO the bigger problem in this ticket was the `ImageIO.write(..)` caller thought they ended up with a valid JPEG. (We were violating the "do no harm / lose no data" doctrine.) Now if something like this ever comes up again: writing will fail with an IIOException. Technically you can argue this change is unnecessary because the new clipping avoids this error condition, but IMO including this safety net is an overall good thing to keep. If anyone disagrees I'm OK with removing it. > > Separately: > I included (and reversed) a commit in this branch that provides an alternate solution. That commit anticipates the overflow problem and switches to a JPEG-encoded thumbnail. From an end user perspective this "just works": they get a (slightly lossly) thumbnail of the original dimensions. But I assume it would be more controversial compared to the clipping approach, since the clipping approach has a strong precedent in this codebase. Jeremy Wood has updated the pull request incrementally with four additional commits since the last revision: - Update test/jdk/javax/imageio/plugins/jpeg/WriteJPEGThumbnailTest.java Co-authored-by: Alexey Ivanov - Update test/jdk/javax/imageio/plugins/jpeg/WriteJPEGThumbnailTest.java Co-authored-by: Alexey Ivanov - Update test/jdk/javax/imageio/plugins/jpeg/WriteJPEGThumbnailTest.java Co-authored-by: Alexey Ivanov - Update src/java.desktop/share/classes/com/sun/imageio/plugins/jpeg/JFIFMarkerSegment.java Co-authored-by: Alexey Ivanov ------------- Changes: - all: https://git.openjdk.org/jdk/pull/23920/files - new: https://git.openjdk.org/jdk/pull/23920/files/e16df900..21dce8e5 Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=23920&range=04 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=23920&range=03-04 Stats: 12 lines in 2 files changed: 0 ins; 0 del; 12 mod Patch: https://git.openjdk.org/jdk/pull/23920.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/23920/head:pull/23920 PR: https://git.openjdk.org/jdk/pull/23920 From prr at openjdk.org Fri Apr 4 21:25:28 2025 From: prr at openjdk.org (Phil Race) Date: Fri, 4 Apr 2025 21:25:28 GMT Subject: RFR: 8353475: Open source two Swing DefaultCaret tests [v2] In-Reply-To: References: Message-ID: > Open source two Swing caret related tests. Phil Race has updated the pull request incrementally with one additional commit since the last revision: 8353475 ------------- Changes: - all: https://git.openjdk.org/jdk/pull/24455/files - new: https://git.openjdk.org/jdk/pull/24455/files/a62741ef..fbf9db6e Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=24455&range=01 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=24455&range=00-01 Stats: 1 line in 1 file changed: 0 ins; 0 del; 1 mod Patch: https://git.openjdk.org/jdk/pull/24455.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/24455/head:pull/24455 PR: https://git.openjdk.org/jdk/pull/24455 From honkar at openjdk.org Fri Apr 4 21:25:28 2025 From: honkar at openjdk.org (Harshitha Onkar) Date: Fri, 4 Apr 2025 21:25:28 GMT Subject: RFR: 8353475: Open source two Swing DefaultCaret tests [v2] In-Reply-To: References: Message-ID: On Fri, 4 Apr 2025 21:21:59 GMT, Phil Race wrote: >> Open source two Swing caret related tests. > > Phil Race has updated the pull request incrementally with one additional commit since the last revision: > > 8353475 Marked as reviewed by honkar (Reviewer). ------------- PR Review: https://git.openjdk.org/jdk/pull/24455#pullrequestreview-2744127535 From prr at openjdk.org Fri Apr 4 21:25:29 2025 From: prr at openjdk.org (Phil Race) Date: Fri, 4 Apr 2025 21:25:29 GMT Subject: RFR: 8353475: Open source two Swing DefaultCaret tests [v2] In-Reply-To: References: Message-ID: On Fri, 4 Apr 2025 21:07:17 GMT, Harshitha Onkar wrote: > bugID was probably updated by mistake. It should be 4193062 oops fixed. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/24455#discussion_r2029448661 From dnguyen at openjdk.org Fri Apr 4 21:29:48 2025 From: dnguyen at openjdk.org (Damon Nguyen) Date: Fri, 4 Apr 2025 21:29:48 GMT Subject: RFR: JDK-8353201 : Open source Swing Tooltip tests - Set 2 [v2] In-Reply-To: References: Message-ID: On Fri, 4 Apr 2025 18:15:40 GMT, Harshitha Onkar wrote: >> Open sourced the following ToolTipManager tests- >> >> - javax/swing/ToolTipManager/bug4250178.java >> - javax/swing/ToolTipManager/bug4294808.java >> - javax/swing/ToolTipManager/bug6178004.java > > Harshitha Onkar has updated the pull request incrementally with one additional commit since the last revision: > > instruction update Marked as reviewed by dnguyen (Committer). ------------- PR Review: https://git.openjdk.org/jdk/pull/24453#pullrequestreview-2744134191 From honkar at openjdk.org Fri Apr 4 21:35:10 2025 From: honkar at openjdk.org (Harshitha Onkar) Date: Fri, 4 Apr 2025 21:35:10 GMT Subject: RFR: JDK-8353201 : Open source Swing Tooltip tests - Set 2 [v3] In-Reply-To: References: Message-ID: <5bcVMEXlzk_xniWDAC3SEays7G10uas2CRIfDuc6b_s=.b4082ef0-f087-4e76-90a0-f3f6e2fd0b85@github.com> > Open sourced the following ToolTipManager tests- > > - javax/swing/ToolTipManager/bug4250178.java > - javax/swing/ToolTipManager/bug4294808.java > - javax/swing/ToolTipManager/bug6178004.java Harshitha Onkar has updated the pull request incrementally with one additional commit since the last revision: minor update ------------- Changes: - all: https://git.openjdk.org/jdk/pull/24453/files - new: https://git.openjdk.org/jdk/pull/24453/files/52a23bd7..1cf055fd Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=24453&range=02 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=24453&range=01-02 Stats: 2 lines in 1 file changed: 0 ins; 0 del; 2 mod Patch: https://git.openjdk.org/jdk/pull/24453.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/24453/head:pull/24453 PR: https://git.openjdk.org/jdk/pull/24453 From dnguyen at openjdk.org Fri Apr 4 21:35:10 2025 From: dnguyen at openjdk.org (Damon Nguyen) Date: Fri, 4 Apr 2025 21:35:10 GMT Subject: RFR: JDK-8353201 : Open source Swing Tooltip tests - Set 2 [v3] In-Reply-To: <5bcVMEXlzk_xniWDAC3SEays7G10uas2CRIfDuc6b_s=.b4082ef0-f087-4e76-90a0-f3f6e2fd0b85@github.com> References: <5bcVMEXlzk_xniWDAC3SEays7G10uas2CRIfDuc6b_s=.b4082ef0-f087-4e76-90a0-f3f6e2fd0b85@github.com> Message-ID: <4LQWPdjnR9KJhsLxFShK0PNnwksGRAazuEP1kBnb2Ic=.1bee70f1-4486-4e7f-bc4a-1ad26d76e6e3@github.com> On Fri, 4 Apr 2025 21:32:18 GMT, Harshitha Onkar wrote: >> Open sourced the following ToolTipManager tests- >> >> - javax/swing/ToolTipManager/bug4250178.java >> - javax/swing/ToolTipManager/bug4294808.java >> - javax/swing/ToolTipManager/bug6178004.java > > Harshitha Onkar has updated the pull request incrementally with one additional commit since the last revision: > > minor update test/jdk/javax/swing/ToolTipManager/bug4250178.java line 25: > 23: > 24: /* @test > 25: * @bug 4250178 Suggestion: /* * @test * @bug 4250178 ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/24453#discussion_r2029460835 From dnguyen at openjdk.org Fri Apr 4 21:35:10 2025 From: dnguyen at openjdk.org (Damon Nguyen) Date: Fri, 4 Apr 2025 21:35:10 GMT Subject: RFR: JDK-8353201 : Open source Swing Tooltip tests - Set 2 [v3] In-Reply-To: <4LQWPdjnR9KJhsLxFShK0PNnwksGRAazuEP1kBnb2Ic=.1bee70f1-4486-4e7f-bc4a-1ad26d76e6e3@github.com> References: <5bcVMEXlzk_xniWDAC3SEays7G10uas2CRIfDuc6b_s=.b4082ef0-f087-4e76-90a0-f3f6e2fd0b85@github.com> <4LQWPdjnR9KJhsLxFShK0PNnwksGRAazuEP1kBnb2Ic=.1bee70f1-4486-4e7f-bc4a-1ad26d76e6e3@github.com> Message-ID: On Fri, 4 Apr 2025 21:31:55 GMT, Damon Nguyen wrote: >> Harshitha Onkar has updated the pull request incrementally with one additional commit since the last revision: >> >> minor update > > test/jdk/javax/swing/ToolTipManager/bug4250178.java line 25: > >> 23: >> 24: /* @test >> 25: * @bug 4250178 > > Suggestion: > > /* > * @test > * @bug 4250178 Just to match the other tests here. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/24453#discussion_r2029460994 From honkar at openjdk.org Fri Apr 4 21:41:20 2025 From: honkar at openjdk.org (Harshitha Onkar) Date: Fri, 4 Apr 2025 21:41:20 GMT Subject: RFR: JDK-8353201 : Open source Swing Tooltip tests - Set 2 [v4] In-Reply-To: References: Message-ID: > Open sourced the following ToolTipManager tests- > > - javax/swing/ToolTipManager/bug4250178.java > - javax/swing/ToolTipManager/bug4294808.java > - javax/swing/ToolTipManager/bug6178004.java Harshitha Onkar has updated the pull request incrementally with one additional commit since the last revision: jtreg header alignment ------------- Changes: - all: https://git.openjdk.org/jdk/pull/24453/files - new: https://git.openjdk.org/jdk/pull/24453/files/1cf055fd..9338fd9e Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=24453&range=03 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=24453&range=02-03 Stats: 2 lines in 1 file changed: 1 ins; 0 del; 1 mod Patch: https://git.openjdk.org/jdk/pull/24453.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/24453/head:pull/24453 PR: https://git.openjdk.org/jdk/pull/24453 From dnguyen at openjdk.org Fri Apr 4 21:41:20 2025 From: dnguyen at openjdk.org (Damon Nguyen) Date: Fri, 4 Apr 2025 21:41:20 GMT Subject: RFR: JDK-8353201 : Open source Swing Tooltip tests - Set 2 [v4] In-Reply-To: References: Message-ID: On Fri, 4 Apr 2025 21:38:27 GMT, Harshitha Onkar wrote: >> Open sourced the following ToolTipManager tests- >> >> - javax/swing/ToolTipManager/bug4250178.java >> - javax/swing/ToolTipManager/bug4294808.java >> - javax/swing/ToolTipManager/bug6178004.java > > Harshitha Onkar has updated the pull request incrementally with one additional commit since the last revision: > > jtreg header alignment Marked as reviewed by dnguyen (Committer). ------------- PR Review: https://git.openjdk.org/jdk/pull/24453#pullrequestreview-2744148560 From prr at openjdk.org Fri Apr 4 22:34:07 2025 From: prr at openjdk.org (Phil Race) Date: Fri, 4 Apr 2025 22:34:07 GMT Subject: RFR: JDK-8353201 : Open source Swing Tooltip tests - Set 2 [v4] In-Reply-To: References: Message-ID: On Fri, 4 Apr 2025 21:41:20 GMT, Harshitha Onkar wrote: >> Open sourced the following ToolTipManager tests- >> >> - javax/swing/ToolTipManager/bug4250178.java >> - javax/swing/ToolTipManager/bug4294808.java >> - javax/swing/ToolTipManager/bug6178004.java > > Harshitha Onkar has updated the pull request incrementally with one additional commit since the last revision: > > jtreg header alignment Marked as reviewed by prr (Reviewer). ------------- PR Review: https://git.openjdk.org/jdk/pull/24453#pullrequestreview-2744210099 From honkar at openjdk.org Fri Apr 4 22:44:58 2025 From: honkar at openjdk.org (Harshitha Onkar) Date: Fri, 4 Apr 2025 22:44:58 GMT Subject: Integrated: JDK-8353201 : Open source Swing Tooltip tests - Set 2 In-Reply-To: References: Message-ID: On Fri, 4 Apr 2025 17:39:57 GMT, Harshitha Onkar wrote: > Open sourced the following ToolTipManager tests- > > - javax/swing/ToolTipManager/bug4250178.java > - javax/swing/ToolTipManager/bug4294808.java > - javax/swing/ToolTipManager/bug6178004.java This pull request has now been integrated. Changeset: e17c3994 Author: Harshitha Onkar URL: https://git.openjdk.org/jdk/commit/e17c3994b8392357b0aacea0bae6b354a2cc90a5 Stats: 282 lines in 3 files changed: 282 ins; 0 del; 0 mod 8353201: Open source Swing Tooltip tests - Set 2 Reviewed-by: dnguyen, prr, azvegint ------------- PR: https://git.openjdk.org/jdk/pull/24453 From prr at openjdk.org Fri Apr 4 22:55:14 2025 From: prr at openjdk.org (Phil Race) Date: Fri, 4 Apr 2025 22:55:14 GMT Subject: RFR: 8353304: Open source two JTabbedPane tests Message-ID: Open source two Swing JTabbedPane tests. One is problem listed for macOS because of the way Aqua displays tabs on the left + right. ------------- Commit messages: - 8353304 Changes: https://git.openjdk.org/jdk/pull/24461/files Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=24461&range=00 Issue: https://bugs.openjdk.org/browse/JDK-8353304 Stats: 363 lines in 3 files changed: 363 ins; 0 del; 0 mod Patch: https://git.openjdk.org/jdk/pull/24461.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/24461/head:pull/24461 PR: https://git.openjdk.org/jdk/pull/24461 From duke at openjdk.org Fri Apr 4 22:57:34 2025 From: duke at openjdk.org (Jeremy Wood) Date: Fri, 4 Apr 2025 22:57:34 GMT Subject: RFR: 8351110: ImageIO.write for JPEG can write corrupt JPEG for certain thumbnail dimensions [v6] In-Reply-To: References: Message-ID: <4cjiN-EQktIY0I6oozTSNYDSDLUJcVeBIp-IU5Dbg0A=.d4d279d0-2d1a-4413-8fd9-611453140ecb@github.com> > JPEG segments can only be 65535-bytes long. (The marker length is expressed as 2 bytes.) The problem in this ticket is that we were writing more than 65535 bytes to a segment, which later caused parsing errors when we tried to read the file back. > > This includes 2 changes: > > 1. We now clip the thumbnail width/height to fit within the available marker. We were already constraining the width & height to a max of 255. (Because the width & height are expressed as 1 byte.) So this new clipping is similar to something we were already doing, and we issue the same WARNING_THUMB_CLIPPED warning to the writer. (Does this require a CSR?) > > 2. This adds a bounds check to `write2bytes`. IMO the bigger problem in this ticket was the `ImageIO.write(..)` caller thought they ended up with a valid JPEG. (We were violating the "do no harm / lose no data" doctrine.) Now if something like this ever comes up again: writing will fail with an IIOException. Technically you can argue this change is unnecessary because the new clipping avoids this error condition, but IMO including this safety net is an overall good thing to keep. If anyone disagrees I'm OK with removing it. > > Separately: > I included (and reversed) a commit in this branch that provides an alternate solution. That commit anticipates the overflow problem and switches to a JPEG-encoded thumbnail. From an end user perspective this "just works": they get a (slightly lossly) thumbnail of the original dimensions. But I assume it would be more controversial compared to the clipping approach, since the clipping approach has a strong precedent in this codebase. Jeremy Wood 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 24 additional commits since the last revision: - Update test/jdk/javax/imageio/plugins/jpeg/WriteJPEGThumbnailTest.java Co-authored-by: Alexey Ivanov - Merge remote-tracking branch 'origin/JDK-8351110' into JDK-8351110 - Update test/jdk/javax/imageio/plugins/jpeg/WriteJPEGThumbnailTest.java Co-authored-by: Alexey Ivanov - Update test/jdk/javax/imageio/plugins/jpeg/WriteJPEGThumbnailTest.java Co-authored-by: Alexey Ivanov - Update test/jdk/javax/imageio/plugins/jpeg/WriteJPEGThumbnailTest.java Co-authored-by: Alexey Ivanov - Update src/java.desktop/share/classes/com/sun/imageio/plugins/jpeg/JFIFMarkerSegment.java Co-authored-by: Alexey Ivanov - Merge branch 'master' into JDK-8351110 - Merge branch 'master' of https://github.com/mickleness/jdk - Merge branch 'openjdk:master' into master - 8351110: adding a few clarifying comments - ... and 14 more: https://git.openjdk.org/jdk/compare/ce0122f9...ecd7883c ------------- Changes: - all: https://git.openjdk.org/jdk/pull/23920/files - new: https://git.openjdk.org/jdk/pull/23920/files/21dce8e5..ecd7883c Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=23920&range=05 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=23920&range=04-05 Stats: 149020 lines in 3405 files changed: 66274 ins; 63624 del; 19122 mod Patch: https://git.openjdk.org/jdk/pull/23920.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/23920/head:pull/23920 PR: https://git.openjdk.org/jdk/pull/23920 From serb at openjdk.org Sat Apr 5 00:16:48 2025 From: serb at openjdk.org (Sergey Bylokhov) Date: Sat, 5 Apr 2025 00:16:48 GMT Subject: RFR: 8353002: Remove unnecessary Windows version check in WTaskbarPeer In-Reply-To: References: Message-ID: On Fri, 28 Mar 2025 09:41:22 GMT, Daniel Gredler wrote: > WTaskbarPeer contains a check as to whether the current Windows version is Windows 7 or later. The current minimum supported version is Windows 10, so this is no longer needed. > > There didn't seem to be a public test exercising this code, so I also added a basic Taskbar sanity test. Marked as reviewed by serb (Reviewer). ------------- PR Review: https://git.openjdk.org/jdk/pull/24287#pullrequestreview-2744327468 From psadhukhan at openjdk.org Sat Apr 5 03:45:41 2025 From: psadhukhan at openjdk.org (Prasanta Sadhukhan) Date: Sat, 5 Apr 2025 03:45:41 GMT Subject: RFR: 8352686: Opensource JInternalFrame tests - series3 Message-ID: Few JInternalFrame tests are opensourced ------------- Commit messages: - 8352686: Opensource JInternalFrame tests - series3 Changes: https://git.openjdk.org/jdk/pull/24466/files Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=24466&range=00 Issue: https://bugs.openjdk.org/browse/JDK-8352686 Stats: 428 lines in 4 files changed: 428 ins; 0 del; 0 mod Patch: https://git.openjdk.org/jdk/pull/24466.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/24466/head:pull/24466 PR: https://git.openjdk.org/jdk/pull/24466 From duke at openjdk.org Sat Apr 5 05:11:50 2025 From: duke at openjdk.org (Jeremy Wood) Date: Sat, 5 Apr 2025 05:11:50 GMT Subject: RFR: 8351110: ImageIO.write for JPEG can write corrupt JPEG for certain thumbnail dimensions [v4] In-Reply-To: <05SR4-1QBrqzhVZYcnQ8pWRandFDG9qNUFyFIU3qtPY=.6ca82582-a39b-49d9-9aa8-c3d782f4756f@github.com> References: <05SR4-1QBrqzhVZYcnQ8pWRandFDG9qNUFyFIU3qtPY=.6ca82582-a39b-49d9-9aa8-c3d782f4756f@github.com> Message-ID: On Fri, 4 Apr 2025 18:58:22 GMT, Alexey Ivanov wrote: >> Jeremy Wood has updated the pull request incrementally with two additional commits since the last revision: >> >> - 8351110: adding a few clarifying comments >> - 8351110: changing `catch` statement to support assertEquals's Error > > test/jdk/javax/imageio/plugins/jpeg/WriteJPEGThumbnailTest.java line 86: > >> 84: } finally { >> 85: jpegData = byteOut.toByteArray(); >> 86: } > > Does it have to be in the `finally` block? > > You can assign `jpegData` outside of the `try` block. If an exception is thrown in `try`, the method stops executing and assigning to `jpegData` makes no sense. No; this is updated ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/23920#discussion_r2029703152 From duke at openjdk.org Sat Apr 5 05:51:50 2025 From: duke at openjdk.org (Jeremy Wood) Date: Sat, 5 Apr 2025 05:51:50 GMT Subject: RFR: 8351110: ImageIO.write for JPEG can write corrupt JPEG for certain thumbnail dimensions [v4] In-Reply-To: References: <05SR4-1QBrqzhVZYcnQ8pWRandFDG9qNUFyFIU3qtPY=.6ca82582-a39b-49d9-9aa8-c3d782f4756f@github.com> Message-ID: On Fri, 4 Apr 2025 19:14:00 GMT, Alexey Ivanov wrote: >> test/jdk/javax/imageio/plugins/jpeg/WriteJPEGThumbnailTest.java line 66: >> >>> 64: boolean b2 = new WriteJPEGThumbnailTest(100, 219).run(); >>> 65: if (!(b1 && b2)) >>> 66: System.err.println("Test failed"); >> >> Suggestion: >> >> if (!(b1 && b2)) { >> System.err.println("Test failed"); >> throw new Error("Test failed"); >> } >> >> Always use braces, even for one-line statement. >> >> You **must throw an exception**, otherwise the test will never fail from jtreg point of view. >> >> >> jdk> ./build/windows-x86_64-server-release/jdk/bin/java -jar ../jtreg/lib/jtreg.jar \ >> -w:./build/jtwork -nr -v \ >> test/jdk/javax/imageio/plugins/jpeg/WriteJPEGThumbnailTest.java >> runner starting test: javax/imageio/plugins/jpeg/WriteJPEGThumbnailTest.java >> runner finished test: javax/imageio/plugins/jpeg/WriteJPEGThumbnailTest.java >> Passed. Execution successful >> Test results: passed: 1 >> >> And I don't have your fix. > > The `WriteJPEGThumbnailTest.jtr` file says, the test failed: > > > ----------System.out:(3/74)---------- > Testing thumbnail 100x218... > Test passed > Testing thumbnail 100x219... > ----------System.err:(15/1153)---------- > javax.imageio.IIOException: Unsupported JPEG process: SOF type 0xc8 > at ... > at WriteJPEGThumbnailTest.run(WriteJPEGThumbnailTest.java:92) > at WriteJPEGThumbnailTest.main(WriteJPEGThumbnailTest.java:64) > at ... > Test failed Thank you for pointing out the `new Error` oversight. > The WriteJPEGThumbnailTest.jtr file says, the test failed That output is exactly what I would expect to see before this PR. Is it possible you ran the test without invoking `make`? When I run this test my jtr file includes: ----------messages:(8/301)---------- command: main WriteJPEGThumbnailTest reason: User specified action: run main WriteJPEGThumbnailTest started: Sat Apr 05 01:24:48 EDT 2025 Mode: othervm Additional options from @modules: --add-modules java.desktop Process id: 63942 finished: Sat Apr 05 01:24:49 EDT 2025 elapsed time (seconds): 1.248 ----------configuration:(3/40)---------- Boot Layer add modules: java.desktop ----------System.out:(4/84)---------- Testing thumbnail 100x218... Test passed Testing thumbnail 100x219... Test passed ----------System.err:(1/15)---------- STATUS:Passed. ----------rerun:(24/1876)*---------- (I tested both before and after the revisions of the last 24 hrs.) ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/23920#discussion_r2029711483 From mvs at openjdk.org Sat Apr 5 11:52:19 2025 From: mvs at openjdk.org (Manukumar V S) Date: Sat, 5 Apr 2025 11:52:19 GMT Subject: RFR: 8288471: java/awt/ScrollPane/bug8077409Test.java is unstable and fails intermittently in CI [v2] In-Reply-To: References: Message-ID: <66tP05yMtj7c-RMTZD9hVVaKRvSE84lwQQNTBNiZx0o=.3cb7badf-f06e-472d-81c2-b4ff82c30dbb@github.com> > java/awt/ScrollPane/bug8077409Test.java is unstable and fails intermittently in CI, especially in MacOS machines. > Also the frame created in this test is not disposed which may interfere with other tests. > > Fix: > Some stabilisations added and the frame is disposed properly. > > Testing: > Tested 100 times per platform(macosx-x64,macosx-aarch64,windows-x64,linux-x64) and got all PASS. Manukumar V S has updated the pull request incrementally with one additional commit since the last revision: Review comments fixed : Formatting changes ------------- Changes: - all: https://git.openjdk.org/jdk/pull/24292/files - new: https://git.openjdk.org/jdk/pull/24292/files/b060af3c..aa029a4f Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=24292&range=01 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=24292&range=00-01 Stats: 10 lines in 1 file changed: 0 ins; 0 del; 10 mod Patch: https://git.openjdk.org/jdk/pull/24292.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/24292/head:pull/24292 PR: https://git.openjdk.org/jdk/pull/24292 From mvs at openjdk.org Sat Apr 5 11:52:20 2025 From: mvs at openjdk.org (Manukumar V S) Date: Sat, 5 Apr 2025 11:52:20 GMT Subject: RFR: 8288471: java/awt/ScrollPane/bug8077409Test.java is unstable and fails intermittently in CI [v2] In-Reply-To: References: Message-ID: <1gNRNysJhraL3sweZi5d9Xl1pB-lXWv3Dtw5jBpakXw=.ae7eeda7-98cc-4427-9c2d-fb2d9012ce02@github.com> On Fri, 28 Mar 2025 15:43:44 GMT, lawrence.andrews wrote: >> Manukumar V S has updated the pull request incrementally with one additional commit since the last revision: >> >> Review comments fixed : Formatting changes > > test/jdk/java/awt/ScrollPane/bug8077409Test.java line 92: > >> 90: final bug8077409Test obj = new bug8077409Test(); >> 91: try { >> 92: obj.setLocationRelativeTo(null); > > Please correct the format Done ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/24292#discussion_r2029850021 From mvs at openjdk.org Sat Apr 5 11:52:20 2025 From: mvs at openjdk.org (Manukumar V S) Date: Sat, 5 Apr 2025 11:52:20 GMT Subject: RFR: 8288471: java/awt/ScrollPane/bug8077409Test.java is unstable and fails intermittently in CI [v2] In-Reply-To: References: Message-ID: On Tue, 1 Apr 2025 02:42:46 GMT, Damon Nguyen wrote: >> Manukumar V S has updated the pull request incrementally with one additional commit since the last revision: >> >> Review comments fixed : Formatting changes > > test/jdk/java/awt/ScrollPane/bug8077409Test.java line 102: > >> 100: } else if (keyEvent.getKeyCode() == KeyEvent.VK_2) { >> 101: obj.repaint(); >> 102: } else if (keyEvent.getKeyCode() == KeyEvent.VK_DOWN) { > > These look like non-standard indents/spacing as well. Typically 4 spaces are used. Done ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/24292#discussion_r2029850069 From aturbanov at openjdk.org Sat Apr 5 16:38:49 2025 From: aturbanov at openjdk.org (Andrey Turbanov) Date: Sat, 5 Apr 2025 16:38:49 GMT Subject: RFR: 8352686: Opensource JInternalFrame tests - series3 In-Reply-To: References: Message-ID: On Sat, 5 Apr 2025 03:40:10 GMT, Prasanta Sadhukhan wrote: > Few JInternalFrame tests are opensourced test/jdk/javax/swing/JInternalFrame/bug4321312.java line 121: > 119: try { > 120: super.processMouseEvent(e); > 121: } catch(Exception exc) { Suggestion: } catch (Exception exc) { ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/24466#discussion_r2029913380 From aturbanov at openjdk.org Sat Apr 5 16:41:51 2025 From: aturbanov at openjdk.org (Andrey Turbanov) Date: Sat, 5 Apr 2025 16:41:51 GMT Subject: RFR: 8353304: Open source two JTabbedPane tests In-Reply-To: References: Message-ID: On Fri, 4 Apr 2025 22:50:28 GMT, Phil Race wrote: > Open source two Swing JTabbedPane tests. > One is problem listed for macOS because of the way Aqua displays tabs on the left + right. test/jdk/javax/swing/JTabbedPane/bug4499556.java line 142: > 140: button.addActionListener(new ActionListener() { > 141: public void actionPerformed(ActionEvent e) { > 142: if(pane.getTabCount() == 4) { Suggestion: if (pane.getTabCount() == 4) { test/jdk/javax/swing/JTabbedPane/bug4499556.java line 231: > 229: testPanel.add(comp); > 230: JButton closeButton = new CloseButton(); > 231: closeButton.setPreferredSize(new Dimension(10,10)); Suggestion: closeButton.setPreferredSize(new Dimension(10, 10)); test/jdk/javax/swing/JTabbedPane/bug4499556.java line 234: > 232: testPanel.add(closeButton); > 233: testPanel.setOpaque(false); > 234: pane.insertTab("Test", null,new JLabel(""), "", 1); Suggestion: pane.insertTab("Test", null, new JLabel(""), "", 1); test/jdk/javax/swing/JTabbedPane/bug6259533.java line 78: > 76: pane.setTabComponentAt(1, label); > 77: frame.add(pane); > 78: frame.setSize(400,200); Suggestion: frame.setSize(400, 200); ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/24461#discussion_r2029913880 PR Review Comment: https://git.openjdk.org/jdk/pull/24461#discussion_r2029913906 PR Review Comment: https://git.openjdk.org/jdk/pull/24461#discussion_r2029913921 PR Review Comment: https://git.openjdk.org/jdk/pull/24461#discussion_r2029913953 From aturbanov at openjdk.org Sat Apr 5 16:42:51 2025 From: aturbanov at openjdk.org (Andrey Turbanov) Date: Sat, 5 Apr 2025 16:42:51 GMT Subject: RFR: 8353589: Open source a few Swing menu-related tests In-Reply-To: References: Message-ID: On Fri, 4 Apr 2025 20:30:50 GMT, Phil Race wrote: > Open source a few tests related to Swing menus. test/jdk/javax/swing/JPopupMenu/bug4119993.java line 92: > 90: cols[r] = "col " + r; > 91: for (int c = 0; c < 5; c ++) { > 92: data[r][c] = "(" + r + "," + c + ")"; Suggestion: data[r][c] = "(" + r + "," + c + ")"; test/jdk/javax/swing/JPopupMenu/bug4119993.java line 102: > 100: p.add(scrollpane); > 101: > 102: String[] s = {"1","2","3","4","5", "6", "7", "8", "9", "10"}; Suggestion: String[] s = {"1", "2", "3", "4", "5", "6", "7", "8", "9", "10"}; ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/24457#discussion_r2029914115 PR Review Comment: https://git.openjdk.org/jdk/pull/24457#discussion_r2029914173 From aturbanov at openjdk.org Sat Apr 5 16:43:49 2025 From: aturbanov at openjdk.org (Andrey Turbanov) Date: Sat, 5 Apr 2025 16:43:49 GMT Subject: RFR: 8352684: Opensource JInternalFrame tests - series1 In-Reply-To: References: Message-ID: On Fri, 4 Apr 2025 13:52:01 GMT, Prasanta Sadhukhan wrote: > Few JInternalFrame tests are opensourced test/jdk/javax/swing/JInternalFrame/bug4244536.java line 65: > 63: JDesktopPane desktop = new JDesktopPane(); > 64: JInternalFrame jif = new JInternalFrame("Internal Frame"); > 65: jif.setSize(150,150); Suggestion: jif.setSize(150, 150); test/jdk/javax/swing/JInternalFrame/bug4305284.java line 66: > 64: jif.setMaximum(false); > 65: jif.setVisible(true); > 66: } catch(Exception e) { Suggestion: } catch (Exception e) { ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/24447#discussion_r2029914371 PR Review Comment: https://git.openjdk.org/jdk/pull/24447#discussion_r2029914269 From zjx001202 at gmail.com Sat Apr 5 17:20:27 2025 From: zjx001202 at gmail.com (Glavo) Date: Sun, 6 Apr 2025 01:20:27 +0800 Subject: Proposal: A new universal Image API independent of java.desktop Message-ID: Hi, In https://github.com/openjdk/jfx/pull/1593, I saw some discussion about splitting the java.desktop module. In this discussion, I think Johan's point of view[1] is the most representative: > I totally agree. It is a (maintenance) nightmare to make sure the whole > java.desktop module is available and works on mobile and embedded, while > only a tiny fraction of it is used. > And even for purely desktop apps, the overhead of including the > java.desktop module in an application is significant. I often see people > comparing the binary size of a JavaFX app versus a similar Electron app, > and it's a pity that the size of JavaFX apps is negatively influenced by > something that is barely used (that is, most of the bytes in the > java.desktop module are never used in JavaFX). > > In the ideal world, I think a more granular javax.imageio module could be a > solution. That could then be leveraged by the javafx modules. > Theoretically, the java.desktop maintainers could leverage that module as > well, and remove the internals from java.desktop, but that is not something > we should discuss on this list. > > As a developer of JavaFX applications and a contributor to commons-imaging, I suffer from the coupling of the AWT Image API and the javax.imageio to java.desktop. Besides the fact that java.desktop is too heavy, the more important problem is that Android does not provide support for it, which makes it considered non-universal. But after I checked the API, I thought it's not possible to split them from java.desktop, they have many dependencies on other parts of java.desktop. I wonder if we can provide a new Image API: * Provides a unified abstraction for images, color space, pixel format, etc. These abstractions can be implemented by different vendors, such as AWT, JavaFX, Android, etc. * We should have a common and extensible interface for reading and writing images, so that libraries such as javax.imageio and JavaFX do not need to repeatedly implement reading and writing support for the same image format. This interface should be bidirectionally compatible with javax.imageio: The implementation of javax.imageio.spi can be regarded as the implementation of the new interface, and the implementation of the new interface can also be accessed through javax.imageio. I want to see if people think it's feasible and worth the effort. Glavo [1]: https://mail.openjdk.org/pipermail/openjfx-dev/2024-October/050042.html -------------- next part -------------- An HTML attachment was scrubbed... URL: From aturbanov at openjdk.org Sat Apr 5 19:38:49 2025 From: aturbanov at openjdk.org (Andrey Turbanov) Date: Sat, 5 Apr 2025 19:38:49 GMT Subject: RFR: 8352638: Enhance code consistency: java.desktop/windows In-Reply-To: <5qm_Hyp98_iQNlGpxru_EapE3rVlCfTTqVTWyF4zlzI=.450e15f8-7a75-44c2-8916-abd44426566d@github.com> References: <5qm_Hyp98_iQNlGpxru_EapE3rVlCfTTqVTWyF4zlzI=.450e15f8-7a75-44c2-8916-abd44426566d@github.com> Message-ID: On Sat, 22 Mar 2025 00:49:25 GMT, Sergey Bylokhov wrote: > The `java.desktop` module currently lacks proper use of the `@Override` annotation for methods and the `final` modifier for classes. While similar changes were previously made in the [JavaSound](https://github.com/openjdk/jdk/commit/e0c7d59246cf36644d494eced76e4b9d96ff1ded#diff-ae3e5f9c40fe25ef03e7a89844de174ef5c15e6179d769e2a4bcb7e73688c9b5) (and some of the classes on demand), these changes are not as critical now due to the new jdk "encapsulation", but they are still useful for improving code consistency. > > To make the code review process easier I have made the following changes: > > 1. I chose `java.desktop/windows` as the starting package because it contains a relatively small number of classes > 2. The public API was not affected so there is no need to worry about a CSR > 3. In a few places I removed the `final` modifier from methods since they were already defined in final classes > > Note: I will submit additional patches in this area later because: > > 1. Only lines with `@Override` and `final` were modified to keep the diff clear - header dates were not updated (that could be covered by one patch similar to [this](https://bugs.openjdk.org/browse/JDK-8345797)) > 2. I skipped adding `@Override` for anonymous classes > > Any feedback or suggestions are welcome! > > Here is a [link](https://patch-diff.githubusercontent.com/raw/openjdk/jdk/pull/24170.diff) to a simple diff file, it might be more convenient for reviewing the changes. > > To download the diff file and filter only the modified lines you can use the following script: > > > curl -s https://patch-diff.githubusercontent.com/raw/openjdk/jdk/pull/24170.diff -o d.txt && grep -E '^+|^-' d.txt > > > The build was successful, and I ran all the open jtreg tests without issues. But it's possible that some closed tests may be affected by these changes. It would be good to verify this by mach5 to ensure everything works as expected. src/java.desktop/windows/classes/com/sun/java/swing/plaf/windows/WindowsFileChooserUI.java line 1061: > 1059: // > 1060: @SuppressWarnings("serial") // Superclass is not serializable across versions > 1061: final class DirectoryComboBoxRenderer extends DefaultListCellRenderer { Suggestion: final class DirectoryComboBoxRenderer extends DefaultListCellRenderer { ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/24170#discussion_r2029953831 From kizune at openjdk.org Sun Apr 6 06:13:54 2025 From: kizune at openjdk.org (Alexander Zuev) Date: Sun, 6 Apr 2025 06:13:54 GMT Subject: RFR: 8353070: Clean up and open source couple AWT Graphics related tests (Part 1) Message-ID: Clean up and open source four tests, two manual and two automatic tests now. ------------- Commit messages: - 8353070: Clean up and open source couple AWT Graphics related tests (Part 1) Changes: https://git.openjdk.org/jdk/pull/24472/files Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=24472&range=00 Issue: https://bugs.openjdk.org/browse/JDK-8353070 Stats: 407 lines in 4 files changed: 407 ins; 0 del; 0 mod Patch: https://git.openjdk.org/jdk/pull/24472.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/24472/head:pull/24472 PR: https://git.openjdk.org/jdk/pull/24472 From serb at openjdk.org Sun Apr 6 23:44:57 2025 From: serb at openjdk.org (Sergey Bylokhov) Date: Sun, 6 Apr 2025 23:44:57 GMT Subject: RFR: 8352638: Enhance code consistency: java.desktop/windows In-Reply-To: References: <5qm_Hyp98_iQNlGpxru_EapE3rVlCfTTqVTWyF4zlzI=.450e15f8-7a75-44c2-8916-abd44426566d@github.com> Message-ID: <5XxRLA4gW63HG3cgFSTxU_E1ve__wWqwY5EFRYw_d_8=.6fb579a5-3723-4359-8f99-0a2dac1e14d8@github.com> On Sat, 5 Apr 2025 19:36:33 GMT, Andrey Turbanov wrote: >> The `java.desktop` module currently lacks proper use of the `@Override` annotation for methods and the `final` modifier for classes. While similar changes were previously made in the [JavaSound](https://github.com/openjdk/jdk/commit/e0c7d59246cf36644d494eced76e4b9d96ff1ded#diff-ae3e5f9c40fe25ef03e7a89844de174ef5c15e6179d769e2a4bcb7e73688c9b5) (and some of the classes on demand), these changes are not as critical now due to the new jdk "encapsulation", but they are still useful for improving code consistency. >> >> To make the code review process easier I have made the following changes: >> >> 1. I chose `java.desktop/windows` as the starting package because it contains a relatively small number of classes >> 2. The public API was not affected so there is no need to worry about a CSR >> 3. In a few places I removed the `final` modifier from methods since they were already defined in final classes >> >> Note: I will submit additional patches in this area later because: >> >> 1. Only lines with `@Override` and `final` were modified to keep the diff clear - header dates were not updated (that could be covered by one patch similar to [this](https://bugs.openjdk.org/browse/JDK-8345797)) >> 2. I skipped adding `@Override` for anonymous classes >> >> Any feedback or suggestions are welcome! >> >> Here is a [link](https://patch-diff.githubusercontent.com/raw/openjdk/jdk/pull/24170.diff) to a simple diff file, it might be more convenient for reviewing the changes. >> >> To download the diff file and filter only the modified lines you can use the following script: >> >> >> curl -s https://patch-diff.githubusercontent.com/raw/openjdk/jdk/pull/24170.diff -o d.txt && grep -E '^+|^-' d.txt >> >> >> The build was successful, and I ran all the open jtreg tests without issues. But it's possible that some closed tests may be affected by these changes. It would be good to verify this by mach5 to ensure everything works as expected. > > src/java.desktop/windows/classes/com/sun/java/swing/plaf/windows/WindowsFileChooserUI.java line 1061: > >> 1059: // >> 1060: @SuppressWarnings("serial") // Superclass is not serializable across versions >> 1061: final class DirectoryComboBoxRenderer extends DefaultListCellRenderer { > > Suggestion: > > final class DirectoryComboBoxRenderer extends DefaultListCellRenderer { There are many places where such a change could be applied, but I intentionally skipped them so that reviewers can be confident there are no other modifications beyond adding final and @Override. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/24170#discussion_r2030306330 From duke at openjdk.org Mon Apr 7 02:59:52 2025 From: duke at openjdk.org (duke) Date: Mon, 7 Apr 2025 02:59:52 GMT Subject: RFR: 8353138: Screen capture for test TaskbarPositionTest.java, failure case [v6] In-Reply-To: References: Message-ID: On Fri, 4 Apr 2025 08:45:22 GMT, Renjith Kannath Pariyangad wrote: >> Hi Reviewers, >> >> Added screen capture in case of test failure using Robot. >> >> Please review and let me know your suggestion if any. > > Renjith Kannath Pariyangad has updated the pull request incrementally with one additional commit since the last revision: > > Fixed spacing @Renjithkannath Your change (at version a24b531c55e96b8aa36e5da2a5c331f378327936) is now ready to be sponsored by a Committer. ------------- PR Comment: https://git.openjdk.org/jdk/pull/24286#issuecomment-2781899366 From kizune at openjdk.org Mon Apr 7 04:01:58 2025 From: kizune at openjdk.org (Alexander Zuev) Date: Mon, 7 Apr 2025 04:01:58 GMT Subject: RFR: 8353304: Open source two JTabbedPane tests In-Reply-To: References: Message-ID: On Fri, 4 Apr 2025 22:50:28 GMT, Phil Race wrote: > Open source two Swing JTabbedPane tests. > One is problem listed for macOS because of the way Aqua displays tabs on the left + right. Looks good. ------------- Marked as reviewed by kizune (Reviewer). PR Review: https://git.openjdk.org/jdk/pull/24461#pullrequestreview-2745470320 From psadhukhan at openjdk.org Mon Apr 7 04:02:45 2025 From: psadhukhan at openjdk.org (Prasanta Sadhukhan) Date: Mon, 7 Apr 2025 04:02:45 GMT Subject: RFR: 8352686: Opensource JInternalFrame tests - series3 [v2] In-Reply-To: References: Message-ID: > Few JInternalFrame tests are opensourced Prasanta Sadhukhan has updated the pull request incrementally with one additional commit since the last revision: spacing ------------- Changes: - all: https://git.openjdk.org/jdk/pull/24466/files - new: https://git.openjdk.org/jdk/pull/24466/files/b3c589fc..f9f994ac Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=24466&range=01 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=24466&range=00-01 Stats: 1 line in 1 file changed: 0 ins; 0 del; 1 mod Patch: https://git.openjdk.org/jdk/pull/24466.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/24466/head:pull/24466 PR: https://git.openjdk.org/jdk/pull/24466 From psadhukhan at openjdk.org Mon Apr 7 04:04:37 2025 From: psadhukhan at openjdk.org (Prasanta Sadhukhan) Date: Mon, 7 Apr 2025 04:04:37 GMT Subject: RFR: 8352684: Opensource JInternalFrame tests - series1 [v2] In-Reply-To: References: Message-ID: > Few JInternalFrame tests are opensourced Prasanta Sadhukhan has updated the pull request incrementally with one additional commit since the last revision: spacing ------------- Changes: - all: https://git.openjdk.org/jdk/pull/24447/files - new: https://git.openjdk.org/jdk/pull/24447/files/9a49d316..b22ff769 Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=24447&range=01 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=24447&range=00-01 Stats: 2 lines in 2 files changed: 0 ins; 0 del; 2 mod Patch: https://git.openjdk.org/jdk/pull/24447.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/24447/head:pull/24447 PR: https://git.openjdk.org/jdk/pull/24447 From psadhukhan at openjdk.org Mon Apr 7 04:43:32 2025 From: psadhukhan at openjdk.org (Prasanta Sadhukhan) Date: Mon, 7 Apr 2025 04:43:32 GMT Subject: RFR: 8352687: Opensource few JInternalFrame and JTextField tests Message-ID: Few JInternalFrame and JTextField tests are opensourced ------------- Commit messages: - Opensource test Changes: https://git.openjdk.org/jdk/pull/24474/files Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=24474&range=00 Issue: https://bugs.openjdk.org/browse/JDK-8352687 Stats: 358 lines in 4 files changed: 358 ins; 0 del; 0 mod Patch: https://git.openjdk.org/jdk/pull/24474.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/24474/head:pull/24474 PR: https://git.openjdk.org/jdk/pull/24474 From duke at openjdk.org Mon Apr 7 07:01:58 2025 From: duke at openjdk.org (Hendrik Schick) Date: Mon, 7 Apr 2025 07:01:58 GMT Subject: RFR: 8353304: Open source two JTabbedPane tests In-Reply-To: References: Message-ID: On Fri, 4 Apr 2025 22:50:28 GMT, Phil Race wrote: > Open source two Swing JTabbedPane tests. > One is problem listed for macOS because of the way Aqua displays tabs on the left + right. test/jdk/javax/swing/JTabbedPane/bug6259533.java line 47: > 45: The first tab uses a string and the second tab has a JLabel as a tabComponent > 46: > 47: Select the each tab and notice that on selection the tab title Suggestion: Select each tab and notice that on selection the tab title test/jdk/javax/swing/JTabbedPane/bug6259533.java line 48: > 46: > 47: Select the each tab and notice that on selection the tab title > 48: is moved a upwards slightly in comparison with the unselected tab Suggestion: is moved upwards slightly in comparison with the unselected tab ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/24461#discussion_r2030572110 PR Review Comment: https://git.openjdk.org/jdk/pull/24461#discussion_r2030570987 From tr at openjdk.org Mon Apr 7 07:29:38 2025 From: tr at openjdk.org (Tejesh R) Date: Mon, 7 Apr 2025 07:29:38 GMT Subject: RFR: 8352865: Open source several AWT TextComponent tests - Batch 2 Message-ID: Open source these AWT TextComponent tests: java/awt/TextComponent/SelectionAndCaretColor/SelectionAndCaretColor.java java/awt/TextComponent/SelectionTest/SelectionTest.java java/awt/TextComponent/CorrectTextComponentSelectionTest/CorrectTextComponentSelectionTest.java java/awt/TextComponent/AltPlusNumberKeyCombinationsTest/AltPlusNumberKeyCombinationsTest.java ------------- Commit messages: - Open source Changes: https://git.openjdk.org/jdk/pull/24477/files Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=24477&range=00 Issue: https://bugs.openjdk.org/browse/JDK-8352865 Stats: 448 lines in 5 files changed: 448 ins; 0 del; 0 mod Patch: https://git.openjdk.org/jdk/pull/24477.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/24477/head:pull/24477 PR: https://git.openjdk.org/jdk/pull/24477 From duke at openjdk.org Mon Apr 7 07:31:54 2025 From: duke at openjdk.org (Hendrik Schick) Date: Mon, 7 Apr 2025 07:31:54 GMT Subject: RFR: 8353589: Open source a few Swing menu-related tests In-Reply-To: References: Message-ID: On Fri, 4 Apr 2025 20:30:50 GMT, Phil Race wrote: > Open source a few tests related to Swing menus. test/jdk/javax/swing/JPopupMenu/bug4530303.java line 47: > 45: Open the menu "Menu" and place the mouse pointer over the first menu item, "Point here". > 46: The second menu item, "Ghost", should be replaced with another item, "Fixed!". > 47: If it the item just disappears and no new item appears in the empty space, the test FAILS. Suggestion: If the item just disappears and no new item appears in the empty space, the test FAILS. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/24457#discussion_r2030615053 From duke at openjdk.org Mon Apr 7 09:07:04 2025 From: duke at openjdk.org (Hendrik Schick) Date: Mon, 7 Apr 2025 09:07:04 GMT Subject: RFR: 8352865: Open source several AWT TextComponent tests - Batch 2 In-Reply-To: References: Message-ID: On Mon, 7 Apr 2025 07:24:31 GMT, Tejesh R wrote: > Open source these AWT TextComponent tests: > > java/awt/TextComponent/SelectionAndCaretColor/SelectionAndCaretColor.java > java/awt/TextComponent/SelectionTest/SelectionTest.java > java/awt/TextComponent/CorrectTextComponentSelectionTest/CorrectTextComponentSelectionTest.java > java/awt/TextComponent/AltPlusNumberKeyCombinationsTest/AltPlusNumberKeyCombinationsTest.java test/jdk/java/awt/TextComponent/AltPlusNumberKeyCombinationsTest.java line 43: > 41: String INSTRUCTIONS = """ > 42: [WINDOWS PLATFORM ONLY] > 43: Please do the following steps for the both TextField and TextArea: Suggestion: Please do the following steps for both TextField and TextArea: ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/24477#discussion_r2030787727 From azvegint at openjdk.org Mon Apr 7 11:08:49 2025 From: azvegint at openjdk.org (Alexander Zvegintsev) Date: Mon, 7 Apr 2025 11:08:49 GMT Subject: RFR: 8352686: Opensource JInternalFrame tests - series3 [v2] In-Reply-To: References: Message-ID: <0pIVeph2P-YgbITqumR2G0O3mhn33olB8W0SRpBBmEM=.10205a95-f854-46f2-85ed-c525cf812eb0@github.com> On Mon, 7 Apr 2025 04:02:45 GMT, Prasanta Sadhukhan wrote: >> Few JInternalFrame tests are opensourced > > Prasanta Sadhukhan has updated the pull request incrementally with one additional commit since the last revision: > > spacing Marked as reviewed by azvegint (Reviewer). ------------- PR Review: https://git.openjdk.org/jdk/pull/24466#pullrequestreview-2746430814 From azvegint at openjdk.org Mon Apr 7 11:16:57 2025 From: azvegint at openjdk.org (Alexander Zvegintsev) Date: Mon, 7 Apr 2025 11:16:57 GMT Subject: RFR: 8352684: Opensource JInternalFrame tests - series1 [v2] In-Reply-To: References: Message-ID: On Mon, 7 Apr 2025 04:04:37 GMT, Prasanta Sadhukhan wrote: >> Few JInternalFrame tests are opensourced > > Prasanta Sadhukhan has updated the pull request incrementally with one additional commit since the last revision: > > spacing Marked as reviewed by azvegint (Reviewer). ------------- PR Review: https://git.openjdk.org/jdk/pull/24447#pullrequestreview-2746449019 From psadhukhan at openjdk.org Mon Apr 7 12:31:56 2025 From: psadhukhan at openjdk.org (Prasanta Sadhukhan) Date: Mon, 7 Apr 2025 12:31:56 GMT Subject: Integrated: 8352684: Opensource JInternalFrame tests - series1 In-Reply-To: References: Message-ID: On Fri, 4 Apr 2025 13:52:01 GMT, Prasanta Sadhukhan wrote: > Few JInternalFrame tests are opensourced This pull request has now been integrated. Changeset: 66435c27 Author: Prasanta Sadhukhan URL: https://git.openjdk.org/jdk/commit/66435c27b3e0a89e4350caf6207e36f5a9b82b7f Stats: 304 lines in 4 files changed: 304 ins; 0 del; 0 mod 8352684: Opensource JInternalFrame tests - series1 Reviewed-by: azvegint ------------- PR: https://git.openjdk.org/jdk/pull/24447 From psadhukhan at openjdk.org Mon Apr 7 12:34:16 2025 From: psadhukhan at openjdk.org (Prasanta Sadhukhan) Date: Mon, 7 Apr 2025 12:34:16 GMT Subject: Integrated: 8352686: Opensource JInternalFrame tests - series3 In-Reply-To: References: Message-ID: On Sat, 5 Apr 2025 03:40:10 GMT, Prasanta Sadhukhan wrote: > Few JInternalFrame tests are opensourced This pull request has now been integrated. Changeset: 27c8d9d6 Author: Prasanta Sadhukhan URL: https://git.openjdk.org/jdk/commit/27c8d9d635eaa0aac722c1b1eba8591fd291c077 Stats: 428 lines in 4 files changed: 428 ins; 0 del; 0 mod 8352686: Opensource JInternalFrame tests - series3 Reviewed-by: azvegint ------------- PR: https://git.openjdk.org/jdk/pull/24466 From rkannathpari at openjdk.org Mon Apr 7 12:34:43 2025 From: rkannathpari at openjdk.org (Renjith Kannath Pariyangad) Date: Mon, 7 Apr 2025 12:34:43 GMT Subject: RFR: 8353138: Screen capture for test TaskbarPositionTest.java, failure case [v7] In-Reply-To: References: Message-ID: > Hi Reviewers, > > Added screen capture in case of test failure using Robot. > > Please review and let me know your suggestion if any. Renjith Kannath Pariyangad has updated the pull request incrementally with one additional commit since the last revision: Moved function to last ------------- Changes: - all: https://git.openjdk.org/jdk/pull/24286/files - new: https://git.openjdk.org/jdk/pull/24286/files/a24b531c..16e71719 Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=24286&range=06 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=24286&range=05-06 Stats: 26 lines in 1 file changed: 13 ins; 13 del; 0 mod Patch: https://git.openjdk.org/jdk/pull/24286.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/24286/head:pull/24286 PR: https://git.openjdk.org/jdk/pull/24286 From aivanov at openjdk.org Mon Apr 7 13:03:55 2025 From: aivanov at openjdk.org (Alexey Ivanov) Date: Mon, 7 Apr 2025 13:03:55 GMT Subject: RFR: 8353138: Screen capture for test TaskbarPositionTest.java, failure case [v7] In-Reply-To: References: Message-ID: On Mon, 7 Apr 2025 12:34:43 GMT, Renjith Kannath Pariyangad wrote: >> Hi Reviewers, >> >> Added screen capture in case of test failure using Robot. >> >> Please review and let me know your suggestion if any. > > Renjith Kannath Pariyangad has updated the pull request incrementally with one additional commit since the last revision: > > Moved function to last Thank you for updating the PR. ------------- Marked as reviewed by aivanov (Reviewer). PR Review: https://git.openjdk.org/jdk/pull/24286#pullrequestreview-2746739509 From dgredler at openjdk.org Mon Apr 7 14:43:34 2025 From: dgredler at openjdk.org (Daniel Gredler) Date: Mon, 7 Apr 2025 14:43:34 GMT Subject: RFR: 8353002: Remove unnecessary Windows version check in WTaskbarPeer In-Reply-To: References: Message-ID: On Fri, 28 Mar 2025 19:28:58 GMT, Alexey Ivanov wrote: >> WTaskbarPeer contains a check as to whether the current Windows version is Windows 7 or later. The current minimum supported version is Windows 10, so this is no longer needed. >> >> There didn't seem to be a public test exercising this code, so I also added a basic Taskbar sanity test. > > src/java.desktop/windows/classes/sun/awt/windows/WTaskbarPeer.java line 46: > >> 44: private static synchronized void init() { >> 45: if (!initExecuted) { >> 46: supported = ShellFolder.invoke(() -> nativeInit()); > > I wonder what will happen if I start `java.exe` on a system with Windows Vista which doesn't support these features. > > If the native code returns an error, then it's fine. > > I ask this question not only out of curiosity but also because it looks like people run Java apps on Windows versions before Windows 10. We had to implement fallback for older versions of Windows in [JDK-8321151](https://bugs.openjdk.org/browse/JDK-8321151). @aivanov-jdk Are there any additional concerns from your side after the clarifications from Sergey and Phil? ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/24287#discussion_r2031399904 From duke at openjdk.org Mon Apr 7 15:00:23 2025 From: duke at openjdk.org (duke) Date: Mon, 7 Apr 2025 15:00:23 GMT Subject: RFR: 8353138: Screen capture for test TaskbarPositionTest.java, failure case [v7] In-Reply-To: References: Message-ID: On Mon, 7 Apr 2025 12:34:43 GMT, Renjith Kannath Pariyangad wrote: >> Hi Reviewers, >> >> Added screen capture in case of test failure using Robot. >> >> Please review and let me know your suggestion if any. > > Renjith Kannath Pariyangad has updated the pull request incrementally with one additional commit since the last revision: > > Moved function to last @Renjithkannath Your change (at version 16e717190ecf1a401737dc3baad58ea96281c014) is now ready to be sponsored by a Committer. ------------- PR Comment: https://git.openjdk.org/jdk/pull/24286#issuecomment-2783635258 From prr at openjdk.org Mon Apr 7 16:28:44 2025 From: prr at openjdk.org (Phil Race) Date: Mon, 7 Apr 2025 16:28:44 GMT Subject: RFR: 8353304: Open source two JTabbedPane tests [v2] In-Reply-To: References: Message-ID: > Open source two Swing JTabbedPane tests. > One is problem listed for macOS because of the way Aqua displays tabs on the left + right. Phil Race has updated the pull request incrementally with one additional commit since the last revision: 8353304 ------------- Changes: - all: https://git.openjdk.org/jdk/pull/24461/files - new: https://git.openjdk.org/jdk/pull/24461/files/e7ff7b17..43e7670d Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=24461&range=01 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=24461&range=00-01 Stats: 6 lines in 2 files changed: 0 ins; 0 del; 6 mod Patch: https://git.openjdk.org/jdk/pull/24461.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/24461/head:pull/24461 PR: https://git.openjdk.org/jdk/pull/24461 From prr at openjdk.org Mon Apr 7 16:41:37 2025 From: prr at openjdk.org (Phil Race) Date: Mon, 7 Apr 2025 16:41:37 GMT Subject: RFR: 8353589: Open source a few Swing menu-related tests [v2] In-Reply-To: References: Message-ID: On Sat, 5 Apr 2025 16:39:56 GMT, Andrey Turbanov wrote: >> Phil Race has updated the pull request incrementally with one additional commit since the last revision: >> >> 8353589 > > test/jdk/javax/swing/JPopupMenu/bug4119993.java line 92: > >> 90: cols[r] = "col " + r; >> 91: for (int c = 0; c < 5; c ++) { >> 92: data[r][c] = "(" + r + "," + c + ")"; > > Suggestion: > > data[r][c] = "(" + r + "," + c + ")"; updated > test/jdk/javax/swing/JPopupMenu/bug4119993.java line 102: > >> 100: p.add(scrollpane); >> 101: >> 102: String[] s = {"1","2","3","4","5", "6", "7", "8", "9", "10"}; > > Suggestion: > > String[] s = {"1", "2", "3", "4", "5", "6", "7", "8", "9", "10"}; updated ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/24457#discussion_r2031617776 PR Review Comment: https://git.openjdk.org/jdk/pull/24457#discussion_r2031617582 From prr at openjdk.org Mon Apr 7 16:41:37 2025 From: prr at openjdk.org (Phil Race) Date: Mon, 7 Apr 2025 16:41:37 GMT Subject: RFR: 8353589: Open source a few Swing menu-related tests [v2] In-Reply-To: References: Message-ID: > Open source a few tests related to Swing menus. Phil Race has updated the pull request incrementally with one additional commit since the last revision: 8353589 ------------- Changes: - all: https://git.openjdk.org/jdk/pull/24457/files - new: https://git.openjdk.org/jdk/pull/24457/files/d58812cc..8a89a142 Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=24457&range=01 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=24457&range=00-01 Stats: 6 lines in 3 files changed: 0 ins; 3 del; 3 mod Patch: https://git.openjdk.org/jdk/pull/24457.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/24457/head:pull/24457 PR: https://git.openjdk.org/jdk/pull/24457 From prr at openjdk.org Mon Apr 7 16:41:38 2025 From: prr at openjdk.org (Phil Race) Date: Mon, 7 Apr 2025 16:41:38 GMT Subject: RFR: 8353589: Open source a few Swing menu-related tests [v2] In-Reply-To: References: Message-ID: <5QbZ21O5qrZb2fx1QWFLpYkj8X_blQC96zZoGlrCFRQ=.5722a68f-2c35-47c2-a427-d5b412ee1c45@github.com> On Mon, 7 Apr 2025 07:29:07 GMT, Hendrik Schick wrote: >> Phil Race has updated the pull request incrementally with one additional commit since the last revision: >> >> 8353589 > > test/jdk/javax/swing/JPopupMenu/bug4530303.java line 47: > >> 45: Open the menu "Menu" and place the mouse pointer over the first menu item, "Point here". >> 46: The second menu item, "Ghost", should be replaced with another item, "Fixed!". >> 47: If it the item just disappears and no new item appears in the empty space, the test FAILS. > > Suggestion: > > If the item just disappears and no new item appears in the empty space, the test FAILS. updated ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/24457#discussion_r2031618246 From prr at openjdk.org Mon Apr 7 16:41:37 2025 From: prr at openjdk.org (Phil Race) Date: Mon, 7 Apr 2025 16:41:37 GMT Subject: RFR: 8353589: Open source a few Swing menu-related tests [v2] In-Reply-To: References: Message-ID: On Fri, 4 Apr 2025 21:00:20 GMT, Harshitha Onkar wrote: >> Phil Race has updated the pull request incrementally with one additional commit since the last revision: >> >> 8353589 > > test/jdk/javax/swing/JPopupMenu/bug4187004.java line 98: > >> 96: } >> 97: >> 98: > > Extra newlines can be removed. updated > test/jdk/javax/swing/JPopupMenu/bug4530303.java line 29: > >> 27: * @build PassFailJFrame >> 28: * @summary Tests JPopupMenu.pack() >> 29: * @key headful > > `@key headful` redundant for manual tests updated ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/24457#discussion_r2031617920 PR Review Comment: https://git.openjdk.org/jdk/pull/24457#discussion_r2031618027 From prr at openjdk.org Mon Apr 7 16:44:03 2025 From: prr at openjdk.org (Phil Race) Date: Mon, 7 Apr 2025 16:44:03 GMT Subject: Integrated: 8353475: Open source two Swing DefaultCaret tests In-Reply-To: References: Message-ID: On Fri, 4 Apr 2025 18:50:48 GMT, Phil Race wrote: > Open source two Swing caret related tests. This pull request has now been integrated. Changeset: e08441c0 Author: Phil Race URL: https://git.openjdk.org/jdk/commit/e08441c03352543f800aef166afabec1dacaf4bf Stats: 134 lines in 2 files changed: 134 ins; 0 del; 0 mod 8353475: Open source two Swing DefaultCaret tests Reviewed-by: honkar ------------- PR: https://git.openjdk.org/jdk/pull/24455 From kizune at openjdk.org Mon Apr 7 17:15:56 2025 From: kizune at openjdk.org (Alexander Zuev) Date: Mon, 7 Apr 2025 17:15:56 GMT Subject: RFR: 8353304: Open source two JTabbedPane tests [v2] In-Reply-To: References: Message-ID: On Mon, 7 Apr 2025 16:28:44 GMT, Phil Race wrote: >> Open source two Swing JTabbedPane tests. >> One is problem listed for macOS because of the way Aqua displays tabs on the left + right. > > Phil Race has updated the pull request incrementally with one additional commit since the last revision: > > 8353304 Marked as reviewed by kizune (Reviewer). ------------- PR Review: https://git.openjdk.org/jdk/pull/24461#pullrequestreview-2747539572 From prr at openjdk.org Mon Apr 7 18:38:42 2025 From: prr at openjdk.org (Phil Race) Date: Mon, 7 Apr 2025 18:38:42 GMT Subject: Integrated: 8353304: Open source two JTabbedPane tests In-Reply-To: References: Message-ID: On Fri, 4 Apr 2025 22:50:28 GMT, Phil Race wrote: > Open source two Swing JTabbedPane tests. > One is problem listed for macOS because of the way Aqua displays tabs on the left + right. This pull request has now been integrated. Changeset: 1b6f6946 Author: Phil Race URL: https://git.openjdk.org/jdk/commit/1b6f6946ae1fa0657d6bd1f63b25a0008ab2acdd Stats: 363 lines in 3 files changed: 363 ins; 0 del; 0 mod 8353304: Open source two JTabbedPane tests Reviewed-by: kizune ------------- PR: https://git.openjdk.org/jdk/pull/24461 From aivanov at openjdk.org Mon Apr 7 19:30:17 2025 From: aivanov at openjdk.org (Alexey Ivanov) Date: Mon, 7 Apr 2025 19:30:17 GMT Subject: RFR: 8353002: Remove unnecessary Windows version check in WTaskbarPeer In-Reply-To: References: Message-ID: On Fri, 28 Mar 2025 09:41:22 GMT, Daniel Gredler wrote: > WTaskbarPeer contains a check as to whether the current Windows version is Windows 7 or later. The current minimum supported version is Windows 10, so this is no longer needed. > > There didn't seem to be a public test exercising this code, so I also added a basic Taskbar sanity test. Marked as reviewed by aivanov (Reviewer). ------------- PR Review: https://git.openjdk.org/jdk/pull/24287#pullrequestreview-2747903052 From aivanov at openjdk.org Mon Apr 7 19:41:20 2025 From: aivanov at openjdk.org (Alexey Ivanov) Date: Mon, 7 Apr 2025 19:41:20 GMT Subject: RFR: 8353002: Remove unnecessary Windows version check in WTaskbarPeer In-Reply-To: References: Message-ID: On Mon, 7 Apr 2025 14:40:38 GMT, Daniel Gredler wrote: >> src/java.desktop/windows/classes/sun/awt/windows/WTaskbarPeer.java line 46: >> >>> 44: private static synchronized void init() { >>> 45: if (!initExecuted) { >>> 46: supported = ShellFolder.invoke(() -> nativeInit()); >> >> I wonder what will happen if I start `java.exe` on a system with Windows Vista which doesn't support these features. >> >> If the native code returns an error, then it's fine. >> >> I ask this question not only out of curiosity but also because it looks like people run Java apps on Windows versions before Windows 10. We had to implement fallback for older versions of Windows in [JDK-8321151](https://bugs.openjdk.org/browse/JDK-8321151). > > @aivanov-jdk Are there any additional concerns from your side after the clarifications from Sergey and Phil? > Interesting, thanks for the link! > > One issue I see with [JDK-8294427](https://bugs.openjdk.org/browse/JDK-8294427) is that it didn't work all the way back to the original Windows 10 release, which conflicts with the [Oracle compatibility matrix](https://www.oracle.com/java/technologies/javase-subscription/documentation.html#sysconfig). The original release of Windows 10 isn't supported by Microsoft, therefore it's not supported by Oracle. > But besides that, I'm surprised that a fix was implemented and tested targeting Windows 7 compatibility. Is there a different OpenJDK compatibility matrix that I should be aware of? If not, what were the criteria dictating that Windows 7 compatibility be maintained (at least in 2023)? Each JDK vendor could have their own compatibility matrix which are different from Oracle. > But Windows Vista isn't something I care about for JDK 25, although "not crashing" would be nice :-) Very true, Windows Vista is unlikely to be still in use, its adoption was low even when it was new. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/24287#discussion_r2031898268 From duke at openjdk.org Mon Apr 7 19:50:13 2025 From: duke at openjdk.org (duke) Date: Mon, 7 Apr 2025 19:50:13 GMT Subject: RFR: 8353002: Remove unnecessary Windows version check in WTaskbarPeer In-Reply-To: References: Message-ID: On Fri, 28 Mar 2025 09:41:22 GMT, Daniel Gredler wrote: > WTaskbarPeer contains a check as to whether the current Windows version is Windows 7 or later. The current minimum supported version is Windows 10, so this is no longer needed. > > There didn't seem to be a public test exercising this code, so I also added a basic Taskbar sanity test. @gredler Your change (at version ab72f571dd778dc8065b77c0e5f5c599345bc8b7) is now ready to be sponsored by a Committer. ------------- PR Comment: https://git.openjdk.org/jdk/pull/24287#issuecomment-2784463062 From rkannathpari at openjdk.org Mon Apr 7 19:55:25 2025 From: rkannathpari at openjdk.org (Renjith Kannath Pariyangad) Date: Mon, 7 Apr 2025 19:55:25 GMT Subject: Integrated: 8353138: Screen capture for test TaskbarPositionTest.java, failure case In-Reply-To: References: Message-ID: <2JNPNbwjGxyl5YB_g3X85UMiX27D6ZW_xVjdTrYxq38=.16083b55-d852-471a-945b-42e7cfc29b78@github.com> On Fri, 28 Mar 2025 06:00:51 GMT, Renjith Kannath Pariyangad wrote: > Hi Reviewers, > > Added screen capture in case of test failure using Robot. > > Please review and let me know your suggestion if any. This pull request has now been integrated. Changeset: 05ff557d Author: Renjith Kannath Pariyangad Committer: Alexey Ivanov URL: https://git.openjdk.org/jdk/commit/05ff557dee6adc679d85bfe8fb49f69053a6aaba Stats: 26 lines in 1 file changed: 21 ins; 1 del; 4 mod 8353138: Screen capture for test TaskbarPositionTest.java, failure case Reviewed-by: aivanov, serb ------------- PR: https://git.openjdk.org/jdk/pull/24286 From dgredler at openjdk.org Mon Apr 7 19:56:24 2025 From: dgredler at openjdk.org (Daniel Gredler) Date: Mon, 7 Apr 2025 19:56:24 GMT Subject: Integrated: 8353002: Remove unnecessary Windows version check in WTaskbarPeer In-Reply-To: References: Message-ID: On Fri, 28 Mar 2025 09:41:22 GMT, Daniel Gredler wrote: > WTaskbarPeer contains a check as to whether the current Windows version is Windows 7 or later. The current minimum supported version is Windows 10, so this is no longer needed. > > There didn't seem to be a public test exercising this code, so I also added a basic Taskbar sanity test. This pull request has now been integrated. Changeset: 3757f660 Author: Daniel Gredler Committer: Alexey Ivanov URL: https://git.openjdk.org/jdk/commit/3757f660f237408e843584c224f03a64657f7b31 Stats: 55 lines in 2 files changed: 50 ins; 3 del; 2 mod 8353002: Remove unnecessary Windows version check in WTaskbarPeer Reviewed-by: prr, serb, aivanov ------------- PR: https://git.openjdk.org/jdk/pull/24287 From achung at openjdk.org Mon Apr 7 22:54:38 2025 From: achung at openjdk.org (Alisen Chung) Date: Mon, 7 Apr 2025 22:54:38 GMT Subject: RFR: 8352905: Open some JComboBox bugs 1 Message-ID: Updating and opening some tests ------------- Commit messages: - open tests Changes: https://git.openjdk.org/jdk/pull/24495/files Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=24495&range=00 Issue: https://bugs.openjdk.org/browse/JDK-8352905 Stats: 430 lines in 4 files changed: 430 ins; 0 del; 0 mod Patch: https://git.openjdk.org/jdk/pull/24495.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/24495/head:pull/24495 PR: https://git.openjdk.org/jdk/pull/24495 From serb at openjdk.org Tue Apr 8 01:20:24 2025 From: serb at openjdk.org (Sergey Bylokhov) Date: Tue, 8 Apr 2025 01:20:24 GMT Subject: RFR: JDK-8346465 : Add a check in setData() to restrict the update of Built-In ICC_Profiles [v22] In-Reply-To: <9S_w6gnfAlcdsoQviN_kIwZoYzQeAZ2E9APx-ikccuk=.19fa2146-fb05-4687-9b21-cd979bbdced3@github.com> References: <9S_w6gnfAlcdsoQviN_kIwZoYzQeAZ2E9APx-ikccuk=.19fa2146-fb05-4687-9b21-cd979bbdced3@github.com> Message-ID: On Wed, 2 Apr 2025 22:36:13 GMT, Harshitha Onkar wrote: >> Built-in Profiles are singleton objects and if the user happens to modify this shared profile object via setData() then the modified version of the profile is returned each time the same built-in profile is requested via getInstance(). >> >> It is good to protect Built-in profiles from such direct modification by adding BuiltIn profile check in `setData()` such that **only copies** of Built-In profiles are allowed to be updated. >> >> With the proposed fix, if Built-In profile is updated using `.setData()` it throws _**IAE - "BuiltIn profile cannot be modified"**_ >> >> There are no restrictions on creating copies of BuiltIn profile and then modifying it, but what is being restricted with this fix is - the direct modification of the shared BuiltIn profile instance. >> >> Applications which need a modified version of the ICC Profile should instead do the following: >> >> >> byte[] profileData = ICC_Profile.getData() // get the byte array representation of BuiltIn- profile >> ICCProfile newProfile = ICC_Profile.getInstance(profileData) // create a new profile >> newProfile.setData() // to modify and customize the profile >> >> >> Following existing tests are modified to update a copy of Built-In profile. >> >> - java/awt/color/ICC_Profile/SetHeaderInfo.java >> - java/awt/color/ICC_ProfileSetNullDataTest.java >> - sun/java2d/cmm/ProfileOp/SetDataTest.java > > Harshitha Onkar has updated the pull request incrementally with one additional commit since the last revision: > > single case type Marked as reviewed by serb (Reviewer). ------------- PR Review: https://git.openjdk.org/jdk/pull/23606#pullrequestreview-2748437664 From mvs at openjdk.org Tue Apr 8 04:44:10 2025 From: mvs at openjdk.org (Manukumar V S) Date: Tue, 8 Apr 2025 04:44:10 GMT Subject: RFR: 8288471: java/awt/ScrollPane/bug8077409Test.java is unstable and fails intermittently in CI [v2] In-Reply-To: <66tP05yMtj7c-RMTZD9hVVaKRvSE84lwQQNTBNiZx0o=.3cb7badf-f06e-472d-81c2-b4ff82c30dbb@github.com> References: <66tP05yMtj7c-RMTZD9hVVaKRvSE84lwQQNTBNiZx0o=.3cb7badf-f06e-472d-81c2-b4ff82c30dbb@github.com> Message-ID: On Sat, 5 Apr 2025 11:52:19 GMT, Manukumar V S wrote: >> java/awt/ScrollPane/bug8077409Test.java is unstable and fails intermittently in CI, especially in MacOS machines. >> Also the frame created in this test is not disposed which may interfere with other tests. >> >> Fix: >> Some stabilisations added and the frame is disposed properly. >> >> Testing: >> Tested 100 times per platform(macosx-x64,macosx-aarch64,windows-x64,linux-x64) and got all PASS. > > Manukumar V S has updated the pull request incrementally with one additional commit since the last revision: > > Review comments fixed : Formatting changes Any volunteers for a review? ------------- PR Comment: https://git.openjdk.org/jdk/pull/24292#issuecomment-2785206303 From rkannathpari at openjdk.org Tue Apr 8 09:03:47 2025 From: rkannathpari at openjdk.org (Renjith Kannath Pariyangad) Date: Tue, 8 Apr 2025 09:03:47 GMT Subject: RFR: 8334016: Make PrintNullString.java semi-automatic Message-ID: Hi Reviewers, I have updated the test and made it semi-automatic (need to click "Print") . Test will initiate a print and result will be generated automatic. Please review and let me know your suggestions. ------------- Commit messages: - Tabspace removed - Add print cancel test failed - Merge branch 'openjdk:master' into 8334016-v1 - 8334016: Make PrintNullString.java semi-automatic Changes: https://git.openjdk.org/jdk/pull/24501/files Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=24501&range=00 Issue: https://bugs.openjdk.org/browse/JDK-8334016 Stats: 63 lines in 1 file changed: 17 ins; 32 del; 14 mod Patch: https://git.openjdk.org/jdk/pull/24501.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/24501/head:pull/24501 PR: https://git.openjdk.org/jdk/pull/24501 From tr at openjdk.org Tue Apr 8 09:51:23 2025 From: tr at openjdk.org (Tejesh R) Date: Tue, 8 Apr 2025 09:51:23 GMT Subject: RFR: JDK-8353486 : Open source Swing Tests - Set 4 [v2] In-Reply-To: <57D7KGkIDtC2kCWtaXOVc8Pm2hLTASCPyyJnICngoUk=.19804310-f80a-4df7-b1f4-5754fd5be64c@github.com> References: <57D7KGkIDtC2kCWtaXOVc8Pm2hLTASCPyyJnICngoUk=.19804310-f80a-4df7-b1f4-5754fd5be64c@github.com> Message-ID: On Fri, 4 Apr 2025 20:43:45 GMT, Harshitha Onkar wrote: >> Open-sourced the following Swing tests: >> >> 1. javax/swing/JFileChooser/bug4464774.java >> 2. javax/swing/JFileChooser/bug4522756.java >> 3. javax/swing/JFileChooser/bug4759934.java >> 4. javax/swing/JFileChooser/bug4943900.java >> 5. javax/swing/JOptionPane/bug4194862.java > > Harshitha Onkar has updated the pull request incrementally with two additional commits since the last revision: > > - JOptionPane changes > - review changes test/jdk/javax/swing/JFileChooser/bug4464774.java line 60: > 58: .instructions(INSTRUCTIONS) > 59: .rows(10) > 60: .columns(65) Why do we need column width of 65 for the above instructions? test/jdk/javax/swing/JFileChooser/bug4464774.java line 67: > 65: > 66: public static JPanel createAndShowUI() { > 67: JButton button = new JButton("Show JFileChooser"); I guess we can minimize button clicks, instead of showing JFileChooser on button we can directly show JFileChooser on a Frame right ? I hope there are no dependency on JButton click and this test? (same for other applicable test) test/jdk/javax/swing/JFileChooser/bug4522756.java line 58: > 56: .title("Instructions") > 57: .instructions(INSTRUCTIONS) > 58: .rows(12) I hope `row` setting is not required? test/jdk/javax/swing/JOptionPane/bug4194862.java line 25: > 23: > 24: /* @test > 25: @bug 4194862 Suggestion: * @bug 4194862 test/jdk/javax/swing/JOptionPane/bug4194862.java line 26: > 24: /* @test > 25: @bug 4194862 > 26: @summary Tests that internal frame-based dialogs are centered relative Missing `*`. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/24456#discussion_r2032804236 PR Review Comment: https://git.openjdk.org/jdk/pull/24456#discussion_r2032810039 PR Review Comment: https://git.openjdk.org/jdk/pull/24456#discussion_r2032813244 PR Review Comment: https://git.openjdk.org/jdk/pull/24456#discussion_r2032822898 PR Review Comment: https://git.openjdk.org/jdk/pull/24456#discussion_r2032822346 From duke at openjdk.org Tue Apr 8 13:12:26 2025 From: duke at openjdk.org (duke) Date: Tue, 8 Apr 2025 13:12:26 GMT Subject: Withdrawn: JDK-8348302 : [Test bug] Update FileDialogIconTest.java In-Reply-To: References: Message-ID: On Fri, 7 Feb 2025 19:50:03 GMT, Harshitha Onkar wrote: > FileDialogIconTest.java has been updated. > > Following changes were made. > > - Test instructions updated > - BugID associated with the test is updated to the correct one > - setIconBufferedImagesToFrame and setIconBufferedImagesToDialog btns added to the frame. > - other minor cleanups This pull request has been closed without being integrated. ------------- PR: https://git.openjdk.org/jdk/pull/23523 From myankelevich at openjdk.org Tue Apr 8 13:40:18 2025 From: myankelevich at openjdk.org (Mikhail Yankelevich) Date: Tue, 8 Apr 2025 13:40:18 GMT Subject: RFR: 8334016: Make PrintNullString.java semi-automatic In-Reply-To: References: Message-ID: On Tue, 8 Apr 2025 08:58:45 GMT, Renjith Kannath Pariyangad wrote: > Hi Reviewers, > > I have updated the test and made it semi-automatic (need to click "Print") . Test will initiate a print and result will be generated automatic. > > Please review and let me know your suggestions. test/jdk/java/awt/print/PrinterJob/PrintNullString.java line 64: > 62: .columns(45) > 63: .build(); > 64: new PrintNullString(); Minor: Don't you think It's a bit unusual to have the test be executed with the builder of the class? Seems a bit odd to me, but if you prefer it, it's fine as is test/jdk/java/awt/print/PrinterJob/PrintNullString.java line 112: > 110: // API 1: null & empty drawString(String, int, int); > 111: try { > 112: g2d.drawString(nullStr, 20, 40); Isn't it always null? Don't you think it is a bit misleading when reading the test? Also applies to the lines 123, 134, 149 ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/24501#discussion_r2033214637 PR Review Comment: https://git.openjdk.org/jdk/pull/24501#discussion_r2033214366 From azvegint at openjdk.org Tue Apr 8 14:45:28 2025 From: azvegint at openjdk.org (Alexander Zvegintsev) Date: Tue, 8 Apr 2025 14:45:28 GMT Subject: RFR: 8353586: Open source several toolkit tests Message-ID: <2xbRaqpi62yNHGl8xeKAZE4X5PSWnCtm7Zz1-1orEOY=.8e0c2435-c3a6-473e-a06f-2deb5f21f1be@github.com> A couple of tests are open sourced. ------------- Commit messages: - initial Changes: https://git.openjdk.org/jdk/pull/24513/files Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=24513&range=00 Issue: https://bugs.openjdk.org/browse/JDK-8353586 Stats: 400 lines in 2 files changed: 400 ins; 0 del; 0 mod Patch: https://git.openjdk.org/jdk/pull/24513.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/24513/head:pull/24513 PR: https://git.openjdk.org/jdk/pull/24513 From azvegint at openjdk.org Tue Apr 8 15:14:11 2025 From: azvegint at openjdk.org (Alexander Zvegintsev) Date: Tue, 8 Apr 2025 15:14:11 GMT Subject: RFR: 8353549: Open source events tests batch2 Message-ID: <0SKEWTiuwSyz-lNMb59_qAvJgDWsaBV8AIfULgZmu9k=.907a22eb-4f47-49e0-9e45-7ece3764258b@github.com> few more events tests are open sourced. ------------- Commit messages: - initial Changes: https://git.openjdk.org/jdk/pull/24516/files Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=24516&range=00 Issue: https://bugs.openjdk.org/browse/JDK-8353549 Stats: 1104 lines in 5 files changed: 1104 ins; 0 del; 0 mod Patch: https://git.openjdk.org/jdk/pull/24516.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/24516/head:pull/24516 PR: https://git.openjdk.org/jdk/pull/24516 From honkar at openjdk.org Tue Apr 8 17:26:24 2025 From: honkar at openjdk.org (Harshitha Onkar) Date: Tue, 8 Apr 2025 17:26:24 GMT Subject: RFR: 8352687: Opensource few JInternalFrame and JTextField tests In-Reply-To: References: Message-ID: On Mon, 7 Apr 2025 04:39:05 GMT, Prasanta Sadhukhan wrote: > Few JInternalFrame and JTextField tests are opensourced test/jdk/javax/swing/JInternalFrame/bug4190516.java line 60: > 58: fr.getContentPane().add(jdp); > 59: > 60: JInternalFrame jif = new JInternalFrame("Title", true, true, true, true); Suggestion: JInternalFrame jif = new JInternalFrame("Title", true, true, true, true); test/jdk/javax/swing/JInternalFrame/bug4242045.java line 54: > 52: "Iconifiable", "Maximizable", "Closable" under different LookAndFeels. > 53: If they appears and disappears correctly then test passes. If any > 54: button not appear or disappear as expected or appear with incorrect Suggestion: button does not appear or disappear as expected or appear with incorrect test/jdk/javax/swing/JTextField/bug4232716.java line 55: > 53: e = new JEditorPane("text/html", html); > 54: e.setEditable(false); > 55: frame.getContentPane().add(e); Suggestion: frame.add(e); test/jdk/javax/swing/JTextField/bug5027332.java line 51: > 49: The caret should be placed slightly off text field borders, > 50: so that it can be easily distinguished from the border. > 51: Test fails if the caret touches the border."""; Just a thought: Would it be good to extend this test to all platforms (getSystemLookAndFeelClassName()) since it verifies if caret does not merge with the text field border? test/jdk/javax/swing/JTextField/bug5027332.java line 70: > 68: > 69: private static JFrame createTestUI() { > 70: Extra line can be removed ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/24474#discussion_r2033672487 PR Review Comment: https://git.openjdk.org/jdk/pull/24474#discussion_r2033676886 PR Review Comment: https://git.openjdk.org/jdk/pull/24474#discussion_r2033681471 PR Review Comment: https://git.openjdk.org/jdk/pull/24474#discussion_r2033700177 PR Review Comment: https://git.openjdk.org/jdk/pull/24474#discussion_r2033682849 From prr at openjdk.org Tue Apr 8 17:28:50 2025 From: prr at openjdk.org (Phil Race) Date: Tue, 8 Apr 2025 17:28:50 GMT Subject: RFR: 8353483: Open source some JProgressBar tests Message-ID: Open source 4 Swing JProgressBar tests. ------------- Commit messages: - 8353483 Changes: https://git.openjdk.org/jdk/pull/24517/files Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=24517&range=00 Issue: https://bugs.openjdk.org/browse/JDK-8353483 Stats: 460 lines in 4 files changed: 460 ins; 0 del; 0 mod Patch: https://git.openjdk.org/jdk/pull/24517.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/24517/head:pull/24517 PR: https://git.openjdk.org/jdk/pull/24517 From honkar at openjdk.org Tue Apr 8 17:30:16 2025 From: honkar at openjdk.org (Harshitha Onkar) Date: Tue, 8 Apr 2025 17:30:16 GMT Subject: RFR: 8352687: Opensource few JInternalFrame and JTextField tests In-Reply-To: References: Message-ID: On Mon, 7 Apr 2025 04:39:05 GMT, Prasanta Sadhukhan wrote: > Few JInternalFrame and JTextField tests are opensourced LGTM apart from the minor comments added inline. ------------- Marked as reviewed by honkar (Reviewer). PR Review: https://git.openjdk.org/jdk/pull/24474#pullrequestreview-2750858531 From kizune at openjdk.org Tue Apr 8 18:45:21 2025 From: kizune at openjdk.org (Alexander Zuev) Date: Tue, 8 Apr 2025 18:45:21 GMT Subject: RFR: 8353549: Open source events tests batch2 In-Reply-To: <0SKEWTiuwSyz-lNMb59_qAvJgDWsaBV8AIfULgZmu9k=.907a22eb-4f47-49e0-9e45-7ece3764258b@github.com> References: <0SKEWTiuwSyz-lNMb59_qAvJgDWsaBV8AIfULgZmu9k=.907a22eb-4f47-49e0-9e45-7ece3764258b@github.com> Message-ID: <7iX3r7_Ne-tw8EYwyKua1YZsJ9j4L4S6DXQgSubPGM8=.cf5c8be9-313a-4218-8485-7c44dd31ecb6@github.com> On Tue, 8 Apr 2025 15:07:27 GMT, Alexander Zvegintsev wrote: > few more events tests are open sourced. Looks good. ------------- Marked as reviewed by kizune (Reviewer). PR Review: https://git.openjdk.org/jdk/pull/24516#pullrequestreview-2751081775 From honkar at openjdk.org Tue Apr 8 20:45:18 2025 From: honkar at openjdk.org (Harshitha Onkar) Date: Tue, 8 Apr 2025 20:45:18 GMT Subject: RFR: 8353549: Open source events tests batch2 In-Reply-To: <0SKEWTiuwSyz-lNMb59_qAvJgDWsaBV8AIfULgZmu9k=.907a22eb-4f47-49e0-9e45-7ece3764258b@github.com> References: <0SKEWTiuwSyz-lNMb59_qAvJgDWsaBV8AIfULgZmu9k=.907a22eb-4f47-49e0-9e45-7ece3764258b@github.com> Message-ID: On Tue, 8 Apr 2025 15:07:27 GMT, Alexander Zvegintsev wrote: > few more events tests are open sourced. test/jdk/java/awt/event/MouseEvent/DragMouseEventTest.java line 67: > 65: > 66: public class DragMouseEventTest { > 67: private static ExtendedRobot robot; This test fails for me on Windows 11 with the following stack trace: java.lang.RuntimeException: 4096: Mouse drag or release was not received mouseDraggedReceived false mouseReleasedReceived false at DragMouseEventTest.testButtonDrag(DragMouseEventTest.java:260) at DragMouseEventTest.testComponent(DragMouseEventTest.java:125) at DragMouseEventTest.test(DragMouseEventTest.java:97) at DragMouseEventTest.main(DragMouseEventTest.java:74) at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:104) at java.base/java.lang.reflect.Method.invoke(Method.java:565) at com.sun.javatest.regtest.agent.MainWrapper$MainTask.run(MainWrapper.java:138) test/jdk/java/awt/event/MouseEvent/DragMouseEventTest.java line 368: > 366: > 367: setSize(500, 400); > 368: setLocation(200, 200); It might be better to have the testUI at the center of the screen to prevent any unwanted interactions with screen menu bars. Suggestion: setLocationRelativeTo(null); test/jdk/java/awt/event/MouseEvent/DragMouseEventTest.java line 438: > 436: } > 437: } > 438: } EOF newline missing test/jdk/java/awt/event/MouseEvent/MouseRButTest.java line 61: > 59: robot.delay(500); > 60: > 61: Point point = Util.invokeOnEDT(() -> button.getLocationOnScreen()); Received a suggestion on one of my other PRs that awt/regtesthelper/Util can be replaced with swing/regtesthelper/Util.getCenterPoint(button) (makes it easier and it is already called on EDT) test/jdk/java/awt/event/MouseEvent/MouseRButTest.java line 99: > 97: frame.setVisible(true); > 98: } > 99: } EOF newline missing test/jdk/java/awt/event/MouseEvent/TitleBarGetsMousePressed.java line 59: > 57: frame.setSize(300, 200); > 58: frame.addMouseListener(new MouseAdapter() { > 59: public void mouseClicked(java.awt.event.MouseEvent ev) { Can be shortened by adding `import java.awt.MouseEvent` Suggestion: public void mouseClicked(MouseEvent ev) { test/jdk/java/awt/event/MouseEvent/TitleBarGetsMousePressed.java line 64: > 62: } > 63: > 64: public void mousePressed(java.awt.event.MouseEvent ev) { same as above. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/24516#discussion_r2033799795 PR Review Comment: https://git.openjdk.org/jdk/pull/24516#discussion_r2033972129 PR Review Comment: https://git.openjdk.org/jdk/pull/24516#discussion_r2033975673 PR Review Comment: https://git.openjdk.org/jdk/pull/24516#discussion_r2033985607 PR Review Comment: https://git.openjdk.org/jdk/pull/24516#discussion_r2033985980 PR Review Comment: https://git.openjdk.org/jdk/pull/24516#discussion_r2033992939 PR Review Comment: https://git.openjdk.org/jdk/pull/24516#discussion_r2033993407 From honkar at openjdk.org Tue Apr 8 20:49:10 2025 From: honkar at openjdk.org (Harshitha Onkar) Date: Tue, 8 Apr 2025 20:49:10 GMT Subject: RFR: 8353549: Open source events tests batch2 In-Reply-To: <0SKEWTiuwSyz-lNMb59_qAvJgDWsaBV8AIfULgZmu9k=.907a22eb-4f47-49e0-9e45-7ece3764258b@github.com> References: <0SKEWTiuwSyz-lNMb59_qAvJgDWsaBV8AIfULgZmu9k=.907a22eb-4f47-49e0-9e45-7ece3764258b@github.com> Message-ID: On Tue, 8 Apr 2025 15:07:27 GMT, Alexander Zvegintsev wrote: > few more events tests are open sourced. test/jdk/java/awt/event/MouseEvent/TitleBarGetsMousePressed.java line 79: > 77: } > 78: > 79: Extra newline can be removed ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/24516#discussion_r2034001493 From honkar at openjdk.org Tue Apr 8 21:01:35 2025 From: honkar at openjdk.org (Harshitha Onkar) Date: Tue, 8 Apr 2025 21:01:35 GMT Subject: RFR: 8353549: Open source events tests batch2 In-Reply-To: <0SKEWTiuwSyz-lNMb59_qAvJgDWsaBV8AIfULgZmu9k=.907a22eb-4f47-49e0-9e45-7ece3764258b@github.com> References: <0SKEWTiuwSyz-lNMb59_qAvJgDWsaBV8AIfULgZmu9k=.907a22eb-4f47-49e0-9e45-7ece3764258b@github.com> Message-ID: On Tue, 8 Apr 2025 15:07:27 GMT, Alexander Zvegintsev wrote: > few more events tests are open sourced. test/jdk/java/awt/event/MouseEvent/DragMouseEventTest.java line 34: > 32: * @build ExtendedRobot Util > 33: * @run main DragMouseEventTest > 34: */ Suggestion: * @run main/othervm -Dsun.java2d.uiScale=1 DragMouseEventTest */ ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/24516#discussion_r2034024804 From honkar at openjdk.org Tue Apr 8 21:01:36 2025 From: honkar at openjdk.org (Harshitha Onkar) Date: Tue, 8 Apr 2025 21:01:36 GMT Subject: RFR: 8353549: Open source events tests batch2 In-Reply-To: References: <0SKEWTiuwSyz-lNMb59_qAvJgDWsaBV8AIfULgZmu9k=.907a22eb-4f47-49e0-9e45-7ece3764258b@github.com> Message-ID: On Tue, 8 Apr 2025 18:22:36 GMT, Harshitha Onkar wrote: >> few more events tests are open sourced. > > test/jdk/java/awt/event/MouseEvent/DragMouseEventTest.java line 67: > >> 65: >> 66: public class DragMouseEventTest { >> 67: private static ExtendedRobot robot; > > This test fails for me on Windows 11 with the following stack trace: > > > java.lang.RuntimeException: 4096: Mouse drag or release was not received > mouseDraggedReceived false mouseReleasedReceived false > at DragMouseEventTest.testButtonDrag(DragMouseEventTest.java:260) > at DragMouseEventTest.testComponent(DragMouseEventTest.java:125) > at DragMouseEventTest.test(DragMouseEventTest.java:97) > at DragMouseEventTest.main(DragMouseEventTest.java:74) > at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:104) > at java.base/java.lang.reflect.Method.invoke(Method.java:565) > at com.sun.javatest.regtest.agent.MainWrapper$MainTask.run(MainWrapper.java:138) It failed on my local since the screen's uiScale was set to 1.5 Good to run the test as `* @run main/othervm -Dsun.java2d.uiScale=1 DragMouseEventTest` ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/24516#discussion_r2034024110 From duke at openjdk.org Tue Apr 8 21:26:16 2025 From: duke at openjdk.org (Hendrik Schick) Date: Tue, 8 Apr 2025 21:26:16 GMT Subject: RFR: 8353483: Open source some JProgressBar tests In-Reply-To: References: Message-ID: On Tue, 8 Apr 2025 17:23:34 GMT, Phil Race wrote: > Open source 4 Swing JProgressBar tests. test/jdk/javax/swing/JProgressBar/bug5003022.java line 58: > 56: > 57: static JFrame createUI() { > 58: try { Suggestion: try { ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/24517#discussion_r2034053062 From prr at openjdk.org Tue Apr 8 22:24:47 2025 From: prr at openjdk.org (Phil Race) Date: Tue, 8 Apr 2025 22:24:47 GMT Subject: RFR: 8353483: Open source some JProgressBar tests [v2] In-Reply-To: References: Message-ID: <6XrJ5CUqRmxUV1qc7G2hq-yuIEti0dcAicIhfSRdzSU=.08886a82-a767-4db0-9e88-1e7d4786a678@github.com> > Open source 4 Swing JProgressBar tests. Phil Race has updated the pull request incrementally with one additional commit since the last revision: 8353483 ------------- Changes: - all: https://git.openjdk.org/jdk/pull/24517/files - new: https://git.openjdk.org/jdk/pull/24517/files/82e33e55..5e9e7348 Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=24517&range=01 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=24517&range=00-01 Stats: 1 line in 1 file changed: 0 ins; 0 del; 1 mod Patch: https://git.openjdk.org/jdk/pull/24517.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/24517/head:pull/24517 PR: https://git.openjdk.org/jdk/pull/24517 From prr at openjdk.org Tue Apr 8 22:24:47 2025 From: prr at openjdk.org (Phil Race) Date: Tue, 8 Apr 2025 22:24:47 GMT Subject: RFR: 8353483: Open source some JProgressBar tests [v2] In-Reply-To: References: Message-ID: On Tue, 8 Apr 2025 21:23:21 GMT, Hendrik Schick wrote: >> Phil Race has updated the pull request incrementally with one additional commit since the last revision: >> >> 8353483 > > test/jdk/javax/swing/JProgressBar/bug5003022.java line 58: > >> 56: >> 57: static JFrame createUI() { >> 58: try { > > Suggestion: > > try { fixed ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/24517#discussion_r2034111434 From honkar at openjdk.org Tue Apr 8 22:45:31 2025 From: honkar at openjdk.org (Harshitha Onkar) Date: Tue, 8 Apr 2025 22:45:31 GMT Subject: RFR: JDK-8353486 : Open source Swing Tests - Set 4 [v3] In-Reply-To: References: Message-ID: > Open-sourced the following Swing tests: > > 1. javax/swing/JFileChooser/bug4464774.java > 2. javax/swing/JFileChooser/bug4522756.java > 3. javax/swing/JFileChooser/bug4759934.java > 4. javax/swing/JFileChooser/bug4943900.java > 5. javax/swing/JOptionPane/bug4194862.java Harshitha Onkar has updated the pull request incrementally with one additional commit since the last revision: review update ------------- Changes: - all: https://git.openjdk.org/jdk/pull/24456/files - new: https://git.openjdk.org/jdk/pull/24456/files/491a6428..fa9529dd Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=24456&range=02 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=24456&range=01-02 Stats: 64 lines in 4 files changed: 2 ins; 28 del; 34 mod Patch: https://git.openjdk.org/jdk/pull/24456.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/24456/head:pull/24456 PR: https://git.openjdk.org/jdk/pull/24456 From honkar at openjdk.org Tue Apr 8 22:45:32 2025 From: honkar at openjdk.org (Harshitha Onkar) Date: Tue, 8 Apr 2025 22:45:32 GMT Subject: RFR: JDK-8353486 : Open source Swing Tests - Set 4 [v2] In-Reply-To: References: <57D7KGkIDtC2kCWtaXOVc8Pm2hLTASCPyyJnICngoUk=.19804310-f80a-4df7-b1f4-5754fd5be64c@github.com> Message-ID: On Tue, 8 Apr 2025 09:38:10 GMT, Tejesh R wrote: >> Harshitha Onkar has updated the pull request incrementally with two additional commits since the last revision: >> >> - JOptionPane changes >> - review changes > > test/jdk/javax/swing/JFileChooser/bug4464774.java line 60: > >> 58: .instructions(INSTRUCTIONS) >> 59: .rows(10) >> 60: .columns(65) > > Why do we need column width of 65 for the above instructions? On Windows LAF the instruction text is monospaced and the usual column width doesn't work. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/24456#discussion_r2034129125 From honkar at openjdk.org Tue Apr 8 22:48:27 2025 From: honkar at openjdk.org (Harshitha Onkar) Date: Tue, 8 Apr 2025 22:48:27 GMT Subject: RFR: JDK-8353486 : Open source Swing Tests - Set 4 [v2] In-Reply-To: References: <57D7KGkIDtC2kCWtaXOVc8Pm2hLTASCPyyJnICngoUk=.19804310-f80a-4df7-b1f4-5754fd5be64c@github.com> Message-ID: On Tue, 8 Apr 2025 09:41:30 GMT, Tejesh R wrote: >> Harshitha Onkar has updated the pull request incrementally with two additional commits since the last revision: >> >> - JOptionPane changes >> - review changes > > test/jdk/javax/swing/JFileChooser/bug4464774.java line 67: > >> 65: >> 66: public static JPanel createAndShowUI() { >> 67: JButton button = new JButton("Show JFileChooser"); > > I guess we can minimize button clicks, instead of showing JFileChooser on button we can directly show JFileChooser on a Frame right ? I hope there are no dependency on JButton click and this test? > (same for other applicable test) I went with the old UI but putting jfc in a frame is cleaner. Updated. > test/jdk/javax/swing/JFileChooser/bug4522756.java line 58: > >> 56: .title("Instructions") >> 57: .instructions(INSTRUCTIONS) >> 58: .rows(12) > > I hope `row` setting is not required? Added for Windows LAF. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/24456#discussion_r2034131996 PR Review Comment: https://git.openjdk.org/jdk/pull/24456#discussion_r2034132869 From honkar at openjdk.org Tue Apr 8 23:50:26 2025 From: honkar at openjdk.org (Harshitha Onkar) Date: Tue, 8 Apr 2025 23:50:26 GMT Subject: RFR: 8353483: Open source some JProgressBar tests [v2] In-Reply-To: <6XrJ5CUqRmxUV1qc7G2hq-yuIEti0dcAicIhfSRdzSU=.08886a82-a767-4db0-9e88-1e7d4786a678@github.com> References: <6XrJ5CUqRmxUV1qc7G2hq-yuIEti0dcAicIhfSRdzSU=.08886a82-a767-4db0-9e88-1e7d4786a678@github.com> Message-ID: On Tue, 8 Apr 2025 22:24:47 GMT, Phil Race wrote: >> Open source 4 Swing JProgressBar tests. > > Phil Race has updated the pull request incrementally with one additional commit since the last revision: > > 8353483 LGTM apart from the minor inline comments test/jdk/javax/swing/JProgressBar/bug4230391.java line 86: > 84: JPanel panel = new JPanel(); > 85: panel.setLayout(new BoxLayout(panel,BoxLayout.X_AXIS)); > 86: JLabel label = new JLabel(name); Unused variable test/jdk/javax/swing/JProgressBar/bug4230391.java line 91: > 89: UIManager.setLookAndFeel(plaf); > 90: > 91: ComponentOrientation rtl = ComponentOrientation.RIGHT_TO_LEFT; Unused var test/jdk/javax/swing/JProgressBar/bug4393042.java line 73: > 71: if (frame != null) { > 72: frame.dispose(); > 73: } Line spacing needs to be adjusted. test/jdk/javax/swing/JProgressBar/bug4393042.java line 87: > 85: progressBar.setValue(0); > 86: frame.add(progressBar); > 87: frame.setSize(200, 100); Increasing frame size will allow the frame title to be seen (especially since it is an automated test). test/jdk/javax/swing/JProgressBar/bug5003022.java line 26: > 24: /* > 25: * @test > 26: * @bug 4785160 Is the bugID 5003022 ? ------------- Marked as reviewed by honkar (Reviewer). PR Review: https://git.openjdk.org/jdk/pull/24517#pullrequestreview-2751616443 PR Review Comment: https://git.openjdk.org/jdk/pull/24517#discussion_r2034169581 PR Review Comment: https://git.openjdk.org/jdk/pull/24517#discussion_r2034169613 PR Review Comment: https://git.openjdk.org/jdk/pull/24517#discussion_r2034171278 PR Review Comment: https://git.openjdk.org/jdk/pull/24517#discussion_r2034174694 PR Review Comment: https://git.openjdk.org/jdk/pull/24517#discussion_r2034175409 From azvegint at openjdk.org Tue Apr 8 23:51:57 2025 From: azvegint at openjdk.org (Alexander Zvegintsev) Date: Tue, 8 Apr 2025 23:51:57 GMT Subject: RFR: 8353549: Open source events tests batch2 [v2] In-Reply-To: <0SKEWTiuwSyz-lNMb59_qAvJgDWsaBV8AIfULgZmu9k=.907a22eb-4f47-49e0-9e45-7ece3764258b@github.com> References: <0SKEWTiuwSyz-lNMb59_qAvJgDWsaBV8AIfULgZmu9k=.907a22eb-4f47-49e0-9e45-7ece3764258b@github.com> Message-ID: > few more events tests are open sourced. Alexander Zvegintsev has updated the pull request incrementally with one additional commit since the last revision: review comments ------------- Changes: - all: https://git.openjdk.org/jdk/pull/24516/files - new: https://git.openjdk.org/jdk/pull/24516/files/da47af6a..3e0a491d Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=24516&range=01 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=24516&range=00-01 Stats: 23 lines in 4 files changed: 3 ins; 6 del; 14 mod Patch: https://git.openjdk.org/jdk/pull/24516.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/24516/head:pull/24516 PR: https://git.openjdk.org/jdk/pull/24516 From azvegint at openjdk.org Tue Apr 8 23:51:58 2025 From: azvegint at openjdk.org (Alexander Zvegintsev) Date: Tue, 8 Apr 2025 23:51:58 GMT Subject: RFR: 8353549: Open source events tests batch2 [v2] In-Reply-To: References: <0SKEWTiuwSyz-lNMb59_qAvJgDWsaBV8AIfULgZmu9k=.907a22eb-4f47-49e0-9e45-7ece3764258b@github.com> Message-ID: On Tue, 8 Apr 2025 20:39:14 GMT, Harshitha Onkar wrote: >> Alexander Zvegintsev has updated the pull request incrementally with one additional commit since the last revision: >> >> review comments > > test/jdk/java/awt/event/MouseEvent/MouseRButTest.java line 61: > >> 59: robot.delay(500); >> 60: >> 61: Point point = Util.invokeOnEDT(() -> button.getLocationOnScreen()); > > Received a suggestion on one of my other PRs that awt/regtesthelper/Util can be replaced with swing/regtesthelper/Util.getCenterPoint(button) (makes it easier and it is already called on EDT) Yes, sometimes it may be helpful ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/24516#discussion_r2034177295 From azvegint at openjdk.org Tue Apr 8 23:51:57 2025 From: azvegint at openjdk.org (Alexander Zvegintsev) Date: Tue, 8 Apr 2025 23:51:57 GMT Subject: RFR: 8353549: Open source events tests batch2 [v2] In-Reply-To: References: <0SKEWTiuwSyz-lNMb59_qAvJgDWsaBV8AIfULgZmu9k=.907a22eb-4f47-49e0-9e45-7ece3764258b@github.com> Message-ID: On Tue, 8 Apr 2025 20:58:04 GMT, Harshitha Onkar wrote: >> test/jdk/java/awt/event/MouseEvent/DragMouseEventTest.java line 67: >> >>> 65: >>> 66: public class DragMouseEventTest { >>> 67: private static ExtendedRobot robot; >> >> This test fails for me on Windows 11 with the following stack trace: >> >> >> java.lang.RuntimeException: 4096: Mouse drag or release was not received >> mouseDraggedReceived false mouseReleasedReceived false >> at DragMouseEventTest.testButtonDrag(DragMouseEventTest.java:260) >> at DragMouseEventTest.testComponent(DragMouseEventTest.java:125) >> at DragMouseEventTest.test(DragMouseEventTest.java:97) >> at DragMouseEventTest.main(DragMouseEventTest.java:74) >> at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:104) >> at java.base/java.lang.reflect.Method.invoke(Method.java:565) >> at com.sun.javatest.regtest.agent.MainWrapper$MainTask.run(MainWrapper.java:138) > > It failed on my local since the screen's uiScale was set to 1.5 > > Good to run the test as `* @run main/othervm -Dsun.java2d.uiScale=1 DragMouseEventTest` Thanks for catching, updated. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/24516#discussion_r2034176494 From honkar at openjdk.org Wed Apr 9 00:04:38 2025 From: honkar at openjdk.org (Harshitha Onkar) Date: Wed, 9 Apr 2025 00:04:38 GMT Subject: RFR: 8353549: Open source events tests batch2 [v2] In-Reply-To: References: <0SKEWTiuwSyz-lNMb59_qAvJgDWsaBV8AIfULgZmu9k=.907a22eb-4f47-49e0-9e45-7ece3764258b@github.com> Message-ID: On Tue, 8 Apr 2025 23:51:57 GMT, Alexander Zvegintsev wrote: >> few more events tests are open sourced. > > Alexander Zvegintsev has updated the pull request incrementally with one additional commit since the last revision: > > review comments LGTM ------------- Marked as reviewed by honkar (Reviewer). PR Review: https://git.openjdk.org/jdk/pull/24516#pullrequestreview-2751644864 From honkar at openjdk.org Wed Apr 9 00:18:39 2025 From: honkar at openjdk.org (Harshitha Onkar) Date: Wed, 9 Apr 2025 00:18:39 GMT Subject: RFR: 8353007: Open some JComboBox bugs 2 In-Reply-To: References: Message-ID: On Tue, 8 Apr 2025 01:53:23 GMT, Alisen Chung wrote: > Updating and opening some tests Changes requested by honkar (Reviewer). test/jdk/javax/swing/JComboBox/bug4185024.java line 37: > 35: * @bug 4185024 > 36: * @summary Tests that Heavyweight combo boxes on JDesktop work correctly > 37: * @library /open/test/jdk/java/awt/regtesthelpers Please update lib paths. Applicable for other tests as well. Suggestion: * @library /java/awt/regtesthelpers test/jdk/javax/swing/JComboBox/bug4201964.java line 36: > 34: * @summary Tests that JComboBox's arrow button isn't drawn too wide in Windows Look&Feel > 35: * @requires (os.family == "windows") > 36: * @library /open/test/jdk/java/awt/regtesthelpers /open/test/lib Suggestion: * @library /java/awt/regtesthelpers test/lib test/jdk/javax/swing/JComboBox/bug4201964.java line 57: > 55: PassFailJFrame.builder() > 56: .instructions(INSTRUCTIONS) > 57: .rows(50) 50 rows might be more for this test. test/jdk/javax/swing/JComboBox/bug4201964.java line 79: > 77: frame.add(panel); > 78: frame.setLocationRelativeTo(null); > 79: frame.pack(); frame.setSize() instead of pack() ? test/jdk/javax/swing/JComboBox/bug4249732.java line 56: > 54: PassFailJFrame.builder() > 55: .instructions(INSTRUCTIONS) > 56: .rows(50) Same here 50 rows might be bit more than required. Since it cause the instruction window to extend down the whole screen. ------------- PR Review: https://git.openjdk.org/jdk/pull/24496#pullrequestreview-2751652252 PR Review Comment: https://git.openjdk.org/jdk/pull/24496#discussion_r2034193195 PR Review Comment: https://git.openjdk.org/jdk/pull/24496#discussion_r2034194468 PR Review Comment: https://git.openjdk.org/jdk/pull/24496#discussion_r2034194857 PR Review Comment: https://git.openjdk.org/jdk/pull/24496#discussion_r2034195418 PR Review Comment: https://git.openjdk.org/jdk/pull/24496#discussion_r2034197028 From achung at openjdk.org Wed Apr 9 00:32:23 2025 From: achung at openjdk.org (Alisen Chung) Date: Wed, 9 Apr 2025 00:32:23 GMT Subject: RFR: 8353007: Open some JComboBox bugs 2 [v2] In-Reply-To: References: Message-ID: <-H-tGx9WgKTmLYP7_SxcvaBT0uN27cGdKEZ6tVtUz90=.f8a341f8-4a3c-4d13-885c-1b93f28da699@github.com> > Updating and opening some tests Alisen Chung has updated the pull request incrementally with one additional commit since the last revision: update jtreg ------------- Changes: - all: https://git.openjdk.org/jdk/pull/24496/files - new: https://git.openjdk.org/jdk/pull/24496/files/e5a9f295..97c86bb9 Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=24496&range=01 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=24496&range=00-01 Stats: 4 lines in 4 files changed: 0 ins; 0 del; 4 mod Patch: https://git.openjdk.org/jdk/pull/24496.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/24496/head:pull/24496 PR: https://git.openjdk.org/jdk/pull/24496 From serb at openjdk.org Wed Apr 9 02:26:38 2025 From: serb at openjdk.org (Sergey Bylokhov) Date: Wed, 9 Apr 2025 02:26:38 GMT Subject: RFR: 8347826: Introspector shows wrong method list after 8071693 [v12] In-Reply-To: <0645YLoDLjcLbjQxBs3QFCFVvenQjAeJlZANZ0hay_8=.e50b8551-4a2f-4cc5-b910-5f5544beb1f7@github.com> References: <0645YLoDLjcLbjQxBs3QFCFVvenQjAeJlZANZ0hay_8=.e50b8551-4a2f-4cc5-b910-5f5544beb1f7@github.com> Message-ID: On Thu, 3 Apr 2025 09:21:38 GMT, Roman Marchenko wrote: >> Fixed `com.sun.beans.introspect.MethodInfo#MethodOrder` to make `Introspector.addMethod()` working properly when filtering methods out. >> >> Also, after PR discussion, added the approptiate test cases with corresponding fixes in MethodInfo.java and PropertyInfo.java. >> >> --------- >> `getMethodDescriptors()` returns descriptors of public methods of a class and its parent classes, including default and static methods defined in interfaces. The result doesn't include methods which were declared and not implemented, bridge methods, or methods which were overriden in subclasses. >> >> When a subclass "overrides" a static method from a parent class `getMethodDescriptors()` behaves as follows: >> >> - In case of a clash with a class method, the class version will take precedence rather than interface's one. >> - If the same method appears in multiple classes/interfaces within the same hierarchy, the version from the most specific sub-interface will be selected. >> - If the method appears in classes/interfaces from different hierarchies, the result is undefined, either version can be returned. >> >> `getPropertyDescriptors()` returns descriptors of methods which were identified as getters or setters. As there can be the only method getter/setter per property, the following rules are applied when choosing a getter/setter: >> >> * Getters/setters for the same property defined (not necessarily overriden) in subclasses have higher precedence. >> * If there are getters/setters for the same property defined in the same class and argument types are assignable one to another, the method with the Least Common Supertype has the lower priority. If argument types are not assignable, the result is undefined (any method will be chosen). >> * Gettters/setters declared and not implemented are not considered. > > Roman Marchenko has updated the pull request incrementally with one additional commit since the last revision: > > Fixing review comments I do not have any other comments, @aivanov-jdk please take a look. ------------- Marked as reviewed by serb (Reviewer). PR Review: https://git.openjdk.org/jdk/pull/23443#pullrequestreview-2751882390 From rkannathpari at openjdk.org Wed Apr 9 03:54:24 2025 From: rkannathpari at openjdk.org (Renjith Kannath Pariyangad) Date: Wed, 9 Apr 2025 03:54:24 GMT Subject: RFR: 8334016: Make PrintNullString.java semi-automatic In-Reply-To: References: Message-ID: On Tue, 8 Apr 2025 13:37:25 GMT, Mikhail Yankelevich wrote: >> Hi Reviewers, >> >> I have updated the test and made it semi-automatic (need to click "Print") . Test will initiate a print and result will be generated automatic. >> >> Please review and let me know your suggestions. > > test/jdk/java/awt/print/PrinterJob/PrintNullString.java line 64: > >> 62: .columns(45) >> 63: .build(); >> 64: new PrintNullString(); > > Minor: Don't you think It's a bit unusual to have the test be executed with the builder of the class? Seems a bit odd to me, but if you prefer it, it's fine as is This **builder** is for PassFailJFrame (user instruction window). ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/24501#discussion_r2034394475 From rkannathpari at openjdk.org Wed Apr 9 03:58:26 2025 From: rkannathpari at openjdk.org (Renjith Kannath Pariyangad) Date: Wed, 9 Apr 2025 03:58:26 GMT Subject: RFR: 8334016: Make PrintNullString.java semi-automatic In-Reply-To: References: Message-ID: <-bzaJMUQF1pGeN8WFeBZGJBcxhpmRJLxRNcVTE7pcHM=.2bddc14f-b9a8-4411-ab9b-51a34e6b4e3a@github.com> On Tue, 8 Apr 2025 13:37:17 GMT, Mikhail Yankelevich wrote: >> Hi Reviewers, >> >> I have updated the test and made it semi-automatic (need to click "Print") . Test will initiate a print and result will be generated automatic. >> >> Please review and let me know your suggestions. > > test/jdk/java/awt/print/PrinterJob/PrintNullString.java line 112: > >> 110: // API 1: null & empty drawString(String, int, int); >> 111: try { >> 112: g2d.drawString(nullStr, 20, 40); > > Isn't it always null? Don't you think it is a bit misleading when reading the test? > > Also applies to the lines 123, 134, 149 Yes it is, this test intended to evaluate how `drawString` handle _null_ and _emptyStr_ ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/24501#discussion_r2034397289 From abhiscxk at openjdk.org Wed Apr 9 04:57:58 2025 From: abhiscxk at openjdk.org (Abhishek Kumar) Date: Wed, 9 Apr 2025 04:57:58 GMT Subject: RFR: 8352877: Opensource Several Font related tests - Batch 1 Message-ID: Font related Applet tests are converted to manual and open sourced. ------------- Commit messages: - library path upjtreg library tag update - Applet test converted to manual and open sourced Changes: https://git.openjdk.org/jdk/pull/24536/files Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=24536&range=00 Issue: https://bugs.openjdk.org/browse/JDK-8352877 Stats: 417 lines in 3 files changed: 417 ins; 0 del; 0 mod Patch: https://git.openjdk.org/jdk/pull/24536.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/24536/head:pull/24536 PR: https://git.openjdk.org/jdk/pull/24536 From myankelevich at openjdk.org Wed Apr 9 09:30:37 2025 From: myankelevich at openjdk.org (Mikhail Yankelevich) Date: Wed, 9 Apr 2025 09:30:37 GMT Subject: RFR: 8334016: Make PrintNullString.java semi-automatic In-Reply-To: References: Message-ID: On Wed, 9 Apr 2025 03:51:27 GMT, Renjith Kannath Pariyangad wrote: >> test/jdk/java/awt/print/PrinterJob/PrintNullString.java line 64: >> >>> 62: .columns(45) >>> 63: .build(); >>> 64: new PrintNullString(); >> >> Minor: Don't you think It's a bit unusual to have the test be executed with the builder of the class? Seems a bit odd to me, but if you prefer it, it's fine as is > > This **builder** is for PassFailJFrame (user instruction window). @Renjithkannath apologies, I meant the constructor, line 64 ? ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/24501#discussion_r2034919842 From myankelevich at openjdk.org Wed Apr 9 09:34:35 2025 From: myankelevich at openjdk.org (Mikhail Yankelevich) Date: Wed, 9 Apr 2025 09:34:35 GMT Subject: RFR: 8334016: Make PrintNullString.java semi-automatic In-Reply-To: <-bzaJMUQF1pGeN8WFeBZGJBcxhpmRJLxRNcVTE7pcHM=.2bddc14f-b9a8-4411-ab9b-51a34e6b4e3a@github.com> References: <-bzaJMUQF1pGeN8WFeBZGJBcxhpmRJLxRNcVTE7pcHM=.2bddc14f-b9a8-4411-ab9b-51a34e6b4e3a@github.com> Message-ID: <0IZ-t-EfYs0ew4G_PjDtVwTHc7ramUT-jtygD6BLn4c=.48f467c5-b4cf-4d9b-be56-bfc4cb02c81a@github.com> On Wed, 9 Apr 2025 03:55:58 GMT, Renjith Kannath Pariyangad wrote: >> test/jdk/java/awt/print/PrinterJob/PrintNullString.java line 112: >> >>> 110: // API 1: null & empty drawString(String, int, int); >>> 111: try { >>> 112: g2d.drawString(nullStr, 20, 40); >> >> Isn't it always null? Don't you think it is a bit misleading when reading the test? >> >> Also applies to the lines 123, 134, 149 > > Yes it is, this test intended to evaluate how `drawString` handle _null_ and _emptyStr_ I understand, but this is a string value which is always set to null. Wouldn't it be easier to read if it was `null` straight in the method call? Something like this: `g2d.drawString((String) null, 20, 40);` If you prefer it as is, it's fine too ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/24501#discussion_r2034933835 From aivanov at openjdk.org Wed Apr 9 11:25:30 2025 From: aivanov at openjdk.org (Alexey Ivanov) Date: Wed, 9 Apr 2025 11:25:30 GMT Subject: RFR: 8352877: Opensource Several Font related tests - Batch 1 In-Reply-To: References: Message-ID: On Wed, 9 Apr 2025 04:49:18 GMT, Abhishek Kumar wrote: > Font related Applet tests are converted to manual and open sourced. Marked as reviewed by aivanov (Reviewer). ------------- PR Review: https://git.openjdk.org/jdk/pull/24536#pullrequestreview-2753130164 From mkartashev at openjdk.org Wed Apr 9 14:48:16 2025 From: mkartashev at openjdk.org (Maxim Kartashev) Date: Wed, 9 Apr 2025 14:48:16 GMT Subject: RFR: 8354191: GTK LaF should use pre-multiplied alpha same as cairo Message-ID: <-sAv6upz5pv3EA1zjjUvRUxNP1Tl75NJAwOX-df8Vbk=.442e3494-836b-4664-baf1-669fbd7532a0@github.com> The pixels that cairo produces for GTK LaF to draw on a Swing component have their alpha components pre-multiplied as per [the documentation](https://www.cairographics.org/manual/cairo-Image-Surfaces.html?spm=a2ty_o01.29997173.0.0.540ac921z2EebT#cairo-format-t): > Pre-multiplied alpha is used. (That is, 50% transparent red is 0x80800000, not 0x80ff0000.) The BufferedImage created from those pixels, however, has its constructor's argument for `isRasterPremultiplied` set to `false` in `GTKEngine.finishPainting()`. This commit corrects that. In addition, since at least some "native" graphics color models also use pre-multiplied alpha (ex.: `GLXGraphicsConfig.getColorModel()`), `COLOR_MODELS` were modified to take advantage of that and avoid unnecessary re-calculations of image's pixels. ------------- Commit messages: - 8354191: GTK LaF should use pre-multiplied alpha same as cairo Changes: https://git.openjdk.org/jdk/pull/24551/files Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=24551&range=00 Issue: https://bugs.openjdk.org/browse/JDK-8354191 Stats: 22 lines in 1 file changed: 12 ins; 7 del; 3 mod Patch: https://git.openjdk.org/jdk/pull/24551.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/24551/head:pull/24551 PR: https://git.openjdk.org/jdk/pull/24551 From aivanov at openjdk.org Wed Apr 9 14:59:51 2025 From: aivanov at openjdk.org (Alexey Ivanov) Date: Wed, 9 Apr 2025 14:59:51 GMT Subject: RFR: 8351110: ImageIO.write for JPEG can write corrupt JPEG for certain thumbnail dimensions [v6] In-Reply-To: <4cjiN-EQktIY0I6oozTSNYDSDLUJcVeBIp-IU5Dbg0A=.d4d279d0-2d1a-4413-8fd9-611453140ecb@github.com> References: <4cjiN-EQktIY0I6oozTSNYDSDLUJcVeBIp-IU5Dbg0A=.d4d279d0-2d1a-4413-8fd9-611453140ecb@github.com> Message-ID: On Fri, 4 Apr 2025 22:57:34 GMT, Jeremy Wood wrote: >> JPEG segments can only be 65535-bytes long. (The marker length is expressed as 2 bytes.) The problem in this ticket is that we were writing more than 65535 bytes to a segment, which later caused parsing errors when we tried to read the file back. >> >> This includes 2 changes: >> >> 1. We now clip the thumbnail width/height to fit within the available marker. We were already constraining the width & height to a max of 255. (Because the width & height are expressed as 1 byte.) So this new clipping is similar to something we were already doing, and we issue the same WARNING_THUMB_CLIPPED warning to the writer. (Does this require a CSR?) >> >> 2. This adds a bounds check to `write2bytes`. IMO the bigger problem in this ticket was the `ImageIO.write(..)` caller thought they ended up with a valid JPEG. (We were violating the "do no harm / lose no data" doctrine.) Now if something like this ever comes up again: writing will fail with an IIOException. Technically you can argue this change is unnecessary because the new clipping avoids this error condition, but IMO including this safety net is an overall good thing to keep. If anyone disagrees I'm OK with removing it. >> >> Separately: >> I included (and reversed) a commit in this branch that provides an alternate solution. That commit anticipates the overflow problem and switches to a JPEG-encoded thumbnail. From an end user perspective this "just works": they get a (slightly lossly) thumbnail of the original dimensions. But I assume it would be more controversial compared to the clipping approach, since the clipping approach has a strong precedent in this codebase. > > Jeremy Wood 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 24 additional commits since the last revision: > > - Update test/jdk/javax/imageio/plugins/jpeg/WriteJPEGThumbnailTest.java > > Co-authored-by: Alexey Ivanov > - Merge remote-tracking branch 'origin/JDK-8351110' into JDK-8351110 > - Update test/jdk/javax/imageio/plugins/jpeg/WriteJPEGThumbnailTest.java > > Co-authored-by: Alexey Ivanov > - Update test/jdk/javax/imageio/plugins/jpeg/WriteJPEGThumbnailTest.java > > Co-authored-by: Alexey Ivanov > - Update test/jdk/javax/imageio/plugins/jpeg/WriteJPEGThumbnailTest.java > > Co-authored-by: Alexey Ivanov > - Update src/java.desktop/share/classes/com/sun/imageio/plugins/jpeg/JFIFMarkerSegment.java > > Co-authored-by: Alexey Ivanov > - Merge branch 'master' into JDK-8351110 > - Merge branch 'master' of https://github.com/mickleness/jdk > - Merge branch 'openjdk:master' into master > - 8351110: adding a few clarifying comments > - ... and 14 more: https://git.openjdk.org/jdk/compare/8ef20634...ecd7883c Changes requested by aivanov (Reviewer). test/jdk/javax/imageio/plugins/jpeg/WriteJPEGThumbnailTest.java line 65: > 63: // we wrote a corrupt JPEG file.) > 64: boolean b2 = new WriteJPEGThumbnailTest(100, 219).run(); > 65: if (!(b1 && b2)) { Suggestion: boolean b2 = new WriteJPEGThumbnailTest(100, 219).run(); if (!(b1 && b2)) { I'd add a blank line here to visually separate the test from the condition. test/jdk/javax/imageio/plugins/jpeg/WriteJPEGThumbnailTest.java line 71: > 69: } > 70: > 71: final int thumbWidth, thumbHeight; Suggestion: final int thumbWidth; final int thumbHeight; I prefer them on separate lines, although it's not that important for a test. test/jdk/javax/imageio/plugins/jpeg/WriteJPEGThumbnailTest.java line 123: > 121: > 122: // Write the main image > 123: IIOImage img = new javax.imageio.IIOImage(bi, List.of(thumbnail), null); Suggestion: IIOImage img = new IIOImage(bi, List.of(thumbnail), null); The package name on right side of the assignment is redundant. ------------- PR Review: https://git.openjdk.org/jdk/pull/23920#pullrequestreview-2753786051 PR Review Comment: https://git.openjdk.org/jdk/pull/23920#discussion_r2035553786 PR Review Comment: https://git.openjdk.org/jdk/pull/23920#discussion_r2035563230 PR Review Comment: https://git.openjdk.org/jdk/pull/23920#discussion_r2035559293 From aivanov at openjdk.org Wed Apr 9 14:59:52 2025 From: aivanov at openjdk.org (Alexey Ivanov) Date: Wed, 9 Apr 2025 14:59:52 GMT Subject: RFR: 8351110: ImageIO.write for JPEG can write corrupt JPEG for certain thumbnail dimensions [v4] In-Reply-To: References: <05SR4-1QBrqzhVZYcnQ8pWRandFDG9qNUFyFIU3qtPY=.6ca82582-a39b-49d9-9aa8-c3d782f4756f@github.com> Message-ID: On Sat, 5 Apr 2025 05:09:18 GMT, Jeremy Wood wrote: >> test/jdk/javax/imageio/plugins/jpeg/WriteJPEGThumbnailTest.java line 86: >> >>> 84: } finally { >>> 85: jpegData = byteOut.toByteArray(); >>> 86: } >> >> Does it have to be in the `finally` block? >> >> You can assign `jpegData` outside of the `try` block. If an exception is thrown in `try`, the method stops executing and assigning to `jpegData` makes no sense. > > No; this is updated It is still in the `finally` block. Did you miss a commit? ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/23920#discussion_r2035555378 From aivanov at openjdk.org Wed Apr 9 15:04:45 2025 From: aivanov at openjdk.org (Alexey Ivanov) Date: Wed, 9 Apr 2025 15:04:45 GMT Subject: RFR: 8351110: ImageIO.write for JPEG can write corrupt JPEG for certain thumbnail dimensions [v4] In-Reply-To: References: <05SR4-1QBrqzhVZYcnQ8pWRandFDG9qNUFyFIU3qtPY=.6ca82582-a39b-49d9-9aa8-c3d782f4756f@github.com> Message-ID: On Sat, 5 Apr 2025 05:49:14 GMT, Jeremy Wood wrote: > Thank you for pointing out the `new Error` oversight. > > > The WriteJPEGThumbnailTest.jtr file says, the test failed > > That output is exactly what I would expect to see before this PR. Is it possible you ran the test without invoking `make`? I pointed out that missing `new Error` made the test pass even though it failed. I didn't build JDK with the fix. [Phil said](https://github.com/openjdk/jdk/pull/23920#pullrequestreview-2743803137), ?Testing looks good,? and I didn't run the full client test suite. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/23920#discussion_r2035573046 From ihse at openjdk.org Wed Apr 9 15:09:58 2025 From: ihse at openjdk.org (Magnus Ihse Bursie) Date: Wed, 9 Apr 2025 15:09:58 GMT Subject: RFR: 8301991: Convert l10n properties resource bundles to UTF-8 native [v6] In-Reply-To: References: <0MB7FLFNfaGEWssr9X54UJ_iZNFWBJkxQ1yusP7fsuY=.3f9f3de5-fe84-48e6-9449-626cac42da0b@github.com> Message-ID: <_YOUyzMbSEXFduCKVgyis37kwTlGSjBbP8VlFu3xQpU=.9b668e2a-8f91-476d-8914-13dc33a0b9e5@github.com> On Thu, 11 May 2023 20:21:57 GMT, Justin Lu wrote: >> This PR converts Unicode sequences to UTF-8 native in .properties file. (Excluding the Unicode space and tab sequence). The conversion was done using native2ascii. >> >> In addition, the build logic is adjusted to support reading in the .properties files as UTF-8 during the conversion from .properties file to .java ListResourceBundle file. > > Justin Lu has updated the pull request with a new target base due to a merge or a rebase. The pull request now contains 16 commits: > > - Convert the merged master changes to UTF-8 > - Merge master and fix conflicts > - Close streams when finished loading into props > - Adjust CF test to read in with UTF-8 to fix failing test > - Reconvert CS.properties to UTF-8 > - Revert all changes to CurrencySymbols.properties > - Bug6204853 should not be converted > - Copyright year for CompileProperties > - Redo translation for CS.properties > - Spot convert CurrencySymbols.properties > - ... and 6 more: https://git.openjdk.org/jdk/compare/4386d42d...f15b373a src/java.xml/share/classes/com/sun/org/apache/xml/internal/serializer/Encodings.properties line 22: > 20: # Peter Smolik > 21: Cp1250 WINDOWS-1250 0x00FF > 22: # Patch attributed to havardw at underdusken.no (H?vard Wigtil) This does not seem to have been a correct conversion. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/12726#discussion_r2035582242 From duke at openjdk.org Wed Apr 9 16:58:28 2025 From: duke at openjdk.org (Jeremy Wood) Date: Wed, 9 Apr 2025 16:58:28 GMT Subject: RFR: 8351110: ImageIO.write for JPEG can write corrupt JPEG for certain thumbnail dimensions [v7] In-Reply-To: References: Message-ID: > JPEG segments can only be 65535-bytes long. (The marker length is expressed as 2 bytes.) The problem in this ticket is that we were writing more than 65535 bytes to a segment, which later caused parsing errors when we tried to read the file back. > > This includes 2 changes: > > 1. We now clip the thumbnail width/height to fit within the available marker. We were already constraining the width & height to a max of 255. (Because the width & height are expressed as 1 byte.) So this new clipping is similar to something we were already doing, and we issue the same WARNING_THUMB_CLIPPED warning to the writer. (Does this require a CSR?) > > 2. This adds a bounds check to `write2bytes`. IMO the bigger problem in this ticket was the `ImageIO.write(..)` caller thought they ended up with a valid JPEG. (We were violating the "do no harm / lose no data" doctrine.) Now if something like this ever comes up again: writing will fail with an IIOException. Technically you can argue this change is unnecessary because the new clipping avoids this error condition, but IMO including this safety net is an overall good thing to keep. If anyone disagrees I'm OK with removing it. > > Separately: > I included (and reversed) a commit in this branch that provides an alternate solution. That commit anticipates the overflow problem and switches to a JPEG-encoded thumbnail. From an end user perspective this "just works": they get a (slightly lossly) thumbnail of the original dimensions. But I assume it would be more controversial compared to the clipping approach, since the clipping approach has a strong precedent in this codebase. Jeremy Wood has updated the pull request incrementally with one additional commit since the last revision: 8351913: code cleanup This is in response to: https://github.com/openjdk/jdk/pull/23920#discussion_r2029297962 ------------- Changes: - all: https://git.openjdk.org/jdk/pull/23920/files - new: https://git.openjdk.org/jdk/pull/23920/files/ecd7883c..e0709a5f Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=23920&range=06 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=23920&range=05-06 Stats: 5 lines in 1 file changed: 0 ins; 3 del; 2 mod Patch: https://git.openjdk.org/jdk/pull/23920.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/23920/head:pull/23920 PR: https://git.openjdk.org/jdk/pull/23920 From aivanov at openjdk.org Wed Apr 9 17:06:37 2025 From: aivanov at openjdk.org (Alexey Ivanov) Date: Wed, 9 Apr 2025 17:06:37 GMT Subject: RFR: 8351110: ImageIO.write for JPEG can write corrupt JPEG for certain thumbnail dimensions [v7] In-Reply-To: References: Message-ID: On Wed, 9 Apr 2025 16:58:28 GMT, Jeremy Wood wrote: >> JPEG segments can only be 65535-bytes long. (The marker length is expressed as 2 bytes.) The problem in this ticket is that we were writing more than 65535 bytes to a segment, which later caused parsing errors when we tried to read the file back. >> >> This includes 2 changes: >> >> 1. We now clip the thumbnail width/height to fit within the available marker. We were already constraining the width & height to a max of 255. (Because the width & height are expressed as 1 byte.) So this new clipping is similar to something we were already doing, and we issue the same WARNING_THUMB_CLIPPED warning to the writer. (Does this require a CSR?) >> >> 2. This adds a bounds check to `write2bytes`. IMO the bigger problem in this ticket was the `ImageIO.write(..)` caller thought they ended up with a valid JPEG. (We were violating the "do no harm / lose no data" doctrine.) Now if something like this ever comes up again: writing will fail with an IIOException. Technically you can argue this change is unnecessary because the new clipping avoids this error condition, but IMO including this safety net is an overall good thing to keep. If anyone disagrees I'm OK with removing it. >> >> Separately: >> I included (and reversed) a commit in this branch that provides an alternate solution. That commit anticipates the overflow problem and switches to a JPEG-encoded thumbnail. From an end user perspective this "just works": they get a (slightly lossly) thumbnail of the original dimensions. But I assume it would be more controversial compared to the clipping approach, since the clipping approach has a strong precedent in this codebase. > > Jeremy Wood has updated the pull request incrementally with one additional commit since the last revision: > > 8351913: code cleanup > > This is in response to: > https://github.com/openjdk/jdk/pull/23920#discussion_r2029297962 test/jdk/javax/imageio/plugins/jpeg/WriteJPEGThumbnailTest.java line 86: > 84: thumbnail = writeImage(byteOut); > 85: jpegData = byteOut.toByteArray(); > 86: } For `ByteArrayOutputStream`, it should be okay to convert it before the stream is closed, and the stream is closed by `writeImage` anyway. However, placing `jpegData = byteOut.toByteArray()` after the try-with-resources for `byteOut` won't raise any questions. Then, `jpegData` can be declared where it's assigned. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/23920#discussion_r2035785315 From avu at openjdk.org Wed Apr 9 17:34:39 2025 From: avu at openjdk.org (Alexey Ushakov) Date: Wed, 9 Apr 2025 17:34:39 GMT Subject: RFR: 8354191: GTK LaF should use pre-multiplied alpha same as cairo In-Reply-To: <-sAv6upz5pv3EA1zjjUvRUxNP1Tl75NJAwOX-df8Vbk=.442e3494-836b-4664-baf1-669fbd7532a0@github.com> References: <-sAv6upz5pv3EA1zjjUvRUxNP1Tl75NJAwOX-df8Vbk=.442e3494-836b-4664-baf1-669fbd7532a0@github.com> Message-ID: On Wed, 9 Apr 2025 14:42:05 GMT, Maxim Kartashev wrote: > The pixels that cairo produces for GTK LaF to draw on a Swing component have their alpha components pre-multiplied as per [the documentation](https://www.cairographics.org/manual/cairo-Image-Surfaces.html?spm=a2ty_o01.29997173.0.0.540ac921z2EebT#cairo-format-t): >> Pre-multiplied alpha is used. (That is, 50% transparent red is 0x80800000, not 0x80ff0000.) > > The BufferedImage created from those pixels, however, has its constructor's argument for `isRasterPremultiplied` set to `false` in `GTKEngine.finishPainting()`. This commit corrects that. > > In addition, since at least some "native" graphics color models also use pre-multiplied alpha (ex.: `GLXGraphicsConfig.getColorModel()`), `COLOR_MODELS` were modified to take advantage of that and avoid unnecessary re-calculations of image's pixels. LGTM ------------- Marked as reviewed by avu (Committer). PR Review: https://git.openjdk.org/jdk/pull/24551#pullrequestreview-2754232862 From duke at openjdk.org Wed Apr 9 17:48:48 2025 From: duke at openjdk.org (Jeremy Wood) Date: Wed, 9 Apr 2025 17:48:48 GMT Subject: RFR: 8351110: ImageIO.write for JPEG can write corrupt JPEG for certain thumbnail dimensions [v4] In-Reply-To: References: <05SR4-1QBrqzhVZYcnQ8pWRandFDG9qNUFyFIU3qtPY=.6ca82582-a39b-49d9-9aa8-c3d782f4756f@github.com> Message-ID: On Wed, 9 Apr 2025 15:01:38 GMT, Alexey Ivanov wrote: >> Thank you for pointing out the `new Error` oversight. >> >>> The WriteJPEGThumbnailTest.jtr file says, the test failed >> >> That output is exactly what I would expect to see before this PR. Is it possible you ran the test without invoking `make`? >> >> When I run this test my jtr file includes: >> >> >> ----------messages:(8/301)---------- >> command: main WriteJPEGThumbnailTest >> reason: User specified action: run main WriteJPEGThumbnailTest >> started: Sat Apr 05 01:24:48 EDT 2025 >> Mode: othervm >> Additional options from @modules: --add-modules java.desktop >> Process id: 63942 >> finished: Sat Apr 05 01:24:49 EDT 2025 >> elapsed time (seconds): 1.248 >> ----------configuration:(3/40)---------- >> Boot Layer >> add modules: java.desktop >> >> ----------System.out:(4/84)---------- >> Testing thumbnail 100x218... >> Test passed >> Testing thumbnail 100x219... >> Test passed >> ----------System.err:(1/15)---------- >> STATUS:Passed. >> ----------rerun:(24/1876)*---------- >> >> >> (I tested both before and after the revisions of the last 24 hrs.) > >> Thank you for pointing out the `new Error` oversight. >> >> > The WriteJPEGThumbnailTest.jtr file says, the test failed >> >> That output is exactly what I would expect to see before this PR. Is it possible you ran the test without invoking `make`? > > I pointed out that missing `new Error` made the test pass even though it failed. > > I didn't build JDK with the fix. > > [Phil said](https://github.com/openjdk/jdk/pull/23920#pullrequestreview-2743803137), ?Testing looks good,? and I didn't run the full client test suite. Ah, OK. So is there any outstanding question in this thread? ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/23920#discussion_r2035846079 From azvegint at openjdk.org Wed Apr 9 17:52:50 2025 From: azvegint at openjdk.org (Alexander Zvegintsev) Date: Wed, 9 Apr 2025 17:52:50 GMT Subject: Integrated: 8353549: Open source events tests batch2 In-Reply-To: <0SKEWTiuwSyz-lNMb59_qAvJgDWsaBV8AIfULgZmu9k=.907a22eb-4f47-49e0-9e45-7ece3764258b@github.com> References: <0SKEWTiuwSyz-lNMb59_qAvJgDWsaBV8AIfULgZmu9k=.907a22eb-4f47-49e0-9e45-7ece3764258b@github.com> Message-ID: On Tue, 8 Apr 2025 15:07:27 GMT, Alexander Zvegintsev wrote: > few more events tests are open sourced. This pull request has now been integrated. Changeset: cc546e7a Author: Alexander Zvegintsev URL: https://git.openjdk.org/jdk/commit/cc546e7a283faad40b75183887f6a1f433a2407f Stats: 1101 lines in 5 files changed: 1101 ins; 0 del; 0 mod 8353549: Open source events tests batch2 Reviewed-by: honkar, kizune ------------- PR: https://git.openjdk.org/jdk/pull/24516 From duke at openjdk.org Wed Apr 9 17:56:06 2025 From: duke at openjdk.org (Jeremy Wood) Date: Wed, 9 Apr 2025 17:56:06 GMT Subject: RFR: 8351110: ImageIO.write for JPEG can write corrupt JPEG for certain thumbnail dimensions [v8] In-Reply-To: References: Message-ID: > JPEG segments can only be 65535-bytes long. (The marker length is expressed as 2 bytes.) The problem in this ticket is that we were writing more than 65535 bytes to a segment, which later caused parsing errors when we tried to read the file back. > > This includes 2 changes: > > 1. We now clip the thumbnail width/height to fit within the available marker. We were already constraining the width & height to a max of 255. (Because the width & height are expressed as 1 byte.) So this new clipping is similar to something we were already doing, and we issue the same WARNING_THUMB_CLIPPED warning to the writer. (Does this require a CSR?) > > 2. This adds a bounds check to `write2bytes`. IMO the bigger problem in this ticket was the `ImageIO.write(..)` caller thought they ended up with a valid JPEG. (We were violating the "do no harm / lose no data" doctrine.) Now if something like this ever comes up again: writing will fail with an IIOException. Technically you can argue this change is unnecessary because the new clipping avoids this error condition, but IMO including this safety net is an overall good thing to keep. If anyone disagrees I'm OK with removing it. > > Separately: > I included (and reversed) a commit in this branch that provides an alternate solution. That commit anticipates the overflow problem and switches to a JPEG-encoded thumbnail. From an end user perspective this "just works": they get a (slightly lossly) thumbnail of the original dimensions. But I assume it would be more controversial compared to the clipping approach, since the clipping approach has a strong precedent in this codebase. Jeremy Wood has updated the pull request incrementally with three additional commits since the last revision: - Update test/jdk/javax/imageio/plugins/jpeg/WriteJPEGThumbnailTest.java Co-authored-by: Alexey Ivanov - Update test/jdk/javax/imageio/plugins/jpeg/WriteJPEGThumbnailTest.java Co-authored-by: Alexey Ivanov - Update test/jdk/javax/imageio/plugins/jpeg/WriteJPEGThumbnailTest.java Co-authored-by: Alexey Ivanov ------------- Changes: - all: https://git.openjdk.org/jdk/pull/23920/files - new: https://git.openjdk.org/jdk/pull/23920/files/e0709a5f..703c6d31 Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=23920&range=07 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=23920&range=06-07 Stats: 4 lines in 1 file changed: 2 ins; 0 del; 2 mod Patch: https://git.openjdk.org/jdk/pull/23920.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/23920/head:pull/23920 PR: https://git.openjdk.org/jdk/pull/23920 From duke at openjdk.org Wed Apr 9 18:09:34 2025 From: duke at openjdk.org (Jeremy Wood) Date: Wed, 9 Apr 2025 18:09:34 GMT Subject: RFR: 8351110: ImageIO.write for JPEG can write corrupt JPEG for certain thumbnail dimensions [v7] In-Reply-To: References: Message-ID: On Wed, 9 Apr 2025 17:03:26 GMT, Alexey Ivanov wrote: >> Jeremy Wood has updated the pull request incrementally with one additional commit since the last revision: >> >> 8351913: code cleanup >> >> This is in response to: >> https://github.com/openjdk/jdk/pull/23920#discussion_r2029297962 > > test/jdk/javax/imageio/plugins/jpeg/WriteJPEGThumbnailTest.java line 86: > >> 84: thumbnail = writeImage(byteOut); >> 85: jpegData = byteOut.toByteArray(); >> 86: } > > For `ByteArrayOutputStream`, it should be okay to convert it before the stream is closed, and the stream is closed by `writeImage` anyway. However, placing `jpegData = byteOut.toByteArray()` after the try-with-resources for `byteOut` won't raise any questions. Then, `jpegData` can be declared where it's assigned. If I understood you correctly: I couldn't place `jpegData = byteOut.toByteArray()` after the try-with-resources block because `byteOut` fell out of scope. But if the priority is to declare variables where they're assigned: I can just remove that inner try-with-resources block. (This is updated.) ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/23920#discussion_r2035875168 From duke at openjdk.org Wed Apr 9 18:09:31 2025 From: duke at openjdk.org (Jeremy Wood) Date: Wed, 9 Apr 2025 18:09:31 GMT Subject: RFR: 8351110: ImageIO.write for JPEG can write corrupt JPEG for certain thumbnail dimensions [v9] In-Reply-To: References: Message-ID: > JPEG segments can only be 65535-bytes long. (The marker length is expressed as 2 bytes.) The problem in this ticket is that we were writing more than 65535 bytes to a segment, which later caused parsing errors when we tried to read the file back. > > This includes 2 changes: > > 1. We now clip the thumbnail width/height to fit within the available marker. We were already constraining the width & height to a max of 255. (Because the width & height are expressed as 1 byte.) So this new clipping is similar to something we were already doing, and we issue the same WARNING_THUMB_CLIPPED warning to the writer. (Does this require a CSR?) > > 2. This adds a bounds check to `write2bytes`. IMO the bigger problem in this ticket was the `ImageIO.write(..)` caller thought they ended up with a valid JPEG. (We were violating the "do no harm / lose no data" doctrine.) Now if something like this ever comes up again: writing will fail with an IIOException. Technically you can argue this change is unnecessary because the new clipping avoids this error condition, but IMO including this safety net is an overall good thing to keep. If anyone disagrees I'm OK with removing it. > > Separately: > I included (and reversed) a commit in this branch that provides an alternate solution. That commit anticipates the overflow problem and switches to a JPEG-encoded thumbnail. From an end user perspective this "just works": they get a (slightly lossly) thumbnail of the original dimensions. But I assume it would be more controversial compared to the clipping approach, since the clipping approach has a strong precedent in this codebase. Jeremy Wood has updated the pull request incrementally with six additional commits since the last revision: - Merge remote-tracking branch 'origin/JDK-8351110' into JDK-8351110 # Conflicts: # test/jdk/javax/imageio/plugins/jpeg/WriteJPEGThumbnailTest.java - 8351110: code cleanup This is in response to: https://github.com/openjdk/jdk/pull/23920#discussion_r2035785315 - Update test/jdk/javax/imageio/plugins/jpeg/WriteJPEGThumbnailTest.java Co-authored-by: Alexey Ivanov - Update test/jdk/javax/imageio/plugins/jpeg/WriteJPEGThumbnailTest.java Co-authored-by: Alexey Ivanov - Update test/jdk/javax/imageio/plugins/jpeg/WriteJPEGThumbnailTest.java Co-authored-by: Alexey Ivanov - 8351110: code cleanup This is in response to: https://github.com/openjdk/jdk/pull/23920#discussion_r2029297962 ------------- Changes: - all: https://git.openjdk.org/jdk/pull/23920/files - new: https://git.openjdk.org/jdk/pull/23920/files/703c6d31..e093793b Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=23920&range=08 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=23920&range=07-08 Stats: 7 lines in 1 file changed: 0 ins; 4 del; 3 mod Patch: https://git.openjdk.org/jdk/pull/23920.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/23920/head:pull/23920 PR: https://git.openjdk.org/jdk/pull/23920 From duke at openjdk.org Wed Apr 9 18:14:42 2025 From: duke at openjdk.org (Jeremy Wood) Date: Wed, 9 Apr 2025 18:14:42 GMT Subject: RFR: 8351110: ImageIO.write for JPEG can write corrupt JPEG for certain thumbnail dimensions [v4] In-Reply-To: References: <05SR4-1QBrqzhVZYcnQ8pWRandFDG9qNUFyFIU3qtPY=.6ca82582-a39b-49d9-9aa8-c3d782f4756f@github.com> Message-ID: On Wed, 9 Apr 2025 14:53:08 GMT, Alexey Ivanov wrote: >> No; this is updated > > It is still in the `finally` block. Did you miss a commit? Yes, sorry. I didn't push after this commit last week. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/23920#discussion_r2035884270 From prr at openjdk.org Wed Apr 9 18:22:56 2025 From: prr at openjdk.org (Phil Race) Date: Wed, 9 Apr 2025 18:22:56 GMT Subject: RFR: 8353483: Open source some JProgressBar tests [v3] In-Reply-To: References: Message-ID: > Open source 4 Swing JProgressBar tests. Phil Race has updated the pull request incrementally with one additional commit since the last revision: 8353483 ------------- Changes: - all: https://git.openjdk.org/jdk/pull/24517/files - new: https://git.openjdk.org/jdk/pull/24517/files/5e9e7348..829199d2 Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=24517&range=02 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=24517&range=01-02 Stats: 8 lines in 3 files changed: 0 ins; 2 del; 6 mod Patch: https://git.openjdk.org/jdk/pull/24517.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/24517/head:pull/24517 PR: https://git.openjdk.org/jdk/pull/24517 From prr at openjdk.org Wed Apr 9 18:22:57 2025 From: prr at openjdk.org (Phil Race) Date: Wed, 9 Apr 2025 18:22:57 GMT Subject: RFR: 8353483: Open source some JProgressBar tests [v2] In-Reply-To: References: <6XrJ5CUqRmxUV1qc7G2hq-yuIEti0dcAicIhfSRdzSU=.08886a82-a767-4db0-9e88-1e7d4786a678@github.com> Message-ID: On Tue, 8 Apr 2025 23:36:33 GMT, Harshitha Onkar wrote: >> Phil Race has updated the pull request incrementally with one additional commit since the last revision: >> >> 8353483 > > test/jdk/javax/swing/JProgressBar/bug4230391.java line 86: > >> 84: JPanel panel = new JPanel(); >> 85: panel.setLayout(new BoxLayout(panel,BoxLayout.X_AXIS)); >> 86: JLabel label = new JLabel(name); > > Unused variable fixed > test/jdk/javax/swing/JProgressBar/bug4230391.java line 91: > >> 89: UIManager.setLookAndFeel(plaf); >> 90: >> 91: ComponentOrientation rtl = ComponentOrientation.RIGHT_TO_LEFT; > > Unused var fixed > test/jdk/javax/swing/JProgressBar/bug4393042.java line 73: > >> 71: if (frame != null) { >> 72: frame.dispose(); >> 73: } > > Line spacing needs to be adjusted. fixed > test/jdk/javax/swing/JProgressBar/bug4393042.java line 87: > >> 85: progressBar.setValue(0); >> 86: frame.add(progressBar); >> 87: frame.setSize(200, 100); > > Increasing frame size will allow the frame title to be seen (especially since it is an automated test). fixed > test/jdk/javax/swing/JProgressBar/bug5003022.java line 26: > >> 24: /* >> 25: * @test >> 26: * @bug 4785160 > > Is the bugID 5003022 ? fixed ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/24517#discussion_r2035894186 PR Review Comment: https://git.openjdk.org/jdk/pull/24517#discussion_r2035894353 PR Review Comment: https://git.openjdk.org/jdk/pull/24517#discussion_r2035894863 PR Review Comment: https://git.openjdk.org/jdk/pull/24517#discussion_r2035894508 PR Review Comment: https://git.openjdk.org/jdk/pull/24517#discussion_r2035894686 From honkar at openjdk.org Wed Apr 9 18:43:40 2025 From: honkar at openjdk.org (Harshitha Onkar) Date: Wed, 9 Apr 2025 18:43:40 GMT Subject: RFR: 8353483: Open source some JProgressBar tests [v3] In-Reply-To: References: Message-ID: <5T4czteFWFKpAoF01SLI5C3MmsWg6krrq20pYRPIHsQ=.25e37f38-9e9e-46ce-866b-e3616ff98667@github.com> On Wed, 9 Apr 2025 18:22:56 GMT, Phil Race wrote: >> Open source 4 Swing JProgressBar tests. > > Phil Race has updated the pull request incrementally with one additional commit since the last revision: > > 8353483 LGTM ------------- Marked as reviewed by honkar (Reviewer). PR Review: https://git.openjdk.org/jdk/pull/24517#pullrequestreview-2754409573 From aivanov at openjdk.org Wed Apr 9 21:02:32 2025 From: aivanov at openjdk.org (Alexey Ivanov) Date: Wed, 9 Apr 2025 21:02:32 GMT Subject: RFR: 8351110: ImageIO.write for JPEG can write corrupt JPEG for certain thumbnail dimensions [v9] In-Reply-To: References: Message-ID: <7y1ez1b4ePtPsuV88J3hIlETUVYRjK9t8a_quaKo-hw=.52212032-7b12-4afa-a20a-b3cd2cb66bda@github.com> On Wed, 9 Apr 2025 18:09:31 GMT, Jeremy Wood wrote: >> JPEG segments can only be 65535-bytes long. (The marker length is expressed as 2 bytes.) The problem in this ticket is that we were writing more than 65535 bytes to a segment, which later caused parsing errors when we tried to read the file back. >> >> This includes 2 changes: >> >> 1. We now clip the thumbnail width/height to fit within the available marker. We were already constraining the width & height to a max of 255. (Because the width & height are expressed as 1 byte.) So this new clipping is similar to something we were already doing, and we issue the same WARNING_THUMB_CLIPPED warning to the writer. (Does this require a CSR?) >> >> 2. This adds a bounds check to `write2bytes`. IMO the bigger problem in this ticket was the `ImageIO.write(..)` caller thought they ended up with a valid JPEG. (We were violating the "do no harm / lose no data" doctrine.) Now if something like this ever comes up again: writing will fail with an IIOException. Technically you can argue this change is unnecessary because the new clipping avoids this error condition, but IMO including this safety net is an overall good thing to keep. If anyone disagrees I'm OK with removing it. >> >> Separately: >> I included (and reversed) a commit in this branch that provides an alternate solution. That commit anticipates the overflow problem and switches to a JPEG-encoded thumbnail. From an end user perspective this "just works": they get a (slightly lossly) thumbnail of the original dimensions. But I assume it would be more controversial compared to the clipping approach, since the clipping approach has a strong precedent in this codebase. > > Jeremy Wood has updated the pull request incrementally with six additional commits since the last revision: > > - Merge remote-tracking branch 'origin/JDK-8351110' into JDK-8351110 > > # Conflicts: > # test/jdk/javax/imageio/plugins/jpeg/WriteJPEGThumbnailTest.java > - 8351110: code cleanup > > This is in response to: > https://github.com/openjdk/jdk/pull/23920#discussion_r2035785315 > - Update test/jdk/javax/imageio/plugins/jpeg/WriteJPEGThumbnailTest.java > > Co-authored-by: Alexey Ivanov > - Update test/jdk/javax/imageio/plugins/jpeg/WriteJPEGThumbnailTest.java > > Co-authored-by: Alexey Ivanov > - Update test/jdk/javax/imageio/plugins/jpeg/WriteJPEGThumbnailTest.java > > Co-authored-by: Alexey Ivanov > - 8351110: code cleanup > > This is in response to: > https://github.com/openjdk/jdk/pull/23920#discussion_r2029297962 Marked as reviewed by aivanov (Reviewer). test/jdk/javax/imageio/plugins/jpeg/WriteJPEGThumbnailTest.java line 85: > 83: ByteArrayOutputStream byteOut = new ByteArrayOutputStream(); > 84: BufferedImage thumbnail = writeImage(byteOut); > 85: byte[] jpegData = byteOut.toByteArray(); Now I see the complication. When you use try-with-resources, the stream is declared within the scope of the try-block. I didn't notice it before. I may suggest something like this to overcome the complication: BufferedImage thumbnail; ByteArrayOutputStream byteOut = new ByteArrayOutputStream(); try (byteOut) { thumbnail = writeImage(byteOut); } ImageReader reader = getJPEGImageReader(); ImageInputStream stream = ImageIO.createImageInputStream( new ByteArrayInputStream(byteOut.toByteArray())); reader.setInput(stream); Such syntax for try-with-resources is acceptable since Java 9, if my memory serves me right; yet Java 8 requires you to declare and initialise the auto-closable stream inside the `try`-parentheses. Anyway the current version looks good to me too, and it's shorter. ------------- PR Review: https://git.openjdk.org/jdk/pull/23920#pullrequestreview-2754795132 PR Review Comment: https://git.openjdk.org/jdk/pull/23920#discussion_r2036131572 From aivanov at openjdk.org Wed Apr 9 21:11:27 2025 From: aivanov at openjdk.org (Alexey Ivanov) Date: Wed, 9 Apr 2025 21:11:27 GMT Subject: RFR: 8351110: ImageIO.write for JPEG can write corrupt JPEG for certain thumbnail dimensions [v9] In-Reply-To: References: Message-ID: On Wed, 9 Apr 2025 18:09:31 GMT, Jeremy Wood wrote: >> JPEG segments can only be 65535-bytes long. (The marker length is expressed as 2 bytes.) The problem in this ticket is that we were writing more than 65535 bytes to a segment, which later caused parsing errors when we tried to read the file back. >> >> This includes 2 changes: >> >> 1. We now clip the thumbnail width/height to fit within the available marker. We were already constraining the width & height to a max of 255. (Because the width & height are expressed as 1 byte.) So this new clipping is similar to something we were already doing, and we issue the same WARNING_THUMB_CLIPPED warning to the writer. (Does this require a CSR?) >> >> 2. This adds a bounds check to `write2bytes`. IMO the bigger problem in this ticket was the `ImageIO.write(..)` caller thought they ended up with a valid JPEG. (We were violating the "do no harm / lose no data" doctrine.) Now if something like this ever comes up again: writing will fail with an IIOException. Technically you can argue this change is unnecessary because the new clipping avoids this error condition, but IMO including this safety net is an overall good thing to keep. If anyone disagrees I'm OK with removing it. >> >> Separately: >> I included (and reversed) a commit in this branch that provides an alternate solution. That commit anticipates the overflow problem and switches to a JPEG-encoded thumbnail. From an end user perspective this "just works": they get a (slightly lossly) thumbnail of the original dimensions. But I assume it would be more controversial compared to the clipping approach, since the clipping approach has a strong precedent in this codebase. > > Jeremy Wood has updated the pull request incrementally with six additional commits since the last revision: > > - Merge remote-tracking branch 'origin/JDK-8351110' into JDK-8351110 > > # Conflicts: > # test/jdk/javax/imageio/plugins/jpeg/WriteJPEGThumbnailTest.java > - 8351110: code cleanup > > This is in response to: > https://github.com/openjdk/jdk/pull/23920#discussion_r2035785315 > - Update test/jdk/javax/imageio/plugins/jpeg/WriteJPEGThumbnailTest.java > > Co-authored-by: Alexey Ivanov > - Update test/jdk/javax/imageio/plugins/jpeg/WriteJPEGThumbnailTest.java > > Co-authored-by: Alexey Ivanov > - Update test/jdk/javax/imageio/plugins/jpeg/WriteJPEGThumbnailTest.java > > Co-authored-by: Alexey Ivanov > - 8351110: code cleanup > > This is in response to: > https://github.com/openjdk/jdk/pull/23920#discussion_r2029297962 test/jdk/javax/imageio/plugins/jpeg/WriteJPEGThumbnailTest.java line 24: > 22: */ > 23: > 24: /** Suggestion: /* The jtreg tags shouldn't use javadoc-style comment, a regular comment is preferred in my opinion. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/23920#discussion_r2036146734 From aivanov at openjdk.org Wed Apr 9 21:11:28 2025 From: aivanov at openjdk.org (Alexey Ivanov) Date: Wed, 9 Apr 2025 21:11:28 GMT Subject: RFR: 8351110: ImageIO.write for JPEG can write corrupt JPEG for certain thumbnail dimensions [v4] In-Reply-To: References: <05SR4-1QBrqzhVZYcnQ8pWRandFDG9qNUFyFIU3qtPY=.6ca82582-a39b-49d9-9aa8-c3d782f4756f@github.com> Message-ID: On Wed, 9 Apr 2025 17:46:19 GMT, Jeremy Wood wrote: > Ah, OK. So is there any outstanding question in this thread? No, it's resolved now. You throw an `Error` to make the test fail, and jtreg now reports a failed test without the fix. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/23920#discussion_r2036145541 From aivanov at openjdk.org Wed Apr 9 21:15:27 2025 From: aivanov at openjdk.org (Alexey Ivanov) Date: Wed, 9 Apr 2025 21:15:27 GMT Subject: RFR: 8351110: ImageIO.write for JPEG can write corrupt JPEG for certain thumbnail dimensions [v7] In-Reply-To: References: Message-ID: On Wed, 9 Apr 2025 18:05:37 GMT, Jeremy Wood wrote: >> test/jdk/javax/imageio/plugins/jpeg/WriteJPEGThumbnailTest.java line 86: >> >>> 84: thumbnail = writeImage(byteOut); >>> 85: jpegData = byteOut.toByteArray(); >>> 86: } >> >> For `ByteArrayOutputStream`, it should be okay to convert it before the stream is closed, and the stream is closed by `writeImage` anyway. However, placing `jpegData = byteOut.toByteArray()` after the try-with-resources for `byteOut` won't raise any questions. Then, `jpegData` can be declared where it's assigned. > > If I understood you correctly: > I couldn't place `jpegData = byteOut.toByteArray()` after the try-with-resources block because `byteOut` fell out of scope. > > But if the priority is to declare variables where they're assigned: I can just remove that inner try-with-resources block. (This is updated.) I missed that `byteOut` was declared inside the try-block only. More in [the following comment](https://github.com/openjdk/jdk/pull/23920#discussion_r2036131572), which I should've posted as a reply to this thread. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/23920#discussion_r2036150901 From jlu at openjdk.org Wed Apr 9 21:28:41 2025 From: jlu at openjdk.org (Justin Lu) Date: Wed, 9 Apr 2025 21:28:41 GMT Subject: RFR: 8301991: Convert l10n properties resource bundles to UTF-8 native [v6] In-Reply-To: <_YOUyzMbSEXFduCKVgyis37kwTlGSjBbP8VlFu3xQpU=.9b668e2a-8f91-476d-8914-13dc33a0b9e5@github.com> References: <0MB7FLFNfaGEWssr9X54UJ_iZNFWBJkxQ1yusP7fsuY=.3f9f3de5-fe84-48e6-9449-626cac42da0b@github.com> <_YOUyzMbSEXFduCKVgyis37kwTlGSjBbP8VlFu3xQpU=.9b668e2a-8f91-476d-8914-13dc33a0b9e5@github.com> Message-ID: On Wed, 9 Apr 2025 15:06:32 GMT, Magnus Ihse Bursie wrote: >> Justin Lu has updated the pull request with a new target base due to a merge or a rebase. The pull request now contains 16 commits: >> >> - Convert the merged master changes to UTF-8 >> - Merge master and fix conflicts >> - Close streams when finished loading into props >> - Adjust CF test to read in with UTF-8 to fix failing test >> - Reconvert CS.properties to UTF-8 >> - Revert all changes to CurrencySymbols.properties >> - Bug6204853 should not be converted >> - Copyright year for CompileProperties >> - Redo translation for CS.properties >> - Spot convert CurrencySymbols.properties >> - ... and 6 more: https://git.openjdk.org/jdk/compare/4386d42d...f15b373a > > src/java.xml/share/classes/com/sun/org/apache/xml/internal/serializer/Encodings.properties line 22: > >> 20: # Peter Smolik >> 21: Cp1250 WINDOWS-1250 0x00FF >> 22: # Patch attributed to havardw at underdusken.no (H?vard Wigtil) > > This does not seem to have been a correct conversion. Right, that `?` looks to have been incorrectly converted during the ISO-8859-1 to UTF-8 conversion. (I can't find the script used for conversion as this change is from some time ago.) Since the change occurs in a comment (thankfully), it should be harmless and the next upstream update of this file would overwrite this incorrect change. However, this file does not seem to be updated that often, so I can also file an issue to correct this if you would prefer that. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/12726#discussion_r2036165417 From aivanov at openjdk.org Wed Apr 9 21:34:30 2025 From: aivanov at openjdk.org (Alexey Ivanov) Date: Wed, 9 Apr 2025 21:34:30 GMT Subject: RFR: JDK-8346465 : Add a check in setData() to restrict the update of Built-In ICC_Profiles [v22] In-Reply-To: <9S_w6gnfAlcdsoQviN_kIwZoYzQeAZ2E9APx-ikccuk=.19fa2146-fb05-4687-9b21-cd979bbdced3@github.com> References: <9S_w6gnfAlcdsoQviN_kIwZoYzQeAZ2E9APx-ikccuk=.19fa2146-fb05-4687-9b21-cd979bbdced3@github.com> Message-ID: On Wed, 2 Apr 2025 22:36:13 GMT, Harshitha Onkar wrote: >> Built-in Profiles are singleton objects and if the user happens to modify this shared profile object via setData() then the modified version of the profile is returned each time the same built-in profile is requested via getInstance(). >> >> It is good to protect Built-in profiles from such direct modification by adding BuiltIn profile check in `setData()` such that **only copies** of Built-In profiles are allowed to be updated. >> >> With the proposed fix, if Built-In profile is updated using `.setData()` it throws _**IAE - "BuiltIn profile cannot be modified"**_ >> >> There are no restrictions on creating copies of BuiltIn profile and then modifying it, but what is being restricted with this fix is - the direct modification of the shared BuiltIn profile instance. >> >> Applications which need a modified version of the ICC Profile should instead do the following: >> >> >> byte[] profileData = ICC_Profile.getData() // get the byte array representation of BuiltIn- profile >> ICCProfile newProfile = ICC_Profile.getInstance(profileData) // create a new profile >> newProfile.setData() // to modify and customize the profile >> >> >> Following existing tests are modified to update a copy of Built-In profile. >> >> - java/awt/color/ICC_Profile/SetHeaderInfo.java >> - java/awt/color/ICC_ProfileSetNullDataTest.java >> - sun/java2d/cmm/ProfileOp/SetDataTest.java > > Harshitha Onkar has updated the pull request incrementally with one additional commit since the last revision: > > single case type Marked as reviewed by aivanov (Reviewer). test/jdk/java/awt/color/ICC_Profile/BuiltInProfileCheck/BuiltInProfileCheck.java line 92: > 90: > 91: private static void prepareTestProfile(String testCase, > 92: boolean isBuiltIn, int cs) { I'd probably return the resulting profile to run test on, it will make data flow explicit. However, it'd be more verbose? to pass the test profile. So, the current approach is sensible. Could you write a comment that `prepareTestProfile` stores the profile to test in `testProfile`? It could be a javadoc for the `testProfile` field. ------------- PR Review: https://git.openjdk.org/jdk/pull/23606#pullrequestreview-2754849213 PR Review Comment: https://git.openjdk.org/jdk/pull/23606#discussion_r2036165465 From dnguyen at openjdk.org Wed Apr 9 21:51:55 2025 From: dnguyen at openjdk.org (Damon Nguyen) Date: Wed, 9 Apr 2025 21:51:55 GMT Subject: RFR: 8352908: Open source several swing tests batch1 Message-ID: Open-sourcing and standardizing several tests (JSplitPane JApplet JToolBar) ------------- Commit messages: - Initial add - Merge branch 'master' of github.com:DamonGuy/jdk - Merge branch 'master' of github.com:DamonGuy/jdk - Merge branch 'master' of github.com:DamonGuy/jdk - Initial commit for backout Changes: https://git.openjdk.org/jdk/pull/24559/files Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=24559&range=00 Issue: https://bugs.openjdk.org/browse/JDK-8352908 Stats: 353 lines in 4 files changed: 353 ins; 0 del; 0 mod Patch: https://git.openjdk.org/jdk/pull/24559.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/24559/head:pull/24559 PR: https://git.openjdk.org/jdk/pull/24559 From honkar at openjdk.org Wed Apr 9 22:06:55 2025 From: honkar at openjdk.org (Harshitha Onkar) Date: Wed, 9 Apr 2025 22:06:55 GMT Subject: RFR: JDK-8346465 : Add a check in setData() to restrict the update of Built-In ICC_Profiles [v23] In-Reply-To: References: Message-ID: > Built-in Profiles are singleton objects and if the user happens to modify this shared profile object via setData() then the modified version of the profile is returned each time the same built-in profile is requested via getInstance(). > > It is good to protect Built-in profiles from such direct modification by adding BuiltIn profile check in `setData()` such that **only copies** of Built-In profiles are allowed to be updated. > > With the proposed fix, if Built-In profile is updated using `.setData()` it throws _**IAE - "BuiltIn profile cannot be modified"**_ > > There are no restrictions on creating copies of BuiltIn profile and then modifying it, but what is being restricted with this fix is - the direct modification of the shared BuiltIn profile instance. > > Applications which need a modified version of the ICC Profile should instead do the following: > > > byte[] profileData = ICC_Profile.getData() // get the byte array representation of BuiltIn- profile > ICCProfile newProfile = ICC_Profile.getInstance(profileData) // create a new profile > newProfile.setData() // to modify and customize the profile > > > Following existing tests are modified to update a copy of Built-In profile. > > - java/awt/color/ICC_Profile/SetHeaderInfo.java > - java/awt/color/ICC_ProfileSetNullDataTest.java > - sun/java2d/cmm/ProfileOp/SetDataTest.java Harshitha Onkar has updated the pull request incrementally with one additional commit since the last revision: added javadoc to testprofile ------------- Changes: - all: https://git.openjdk.org/jdk/pull/23606/files - new: https://git.openjdk.org/jdk/pull/23606/files/71a125c6..47c0129e Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=23606&range=22 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=23606&range=21-22 Stats: 4 lines in 1 file changed: 4 ins; 0 del; 0 mod Patch: https://git.openjdk.org/jdk/pull/23606.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/23606/head:pull/23606 PR: https://git.openjdk.org/jdk/pull/23606 From honkar at openjdk.org Wed Apr 9 22:13:30 2025 From: honkar at openjdk.org (Harshitha Onkar) Date: Wed, 9 Apr 2025 22:13:30 GMT Subject: RFR: JDK-8346465 : Add a check in setData() to restrict the update of Built-In ICC_Profiles [v22] In-Reply-To: References: <9S_w6gnfAlcdsoQviN_kIwZoYzQeAZ2E9APx-ikccuk=.19fa2146-fb05-4687-9b21-cd979bbdced3@github.com> Message-ID: On Wed, 9 Apr 2025 21:26:16 GMT, Alexey Ivanov wrote: > I'd probably return the resulting profile to run test on, it will make data flow explicit. However, it'd be more verbose? to pass the test profile. My initial thought was same - return the profile, but chose to keep it as static var to reduce the number of arguments prepareTestProfile() & testProfile() and it makes the test code cleaner. > Could you write a comment that prepareTestProfile stores the profile to test in testProfile? It could be a javadoc for the testProfile field. Updated. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/23606#discussion_r2036204841 From dnguyen at openjdk.org Wed Apr 9 22:22:04 2025 From: dnguyen at openjdk.org (Damon Nguyen) Date: Wed, 9 Apr 2025 22:22:04 GMT Subject: RFR: 8353000: Open source several swing tests batch2 Message-ID: Open-sourcing and standardizing several tests (metal) ------------- Commit messages: - Initial move - Merge branch 'master' of github.com:DamonGuy/jdk - Merge branch 'master' of github.com:DamonGuy/jdk - Merge branch 'master' of github.com:DamonGuy/jdk - Initial commit for backout Changes: https://git.openjdk.org/jdk/pull/24560/files Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=24560&range=00 Issue: https://bugs.openjdk.org/browse/JDK-8353000 Stats: 484 lines in 6 files changed: 484 ins; 0 del; 0 mod Patch: https://git.openjdk.org/jdk/pull/24560.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/24560/head:pull/24560 PR: https://git.openjdk.org/jdk/pull/24560 From dnguyen at openjdk.org Wed Apr 9 22:22:30 2025 From: dnguyen at openjdk.org (Damon Nguyen) Date: Wed, 9 Apr 2025 22:22:30 GMT Subject: RFR: 8353586: Open source several toolkit tests In-Reply-To: <2xbRaqpi62yNHGl8xeKAZE4X5PSWnCtm7Zz1-1orEOY=.8e0c2435-c3a6-473e-a06f-2deb5f21f1be@github.com> References: <2xbRaqpi62yNHGl8xeKAZE4X5PSWnCtm7Zz1-1orEOY=.8e0c2435-c3a6-473e-a06f-2deb5f21f1be@github.com> Message-ID: On Tue, 8 Apr 2025 14:40:01 GMT, Alexander Zvegintsev wrote: > A couple of tests are open sourced. Marked as reviewed by dnguyen (Committer). ------------- PR Review: https://git.openjdk.org/jdk/pull/24513#pullrequestreview-2754921393 From dnguyen at openjdk.org Wed Apr 9 22:25:26 2025 From: dnguyen at openjdk.org (Damon Nguyen) Date: Wed, 9 Apr 2025 22:25:26 GMT Subject: RFR: JDK-8353486 : Open source Swing Tests - Set 4 [v3] In-Reply-To: References: Message-ID: <6fJwqQIfqUNZgOy7OWCDFMKuYnX05cW1x-T6RxpAeKI=.3b27d9d2-fa5d-496d-aad3-802f1ba14fb2@github.com> On Tue, 8 Apr 2025 22:45:31 GMT, Harshitha Onkar wrote: >> Open-sourced the following Swing tests: >> >> 1. javax/swing/JFileChooser/bug4464774.java >> 2. javax/swing/JFileChooser/bug4522756.java >> 3. javax/swing/JFileChooser/bug4759934.java >> 4. javax/swing/JFileChooser/bug4943900.java >> 5. javax/swing/JOptionPane/bug4194862.java > > Harshitha Onkar has updated the pull request incrementally with one additional commit since the last revision: > > review update Thanks. I saw via your screenshots on Window how different the rows/cols can appear for the instructions. LGTM ------------- Marked as reviewed by dnguyen (Committer). PR Review: https://git.openjdk.org/jdk/pull/24456#pullrequestreview-2754923867 From duke at openjdk.org Wed Apr 9 23:31:02 2025 From: duke at openjdk.org (Jeremy Wood) Date: Wed, 9 Apr 2025 23:31:02 GMT Subject: RFR: 8351110: ImageIO.write for JPEG can write corrupt JPEG for certain thumbnail dimensions [v10] In-Reply-To: References: Message-ID: > JPEG segments can only be 65535-bytes long. (The marker length is expressed as 2 bytes.) The problem in this ticket is that we were writing more than 65535 bytes to a segment, which later caused parsing errors when we tried to read the file back. > > This includes 2 changes: > > 1. We now clip the thumbnail width/height to fit within the available marker. We were already constraining the width & height to a max of 255. (Because the width & height are expressed as 1 byte.) So this new clipping is similar to something we were already doing, and we issue the same WARNING_THUMB_CLIPPED warning to the writer. (Does this require a CSR?) > > 2. This adds a bounds check to `write2bytes`. IMO the bigger problem in this ticket was the `ImageIO.write(..)` caller thought they ended up with a valid JPEG. (We were violating the "do no harm / lose no data" doctrine.) Now if something like this ever comes up again: writing will fail with an IIOException. Technically you can argue this change is unnecessary because the new clipping avoids this error condition, but IMO including this safety net is an overall good thing to keep. If anyone disagrees I'm OK with removing it. > > Separately: > I included (and reversed) a commit in this branch that provides an alternate solution. That commit anticipates the overflow problem and switches to a JPEG-encoded thumbnail. From an end user perspective this "just works": they get a (slightly lossly) thumbnail of the original dimensions. But I assume it would be more controversial compared to the clipping approach, since the clipping approach has a strong precedent in this codebase. Jeremy Wood has updated the pull request incrementally with one additional commit since the last revision: Update test/jdk/javax/imageio/plugins/jpeg/WriteJPEGThumbnailTest.java Co-authored-by: Alexey Ivanov ------------- Changes: - all: https://git.openjdk.org/jdk/pull/23920/files - new: https://git.openjdk.org/jdk/pull/23920/files/e093793b..9573b82d Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=23920&range=09 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=23920&range=08-09 Stats: 1 line in 1 file changed: 0 ins; 0 del; 1 mod Patch: https://git.openjdk.org/jdk/pull/23920.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/23920/head:pull/23920 PR: https://git.openjdk.org/jdk/pull/23920 From serb at openjdk.org Thu Apr 10 03:34:35 2025 From: serb at openjdk.org (Sergey Bylokhov) Date: Thu, 10 Apr 2025 03:34:35 GMT Subject: RFR: 8354077: Get rid of offscreenSharingEnabled windows flag Message-ID: Another unused obsoleted flag removed (offscreenSharingEnabled) from WindowsFlags. Its last usage was eliminated by [JDK-6725214](https://bugs.openjdk.org/browse/JDk-6725214) ("D3D: forward-port the new pipeline from 6u10"), see [commit](https://github.com/openjdk/jdk/commit/e4c9db984fe1a3a9d06fb60e333e92df3b165454#diff-c27da1eb4bdc7e69158f38ab3e7a1aa02b074c131c18ad15d04d0f88f169febeL319). Interestingly, the original JDK 6u10 changes marked many options as "Obsoleted" (see [System Properties for Java 2D Technology](https://docs.oracle.com/javase/8/docs/technotes/guides/2d/flags.html)). Some of them later were removed in JDK 9 via [JDK-8155682](https://bugs.openjdk.org/browse/JDK-8155682) ("Get rid of legacy Windows Flags for DX"). However, two obsoleted flags remain: - **sun.java2d.noddraw**: Obsoleted in: Java SE 6 Update 10, which contains a new implementation of D3D support. Setting sun.java2d.noddraw=true is now interpreted exactly the same as disabling that via sun.java2d.d3d=false. Intended use: To turn off the Java 2D system's use of DirectDraw and Direct3D completely. Introduced: 1.2 Default value: false How to use: Setting this flag to true turns off DirectDraw usage, which sometimes helps to get rid of rendering problems on Win32. - **sun.java2d.ddoffscreen**: Obsoleted in: Java SE 6 Update 10 Intended use: To turn on hardware-accelerated scaling when the DirectDraw/Direct3D pipeline is in use. Introduced: 1.2 Default value: false How to use: Setting this flag to true enables hardware-accelerated scaling if the DirectDraw/Direct3D pipeline is in use. DirectDraw/Direct3D hardware scaling is disabled by default to avoid rendering artifacts in existing applications. These rendering artifacts are caused by possible inconsistencies between the scale method that the software scaling operation uses (nearest neighbor) and the different scale methods that video cards use. Certain events that occur while an application is running might cause a scaled image to be rendered partially with hardware scaling operations and partially with software scaling operations, resulting in an inconsistent appearance. For now, you can enable acceleration by setting the ddscale flag to true. Should we: - Continue supporting these indefinitely, or - Mark them as deprecated for removal in some upcoming release? ------------- Commit messages: - 8354077: Get rid of offscreenSharingEnabled windows flag Changes: https://git.openjdk.org/jdk/pull/24534/files Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=24534&range=00 Issue: https://bugs.openjdk.org/browse/JDK-8354077 Stats: 41 lines in 3 files changed: 0 ins; 37 del; 4 mod Patch: https://git.openjdk.org/jdk/pull/24534.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/24534/head:pull/24534 PR: https://git.openjdk.org/jdk/pull/24534 From honkar at openjdk.org Thu Apr 10 04:15:31 2025 From: honkar at openjdk.org (Harshitha Onkar) Date: Thu, 10 Apr 2025 04:15:31 GMT Subject: RFR: JDK-8346465 : Add a check in setData() to restrict the update of Built-In ICC_Profiles [v24] In-Reply-To: References: Message-ID: > Built-in Profiles are singleton objects and if the user happens to modify this shared profile object via setData() then the modified version of the profile is returned each time the same built-in profile is requested via getInstance(). > > It is good to protect Built-in profiles from such direct modification by adding BuiltIn profile check in `setData()` such that **only copies** of Built-In profiles are allowed to be updated. > > With the proposed fix, if Built-In profile is updated using `.setData()` it throws _**IAE - "BuiltIn profile cannot be modified"**_ > > There are no restrictions on creating copies of BuiltIn profile and then modifying it, but what is being restricted with this fix is - the direct modification of the shared BuiltIn profile instance. > > Applications which need a modified version of the ICC Profile should instead do the following: > > > byte[] profileData = ICC_Profile.getData() // get the byte array representation of BuiltIn- profile > ICCProfile newProfile = ICC_Profile.getInstance(profileData) // create a new profile > newProfile.setData() // to modify and customize the profile > > > Following existing tests are modified to update a copy of Built-In profile. > > - java/awt/color/ICC_Profile/SetHeaderInfo.java > - java/awt/color/ICC_ProfileSetNullDataTest.java > - sun/java2d/cmm/ProfileOp/SetDataTest.java Harshitha Onkar 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 26 additional commits since the last revision: - Merge branch 'master' into BuiltInCheck - added javadoc to testprofile - single case type - added test cases to read .icc, updated test code - serialization test case changes - Merge branch 'master' into BuiltInCheck - updated test to check for all builtIn profiles, serial-deserialization - redudant stmt removed - modifier order changed, added comment to BuiltInProfile - review changes - ... and 16 more: https://git.openjdk.org/jdk/compare/0385ad8a...b55bebf2 ------------- Changes: - all: https://git.openjdk.org/jdk/pull/23606/files - new: https://git.openjdk.org/jdk/pull/23606/files/47c0129e..b55bebf2 Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=23606&range=23 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=23606&range=22-23 Stats: 103182 lines in 2627 files changed: 40551 ins; 54234 del; 8397 mod Patch: https://git.openjdk.org/jdk/pull/23606.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/23606/head:pull/23606 PR: https://git.openjdk.org/jdk/pull/23606 From psadhukhan at openjdk.org Thu Apr 10 05:29:42 2025 From: psadhukhan at openjdk.org (Prasanta Sadhukhan) Date: Thu, 10 Apr 2025 05:29:42 GMT Subject: RFR: 8352687: Opensource few JInternalFrame and JTextField tests [v2] In-Reply-To: References: Message-ID: > Few JInternalFrame and JTextField tests are opensourced Prasanta Sadhukhan has updated the pull request incrementally with one additional commit since the last revision: Fix ------------- Changes: - all: https://git.openjdk.org/jdk/pull/24474/files - new: https://git.openjdk.org/jdk/pull/24474/files/5229902e..68c72c3b Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=24474&range=01 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=24474&range=00-01 Stats: 14 lines in 4 files changed: 1 ins; 8 del; 5 mod Patch: https://git.openjdk.org/jdk/pull/24474.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/24474/head:pull/24474 PR: https://git.openjdk.org/jdk/pull/24474 From psadhukhan at openjdk.org Thu Apr 10 05:29:43 2025 From: psadhukhan at openjdk.org (Prasanta Sadhukhan) Date: Thu, 10 Apr 2025 05:29:43 GMT Subject: RFR: 8352687: Opensource few JInternalFrame and JTextField tests [v2] In-Reply-To: References: Message-ID: On Tue, 8 Apr 2025 17:07:48 GMT, Harshitha Onkar wrote: >> Prasanta Sadhukhan has updated the pull request incrementally with one additional commit since the last revision: >> >> Fix > > test/jdk/javax/swing/JInternalFrame/bug4190516.java line 60: > >> 58: fr.getContentPane().add(jdp); >> 59: >> 60: JInternalFrame jif = new JInternalFrame("Title", true, true, true, true); > > Suggestion: > > JInternalFrame jif = new JInternalFrame("Title", true, true, true, true); fixed > test/jdk/javax/swing/JInternalFrame/bug4242045.java line 54: > >> 52: "Iconifiable", "Maximizable", "Closable" under different LookAndFeels. >> 53: If they appears and disappears correctly then test passes. If any >> 54: button not appear or disappear as expected or appear with incorrect > > Suggestion: > > button does not appear or disappear as expected or appear with incorrect ok > test/jdk/javax/swing/JTextField/bug4232716.java line 55: > >> 53: e = new JEditorPane("text/html", html); >> 54: e.setEditable(false); >> 55: frame.getContentPane().add(e); > > Suggestion: > > frame.add(e); ok > test/jdk/javax/swing/JTextField/bug5027332.java line 51: > >> 49: The caret should be placed slightly off text field borders, >> 50: so that it can be easily distinguished from the border. >> 51: Test fails if the caret touches the border."""; > > Just a thought: Would it be good to extend this test to all platforms (getSystemLookAndFeelClassName()) since it verifies if caret does not merge with the text field border? Yes made it for SystemLookAndFeel > test/jdk/javax/swing/JTextField/bug5027332.java line 70: > >> 68: >> 69: private static JFrame createTestUI() { >> 70: > > Extra line can be removed ok ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/24474#discussion_r2036529266 PR Review Comment: https://git.openjdk.org/jdk/pull/24474#discussion_r2036529375 PR Review Comment: https://git.openjdk.org/jdk/pull/24474#discussion_r2036529456 PR Review Comment: https://git.openjdk.org/jdk/pull/24474#discussion_r2036529830 PR Review Comment: https://git.openjdk.org/jdk/pull/24474#discussion_r2036529544 From psadhukhan at openjdk.org Thu Apr 10 05:36:58 2025 From: psadhukhan at openjdk.org (Prasanta Sadhukhan) Date: Thu, 10 Apr 2025 05:36:58 GMT Subject: RFR: 8352687: Opensource few JInternalFrame and JTextField tests [v3] In-Reply-To: References: Message-ID: > Few JInternalFrame and JTextField tests are opensourced Prasanta Sadhukhan has updated the pull request incrementally with one additional commit since the last revision: Remove SkippedException ------------- Changes: - all: https://git.openjdk.org/jdk/pull/24474/files - new: https://git.openjdk.org/jdk/pull/24474/files/68c72c3b..cdcd9b5b Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=24474&range=02 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=24474&range=01-02 Stats: 2 lines in 1 file changed: 0 ins; 2 del; 0 mod Patch: https://git.openjdk.org/jdk/pull/24474.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/24474/head:pull/24474 PR: https://git.openjdk.org/jdk/pull/24474 From duke at openjdk.org Thu Apr 10 06:10:32 2025 From: duke at openjdk.org (Jeremy Wood) Date: Thu, 10 Apr 2025 06:10:32 GMT Subject: RFR: 8351110: ImageIO.write for JPEG can write corrupt JPEG for certain thumbnail dimensions [v9] In-Reply-To: <7y1ez1b4ePtPsuV88J3hIlETUVYRjK9t8a_quaKo-hw=.52212032-7b12-4afa-a20a-b3cd2cb66bda@github.com> References: <7y1ez1b4ePtPsuV88J3hIlETUVYRjK9t8a_quaKo-hw=.52212032-7b12-4afa-a20a-b3cd2cb66bda@github.com> Message-ID: On Wed, 9 Apr 2025 20:56:40 GMT, Alexey Ivanov wrote: >> Jeremy Wood has updated the pull request incrementally with six additional commits since the last revision: >> >> - Merge remote-tracking branch 'origin/JDK-8351110' into JDK-8351110 >> >> # Conflicts: >> # test/jdk/javax/imageio/plugins/jpeg/WriteJPEGThumbnailTest.java >> - 8351110: code cleanup >> >> This is in response to: >> https://github.com/openjdk/jdk/pull/23920#discussion_r2035785315 >> - Update test/jdk/javax/imageio/plugins/jpeg/WriteJPEGThumbnailTest.java >> >> Co-authored-by: Alexey Ivanov >> - Update test/jdk/javax/imageio/plugins/jpeg/WriteJPEGThumbnailTest.java >> >> Co-authored-by: Alexey Ivanov >> - Update test/jdk/javax/imageio/plugins/jpeg/WriteJPEGThumbnailTest.java >> >> Co-authored-by: Alexey Ivanov >> - 8351110: code cleanup >> >> This is in response to: >> https://github.com/openjdk/jdk/pull/23920#discussion_r2029297962 > > test/jdk/javax/imageio/plugins/jpeg/WriteJPEGThumbnailTest.java line 85: > >> 83: ByteArrayOutputStream byteOut = new ByteArrayOutputStream(); >> 84: BufferedImage thumbnail = writeImage(byteOut); >> 85: byte[] jpegData = byteOut.toByteArray(); > > Now I see the complication. When you use try-with-resources, the stream is declared within the scope of the try-block. I didn't notice it before. > > I may suggest something like this to overcome the complication: > > > BufferedImage thumbnail; > ByteArrayOutputStream byteOut = new ByteArrayOutputStream(); > try (byteOut) { > thumbnail = writeImage(byteOut); > } > > ImageReader reader = getJPEGImageReader(); > ImageInputStream stream = ImageIO.createImageInputStream( > new ByteArrayInputStream(byteOut.toByteArray())); > reader.setInput(stream); > > > Such syntax for try-with-resources is acceptable since Java 9, if my memory serves me right; yet Java 8 requires you to declare and initialise the auto-closable stream inside the `try`-parentheses. > > Anyway the current version looks good to me too, and it's shorter. OK; if it looks good then I'll resolve this conversation. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/23920#discussion_r2036573003 From psadhukhan at openjdk.org Thu Apr 10 06:28:24 2025 From: psadhukhan at openjdk.org (Prasanta Sadhukhan) Date: Thu, 10 Apr 2025 06:28:24 GMT Subject: RFR: 8353586: Open source several toolkit tests In-Reply-To: <2xbRaqpi62yNHGl8xeKAZE4X5PSWnCtm7Zz1-1orEOY=.8e0c2435-c3a6-473e-a06f-2deb5f21f1be@github.com> References: <2xbRaqpi62yNHGl8xeKAZE4X5PSWnCtm7Zz1-1orEOY=.8e0c2435-c3a6-473e-a06f-2deb5f21f1be@github.com> Message-ID: On Tue, 8 Apr 2025 14:40:01 GMT, Alexander Zvegintsev wrote: > A couple of tests are open sourced. Marked as reviewed by psadhukhan (Reviewer). ------------- PR Review: https://git.openjdk.org/jdk/pull/24513#pullrequestreview-2755473151 From psadhukhan at openjdk.org Thu Apr 10 06:41:49 2025 From: psadhukhan at openjdk.org (Prasanta Sadhukhan) Date: Thu, 10 Apr 2025 06:41:49 GMT Subject: RFR: 8352682: Opensource JComponent tests Message-ID: Few JComponent tests are opensourced ------------- Commit messages: - 8352682: Opensource JComponent tests Changes: https://git.openjdk.org/jdk/pull/24562/files Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=24562&range=00 Issue: https://bugs.openjdk.org/browse/JDK-8352682 Stats: 270 lines in 3 files changed: 270 ins; 0 del; 0 mod Patch: https://git.openjdk.org/jdk/pull/24562.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/24562/head:pull/24562 PR: https://git.openjdk.org/jdk/pull/24562 From duke at openjdk.org Thu Apr 10 07:16:03 2025 From: duke at openjdk.org (Jeremy Wood) Date: Thu, 10 Apr 2025 07:16:03 GMT Subject: RFR: 8351913: ToolkitImage renders some gifs wrong Message-ID: <74IJiA4t9MAOiGPCGuls0-KbIfGg9D2bNUXPapOx0Zs=.4cdf9b89-4007-4727-a07e-ac4eae84134e@github.com> I do not have much background in LZW compression or in C, but I'm reasonably confident this resolves the problem I'm observing. It looks like the GifImageDecoder was not always correctly handling compression codes after the table reached its limit of ~4096. If anyone has suggestions for improvements I'm happy to make adjustments. Luckily while debugging this: I was able to compare the flawed implementation (GifImageDecoder) with ImageIO's implementation (GIFImageReader) to help identify how the suffix/prefix tables are supposed to work. ImageIO's implementation may have suffered a similar bug (maybe https://bugs.openjdk.org/browse/JDK-7131823 ?), and that appears to have been backported. I have dozens of additional test cases for this problem, but unfortunately I don't have the rights to commit them to the OpenJDK repo. Feel free to email me for additional context/test cases. ------------- Commit messages: - 8351913: changing whitespace - Merge branch 'master' into JDK-8351913 - Merge branch 'master' of https://github.com/mickleness/jdk - 8351913: code cleanup - 8351913: support decoding LZW image data with 4095 entries - Merge branch 'openjdk:master' into master - Merge branch 'openjdk:master' into master - Merge branch 'openjdk:master' into master - Merge pull request #5 from openjdk/master - Merge pull request #4 from openjdk/master - ... and 3 more: https://git.openjdk.org/jdk/compare/9fcb06f9...6179ea22 Changes: https://git.openjdk.org/jdk/pull/24271/files Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=24271&range=00 Issue: https://bugs.openjdk.org/browse/JDK-8351913 Stats: 249 lines in 4 files changed: 241 ins; 0 del; 8 mod Patch: https://git.openjdk.org/jdk/pull/24271.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/24271/head:pull/24271 PR: https://git.openjdk.org/jdk/pull/24271 From duke at openjdk.org Thu Apr 10 07:20:06 2025 From: duke at openjdk.org (Jeremy Wood) Date: Thu, 10 Apr 2025 07:20:06 GMT Subject: RFR: 8351913: ToolkitImage renders some gifs wrong [v2] In-Reply-To: <74IJiA4t9MAOiGPCGuls0-KbIfGg9D2bNUXPapOx0Zs=.4cdf9b89-4007-4727-a07e-ac4eae84134e@github.com> References: <74IJiA4t9MAOiGPCGuls0-KbIfGg9D2bNUXPapOx0Zs=.4cdf9b89-4007-4727-a07e-ac4eae84134e@github.com> Message-ID: <4MLiBt1VUPDfV0DwZN8bgPeaITltl5ZeEi12lTfz0bo=.47a17fe5-e68b-4116-a954-93c3cb562491@github.com> > I do not have much background in LZW compression or in C, but I'm reasonably confident this resolves the problem I'm observing. It looks like the GifImageDecoder was not always correctly handling compression codes after the table reached its limit of ~4096. If anyone has suggestions for improvements I'm happy to make adjustments. > > Luckily while debugging this: I was able to compare the flawed implementation (GifImageDecoder) with ImageIO's implementation (GIFImageReader) to help identify how the suffix/prefix tables are supposed to work. > > ImageIO's implementation may have suffered a similar bug (maybe https://bugs.openjdk.org/browse/JDK-7131823 ?), and that appears to have been backported. > > I have dozens of additional test cases for this problem, but unfortunately I don't have the rights to commit them to the OpenJDK repo. Feel free to email me for additional context/test cases. Jeremy Wood has updated the pull request incrementally with one additional commit since the last revision: 8351913: changing whitespace (PR review) ------------- Changes: - all: https://git.openjdk.org/jdk/pull/24271/files - new: https://git.openjdk.org/jdk/pull/24271/files/6179ea22..e2ab9492 Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=24271&range=01 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=24271&range=00-01 Stats: 1 line in 1 file changed: 0 ins; 0 del; 1 mod Patch: https://git.openjdk.org/jdk/pull/24271.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/24271/head:pull/24271 PR: https://git.openjdk.org/jdk/pull/24271 From ihse at openjdk.org Thu Apr 10 07:34:37 2025 From: ihse at openjdk.org (Magnus Ihse Bursie) Date: Thu, 10 Apr 2025 07:34:37 GMT Subject: RFR: 8301991: Convert l10n properties resource bundles to UTF-8 native [v6] In-Reply-To: References: <0MB7FLFNfaGEWssr9X54UJ_iZNFWBJkxQ1yusP7fsuY=.3f9f3de5-fe84-48e6-9449-626cac42da0b@github.com> <_YOUyzMbSEXFduCKVgyis37kwTlGSjBbP8VlFu3xQpU=.9b668e2a-8f91-476d-8914-13dc33a0b9e5@github.com> Message-ID: On Wed, 9 Apr 2025 21:26:15 GMT, Justin Lu wrote: >> src/java.xml/share/classes/com/sun/org/apache/xml/internal/serializer/Encodings.properties line 22: >> >>> 20: # Peter Smolik >>> 21: Cp1250 WINDOWS-1250 0x00FF >>> 22: # Patch attributed to havardw at underdusken.no (H?vard Wigtil) >> >> This does not seem to have been a correct conversion. > > Right, that `?` looks to have been incorrectly converted during the ISO-8859-1 to UTF-8 conversion. (I can't find the script used for conversion as this change is from some time ago.) > > Since the change occurs in a comment (thankfully), it should be harmless and the next upstream update of this file would overwrite this incorrect change. However, this file does not seem to be updated that often, so I can also file an issue to correct this if you would prefer that. You don't have to do that, I'm working on an omnibus UTF-8 fixing PR right now, where I will include a fix for this as well. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/12726#discussion_r2036695622 From ihse at openjdk.org Thu Apr 10 07:34:37 2025 From: ihse at openjdk.org (Magnus Ihse Bursie) Date: Thu, 10 Apr 2025 07:34:37 GMT Subject: RFR: 8301991: Convert l10n properties resource bundles to UTF-8 native [v6] In-Reply-To: References: <0MB7FLFNfaGEWssr9X54UJ_iZNFWBJkxQ1yusP7fsuY=.3f9f3de5-fe84-48e6-9449-626cac42da0b@github.com> <_YOUyzMbSEXFduCKVgyis37kwTlGSjBbP8VlFu3xQpU=.9b668e2a-8f91-476d-8914-13dc33a0b9e5@github.com> Message-ID: On Thu, 10 Apr 2025 07:31:37 GMT, Magnus Ihse Bursie wrote: >> Right, that `?` looks to have been incorrectly converted during the ISO-8859-1 to UTF-8 conversion. (I can't find the script used for conversion as this change is from some time ago.) >> >> Since the change occurs in a comment (thankfully), it should be harmless and the next upstream update of this file would overwrite this incorrect change. However, this file does not seem to be updated that often, so I can also file an issue to correct this if you would prefer that. > > You don't have to do that, I'm working on an omnibus UTF-8 fixing PR right now, where I will include a fix for this as well. If anything, I might be a bit worried that there are more incorrect conversions stemming from this PR, that my automated tools and manual scanning has not revealed. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/12726#discussion_r2036696723 From eirbjo at openjdk.org Thu Apr 10 08:10:42 2025 From: eirbjo at openjdk.org (Eirik =?UTF-8?B?QmrDuHJzbsO4cw==?=) Date: Thu, 10 Apr 2025 08:10:42 GMT Subject: RFR: 8301991: Convert l10n properties resource bundles to UTF-8 native [v6] In-Reply-To: References: <0MB7FLFNfaGEWssr9X54UJ_iZNFWBJkxQ1yusP7fsuY=.3f9f3de5-fe84-48e6-9449-626cac42da0b@github.com> <_YOUyzMbSEXFduCKVgyis37kwTlGSjBbP8VlFu3xQpU=.9b668e2a-8f91-476d-8914-13dc33a0b9e5@github.com> Message-ID: <6c6DqyCqyPonBZgUU8BpYJR3JQvMXjWm9ulq4SN25Do=.77775825-716d-4908-ae24-c4cf1ead78a5@github.com> On Thu, 10 Apr 2025 07:32:18 GMT, Magnus Ihse Bursie wrote: >> You don't have to do that, I'm working on an omnibus UTF-8 fixing PR right now, where I will include a fix for this as well. > > If anything, I might be a bit worried that there are more incorrect conversions stemming from this PR, that my automated tools and manual scanning has not revealed. Some observations: 1: This PR seems to have been abondoned, so perhaps this discussion belongs in #15694 ? 2: The `?` (Unicode 'Latin small letter a with ring above' U+00E5) was correctly encoded as 0xEF in ISO-8859-1 previous to this change. 3: The conversion changed this `0xEF` to the three-byte sequence `ef bf bd` 4: This is as-if the file was incorrctly decoded using UTF-8, then encoded using UTF-8: byte[] origBytes = "?".getBytes(StandardCharsets.ISO_8859_1); String decoded = new String(origBytes, StandardCharsets.UTF_8); byte[] encoded = decoded.getBytes(StandardCharsets.UTF_8); String hex = HexFormat.of().formatHex(encoded); assertEquals("efbfbd", hex); ``` Like @magicus I'm worried that similar incorrect decoding could have been introduced by the same script in other files. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/12726#discussion_r2036767319 From mkartashev at openjdk.org Thu Apr 10 08:26:33 2025 From: mkartashev at openjdk.org (Maxim Kartashev) Date: Thu, 10 Apr 2025 08:26:33 GMT Subject: RFR: 8354191: GTK LaF should use pre-multiplied alpha same as cairo In-Reply-To: <-sAv6upz5pv3EA1zjjUvRUxNP1Tl75NJAwOX-df8Vbk=.442e3494-836b-4664-baf1-669fbd7532a0@github.com> References: <-sAv6upz5pv3EA1zjjUvRUxNP1Tl75NJAwOX-df8Vbk=.442e3494-836b-4664-baf1-669fbd7532a0@github.com> Message-ID: On Wed, 9 Apr 2025 14:42:05 GMT, Maxim Kartashev wrote: > The pixels that cairo produces for GTK LaF to draw on a Swing component have their alpha components pre-multiplied as per [the documentation](https://www.cairographics.org/manual/cairo-Image-Surfaces.html?spm=a2ty_o01.29997173.0.0.540ac921z2EebT#cairo-format-t): >> Pre-multiplied alpha is used. (That is, 50% transparent red is 0x80800000, not 0x80ff0000.) > > The BufferedImage created from those pixels, however, has its constructor's argument for `isRasterPremultiplied` set to `false` in `GTKEngine.finishPainting()`. This commit corrects that. > > In addition, since at least some "native" graphics color models also use pre-multiplied alpha (ex.: `GLXGraphicsConfig.getColorModel()`), `COLOR_MODELS` were modified to take advantage of that and avoid unnecessary re-calculations of image's pixels. To illustrate the difference, here's a magnified portion of the SwingSet2 demo with GTK LaF: ![image](https://github.com/user-attachments/assets/b1ba0571-d3e4-4657-8f4c-c73abc468bf8) "Old" is on the left and "new" (with this change) is on the right. ------------- PR Comment: https://git.openjdk.org/jdk/pull/24551#issuecomment-2791958919 From ihse at openjdk.org Thu Apr 10 08:38:38 2025 From: ihse at openjdk.org (Magnus Ihse Bursie) Date: Thu, 10 Apr 2025 08:38:38 GMT Subject: RFR: 8301991: Convert l10n properties resource bundles to UTF-8 native [v6] In-Reply-To: <6c6DqyCqyPonBZgUU8BpYJR3JQvMXjWm9ulq4SN25Do=.77775825-716d-4908-ae24-c4cf1ead78a5@github.com> References: <0MB7FLFNfaGEWssr9X54UJ_iZNFWBJkxQ1yusP7fsuY=.3f9f3de5-fe84-48e6-9449-626cac42da0b@github.com> <_YOUyzMbSEXFduCKVgyis37kwTlGSjBbP8VlFu3xQpU=.9b668e2a-8f91-476d-8914-13dc33a0b9e5@github.com> <6c6DqyCqyPonBZgUU8BpYJR3JQvMXjWm9ulq4SN25Do=.77775825-716d-4908-ae24-c4cf1ead78a5@github.com> Message-ID: On Thu, 10 Apr 2025 08:08:02 GMT, Eirik Bj?rsn?s wrote: >> If anything, I might be a bit worried that there are more incorrect conversions stemming from this PR, that my automated tools and manual scanning has not revealed. > > Some observations: > > 1: This PR seems to have been abondoned, so perhaps this discussion belongs in #15694 ? > > 2: The `?` (Unicode 'Latin small letter a with ring above' U+00E5) was correctly encoded as 0xEF in ISO-8859-1 previous to this change. > > 3: The conversion changed this `0xEF` to the three-byte sequence `ef bf bd` > > 4: This is as-if the file was incorrctly decoded using UTF-8, then encoded using UTF-8: > > > byte[] origBytes = "?".getBytes(StandardCharsets.ISO_8859_1); > String decoded = new String(origBytes, StandardCharsets.UTF_8); > byte[] encoded = decoded.getBytes(StandardCharsets.UTF_8); > String hex = HexFormat.of().formatHex(encoded); > assertEquals("efbfbd", hex); > ``` > > Like @magicus I'm worried that similar incorrect decoding could have been introduced by the same script in other files. > This PR seems to have been abondoned, so perhaps this discussion belongs in https://github.com/openjdk/jdk/pull/15694 ? Oh, I didn't notice this was supplanted by another PR. It might be better to continue there, yes. Even if closed PRs seldom are the best places to conduct discussions, I think it might be a good idea to scrutinize all files modified by this script. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/12726#discussion_r2036820765 From ihse at openjdk.org Thu Apr 10 08:41:45 2025 From: ihse at openjdk.org (Magnus Ihse Bursie) Date: Thu, 10 Apr 2025 08:41:45 GMT Subject: RFR: 8301991: Convert l10n properties resource bundles to UTF-8 native [v2] In-Reply-To: References: Message-ID: On Wed, 13 Sep 2023 17:38:28 GMT, Justin Lu wrote: >> JDK .properties files still use ISO-8859-1 encoding with escape sequences. It would improve readability to see the native characters instead of escape sequences (especially for the L10n process). The majority of files changed are localized resource files. >> >> This change converts the Unicode escape sequences in the JDK .properties files (both in src and test) to UTF-8 native characters. Additionally, the build logic is adjusted to read the .properties files in UTF-8 while generating the ListResourceBundle files. >> >> The only escape sequence not converted was `\u0020` as this is used to denote intentional trailing white space. (E.g. `key=This is the value:\u0020`) >> >> The conversion was done using native2ascii with options `-reverse -encoding UTF-8`. >> >> If this PR is integrated, the IDE default encoding for .properties files need to be updated to UTF-8. (IntelliJ IDEA locks .properties files as ISO-8859-1 unless manually changed). > > Justin Lu has updated the pull request incrementally with one additional commit since the last revision: > > Replace InputStreamReader with BufferedReader Continuing the discussion that was started at a predecessor to this PR, https://github.com/openjdk/jdk/pull/12726#discussion_r2035582242. At least one incorrect conversion has been found in this PR. It might be worthwhile to double- and triple-check all the other conversions as well. As part of https://bugs.openjdk.org/browse/JDK-8301971 I am trying various ways of detecting files without UTF-8 encoding, but it is still a bit of hit and miss, since there are no surefire way of telling which encoding a file has, only heuristics. So finding and following up potential sources of error is important. ------------- PR Comment: https://git.openjdk.org/jdk/pull/15694#issuecomment-2791991649 PR Comment: https://git.openjdk.org/jdk/pull/15694#issuecomment-2791997157 From eirbjo at openjdk.org Thu Apr 10 08:48:37 2025 From: eirbjo at openjdk.org (Eirik =?UTF-8?B?QmrDuHJzbsO4cw==?=) Date: Thu, 10 Apr 2025 08:48:37 GMT Subject: RFR: 8301991: Convert l10n properties resource bundles to UTF-8 native [v2] In-Reply-To: References: Message-ID: <0q0gTsqIsYtmzAfNYbBXksUXKdZh2uzQ9yvSETKAP88=.137372e6-d63e-4539-b196-4bd9ef1ddd16@github.com> On Wed, 13 Sep 2023 17:38:28 GMT, Justin Lu wrote: >> JDK .properties files still use ISO-8859-1 encoding with escape sequences. It would improve readability to see the native characters instead of escape sequences (especially for the L10n process). The majority of files changed are localized resource files. >> >> This change converts the Unicode escape sequences in the JDK .properties files (both in src and test) to UTF-8 native characters. Additionally, the build logic is adjusted to read the .properties files in UTF-8 while generating the ListResourceBundle files. >> >> The only escape sequence not converted was `\u0020` as this is used to denote intentional trailing white space. (E.g. `key=This is the value:\u0020`) >> >> The conversion was done using native2ascii with options `-reverse -encoding UTF-8`. >> >> If this PR is integrated, the IDE default encoding for .properties files need to be updated to UTF-8. (IntelliJ IDEA locks .properties files as ISO-8859-1 unless manually changed). > > Justin Lu has updated the pull request incrementally with one additional commit since the last revision: > > Replace InputStreamReader with BufferedReader FWIW, I checked out the revision of the commit previous to this change and found the following: % git checkout b55e418a077791b39992042411cde97f68dc39fe^ % find src -name "*.properties" | xargs file | grep -v ASCII src/java.xml/share/classes/com/sun/org/apache/xml/internal/serializer/Encodings.properties: ISO-8859 text src/java.xml.crypto/share/classes/com/sun/org/apache/xml/internal/security/resource/xmlsecurity_de.properties: Unicode text, UTF-8 text, with very long lines (322) Which indicates that that this is the only non-ASCII, non-UTF-8 property file. So we may be lucky. ------------- PR Comment: https://git.openjdk.org/jdk/pull/15694#issuecomment-2792014164 From ihse at openjdk.org Thu Apr 10 09:45:56 2025 From: ihse at openjdk.org (Magnus Ihse Bursie) Date: Thu, 10 Apr 2025 09:45:56 GMT Subject: RFR: 8301991: Convert l10n properties resource bundles to UTF-8 native [v2] In-Reply-To: References: Message-ID: On Wed, 13 Sep 2023 17:38:28 GMT, Justin Lu wrote: >> JDK .properties files still use ISO-8859-1 encoding with escape sequences. It would improve readability to see the native characters instead of escape sequences (especially for the L10n process). The majority of files changed are localized resource files. >> >> This change converts the Unicode escape sequences in the JDK .properties files (both in src and test) to UTF-8 native characters. Additionally, the build logic is adjusted to read the .properties files in UTF-8 while generating the ListResourceBundle files. >> >> The only escape sequence not converted was `\u0020` as this is used to denote intentional trailing white space. (E.g. `key=This is the value:\u0020`) >> >> The conversion was done using native2ascii with options `-reverse -encoding UTF-8`. >> >> If this PR is integrated, the IDE default encoding for .properties files need to be updated to UTF-8. (IntelliJ IDEA locks .properties files as ISO-8859-1 unless manually changed). > > Justin Lu has updated the pull request incrementally with one additional commit since the last revision: > > Replace InputStreamReader with BufferedReader Thanks for checking! ------------- PR Comment: https://git.openjdk.org/jdk/pull/15694#issuecomment-2792170460 From ihse at openjdk.org Thu Apr 10 10:18:13 2025 From: ihse at openjdk.org (Magnus Ihse Bursie) Date: Thu, 10 Apr 2025 10:18:13 GMT Subject: RFR: 8354266: Fix non-UTF-8 text encoding In-Reply-To: References: Message-ID: On Thu, 10 Apr 2025 10:10:49 GMT, Magnus Ihse Bursie wrote: > I have checked the entire code base for incorrect encodings, but luckily enough these were the only remaining problems I found. > > BOM (byte-order mark) is a method used for distinguishing big and little endian UTF-16 encodings. There is a special UTF-8 BOM, but it is discouraged. In the words of the Unicode Consortium: "Use of a BOM is neither required nor recommended for UTF-8". We have UTF-8 BOMs in a handful of files. These should be removed. > > Methodology used: > > I have run four different tools for using different heuristics for determining the encoding of a file: > * chardetect (the original, slow-as-molasses Perl program, which also had the worst performing heuristics of all; I'll rate it 1/5) > * uchardet (a modern version by freedesktop, used by e.g. Firefox) > * enca (targeted towards obscure code pages) > * libmagic / `file --mime-encoding` > > They all agreed on pure ASCII files (which is easy to check), and these I just ignored/accepted as good. The handling of pure binary files differed between the tools; most detected them as binary but some suggested arcane encodings for specific (often small) binary files. To keep my sanity, I decided that files ending in any of these extensions were binary, and I did not check them further: > * `gif|png|ico|jpg|icns|tiff|wav|woff|woff2|jar|ttf|bmp|class|crt|jks|keystore|ks|db` > > From the remaining list of non-ascii, non-known-binary files I selected two overlapping and exhaustive subsets: > * All files where at least one tool claimed it to be UTF-8 > * All files where at least one tool claimed it to be *not* UTF-8 > > For the first subset, I checked every non-ASCII character (using `C_ALL=C ggrep -H --color='auto' -P -n "[^\x00-\x7F]" $(cat names-of-files-to-check.txt)`, and visually examining the results). At this stage, I found several files where unicode were unnecessarily used instead of pure ASCII, and I treated those files separately. Other from that, my inspection revealed no obvious encoding errors. This list comprised of about 2000 files, so I did not spend too much time on each file. The assumption, after all, was that these files are okay. > > For the second subset, I checked every non-ASCII character (using the same method). This list was about 300+ files. Most of them were okay far as I can tell; I can confirm encodings for European languages 100%, but JCK encodings could theoretically be wrong; they looked sane but I cannot read and confirm fully. Several were in fact pure binary files, but without any telling exten... src/hotspot/cpu/x86/macroAssembler_x86_sha.cpp line 497: > 495: /* > 496: The algorithm below is based on Intel publication: > 497: "Fast SHA-256 Implementations on Intel(R) Architecture Processors" by Jim Guilford, Kirk Yap and Vinodh Gopal. Note: There is of course a unicode `?` symbol, which is what it was originally before it was botched here, but I found no reason to keep this, and in the spirit of JDK-8354213, I thought it better to use pure ASCII here. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/24566#discussion_r2037012318 From ihse at openjdk.org Thu Apr 10 10:18:13 2025 From: ihse at openjdk.org (Magnus Ihse Bursie) Date: Thu, 10 Apr 2025 10:18:13 GMT Subject: RFR: 8354266: Fix non-UTF-8 text encoding Message-ID: I have checked the entire code base for incorrect encodings, but luckily enough these were the only remaining problems I found. BOM (byte-order mark) is a method used for distinguishing big and little endian UTF-16 encodings. There is a special UTF-8 BOM, but it is discouraged. In the words of the Unicode Consortium: "Use of a BOM is neither required nor recommended for UTF-8". We have UTF-8 BOMs in a handful of files. These should be removed. Methodology used: I have run four different tools for using different heuristics for determining the encoding of a file: * chardetect (the original, slow-as-molasses Perl program, which also had the worst performing heuristics of all; I'll rate it 1/5) * uchardet (a modern version by freedesktop, used by e.g. Firefox) * enca (targeted towards obscure code pages) * libmagic / `file --mime-encoding` They all agreed on pure ASCII files (which is easy to check), and these I just ignored/accepted as good. The handling of pure binary files differed between the tools; most detected them as binary but some suggested arcane encodings for specific (often small) binary files. To keep my sanity, I decided that files ending in any of these extensions were binary, and I did not check them further: * `gif|png|ico|jpg|icns|tiff|wav|woff|woff2|jar|ttf|bmp|class|crt|jks|keystore|ks|db` >From the remaining list of non-ascii, non-known-binary files I selected two overlapping and exhaustive subsets: * All files where at least one tool claimed it to be UTF-8 * All files where at least one tool claimed it to be *not* UTF-8 For the first subset, I checked every non-ASCII character (using `C_ALL=C ggrep -H --color='auto' -P -n "[^\x00-\x7F]" $(cat names-of-files-to-check.txt)`, and visually examining the results). At this stage, I found several files where unicode were unnecessarily used instead of pure ASCII, and I treated those files separately. Other from that, my inspection revealed no obvious encoding errors. This list comprised of about 2000 files, so I did not spend too much time on each file. The assumption, after all, was that these files are okay. For the second subset, I checked every non-ASCII character (using the same method). This list was about 300+ files. Most of them were okay far as I can tell; I can confirm encodings for European languages 100%, but JCK encodings could theoretically be wrong; they looked sane but I cannot read and confirm fully. Several were in fact pure binary files, but without any telling extensions (most of these are in tests). The BOM files were only pointed out by chardetect; I did run an additional search for UTF-8 BOM markers over the code base to make sure I did not miss any others (since chardetect apart from this did a not-so-perfect job). The files included in this PR are what I actually found that had encoding errors or issues. ------------- Commit messages: - Remove UTF-8 BOM (byte-order mark) which is discouraged by the Unicode Consortium - Fix incorrect encoding Changes: https://git.openjdk.org/jdk/pull/24566/files Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=24566&range=00 Issue: https://bugs.openjdk.org/browse/JDK-8354266 Stats: 32 lines in 13 files changed: 0 ins; 2 del; 30 mod Patch: https://git.openjdk.org/jdk/pull/24566.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/24566/head:pull/24566 PR: https://git.openjdk.org/jdk/pull/24566 From ihse at openjdk.org Thu Apr 10 10:23:56 2025 From: ihse at openjdk.org (Magnus Ihse Bursie) Date: Thu, 10 Apr 2025 10:23:56 GMT Subject: RFR: 8354273: Restore even more pointless unicode characters to ASCII Message-ID: As a follow-up to [JDK-8354213](https://bugs.openjdk.org/browse/JDK-8354213), I found some additional places where unicode characters are unnecessarily used instead of pure ASCII. ------------- Commit messages: - 8354273: Restore even more pointless unicode characters to ASCII Changes: https://git.openjdk.org/jdk/pull/24567/files Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=24567&range=00 Issue: https://bugs.openjdk.org/browse/JDK-8354273 Stats: 9 lines in 6 files changed: 0 ins; 1 del; 8 mod Patch: https://git.openjdk.org/jdk/pull/24567.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/24567/head:pull/24567 PR: https://git.openjdk.org/jdk/pull/24567 From ihse at openjdk.org Thu Apr 10 10:36:31 2025 From: ihse at openjdk.org (Magnus Ihse Bursie) Date: Thu, 10 Apr 2025 10:36:31 GMT Subject: RFR: 8354273: Restore even more pointless unicode characters to ASCII [v2] In-Reply-To: References: Message-ID: > As a follow-up to [JDK-8354213](https://bugs.openjdk.org/browse/JDK-8354213), I found some additional places where unicode characters are unnecessarily used instead of pure ASCII. Magnus Ihse Bursie has updated the pull request incrementally with one additional commit since the last revision: Remove incorrectly copied "?anchor" ------------- Changes: - all: https://git.openjdk.org/jdk/pull/24567/files - new: https://git.openjdk.org/jdk/pull/24567/files/d9527eb9..876708c2 Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=24567&range=01 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=24567&range=00-01 Stats: 2 lines in 2 files changed: 0 ins; 0 del; 2 mod Patch: https://git.openjdk.org/jdk/pull/24567.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/24567/head:pull/24567 PR: https://git.openjdk.org/jdk/pull/24567 From ihse at openjdk.org Thu Apr 10 10:39:32 2025 From: ihse at openjdk.org (Magnus Ihse Bursie) Date: Thu, 10 Apr 2025 10:39:32 GMT Subject: RFR: 8354273: Restore even more pointless unicode characters to ASCII [v2] In-Reply-To: References: Message-ID: On Thu, 10 Apr 2025 10:36:31 GMT, Magnus Ihse Bursie wrote: >> As a follow-up to [JDK-8354213](https://bugs.openjdk.org/browse/JDK-8354213), I found some additional places where unicode characters are unnecessarily used instead of pure ASCII. > > Magnus Ihse Bursie has updated the pull request incrementally with one additional commit since the last revision: > > Remove incorrectly copied "?anchor" src/java.xml/share/legal/xmlxsd.md line 29: > 27: https://www.w3.org/copyright/software-license-2023/" > 28: > 29: Disclaimers ?anchor This is an incorrectly copied piece of html; compare how the very same license is handled in e.g. `src/java.xml/share/legal/schema10part1.md`. The ? is the non-ascii character that triggered my detection of this, but the entire "anchor" string is incorrect here. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/24567#discussion_r2037047696 From rgiulietti at openjdk.org Thu Apr 10 11:49:30 2025 From: rgiulietti at openjdk.org (Raffaello Giulietti) Date: Thu, 10 Apr 2025 11:49:30 GMT Subject: RFR: 8354266: Fix non-UTF-8 text encoding In-Reply-To: References: Message-ID: On Thu, 10 Apr 2025 10:14:40 GMT, Magnus Ihse Bursie wrote: >> I have checked the entire code base for incorrect encodings, but luckily enough these were the only remaining problems I found. >> >> BOM (byte-order mark) is a method used for distinguishing big and little endian UTF-16 encodings. There is a special UTF-8 BOM, but it is discouraged. In the words of the Unicode Consortium: "Use of a BOM is neither required nor recommended for UTF-8". We have UTF-8 BOMs in a handful of files. These should be removed. >> >> Methodology used: >> >> I have run four different tools for using different heuristics for determining the encoding of a file: >> * chardetect (the original, slow-as-molasses Perl program, which also had the worst performing heuristics of all; I'll rate it 1/5) >> * uchardet (a modern version by freedesktop, used by e.g. Firefox) >> * enca (targeted towards obscure code pages) >> * libmagic / `file --mime-encoding` >> >> They all agreed on pure ASCII files (which is easy to check), and these I just ignored/accepted as good. The handling of pure binary files differed between the tools; most detected them as binary but some suggested arcane encodings for specific (often small) binary files. To keep my sanity, I decided that files ending in any of these extensions were binary, and I did not check them further: >> * `gif|png|ico|jpg|icns|tiff|wav|woff|woff2|jar|ttf|bmp|class|crt|jks|keystore|ks|db` >> >> From the remaining list of non-ascii, non-known-binary files I selected two overlapping and exhaustive subsets: >> * All files where at least one tool claimed it to be UTF-8 >> * All files where at least one tool claimed it to be *not* UTF-8 >> >> For the first subset, I checked every non-ASCII character (using `C_ALL=C ggrep -H --color='auto' -P -n "[^\x00-\x7F]" $(cat names-of-files-to-check.txt)`, and visually examining the results). At this stage, I found several files where unicode were unnecessarily used instead of pure ASCII, and I treated those files separately. Other from that, my inspection revealed no obvious encoding errors. This list comprised of about 2000 files, so I did not spend too much time on each file. The assumption, after all, was that these files are okay. >> >> For the second subset, I checked every non-ASCII character (using the same method). This list was about 300+ files. Most of them were okay far as I can tell; I can confirm encodings for European languages 100%, but JCK encodings could theoretically be wrong; they looked sane but I cannot read and confirm fully. Several were in fact pure... > > src/hotspot/cpu/x86/macroAssembler_x86_sha.cpp line 497: > >> 495: /* >> 496: The algorithm below is based on Intel publication: >> 497: "Fast SHA-256 Implementations on Intel(R) Architecture Processors" by Jim Guilford, Kirk Yap and Vinodh Gopal. > > Note: There is of course a unicode `?` symbol, which is what it was originally before it was botched here, but I found no reason to keep this, and in the spirit of JDK-8354213, I thought it better to use pure ASCII here. I guess the difference at L.1 in the various files is just the BOM? ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/24566#discussion_r2037161789 From duke at openjdk.org Thu Apr 10 11:50:32 2025 From: duke at openjdk.org (Hendrik Schick) Date: Thu, 10 Apr 2025 11:50:32 GMT Subject: RFR: 8352682: Opensource JComponent tests In-Reply-To: References: Message-ID: On Thu, 10 Apr 2025 06:36:49 GMT, Prasanta Sadhukhan wrote: > Few JComponent tests are opensourced test/jdk/javax/swing/JComponent/bug4247610.java line 109: > 107: robot.mouseRelease(InputEvent.BUTTON1_DOWN_MASK); > 108: if (failed()) { > 109: throw new RuntimeException("Failed: unnesessary repaint occured"); Suggestion: throw new RuntimeException("Failed: unnecessary repaint occured"); ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/24562#discussion_r2037163121 From duke at openjdk.org Thu Apr 10 11:57:27 2025 From: duke at openjdk.org (Hendrik Schick) Date: Thu, 10 Apr 2025 11:57:27 GMT Subject: RFR: 8352682: Opensource JComponent tests In-Reply-To: References: Message-ID: <4XrfI07g414hh3IgOdwoo86fCBNyDdEVZY0Y9fg2PeU=.d2a6f588-82ed-49c3-bd1f-7222bbbdda6d@github.com> On Thu, 10 Apr 2025 06:36:49 GMT, Prasanta Sadhukhan wrote: > Few JComponent tests are opensourced test/jdk/javax/swing/JComponent/bug4247610.java line 86: > 84: > 85: damager.addActionListener(new ActionListener() { > 86: public void actionPerformed(ActionEvent event) { use lambda syntax for this functional interface? ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/24562#discussion_r2037174556 From psadhukhan at openjdk.org Thu Apr 10 12:32:02 2025 From: psadhukhan at openjdk.org (Prasanta Sadhukhan) Date: Thu, 10 Apr 2025 12:32:02 GMT Subject: RFR: 8352682: Opensource JComponent tests [v2] In-Reply-To: References: Message-ID: > Few JComponent tests are opensourced Prasanta Sadhukhan has updated the pull request incrementally with one additional commit since the last revision: Use lambda ------------- Changes: - all: https://git.openjdk.org/jdk/pull/24562/files - new: https://git.openjdk.org/jdk/pull/24562/files/24fd7d11..518da8f3 Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=24562&range=01 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=24562&range=00-01 Stats: 9 lines in 1 file changed: 0 ins; 4 del; 5 mod Patch: https://git.openjdk.org/jdk/pull/24562.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/24562/head:pull/24562 PR: https://git.openjdk.org/jdk/pull/24562 From ihse at openjdk.org Thu Apr 10 13:17:24 2025 From: ihse at openjdk.org (Magnus Ihse Bursie) Date: Thu, 10 Apr 2025 13:17:24 GMT Subject: RFR: 8354266: Fix non-UTF-8 text encoding In-Reply-To: References: Message-ID: On Thu, 10 Apr 2025 11:46:45 GMT, Raffaello Giulietti wrote: > I guess the difference at L.1 in the various files is just the BOM? Yes. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/24566#discussion_r2037357899 From rgiulietti at openjdk.org Thu Apr 10 13:56:42 2025 From: rgiulietti at openjdk.org (Raffaello Giulietti) Date: Thu, 10 Apr 2025 13:56:42 GMT Subject: RFR: 8354266: Fix non-UTF-8 text encoding In-Reply-To: References: Message-ID: On Thu, 10 Apr 2025 10:10:49 GMT, Magnus Ihse Bursie wrote: > I have checked the entire code base for incorrect encodings, but luckily enough these were the only remaining problems I found. > > BOM (byte-order mark) is a method used for distinguishing big and little endian UTF-16 encodings. There is a special UTF-8 BOM, but it is discouraged. In the words of the Unicode Consortium: "Use of a BOM is neither required nor recommended for UTF-8". We have UTF-8 BOMs in a handful of files. These should be removed. > > Methodology used: > > I have run four different tools for using different heuristics for determining the encoding of a file: > * chardetect (the original, slow-as-molasses Perl program, which also had the worst performing heuristics of all; I'll rate it 1/5) > * uchardet (a modern version by freedesktop, used by e.g. Firefox) > * enca (targeted towards obscure code pages) > * libmagic / `file --mime-encoding` > > They all agreed on pure ASCII files (which is easy to check), and these I just ignored/accepted as good. The handling of pure binary files differed between the tools; most detected them as binary but some suggested arcane encodings for specific (often small) binary files. To keep my sanity, I decided that files ending in any of these extensions were binary, and I did not check them further: > * `gif|png|ico|jpg|icns|tiff|wav|woff|woff2|jar|ttf|bmp|class|crt|jks|keystore|ks|db` > > From the remaining list of non-ascii, non-known-binary files I selected two overlapping and exhaustive subsets: > * All files where at least one tool claimed it to be UTF-8 > * All files where at least one tool claimed it to be *not* UTF-8 > > For the first subset, I checked every non-ASCII character (using `C_ALL=C ggrep -H --color='auto' -P -n "[^\x00-\x7F]" $(cat names-of-files-to-check.txt)`, and visually examining the results). At this stage, I found several files where unicode were unnecessarily used instead of pure ASCII, and I treated those files separately. Other from that, my inspection revealed no obvious encoding errors. This list comprised of about 2000 files, so I did not spend too much time on each file. The assumption, after all, was that these files are okay. > > For the second subset, I checked every non-ASCII character (using the same method). This list was about 300+ files. Most of them were okay far as I can tell; I can confirm encodings for European languages 100%, but JCK encodings could theoretically be wrong; they looked sane but I cannot read and confirm fully. Several were in fact pure binary files, but without any telling exten... I only checked these 13 files to be UTF-8 encoded and without BOM. ------------- Marked as reviewed by rgiulietti (Reviewer). PR Review: https://git.openjdk.org/jdk/pull/24566#pullrequestreview-2756936848 From aivanov at openjdk.org Thu Apr 10 14:17:45 2025 From: aivanov at openjdk.org (Alexey Ivanov) Date: Thu, 10 Apr 2025 14:17:45 GMT Subject: RFR: 8351110: ImageIO.write for JPEG can write corrupt JPEG for certain thumbnail dimensions [v10] In-Reply-To: References: Message-ID: On Wed, 9 Apr 2025 23:31:02 GMT, Jeremy Wood wrote: >> JPEG segments can only be 65535-bytes long. (The marker length is expressed as 2 bytes.) The problem in this ticket is that we were writing more than 65535 bytes to a segment, which later caused parsing errors when we tried to read the file back. >> >> This includes 2 changes: >> >> 1. We now clip the thumbnail width/height to fit within the available marker. We were already constraining the width & height to a max of 255. (Because the width & height are expressed as 1 byte.) So this new clipping is similar to something we were already doing, and we issue the same WARNING_THUMB_CLIPPED warning to the writer. (Does this require a CSR?) >> >> 2. This adds a bounds check to `write2bytes`. IMO the bigger problem in this ticket was the `ImageIO.write(..)` caller thought they ended up with a valid JPEG. (We were violating the "do no harm / lose no data" doctrine.) Now if something like this ever comes up again: writing will fail with an IIOException. Technically you can argue this change is unnecessary because the new clipping avoids this error condition, but IMO including this safety net is an overall good thing to keep. If anyone disagrees I'm OK with removing it. >> >> Separately: >> I included (and reversed) a commit in this branch that provides an alternate solution. That commit anticipates the overflow problem and switches to a JPEG-encoded thumbnail. From an end user perspective this "just works": they get a (slightly lossly) thumbnail of the original dimensions. But I assume it would be more controversial compared to the clipping approach, since the clipping approach has a strong precedent in this codebase. > > Jeremy Wood has updated the pull request incrementally with one additional commit since the last revision: > > Update test/jdk/javax/imageio/plugins/jpeg/WriteJPEGThumbnailTest.java > > Co-authored-by: Alexey Ivanov Marked as reviewed by aivanov (Reviewer). ------------- PR Review: https://git.openjdk.org/jdk/pull/23920#pullrequestreview-2757023905 From azvegint at openjdk.org Thu Apr 10 15:23:40 2025 From: azvegint at openjdk.org (Alexander Zvegintsev) Date: Thu, 10 Apr 2025 15:23:40 GMT Subject: Integrated: 8353586: Open source several toolkit tests In-Reply-To: <2xbRaqpi62yNHGl8xeKAZE4X5PSWnCtm7Zz1-1orEOY=.8e0c2435-c3a6-473e-a06f-2deb5f21f1be@github.com> References: <2xbRaqpi62yNHGl8xeKAZE4X5PSWnCtm7Zz1-1orEOY=.8e0c2435-c3a6-473e-a06f-2deb5f21f1be@github.com> Message-ID: On Tue, 8 Apr 2025 14:40:01 GMT, Alexander Zvegintsev wrote: > A couple of tests are open sourced. This pull request has now been integrated. Changeset: 2ba80d24 Author: Alexander Zvegintsev URL: https://git.openjdk.org/jdk/commit/2ba80d2403f749a7d8d4e64139b796737bbb62bf Stats: 400 lines in 2 files changed: 400 ins; 0 del; 0 mod 8353586: Open source several toolkit tests Reviewed-by: dnguyen, psadhukhan ------------- PR: https://git.openjdk.org/jdk/pull/24513 From aivanov at openjdk.org Thu Apr 10 16:39:42 2025 From: aivanov at openjdk.org (Alexey Ivanov) Date: Thu, 10 Apr 2025 16:39:42 GMT Subject: RFR: JDK-8346465 : Add a check in setData() to restrict the update of Built-In ICC_Profiles [v24] In-Reply-To: References: Message-ID: On Thu, 10 Apr 2025 04:15:31 GMT, Harshitha Onkar wrote: >> Built-in Profiles are singleton objects and if the user happens to modify this shared profile object via setData() then the modified version of the profile is returned each time the same built-in profile is requested via getInstance(). >> >> It is good to protect Built-in profiles from such direct modification by adding BuiltIn profile check in `setData()` such that **only copies** of Built-In profiles are allowed to be updated. >> >> With the proposed fix, if Built-In profile is updated using `.setData()` it throws _**IAE - "BuiltIn profile cannot be modified"**_ >> >> There are no restrictions on creating copies of BuiltIn profile and then modifying it, but what is being restricted with this fix is - the direct modification of the shared BuiltIn profile instance. >> >> Applications which need a modified version of the ICC Profile should instead do the following: >> >> >> byte[] profileData = ICC_Profile.getData() // get the byte array representation of BuiltIn- profile >> ICCProfile newProfile = ICC_Profile.getInstance(profileData) // create a new profile >> newProfile.setData() // to modify and customize the profile >> >> >> Following existing tests are modified to update a copy of Built-In profile. >> >> - java/awt/color/ICC_Profile/SetHeaderInfo.java >> - java/awt/color/ICC_ProfileSetNullDataTest.java >> - sun/java2d/cmm/ProfileOp/SetDataTest.java > > Harshitha Onkar 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 26 additional commits since the last revision: > > - Merge branch 'master' into BuiltInCheck > - added javadoc to testprofile > - single case type > - added test cases to read .icc, updated test code > - serialization test case changes > - Merge branch 'master' into BuiltInCheck > - updated test to check for all builtIn profiles, serial-deserialization > - redudant stmt removed > - modifier order changed, added comment to BuiltInProfile > - review changes > - ... and 16 more: https://git.openjdk.org/jdk/compare/55b4ca24...b55bebf2 Looks good to me, yet there are a few small typos, fixes? src/java.desktop/share/classes/java/awt/color/ICC_Profile.java line 113: > 111: /** > 112: * Set to {@code true} for {@code BuiltInProfile}, {@code false} otherwise. > 113: * This check is used in {@link #setData(int, byte[])} to prevent modifying Suggestion: * This flag is used in {@link #setData(int, byte[])} to prevent modifying src/java.desktop/share/classes/java/awt/color/ICC_Profile.java line 126: > 124: /* > 125: * ProfileDeferralInfo is used for only built-in profile creation and > 126: * all built-in profiles should be constructed using it. Suggestion: * ProfileDeferralInfo is used for built-in profile creation only, and * all built-in profiles should be constructed using it. src/java.desktop/share/classes/java/awt/color/ICC_Profile.java line 783: > 781: *

> 782: * Note: {@code ProfileDeferralInfo} is used for only built-in profile > 783: * creation and all built-in profiles should be constructed using it. Suggestion: * Note: {@code ProfileDeferralInfo} is used for built-in profile * creation only, and all built-in profiles should be constructed using it. test/jdk/java/awt/color/ICC_Profile/BuiltInProfileCheck/BuiltInProfileCheck.java line 154: > 152: // Try updating a built-in profile, IAE is expected > 153: testProfile.setData(HEADER_TAG, headerData); > 154: throw new RuntimeException("Test Failed! IAE NOT thrown for profile" Suggestion: throw new RuntimeException("Test Failed! IAE NOT thrown for profile " test/jdk/java/awt/color/ICC_ProfileSetNullDataTest.java line 48: > 46: try { > 47: profile.setData(ICC_Profile.icSigCmykData, null); > 48: throw new RuntimeException("IAE expected, but not thrown for" Suggestion: throw new RuntimeException("IAE expected, but not thrown for " ------------- Marked as reviewed by aivanov (Reviewer). PR Review: https://git.openjdk.org/jdk/pull/23606#pullrequestreview-2757457605 PR Review Comment: https://git.openjdk.org/jdk/pull/23606#discussion_r2037793357 PR Review Comment: https://git.openjdk.org/jdk/pull/23606#discussion_r2037796650 PR Review Comment: https://git.openjdk.org/jdk/pull/23606#discussion_r2037797607 PR Review Comment: https://git.openjdk.org/jdk/pull/23606#discussion_r2037823276 PR Review Comment: https://git.openjdk.org/jdk/pull/23606#discussion_r2037822231 From azvegint at openjdk.org Thu Apr 10 16:40:59 2025 From: azvegint at openjdk.org (Alexander Zvegintsev) Date: Thu, 10 Apr 2025 16:40:59 GMT Subject: RFR: 8354317: [XWayland] Problem list two tests crashing XWayland server Message-ID: Problem list two tests crashing XWayland server Corresponding issue [JDK-8354097](https://bugs.openjdk.org/browse/JDK-8354097) ------------- Commit messages: - 8354317: [XWayland] Problem list two tests crashing XWayland server Changes: https://git.openjdk.org/jdk/pull/24582/files Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=24582&range=00 Issue: https://bugs.openjdk.org/browse/JDK-8354317 Stats: 2 lines in 1 file changed: 2 ins; 0 del; 0 mod Patch: https://git.openjdk.org/jdk/pull/24582.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/24582/head:pull/24582 PR: https://git.openjdk.org/jdk/pull/24582 From aivanov at openjdk.org Thu Apr 10 17:02:48 2025 From: aivanov at openjdk.org (Alexey Ivanov) Date: Thu, 10 Apr 2025 17:02:48 GMT Subject: RFR: JDK-8346465 : Add a check in setData() to restrict the update of Built-In ICC_Profiles [v24] In-Reply-To: References: Message-ID: On Thu, 10 Apr 2025 04:15:31 GMT, Harshitha Onkar wrote: >> Built-in Profiles are singleton objects and if the user happens to modify this shared profile object via setData() then the modified version of the profile is returned each time the same built-in profile is requested via getInstance(). >> >> It is good to protect Built-in profiles from such direct modification by adding BuiltIn profile check in `setData()` such that **only copies** of Built-In profiles are allowed to be updated. >> >> With the proposed fix, if Built-In profile is updated using `.setData()` it throws _**IAE - "BuiltIn profile cannot be modified"**_ >> >> There are no restrictions on creating copies of BuiltIn profile and then modifying it, but what is being restricted with this fix is - the direct modification of the shared BuiltIn profile instance. >> >> Applications which need a modified version of the ICC Profile should instead do the following: >> >> >> byte[] profileData = ICC_Profile.getData() // get the byte array representation of BuiltIn- profile >> ICCProfile newProfile = ICC_Profile.getInstance(profileData) // create a new profile >> newProfile.setData() // to modify and customize the profile >> >> >> Following existing tests are modified to update a copy of Built-In profile. >> >> - java/awt/color/ICC_Profile/SetHeaderInfo.java >> - java/awt/color/ICC_ProfileSetNullDataTest.java >> - sun/java2d/cmm/ProfileOp/SetDataTest.java > > Harshitha Onkar 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 26 additional commits since the last revision: > > - Merge branch 'master' into BuiltInCheck > - added javadoc to testprofile > - single case type > - added test cases to read .icc, updated test code > - serialization test case changes > - Merge branch 'master' into BuiltInCheck > - updated test to check for all builtIn profiles, serial-deserialization > - redudant stmt removed > - modifier order changed, added comment to BuiltInProfile > - review changes > - ... and 16 more: https://git.openjdk.org/jdk/compare/b62ca1df...b55bebf2 test/jdk/java/awt/color/ICC_Profile/BuiltInProfileCheck/BuiltInProfileCheck.java line 169: > 167: } > 168: } > 169: Suggestion: } A file should end in a single `\n` characters; there's no need to have two or more. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/23606#discussion_r2037880619 From honkar at openjdk.org Thu Apr 10 17:08:09 2025 From: honkar at openjdk.org (Harshitha Onkar) Date: Thu, 10 Apr 2025 17:08:09 GMT Subject: RFR: JDK-8346465 : Add a check in setData() to restrict the update of Built-In ICC_Profiles [v25] In-Reply-To: References: Message-ID: <-GqIVB2jMkgU9v1WxU_CSSwq1D13bl48IfYKQWCnwtU=.d8b7ef08-3156-4697-9f7b-c9400cea109e@github.com> > Built-in Profiles are singleton objects and if the user happens to modify this shared profile object via setData() then the modified version of the profile is returned each time the same built-in profile is requested via getInstance(). > > It is good to protect Built-in profiles from such direct modification by adding BuiltIn profile check in `setData()` such that **only copies** of Built-In profiles are allowed to be updated. > > With the proposed fix, if Built-In profile is updated using `.setData()` it throws _**IAE - "BuiltIn profile cannot be modified"**_ > > There are no restrictions on creating copies of BuiltIn profile and then modifying it, but what is being restricted with this fix is - the direct modification of the shared BuiltIn profile instance. > > Applications which need a modified version of the ICC Profile should instead do the following: > > > byte[] profileData = ICC_Profile.getData() // get the byte array representation of BuiltIn- profile > ICCProfile newProfile = ICC_Profile.getInstance(profileData) // create a new profile > newProfile.setData() // to modify and customize the profile > > > Following existing tests are modified to update a copy of Built-In profile. > > - java/awt/color/ICC_Profile/SetHeaderInfo.java > - java/awt/color/ICC_ProfileSetNullDataTest.java > - sun/java2d/cmm/ProfileOp/SetDataTest.java Harshitha Onkar has updated the pull request incrementally with one additional commit since the last revision: spacing ------------- Changes: - all: https://git.openjdk.org/jdk/pull/23606/files - new: https://git.openjdk.org/jdk/pull/23606/files/b55bebf2..6c8c105e Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=23606&range=24 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=23606&range=23-24 Stats: 7 lines in 3 files changed: 0 ins; 1 del; 6 mod Patch: https://git.openjdk.org/jdk/pull/23606.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/23606/head:pull/23606 PR: https://git.openjdk.org/jdk/pull/23606 From naoto at openjdk.org Thu Apr 10 17:12:26 2025 From: naoto at openjdk.org (Naoto Sato) Date: Thu, 10 Apr 2025 17:12:26 GMT Subject: RFR: 8354266: Fix non-UTF-8 text encoding In-Reply-To: References: Message-ID: On Thu, 10 Apr 2025 10:10:49 GMT, Magnus Ihse Bursie wrote: > I have checked the entire code base for incorrect encodings, but luckily enough these were the only remaining problems I found. > > BOM (byte-order mark) is a method used for distinguishing big and little endian UTF-16 encodings. There is a special UTF-8 BOM, but it is discouraged. In the words of the Unicode Consortium: "Use of a BOM is neither required nor recommended for UTF-8". We have UTF-8 BOMs in a handful of files. These should be removed. > > Methodology used: > > I have run four different tools for using different heuristics for determining the encoding of a file: > * chardetect (the original, slow-as-molasses Perl program, which also had the worst performing heuristics of all; I'll rate it 1/5) > * uchardet (a modern version by freedesktop, used by e.g. Firefox) > * enca (targeted towards obscure code pages) > * libmagic / `file --mime-encoding` > > They all agreed on pure ASCII files (which is easy to check), and these I just ignored/accepted as good. The handling of pure binary files differed between the tools; most detected them as binary but some suggested arcane encodings for specific (often small) binary files. To keep my sanity, I decided that files ending in any of these extensions were binary, and I did not check them further: > * `gif|png|ico|jpg|icns|tiff|wav|woff|woff2|jar|ttf|bmp|class|crt|jks|keystore|ks|db` > > From the remaining list of non-ascii, non-known-binary files I selected two overlapping and exhaustive subsets: > * All files where at least one tool claimed it to be UTF-8 > * All files where at least one tool claimed it to be *not* UTF-8 > > For the first subset, I checked every non-ASCII character (using `C_ALL=C ggrep -H --color='auto' -P -n "[^\x00-\x7F]" $(cat names-of-files-to-check.txt)`, and visually examining the results). At this stage, I found several files where unicode were unnecessarily used instead of pure ASCII, and I treated those files separately. Other from that, my inspection revealed no obvious encoding errors. This list comprised of about 2000 files, so I did not spend too much time on each file. The assumption, after all, was that these files are okay. > > For the second subset, I checked every non-ASCII character (using the same method). This list was about 300+ files. Most of them were okay far as I can tell; I can confirm encodings for European languages 100%, but JCK encodings could theoretically be wrong; they looked sane but I cannot read and confirm fully. Several were in fact pure binary files, but without any telling exten... src/java.desktop/share/legal/lcms.md line 72: > 70: Mateusz Jurczyk (Google) > 71: Paul Miller > 72: S?bastien L?on I cannot comment on capitalization here, but if we wanted to lowercase them, should they be e-grave instead of e-acute? ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/24566#discussion_r2037895884 From honkar at openjdk.org Thu Apr 10 17:12:30 2025 From: honkar at openjdk.org (Harshitha Onkar) Date: Thu, 10 Apr 2025 17:12:30 GMT Subject: RFR: JDK-8346465 : Add a check in setData() to restrict the update of Built-In ICC_Profiles [v26] In-Reply-To: References: Message-ID: > Built-in Profiles are singleton objects and if the user happens to modify this shared profile object via setData() then the modified version of the profile is returned each time the same built-in profile is requested via getInstance(). > > It is good to protect Built-in profiles from such direct modification by adding BuiltIn profile check in `setData()` such that **only copies** of Built-In profiles are allowed to be updated. > > With the proposed fix, if Built-In profile is updated using `.setData()` it throws _**IAE - "BuiltIn profile cannot be modified"**_ > > There are no restrictions on creating copies of BuiltIn profile and then modifying it, but what is being restricted with this fix is - the direct modification of the shared BuiltIn profile instance. > > Applications which need a modified version of the ICC Profile should instead do the following: > > > byte[] profileData = ICC_Profile.getData() // get the byte array representation of BuiltIn- profile > ICCProfile newProfile = ICC_Profile.getInstance(profileData) // create a new profile > newProfile.setData() // to modify and customize the profile > > > Following existing tests are modified to update a copy of Built-In profile. > > - java/awt/color/ICC_Profile/SetHeaderInfo.java > - java/awt/color/ICC_ProfileSetNullDataTest.java > - sun/java2d/cmm/ProfileOp/SetDataTest.java Harshitha Onkar has updated the pull request incrementally with one additional commit since the last revision: minor ------------- Changes: - all: https://git.openjdk.org/jdk/pull/23606/files - new: https://git.openjdk.org/jdk/pull/23606/files/6c8c105e..81917bd6 Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=23606&range=25 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=23606&range=24-25 Stats: 1 line in 1 file changed: 0 ins; 0 del; 1 mod Patch: https://git.openjdk.org/jdk/pull/23606.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/23606/head:pull/23606 PR: https://git.openjdk.org/jdk/pull/23606 From rgiulietti at openjdk.org Thu Apr 10 17:26:30 2025 From: rgiulietti at openjdk.org (Raffaello Giulietti) Date: Thu, 10 Apr 2025 17:26:30 GMT Subject: RFR: 8354266: Fix non-UTF-8 text encoding In-Reply-To: References: Message-ID: On Thu, 10 Apr 2025 17:09:27 GMT, Naoto Sato wrote: >> I have checked the entire code base for incorrect encodings, but luckily enough these were the only remaining problems I found. >> >> BOM (byte-order mark) is a method used for distinguishing big and little endian UTF-16 encodings. There is a special UTF-8 BOM, but it is discouraged. In the words of the Unicode Consortium: "Use of a BOM is neither required nor recommended for UTF-8". We have UTF-8 BOMs in a handful of files. These should be removed. >> >> Methodology used: >> >> I have run four different tools for using different heuristics for determining the encoding of a file: >> * chardetect (the original, slow-as-molasses Perl program, which also had the worst performing heuristics of all; I'll rate it 1/5) >> * uchardet (a modern version by freedesktop, used by e.g. Firefox) >> * enca (targeted towards obscure code pages) >> * libmagic / `file --mime-encoding` >> >> They all agreed on pure ASCII files (which is easy to check), and these I just ignored/accepted as good. The handling of pure binary files differed between the tools; most detected them as binary but some suggested arcane encodings for specific (often small) binary files. To keep my sanity, I decided that files ending in any of these extensions were binary, and I did not check them further: >> * `gif|png|ico|jpg|icns|tiff|wav|woff|woff2|jar|ttf|bmp|class|crt|jks|keystore|ks|db` >> >> From the remaining list of non-ascii, non-known-binary files I selected two overlapping and exhaustive subsets: >> * All files where at least one tool claimed it to be UTF-8 >> * All files where at least one tool claimed it to be *not* UTF-8 >> >> For the first subset, I checked every non-ASCII character (using `C_ALL=C ggrep -H --color='auto' -P -n "[^\x00-\x7F]" $(cat names-of-files-to-check.txt)`, and visually examining the results). At this stage, I found several files where unicode were unnecessarily used instead of pure ASCII, and I treated those files separately. Other from that, my inspection revealed no obvious encoding errors. This list comprised of about 2000 files, so I did not spend too much time on each file. The assumption, after all, was that these files are okay. >> >> For the second subset, I checked every non-ASCII character (using the same method). This list was about 300+ files. Most of them were okay far as I can tell; I can confirm encodings for European languages 100%, but JCK encodings could theoretically be wrong; they looked sane but I cannot read and confirm fully. Several were in fact pure... > > src/java.desktop/share/legal/lcms.md line 72: > >> 70: Mateusz Jurczyk (Google) >> 71: Paul Miller >> 72: S?bastien L?on > > I cannot comment on capitalization here, but if we wanted to lowercase them, should they be e-grave instead of e-acute? If this is a French name, it's e acute: ?. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/24566#discussion_r2037917708 From duke at openjdk.org Thu Apr 10 17:32:28 2025 From: duke at openjdk.org (duke) Date: Thu, 10 Apr 2025 17:32:28 GMT Subject: RFR: 8351110: ImageIO.write for JPEG can write corrupt JPEG for certain thumbnail dimensions [v10] In-Reply-To: References: Message-ID: On Wed, 9 Apr 2025 23:31:02 GMT, Jeremy Wood wrote: >> JPEG segments can only be 65535-bytes long. (The marker length is expressed as 2 bytes.) The problem in this ticket is that we were writing more than 65535 bytes to a segment, which later caused parsing errors when we tried to read the file back. >> >> This includes 2 changes: >> >> 1. We now clip the thumbnail width/height to fit within the available marker. We were already constraining the width & height to a max of 255. (Because the width & height are expressed as 1 byte.) So this new clipping is similar to something we were already doing, and we issue the same WARNING_THUMB_CLIPPED warning to the writer. (Does this require a CSR?) >> >> 2. This adds a bounds check to `write2bytes`. IMO the bigger problem in this ticket was the `ImageIO.write(..)` caller thought they ended up with a valid JPEG. (We were violating the "do no harm / lose no data" doctrine.) Now if something like this ever comes up again: writing will fail with an IIOException. Technically you can argue this change is unnecessary because the new clipping avoids this error condition, but IMO including this safety net is an overall good thing to keep. If anyone disagrees I'm OK with removing it. >> >> Separately: >> I included (and reversed) a commit in this branch that provides an alternate solution. That commit anticipates the overflow problem and switches to a JPEG-encoded thumbnail. From an end user perspective this "just works": they get a (slightly lossly) thumbnail of the original dimensions. But I assume it would be more controversial compared to the clipping approach, since the clipping approach has a strong precedent in this codebase. > > Jeremy Wood has updated the pull request incrementally with one additional commit since the last revision: > > Update test/jdk/javax/imageio/plugins/jpeg/WriteJPEGThumbnailTest.java > > Co-authored-by: Alexey Ivanov @mickleness Your change (at version 9573b82d20d4a9c20e7d317824e5040d7e90e795) is now ready to be sponsored by a Committer. ------------- PR Comment: https://git.openjdk.org/jdk/pull/23920#issuecomment-2794634154 From erikj at openjdk.org Thu Apr 10 17:37:26 2025 From: erikj at openjdk.org (Erik Joelsson) Date: Thu, 10 Apr 2025 17:37:26 GMT Subject: RFR: 8354266: Fix non-UTF-8 text encoding In-Reply-To: References: Message-ID: <4fRjwM-P0XuOWk9QjYl9zji51zLn7wwsFKlo7tJt3JM=.976560e0-39c6-4633-bc8d-279deb1ebea3@github.com> On Thu, 10 Apr 2025 10:10:49 GMT, Magnus Ihse Bursie wrote: > I have checked the entire code base for incorrect encodings, but luckily enough these were the only remaining problems I found. > > BOM (byte-order mark) is a method used for distinguishing big and little endian UTF-16 encodings. There is a special UTF-8 BOM, but it is discouraged. In the words of the Unicode Consortium: "Use of a BOM is neither required nor recommended for UTF-8". We have UTF-8 BOMs in a handful of files. These should be removed. > > Methodology used: > > I have run four different tools for using different heuristics for determining the encoding of a file: > * chardetect (the original, slow-as-molasses Perl program, which also had the worst performing heuristics of all; I'll rate it 1/5) > * uchardet (a modern version by freedesktop, used by e.g. Firefox) > * enca (targeted towards obscure code pages) > * libmagic / `file --mime-encoding` > > They all agreed on pure ASCII files (which is easy to check), and these I just ignored/accepted as good. The handling of pure binary files differed between the tools; most detected them as binary but some suggested arcane encodings for specific (often small) binary files. To keep my sanity, I decided that files ending in any of these extensions were binary, and I did not check them further: > * `gif|png|ico|jpg|icns|tiff|wav|woff|woff2|jar|ttf|bmp|class|crt|jks|keystore|ks|db` > > From the remaining list of non-ascii, non-known-binary files I selected two overlapping and exhaustive subsets: > * All files where at least one tool claimed it to be UTF-8 > * All files where at least one tool claimed it to be *not* UTF-8 > > For the first subset, I checked every non-ASCII character (using `C_ALL=C ggrep -H --color='auto' -P -n "[^\x00-\x7F]" $(cat names-of-files-to-check.txt)`, and visually examining the results). At this stage, I found several files where unicode were unnecessarily used instead of pure ASCII, and I treated those files separately. Other from that, my inspection revealed no obvious encoding errors. This list comprised of about 2000 files, so I did not spend too much time on each file. The assumption, after all, was that these files are okay. > > For the second subset, I checked every non-ASCII character (using the same method). This list was about 300+ files. Most of them were okay far as I can tell; I can confirm encodings for European languages 100%, but JCK encodings could theoretically be wrong; they looked sane but I cannot read and confirm fully. Several were in fact pure binary files, but without any telling exten... Marked as reviewed by erikj (Reviewer). ------------- PR Review: https://git.openjdk.org/jdk/pull/24566#pullrequestreview-2757703868 From naoto at openjdk.org Thu Apr 10 17:41:25 2025 From: naoto at openjdk.org (Naoto Sato) Date: Thu, 10 Apr 2025 17:41:25 GMT Subject: RFR: 8354266: Fix non-UTF-8 text encoding In-Reply-To: References: Message-ID: <7hmmP0I0kH0UiF8cV-CkNnpdQFkddrt3TYEkFltoj8U=.3bf6bcbf-3771-4628-82e0-f678f7366d8a@github.com> On Thu, 10 Apr 2025 10:10:49 GMT, Magnus Ihse Bursie wrote: > I have checked the entire code base for incorrect encodings, but luckily enough these were the only remaining problems I found. > > BOM (byte-order mark) is a method used for distinguishing big and little endian UTF-16 encodings. There is a special UTF-8 BOM, but it is discouraged. In the words of the Unicode Consortium: "Use of a BOM is neither required nor recommended for UTF-8". We have UTF-8 BOMs in a handful of files. These should be removed. > > Methodology used: > > I have run four different tools for using different heuristics for determining the encoding of a file: > * chardetect (the original, slow-as-molasses Perl program, which also had the worst performing heuristics of all; I'll rate it 1/5) > * uchardet (a modern version by freedesktop, used by e.g. Firefox) > * enca (targeted towards obscure code pages) > * libmagic / `file --mime-encoding` > > They all agreed on pure ASCII files (which is easy to check), and these I just ignored/accepted as good. The handling of pure binary files differed between the tools; most detected them as binary but some suggested arcane encodings for specific (often small) binary files. To keep my sanity, I decided that files ending in any of these extensions were binary, and I did not check them further: > * `gif|png|ico|jpg|icns|tiff|wav|woff|woff2|jar|ttf|bmp|class|crt|jks|keystore|ks|db` > > From the remaining list of non-ascii, non-known-binary files I selected two overlapping and exhaustive subsets: > * All files where at least one tool claimed it to be UTF-8 > * All files where at least one tool claimed it to be *not* UTF-8 > > For the first subset, I checked every non-ASCII character (using `C_ALL=C ggrep -H --color='auto' -P -n "[^\x00-\x7F]" $(cat names-of-files-to-check.txt)`, and visually examining the results). At this stage, I found several files where unicode were unnecessarily used instead of pure ASCII, and I treated those files separately. Other from that, my inspection revealed no obvious encoding errors. This list comprised of about 2000 files, so I did not spend too much time on each file. The assumption, after all, was that these files are okay. > > For the second subset, I checked every non-ASCII character (using the same method). This list was about 300+ files. Most of them were okay far as I can tell; I can confirm encodings for European languages 100%, but JCK encodings could theoretically be wrong; they looked sane but I cannot read and confirm fully. Several were in fact pure binary files, but without any telling exten... Marked as reviewed by naoto (Reviewer). ------------- PR Review: https://git.openjdk.org/jdk/pull/24566#pullrequestreview-2757716905 From eirbjo at openjdk.org Thu Apr 10 18:33:26 2025 From: eirbjo at openjdk.org (Eirik =?UTF-8?B?QmrDuHJzbsO4cw==?=) Date: Thu, 10 Apr 2025 18:33:26 GMT Subject: RFR: 8354266: Fix non-UTF-8 text encoding In-Reply-To: References: Message-ID: On Thu, 10 Apr 2025 17:23:37 GMT, Raffaello Giulietti wrote: > If this is a French name, it's e acute: ?. Supported by this Wikipedia page listing S.L as an LCMS developer: https://en.wikipedia.org/wiki/Little_CMS ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/24566#discussion_r2038022994 From duke at openjdk.org Thu Apr 10 18:34:38 2025 From: duke at openjdk.org (Jeremy Wood) Date: Thu, 10 Apr 2025 18:34:38 GMT Subject: Integrated: 8351110: ImageIO.write for JPEG can write corrupt JPEG for certain thumbnail dimensions In-Reply-To: References: Message-ID: On Wed, 5 Mar 2025 18:29:49 GMT, Jeremy Wood wrote: > JPEG segments can only be 65535-bytes long. (The marker length is expressed as 2 bytes.) The problem in this ticket is that we were writing more than 65535 bytes to a segment, which later caused parsing errors when we tried to read the file back. > > This includes 2 changes: > > 1. We now clip the thumbnail width/height to fit within the available marker. We were already constraining the width & height to a max of 255. (Because the width & height are expressed as 1 byte.) So this new clipping is similar to something we were already doing, and we issue the same WARNING_THUMB_CLIPPED warning to the writer. (Does this require a CSR?) > > 2. This adds a bounds check to `write2bytes`. IMO the bigger problem in this ticket was the `ImageIO.write(..)` caller thought they ended up with a valid JPEG. (We were violating the "do no harm / lose no data" doctrine.) Now if something like this ever comes up again: writing will fail with an IIOException. Technically you can argue this change is unnecessary because the new clipping avoids this error condition, but IMO including this safety net is an overall good thing to keep. If anyone disagrees I'm OK with removing it. > > Separately: > I included (and reversed) a commit in this branch that provides an alternate solution. That commit anticipates the overflow problem and switches to a JPEG-encoded thumbnail. From an end user perspective this "just works": they get a (slightly lossly) thumbnail of the original dimensions. But I assume it would be more controversial compared to the clipping approach, since the clipping approach has a strong precedent in this codebase. This pull request has now been integrated. Changeset: 60f3d607 Author: Jeremy Wood Committer: Phil Race URL: https://git.openjdk.org/jdk/commit/60f3d607412dfe289f33dd922dfc1c9ff766810f Stats: 168 lines in 3 files changed: 167 ins; 0 del; 1 mod 8351110: ImageIO.write for JPEG can write corrupt JPEG for certain thumbnail dimensions Reviewed-by: aivanov, prr ------------- PR: https://git.openjdk.org/jdk/pull/23920 From eirbjo at openjdk.org Thu Apr 10 18:45:28 2025 From: eirbjo at openjdk.org (Eirik =?UTF-8?B?QmrDuHJzbsO4cw==?=) Date: Thu, 10 Apr 2025 18:45:28 GMT Subject: RFR: 8354266: Fix non-UTF-8 text encoding In-Reply-To: References: Message-ID: On Thu, 10 Apr 2025 10:10:49 GMT, Magnus Ihse Bursie wrote: > I have checked the entire code base for incorrect encodings, but luckily enough these were the only remaining problems I found. > > BOM (byte-order mark) is a method used for distinguishing big and little endian UTF-16 encodings. There is a special UTF-8 BOM, but it is discouraged. In the words of the Unicode Consortium: "Use of a BOM is neither required nor recommended for UTF-8". We have UTF-8 BOMs in a handful of files. These should be removed. > > Methodology used: > > I have run four different tools for using different heuristics for determining the encoding of a file: > * chardetect (the original, slow-as-molasses Perl program, which also had the worst performing heuristics of all; I'll rate it 1/5) > * uchardet (a modern version by freedesktop, used by e.g. Firefox) > * enca (targeted towards obscure code pages) > * libmagic / `file --mime-encoding` > > They all agreed on pure ASCII files (which is easy to check), and these I just ignored/accepted as good. The handling of pure binary files differed between the tools; most detected them as binary but some suggested arcane encodings for specific (often small) binary files. To keep my sanity, I decided that files ending in any of these extensions were binary, and I did not check them further: > * `gif|png|ico|jpg|icns|tiff|wav|woff|woff2|jar|ttf|bmp|class|crt|jks|keystore|ks|db` > > From the remaining list of non-ascii, non-known-binary files I selected two overlapping and exhaustive subsets: > * All files where at least one tool claimed it to be UTF-8 > * All files where at least one tool claimed it to be *not* UTF-8 > > For the first subset, I checked every non-ASCII character (using `C_ALL=C ggrep -H --color='auto' -P -n "[^\x00-\x7F]" $(cat names-of-files-to-check.txt)`, and visually examining the results). At this stage, I found several files where unicode were unnecessarily used instead of pure ASCII, and I treated those files separately. Other from that, my inspection revealed no obvious encoding errors. This list comprised of about 2000 files, so I did not spend too much time on each file. The assumption, after all, was that these files are okay. > > For the second subset, I checked every non-ASCII character (using the same method). This list was about 300+ files. Most of them were okay far as I can tell; I can confirm encodings for European languages 100%, but JCK encodings could theoretically be wrong; they looked sane but I cannot read and confirm fully. Several were in fact pure binary files, but without any telling exten... src/java.desktop/share/legal/lcms.md line 103: > 101: Tim Zaman > 102: Amir Montazery and Open Source Technology Improvement Fund (ostif.org), Google, for fuzzer fundings. > 103: ``` This introduces an empty trailing line. I see you have removed trailing whitespace elsewhere. Was this intentional, to avoid the file ending with the three ticks? ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/24566#discussion_r2038071768 From jlu at openjdk.org Thu Apr 10 18:47:53 2025 From: jlu at openjdk.org (Justin Lu) Date: Thu, 10 Apr 2025 18:47:53 GMT Subject: RFR: 8301991: Convert l10n properties resource bundles to UTF-8 native [v2] In-Reply-To: <0q0gTsqIsYtmzAfNYbBXksUXKdZh2uzQ9yvSETKAP88=.137372e6-d63e-4539-b196-4bd9ef1ddd16@github.com> References: <0q0gTsqIsYtmzAfNYbBXksUXKdZh2uzQ9yvSETKAP88=.137372e6-d63e-4539-b196-4bd9ef1ddd16@github.com> Message-ID: <9aQcWun5KNgHgELVwkc3478_RtqfhRL1Cxvyn2Yl0Nw=.07ee596f-e738-4796-8d27-14621ed8860c@github.com> On Thu, 10 Apr 2025 08:44:28 GMT, Eirik Bj?rsn?s wrote: >> Justin Lu has updated the pull request incrementally with one additional commit since the last revision: >> >> Replace InputStreamReader with BufferedReader > > FWIW, I checked out the revision of the commit previous to this change and found the following: > > > % git checkout b55e418a077791b39992042411cde97f68dc39fe^ > % find src -name "*.properties" | xargs file | grep -v ASCII > src/java.xml/share/classes/com/sun/org/apache/xml/internal/serializer/Encodings.properties: > ISO-8859 text > src/java.xml.crypto/share/classes/com/sun/org/apache/xml/internal/security/resource/xmlsecurity_de.properties: > Unicode text, UTF-8 text, with very long lines (322) > > > Which indicates that that this is the only non-ASCII, non-UTF-8 property file. So we may be lucky. This conversion was performed under the assumption of ASCII set and Unicode escape sequences, which is the format we expect for the translation process for .properties files. That file should have been omitted from this change. Thank you @eirbjo and @magicus for the analysis and checking! ------------- PR Comment: https://git.openjdk.org/jdk/pull/15694#issuecomment-2794828598 From eirbjo at openjdk.org Thu Apr 10 19:09:35 2025 From: eirbjo at openjdk.org (Eirik =?UTF-8?B?QmrDuHJzbsO4cw==?=) Date: Thu, 10 Apr 2025 19:09:35 GMT Subject: RFR: 8354266: Fix non-UTF-8 text encoding In-Reply-To: References: Message-ID: On Thu, 10 Apr 2025 10:10:49 GMT, Magnus Ihse Bursie wrote: > I have checked the entire code base for incorrect encodings, but luckily enough these were the only remaining problems I found. > > BOM (byte-order mark) is a method used for distinguishing big and little endian UTF-16 encodings. There is a special UTF-8 BOM, but it is discouraged. In the words of the Unicode Consortium: "Use of a BOM is neither required nor recommended for UTF-8". We have UTF-8 BOMs in a handful of files. These should be removed. > > Methodology used: > > I have run four different tools for using different heuristics for determining the encoding of a file: > * chardetect (the original, slow-as-molasses Perl program, which also had the worst performing heuristics of all; I'll rate it 1/5) > * uchardet (a modern version by freedesktop, used by e.g. Firefox) > * enca (targeted towards obscure code pages) > * libmagic / `file --mime-encoding` > > They all agreed on pure ASCII files (which is easy to check), and these I just ignored/accepted as good. The handling of pure binary files differed between the tools; most detected them as binary but some suggested arcane encodings for specific (often small) binary files. To keep my sanity, I decided that files ending in any of these extensions were binary, and I did not check them further: > * `gif|png|ico|jpg|icns|tiff|wav|woff|woff2|jar|ttf|bmp|class|crt|jks|keystore|ks|db` > > From the remaining list of non-ascii, non-known-binary files I selected two overlapping and exhaustive subsets: > * All files where at least one tool claimed it to be UTF-8 > * All files where at least one tool claimed it to be *not* UTF-8 > > For the first subset, I checked every non-ASCII character (using `C_ALL=C ggrep -H --color='auto' -P -n "[^\x00-\x7F]" $(cat names-of-files-to-check.txt)`, and visually examining the results). At this stage, I found several files where unicode were unnecessarily used instead of pure ASCII, and I treated those files separately. Other from that, my inspection revealed no obvious encoding errors. This list comprised of about 2000 files, so I did not spend too much time on each file. The assumption, after all, was that these files are okay. > > For the second subset, I checked every non-ASCII character (using the same method). This list was about 300+ files. Most of them were okay far as I can tell; I can confirm encodings for European languages 100%, but JCK encodings could theoretically be wrong; they looked sane but I cannot read and confirm fully. Several were in fact pure binary files, but without any telling exten... LGTM. There are some whitepace releated changes in this PR which seem okay, but has no mention in either the JBS or PR description. Perhaps a short mention of this intention in either place would be good for future historians. (BTW, I enjoyed seeing separate commits for the encoding and BOM changes, makes it easier to verify each!) ------------- Marked as reviewed by eirbjo (Committer). PR Review: https://git.openjdk.org/jdk/pull/24566#pullrequestreview-2758055634 From aivanov at openjdk.org Thu Apr 10 19:49:36 2025 From: aivanov at openjdk.org (Alexey Ivanov) Date: Thu, 10 Apr 2025 19:49:36 GMT Subject: RFR: JDK-8346465 : Add a check in setData() to restrict the update of Built-In ICC_Profiles [v26] In-Reply-To: References: Message-ID: On Thu, 10 Apr 2025 17:12:30 GMT, Harshitha Onkar wrote: >> Built-in Profiles are singleton objects and if the user happens to modify this shared profile object via setData() then the modified version of the profile is returned each time the same built-in profile is requested via getInstance(). >> >> It is good to protect Built-in profiles from such direct modification by adding BuiltIn profile check in `setData()` such that **only copies** of Built-In profiles are allowed to be updated. >> >> With the proposed fix, if Built-In profile is updated using `.setData()` it throws _**IAE - "BuiltIn profile cannot be modified"**_ >> >> There are no restrictions on creating copies of BuiltIn profile and then modifying it, but what is being restricted with this fix is - the direct modification of the shared BuiltIn profile instance. >> >> Applications which need a modified version of the ICC Profile should instead do the following: >> >> >> byte[] profileData = ICC_Profile.getData() // get the byte array representation of BuiltIn- profile >> ICCProfile newProfile = ICC_Profile.getInstance(profileData) // create a new profile >> newProfile.setData() // to modify and customize the profile >> >> >> Following existing tests are modified to update a copy of Built-In profile. >> >> - java/awt/color/ICC_Profile/SetHeaderInfo.java >> - java/awt/color/ICC_ProfileSetNullDataTest.java >> - sun/java2d/cmm/ProfileOp/SetDataTest.java > > Harshitha Onkar has updated the pull request incrementally with one additional commit since the last revision: > > minor Marked as reviewed by aivanov (Reviewer). Marked as reviewed by aivanov (Reviewer). ------------- PR Review: https://git.openjdk.org/jdk/pull/23606#pullrequestreview-2757665119 PR Review: https://git.openjdk.org/jdk/pull/23606#pullrequestreview-2758193021 From honkar at openjdk.org Thu Apr 10 19:58:42 2025 From: honkar at openjdk.org (Harshitha Onkar) Date: Thu, 10 Apr 2025 19:58:42 GMT Subject: Integrated: JDK-8346465 : Add a check in setData() to restrict the update of Built-In ICC_Profiles In-Reply-To: References: Message-ID: <1NW9dRLPPKiZ7wRf-B19K3hTY4E5pTh9RzZYRE7hDC0=.c06dfc6c-7046-4b4e-b4a5-b9b2c9145ea7@github.com> On Thu, 13 Feb 2025 01:08:04 GMT, Harshitha Onkar wrote: > Built-in Profiles are singleton objects and if the user happens to modify this shared profile object via setData() then the modified version of the profile is returned each time the same built-in profile is requested via getInstance(). > > It is good to protect Built-in profiles from such direct modification by adding BuiltIn profile check in `setData()` such that **only copies** of Built-In profiles are allowed to be updated. > > With the proposed fix, if Built-In profile is updated using `.setData()` it throws _**IAE - "BuiltIn profile cannot be modified"**_ > > There are no restrictions on creating copies of BuiltIn profile and then modifying it, but what is being restricted with this fix is - the direct modification of the shared BuiltIn profile instance. > > Applications which need a modified version of the ICC Profile should instead do the following: > > > byte[] profileData = ICC_Profile.getData() // get the byte array representation of BuiltIn- profile > ICCProfile newProfile = ICC_Profile.getInstance(profileData) // create a new profile > newProfile.setData() // to modify and customize the profile > > > Following existing tests are modified to update a copy of Built-In profile. > > - java/awt/color/ICC_Profile/SetHeaderInfo.java > - java/awt/color/ICC_ProfileSetNullDataTest.java > - sun/java2d/cmm/ProfileOp/SetDataTest.java This pull request has now been integrated. Changeset: 3131dd1d Author: Harshitha Onkar URL: https://git.openjdk.org/jdk/commit/3131dd1d5cb601b84cf898fff589596c2bcabdbc Stats: 233 lines in 7 files changed: 210 ins; 5 del; 18 mod 8346465: Add a check in setData() to restrict the update of Built-In ICC_Profiles Reviewed-by: aivanov, jdv, prr, serb ------------- PR: https://git.openjdk.org/jdk/pull/23606 From ihse at openjdk.org Thu Apr 10 21:28:31 2025 From: ihse at openjdk.org (Magnus Ihse Bursie) Date: Thu, 10 Apr 2025 21:28:31 GMT Subject: RFR: 8354266: Fix non-UTF-8 text encoding In-Reply-To: References: Message-ID: On Thu, 10 Apr 2025 10:10:49 GMT, Magnus Ihse Bursie wrote: > I have checked the entire code base for incorrect encodings, but luckily enough these were the only remaining problems I found. > > BOM (byte-order mark) is a method used for distinguishing big and little endian UTF-16 encodings. There is a special UTF-8 BOM, but it is discouraged. In the words of the Unicode Consortium: "Use of a BOM is neither required nor recommended for UTF-8". We have UTF-8 BOMs in a handful of files. These should be removed. > > Methodology used: > > I have run four different tools for using different heuristics for determining the encoding of a file: > * chardetect (the original, slow-as-molasses Perl program, which also had the worst performing heuristics of all; I'll rate it 1/5) > * uchardet (a modern version by freedesktop, used by e.g. Firefox) > * enca (targeted towards obscure code pages) > * libmagic / `file --mime-encoding` > > They all agreed on pure ASCII files (which is easy to check), and these I just ignored/accepted as good. The handling of pure binary files differed between the tools; most detected them as binary but some suggested arcane encodings for specific (often small) binary files. To keep my sanity, I decided that files ending in any of these extensions were binary, and I did not check them further: > * `gif|png|ico|jpg|icns|tiff|wav|woff|woff2|jar|ttf|bmp|class|crt|jks|keystore|ks|db` > > From the remaining list of non-ascii, non-known-binary files I selected two overlapping and exhaustive subsets: > * All files where at least one tool claimed it to be UTF-8 > * All files where at least one tool claimed it to be *not* UTF-8 > > For the first subset, I checked every non-ASCII character (using `C_ALL=C ggrep -H --color='auto' -P -n "[^\x00-\x7F]" $(cat names-of-files-to-check.txt)`, and visually examining the results). At this stage, I found several files where unicode were unnecessarily used instead of pure ASCII, and I treated those files separately. Other from that, my inspection revealed no obvious encoding errors. This list comprised of about 2000 files, so I did not spend too much time on each file. The assumption, after all, was that these files are okay. > > For the second subset, I checked every non-ASCII character (using the same method). This list was about 300+ files. Most of them were okay far as I can tell; I can confirm encodings for European languages 100%, but JCK encodings could theoretically be wrong; they looked sane but I cannot read and confirm fully. Several were in fact pure binary files, but without any telling exten... The whitespace changes are my editor removing whitespaces at the end of a line. This is a thing we enforce for many files types, but the check does not yet formally include .txt files. I have been working from time to time with trying to extend the set of files covered by this check, so I have in general not tried to circumvent my editor when it strips trailing whitespaces even for files that we do not yet require no trailing whitespaces in jcheck. ------------- PR Comment: https://git.openjdk.org/jdk/pull/24566#issuecomment-2795201480 From ihse at openjdk.org Thu Apr 10 21:28:32 2025 From: ihse at openjdk.org (Magnus Ihse Bursie) Date: Thu, 10 Apr 2025 21:28:32 GMT Subject: RFR: 8354266: Fix non-UTF-8 text encoding In-Reply-To: References: Message-ID: <1IvhgoM9LMGg7s2kq_N0V7F1GCh-xFBnauZ9Ajk2Txo=.672329ea-e4c9-437c-a8b7-0502a9fdd414@github.com> On Thu, 10 Apr 2025 19:06:35 GMT, Eirik Bj?rsn?s wrote: > (BTW, I enjoyed seeing separate commits for the encoding and BOM changes, makes it easier to verify each!) Thanks! I do very much like myself to review PRs that has separate logical commits, so I try to produce such myself. I'm glad to hear it was appreciated. ------------- PR Comment: https://git.openjdk.org/jdk/pull/24566#issuecomment-2795203125 From ihse at openjdk.org Thu Apr 10 21:28:32 2025 From: ihse at openjdk.org (Magnus Ihse Bursie) Date: Thu, 10 Apr 2025 21:28:32 GMT Subject: RFR: 8354266: Fix non-UTF-8 text encoding In-Reply-To: References: Message-ID: On Thu, 10 Apr 2025 18:30:22 GMT, Eirik Bj?rsn?s wrote: >> If this is a French name, it's e acute: ?. > >> If this is a French name, it's e acute: ?. > > Supported by this Wikipedia page listing S.L as an LCMS developer: > > https://en.wikipedia.org/wiki/Little_CMS It's not a mistake in capitalization, it's a mistake for two different characters in two different encodings. (Probably iso-8859-1 mistaken as ansi iirc.) I verified the developers name at the original file in the LCMS repo. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/24566#discussion_r2038362034 From honkar at openjdk.org Thu Apr 10 21:42:36 2025 From: honkar at openjdk.org (Harshitha Onkar) Date: Thu, 10 Apr 2025 21:42:36 GMT Subject: RFR: 8352687: Opensource few JInternalFrame and JTextField tests [v3] In-Reply-To: References: Message-ID: On Thu, 10 Apr 2025 05:36:58 GMT, Prasanta Sadhukhan wrote: >> Few JInternalFrame and JTextField tests are opensourced > > Prasanta Sadhukhan has updated the pull request incrementally with one additional commit since the last revision: > > Remove SkippedException Marked as reviewed by honkar (Reviewer). ------------- PR Review: https://git.openjdk.org/jdk/pull/24474#pullrequestreview-2758485306 From azvegint at openjdk.org Thu Apr 10 22:30:28 2025 From: azvegint at openjdk.org (Alexander Zvegintsev) Date: Thu, 10 Apr 2025 22:30:28 GMT Subject: RFR: 8353000: Open source several swing tests batch2 In-Reply-To: References: Message-ID: On Wed, 9 Apr 2025 22:17:35 GMT, Damon Nguyen wrote: > Open-sourcing and standardizing several tests (metal) Marked as reviewed by azvegint (Reviewer). ------------- PR Review: https://git.openjdk.org/jdk/pull/24560#pullrequestreview-2758602209 From serb at openjdk.org Fri Apr 11 03:25:33 2025 From: serb at openjdk.org (Sergey Bylokhov) Date: Fri, 11 Apr 2025 03:25:33 GMT Subject: RFR: 8354317: [XWayland] Problem list two tests crashing XWayland server In-Reply-To: References: Message-ID: On Thu, 10 Apr 2025 16:35:33 GMT, Alexander Zvegintsev wrote: > Problem list two tests crashing XWayland server > Corresponding issue [JDK-8354097](https://bugs.openjdk.org/browse/JDK-8354097) Marked as reviewed by serb (Reviewer). ------------- PR Review: https://git.openjdk.org/jdk/pull/24582#pullrequestreview-2759056816 From serb at openjdk.org Fri Apr 11 03:37:29 2025 From: serb at openjdk.org (Sergey Bylokhov) Date: Fri, 11 Apr 2025 03:37:29 GMT Subject: RFR: 8354266: Fix non-UTF-8 text encoding In-Reply-To: References: Message-ID: On Thu, 10 Apr 2025 10:10:49 GMT, Magnus Ihse Bursie wrote: > I have checked the entire code base for incorrect encodings, but luckily enough these were the only remaining problems I found. > > BOM (byte-order mark) is a method used for distinguishing big and little endian UTF-16 encodings. There is a special UTF-8 BOM, but it is discouraged. In the words of the Unicode Consortium: "Use of a BOM is neither required nor recommended for UTF-8". We have UTF-8 BOMs in a handful of files. These should be removed. > > Methodology used: > > I have run four different tools for using different heuristics for determining the encoding of a file: > * chardetect (the original, slow-as-molasses Perl program, which also had the worst performing heuristics of all; I'll rate it 1/5) > * uchardet (a modern version by freedesktop, used by e.g. Firefox) > * enca (targeted towards obscure code pages) > * libmagic / `file --mime-encoding` > > They all agreed on pure ASCII files (which is easy to check), and these I just ignored/accepted as good. The handling of pure binary files differed between the tools; most detected them as binary but some suggested arcane encodings for specific (often small) binary files. To keep my sanity, I decided that files ending in any of these extensions were binary, and I did not check them further: > * `gif|png|ico|jpg|icns|tiff|wav|woff|woff2|jar|ttf|bmp|class|crt|jks|keystore|ks|db` > > From the remaining list of non-ascii, non-known-binary files I selected two overlapping and exhaustive subsets: > * All files where at least one tool claimed it to be UTF-8 > * All files where at least one tool claimed it to be *not* UTF-8 > > For the first subset, I checked every non-ASCII character (using `C_ALL=C ggrep -H --color='auto' -P -n "[^\x00-\x7F]" $(cat names-of-files-to-check.txt)`, and visually examining the results). At this stage, I found several files where unicode were unnecessarily used instead of pure ASCII, and I treated those files separately. Other from that, my inspection revealed no obvious encoding errors. This list comprised of about 2000 files, so I did not spend too much time on each file. The assumption, after all, was that these files are okay. > > For the second subset, I checked every non-ASCII character (using the same method). This list was about 300+ files. Most of them were okay far as I can tell; I can confirm encodings for European languages 100%, but JCK encodings could theoretically be wrong; they looked sane but I cannot read and confirm fully. Several were in fact pure binary files, but without any telling exten... src/demo/share/java2d/J2DBench/resources/textdata/arabic.ut8.txt line 11: > 9: ???????? ???????????? ?????????????? "??????????????" ???????? ?????????? ?????? ???????? ???? ???????? ???????????? ?????????????????? ???????? ?????? ?????????? ???? ?????? ?????????????? ???? ?????????????? ??????????????????. ?????? ?????? ???????? ???????????? "??????????????" ???????? ???????? ???????? ???????????????? ???????????? ???????????????? ?????? ?????????????? ?????? ?????????? ????.????.????. (IBM)?? ???????? (APPLE)?? ???????????????????? ?????????????? (Hewlett-Packard) ?? ???????????????????? (Microsoft)?? ???????????????? (Oracle) ?? ???? (Sun) ????????????. ?????? ???? ?????????????????? ?????????????????? ?????????????? (?????? ?????? ?????????????? "????????" "JAVA" ???????? "?????? ???? ????" "XML" ???????? ???????????? ???????????? ??????????????????) ?????????? ?????????????? "??????????????". ?????????? ?????? ?????? ?? ?????? "??????????????" ???? ???????????????????? ???????????????? ???????????? ???????????????? ???????????????????? ???????? ?????? ???? (ISO 10646) . > 10: > 11: ???? ???????? ???????????? "??????????????" ?????????????? ?????????????? ???????? ?????????????? ?????????????? ?????????? ???? ?????? ???????????????????? ?????????????? ???? ?????????? ?????????????????? ?????????? ???????????? ???? ????????????. ?????? ?????????????? "??????????????" ???? ???????? ?????????????????? ?????????? ?????? ?????????? ???????? ???????????? ???? ?????????????? ?????????????????? ?????????????????? ?????????????? ??????????????. ?????? ???? ?????????????? "??????????????" ???????????????? ?????????????? ???? ?????????? ???????????????? ?????? ???????????? ?????????????????? ?????? ???? ?????? ???? ?????????????? ???? ???????????????? ???????? ?????? ???? ???????? ???? ???????????? ?????????? ?????????? ?????? ???????????? ???????????? ?????????????? ???? ?????????? ???? ??????????. ?????????????? ?????? ?????????????? "??????????????" ?????????? ???????????????? ???? ???????????????? ?????? ?????????????? ???????????????? ???????????????? ?????? ??? ? ?????????? ?????????????????? ???????? ?????????? ?????????????? ?????????????? ?????????????? ???????????????? ???????????? ???????? ?????? ???? ???????????? ?????? ????????????????. Looks like most of the changes in java2d/* are related to spaces at the end of the line? ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/24566#discussion_r2038746193 From serb at openjdk.org Fri Apr 11 03:41:26 2025 From: serb at openjdk.org (Sergey Bylokhov) Date: Fri, 11 Apr 2025 03:41:26 GMT Subject: RFR: 8353000: Open source several swing tests batch2 In-Reply-To: References: Message-ID: On Wed, 9 Apr 2025 22:17:35 GMT, Damon Nguyen wrote: > Open-sourcing and standardizing several tests (metal) test/jdk/javax/swing/plaf/metal/MetalIconFactory/bug4952462.java line 57: > 55: UIManager.setLookAndFeel("javax.swing.plaf.metal.MetalLookAndFeel"); > 56: > 57: MetalTheme theme = (MetalTheme) AppContext.getAppContext().get("currentMetalTheme"); The usage of AppContext can be dropped, and replaced by some other public api. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/24560#discussion_r2038748285 From serb at openjdk.org Fri Apr 11 03:44:25 2025 From: serb at openjdk.org (Sergey Bylokhov) Date: Fri, 11 Apr 2025 03:44:25 GMT Subject: RFR: 8354191: GTK LaF should use pre-multiplied alpha same as cairo In-Reply-To: <-sAv6upz5pv3EA1zjjUvRUxNP1Tl75NJAwOX-df8Vbk=.442e3494-836b-4664-baf1-669fbd7532a0@github.com> References: <-sAv6upz5pv3EA1zjjUvRUxNP1Tl75NJAwOX-df8Vbk=.442e3494-836b-4664-baf1-669fbd7532a0@github.com> Message-ID: On Wed, 9 Apr 2025 14:42:05 GMT, Maxim Kartashev wrote: > The pixels that cairo produces for GTK LaF to draw on a Swing component have their alpha components pre-multiplied as per [the documentation](https://www.cairographics.org/manual/cairo-Image-Surfaces.html?spm=a2ty_o01.29997173.0.0.540ac921z2EebT#cairo-format-t): >> Pre-multiplied alpha is used. (That is, 50% transparent red is 0x80800000, not 0x80ff0000.) > > The BufferedImage created from those pixels, however, has its constructor's argument for `isRasterPremultiplied` set to `false` in `GTKEngine.finishPainting()`. This commit corrects that. > > In addition, since at least some "native" graphics color models also use pre-multiplied alpha (ex.: `GLXGraphicsConfig.getColorModel()`), `COLOR_MODELS` were modified to take advantage of that and avoid unnecessary re-calculations of image's pixels. src/java.desktop/share/classes/com/sun/java/swing/plaf/gtk/GTKEngine.java line 618: > 616: int index = transparency - 1; > 617: if (COLOR_MODELS[index] == null) { > 618: COLOR_MODELS[index] = GraphicsEnvironment.getLocalGraphicsEnvironment() How will it work if the configuration changes at runtime? ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/24551#discussion_r2038750301 From serb at openjdk.org Fri Apr 11 03:50:32 2025 From: serb at openjdk.org (Sergey Bylokhov) Date: Fri, 11 Apr 2025 03:50:32 GMT Subject: RFR: 8352877: Opensource Several Font related tests - Batch 1 In-Reply-To: References: Message-ID: On Wed, 9 Apr 2025 04:49:18 GMT, Abhishek Kumar wrote: > Font related Applet tests are converted to manual and open sourced. Marked as reviewed by serb (Reviewer). ------------- PR Review: https://git.openjdk.org/jdk/pull/24536#pullrequestreview-2759077780 From serb at openjdk.org Fri Apr 11 03:53:27 2025 From: serb at openjdk.org (Sergey Bylokhov) Date: Fri, 11 Apr 2025 03:53:27 GMT Subject: RFR: 8353483: Open source some JProgressBar tests [v3] In-Reply-To: References: Message-ID: On Wed, 9 Apr 2025 18:22:56 GMT, Phil Race wrote: >> Open source 4 Swing JProgressBar tests. > > Phil Race has updated the pull request incrementally with one additional commit since the last revision: > > 8353483 Marked as reviewed by serb (Reviewer). ------------- PR Review: https://git.openjdk.org/jdk/pull/24517#pullrequestreview-2759079652 From serb at openjdk.org Fri Apr 11 03:55:27 2025 From: serb at openjdk.org (Sergey Bylokhov) Date: Fri, 11 Apr 2025 03:55:27 GMT Subject: RFR: 8352905: Open some JComboBox bugs 1 In-Reply-To: References: Message-ID: On Mon, 7 Apr 2025 22:50:14 GMT, Alisen Chung wrote: > Updating and opening some tests test/jdk/javax/swing/JComboBox/bug4166593.java line 65: > 63: } > 64: > 65: if (frame != null) { frame is initialized on a different thread and accessed here without proper synchronization. same issue with numberOfActionEvents ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/24495#discussion_r2038756353 From psadhukhan at openjdk.org Fri Apr 11 03:56:49 2025 From: psadhukhan at openjdk.org (Prasanta Sadhukhan) Date: Fri, 11 Apr 2025 03:56:49 GMT Subject: Integrated: 8352687: Opensource few JInternalFrame and JTextField tests In-Reply-To: References: Message-ID: On Mon, 7 Apr 2025 04:39:05 GMT, Prasanta Sadhukhan wrote: > Few JInternalFrame and JTextField tests are opensourced This pull request has now been integrated. Changeset: f955a8cb Author: Prasanta Sadhukhan URL: https://git.openjdk.org/jdk/commit/f955a8cbd2d1233af7f7e4b4e4bfcdbb5a8cacae Stats: 349 lines in 4 files changed: 349 ins; 0 del; 0 mod 8352687: Opensource few JInternalFrame and JTextField tests Reviewed-by: honkar ------------- PR: https://git.openjdk.org/jdk/pull/24474 From serb at openjdk.org Fri Apr 11 04:08:37 2025 From: serb at openjdk.org (Sergey Bylokhov) Date: Fri, 11 Apr 2025 04:08:37 GMT Subject: RFR: 8353070: Clean up and open source couple AWT Graphics related tests (Part 1) In-Reply-To: References: Message-ID: On Sun, 6 Apr 2025 06:08:36 GMT, Alexander Zuev wrote: > Clean up and open source four tests, two manual and two automatic tests now. Marked as reviewed by serb (Reviewer). ------------- PR Review: https://git.openjdk.org/jdk/pull/24472#pullrequestreview-2759093172 From serb at openjdk.org Fri Apr 11 04:14:31 2025 From: serb at openjdk.org (Sergey Bylokhov) Date: Fri, 11 Apr 2025 04:14:31 GMT Subject: RFR: 8288471: java/awt/ScrollPane/bug8077409Test.java is unstable and fails intermittently in CI [v2] In-Reply-To: <66tP05yMtj7c-RMTZD9hVVaKRvSE84lwQQNTBNiZx0o=.3cb7badf-f06e-472d-81c2-b4ff82c30dbb@github.com> References: <66tP05yMtj7c-RMTZD9hVVaKRvSE84lwQQNTBNiZx0o=.3cb7badf-f06e-472d-81c2-b4ff82c30dbb@github.com> Message-ID: On Sat, 5 Apr 2025 11:52:19 GMT, Manukumar V S wrote: >> java/awt/ScrollPane/bug8077409Test.java is unstable and fails intermittently in CI, especially in MacOS machines. >> Also the frame created in this test is not disposed which may interfere with other tests. >> >> Fix: >> Some stabilisations added and the frame is disposed properly. >> >> Testing: >> Tested 100 times per platform(macosx-x64,macosx-aarch64,windows-x64,linux-x64) and got all PASS. > > Manukumar V S has updated the pull request incrementally with one additional commit since the last revision: > > Review comments fixed : Formatting changes test/jdk/java/awt/ScrollPane/bug8077409Test.java line 130: > 128: robot.delay(300); > 129: if (y != obj.pane.getComponent(0).getLocation().y) { > 130: throw new RuntimeException("Wrong position of component in ScrollPane"); Looks like the code uses a non-standard two-space indentation. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/24292#discussion_r2038768656 From serb at openjdk.org Fri Apr 11 04:17:25 2025 From: serb at openjdk.org (Sergey Bylokhov) Date: Fri, 11 Apr 2025 04:17:25 GMT Subject: RFR: 8352865: Open source several AWT TextComponent tests - Batch 2 In-Reply-To: References: Message-ID: On Mon, 7 Apr 2025 07:24:31 GMT, Tejesh R wrote: > Open source these AWT TextComponent tests: > > java/awt/TextComponent/SelectionAndCaretColor/SelectionAndCaretColor.java > java/awt/TextComponent/SelectionTest/SelectionTest.java > java/awt/TextComponent/CorrectTextComponentSelectionTest/CorrectTextComponentSelectionTest.java > java/awt/TextComponent/AltPlusNumberKeyCombinationsTest/AltPlusNumberKeyCombinationsTest.java test/jdk/java/awt/TextComponent/SelectionAndCaretColor.java line 130: > 128: }); > 129: if (flips != 6) { > 130: throw new RuntimeException("Invalid number of flips: " + flips + " instead of 6"); Please wrap the long lines to a maximum of 80 characters per line. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/24477#discussion_r2038770752 From psadhukhan at openjdk.org Fri Apr 11 05:15:28 2025 From: psadhukhan at openjdk.org (Prasanta Sadhukhan) Date: Fri, 11 Apr 2025 05:15:28 GMT Subject: RFR: 8352905: Open some JComboBox bugs 1 In-Reply-To: References: Message-ID: On Mon, 7 Apr 2025 22:50:14 GMT, Alisen Chung wrote: > Updating and opening some tests test/jdk/javax/swing/JComboBox/bug4180054.java line 57: > 55: comboBox.setSelectedIndex(1); > 56: comboBox.setSelectedIndex(3); > 57: comboBox.setSelectedIndex(2); guess old test also checks "If the same item is selected twice in a row, the number should not increase" so I guess we should also include another `comboBox.setSelectedIndex(2`) and `numberOfContentsChangedEvents ` should still be 3 ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/24495#discussion_r2038809787 From psadhukhan at openjdk.org Fri Apr 11 05:23:30 2025 From: psadhukhan at openjdk.org (Prasanta Sadhukhan) Date: Fri, 11 Apr 2025 05:23:30 GMT Subject: RFR: 8352905: Open some JComboBox bugs 1 In-Reply-To: References: Message-ID: On Mon, 7 Apr 2025 22:50:14 GMT, Alisen Chung wrote: > Updating and opening some tests test/jdk/javax/swing/JComboBox/bug4530952.java line 120: > 118: > 119: btnAction.setEnabled(false); > 120: frame.getContentPane().add(btnAction); all redundant getContentPane() can be removed test/jdk/javax/swing/JComboBox/bug4530953.java line 80: > 78: if (frame != null) { > 79: SwingUtilities.invokeAndWait(() -> frame.dispose()); > 80: } dispose should be in try-finally block.. test/jdk/javax/swing/JComboBox/bug4530953.java line 89: > 87: combo.setSelectedIndex(1); > 88: frame.getContentPane().setLayout(new FlowLayout()); > 89: frame.getContentPane().add(combo); getContentPane can be removed.. test/jdk/javax/swing/JComboBox/bug4530953.java line 91: > 89: frame.getContentPane().add(combo); > 90: frame.setLocationRelativeTo(null); > 91: frame.pack(); guess setLocationRelativeTo should be called after pack..there was an issue if it is called before.. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/24495#discussion_r2038813345 PR Review Comment: https://git.openjdk.org/jdk/pull/24495#discussion_r2038813716 PR Review Comment: https://git.openjdk.org/jdk/pull/24495#discussion_r2038815506 PR Review Comment: https://git.openjdk.org/jdk/pull/24495#discussion_r2038815053 From mvs at openjdk.org Fri Apr 11 05:34:15 2025 From: mvs at openjdk.org (Manukumar V S) Date: Fri, 11 Apr 2025 05:34:15 GMT Subject: RFR: 8288471: java/awt/ScrollPane/bug8077409Test.java is unstable and fails intermittently in CI [v3] In-Reply-To: References: Message-ID: > java/awt/ScrollPane/bug8077409Test.java is unstable and fails intermittently in CI, especially in MacOS machines. > Also the frame created in this test is not disposed which may interfere with other tests. > > Fix: > Some stabilisations added and the frame is disposed properly. > > Testing: > Tested 100 times per platform(macosx-x64,macosx-aarch64,windows-x64,linux-x64) and got all PASS. Manukumar V S has updated the pull request incrementally with one additional commit since the last revision: Review comments fixed : Code reformatting, changed the indentation to the standard four-space indentation ------------- Changes: - all: https://git.openjdk.org/jdk/pull/24292/files - new: https://git.openjdk.org/jdk/pull/24292/files/aa029a4f..0af15c59 Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=24292&range=02 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=24292&range=01-02 Stats: 116 lines in 1 file changed: 37 ins; 37 del; 42 mod Patch: https://git.openjdk.org/jdk/pull/24292.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/24292/head:pull/24292 PR: https://git.openjdk.org/jdk/pull/24292 From mvs at openjdk.org Fri Apr 11 05:34:16 2025 From: mvs at openjdk.org (Manukumar V S) Date: Fri, 11 Apr 2025 05:34:16 GMT Subject: RFR: 8288471: java/awt/ScrollPane/bug8077409Test.java is unstable and fails intermittently in CI [v2] In-Reply-To: References: <66tP05yMtj7c-RMTZD9hVVaKRvSE84lwQQNTBNiZx0o=.3cb7badf-f06e-472d-81c2-b4ff82c30dbb@github.com> Message-ID: On Fri, 11 Apr 2025 04:11:48 GMT, Sergey Bylokhov wrote: >> Manukumar V S has updated the pull request incrementally with one additional commit since the last revision: >> >> Review comments fixed : Formatting changes > > test/jdk/java/awt/ScrollPane/bug8077409Test.java line 130: > >> 128: robot.delay(300); >> 129: if (y != obj.pane.getComponent(0).getLocation().y) { >> 130: throw new RuntimeException("Wrong position of component in ScrollPane"); > > Looks like the code uses a non-standard two-space indentation. Changed the code indentation ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/24292#discussion_r2038823377 From jdv at openjdk.org Fri Apr 11 05:51:26 2025 From: jdv at openjdk.org (Jayathirth D V) Date: Fri, 11 Apr 2025 05:51:26 GMT Subject: RFR: 8354317: [XWayland] Problem list two tests crashing XWayland server In-Reply-To: References: Message-ID: On Thu, 10 Apr 2025 16:35:33 GMT, Alexander Zvegintsev wrote: > Problem list two tests crashing XWayland server > Corresponding issue [JDK-8354097](https://bugs.openjdk.org/browse/JDK-8354097) Suggestion: Since we will be streamlining things to run on Ubuntu 24.04 & Wayland, we can use/add utility to determine whether we use Waylnad/Xorg and disable tests on particular windowing system. Recently in OpenJFX, i was able to use `test.util.isOnWayland()` to disable tests only in Wayland. ------------- Marked as reviewed by jdv (Reviewer). PR Review: https://git.openjdk.org/jdk/pull/24582#pullrequestreview-2759205270 From jdv at openjdk.org Fri Apr 11 05:58:19 2025 From: jdv at openjdk.org (Jayathirth D V) Date: Fri, 11 Apr 2025 05:58:19 GMT Subject: RFR: 8354214: Open source Swing tests Batch 2 Message-ID: Few swing JList tests are open sourced. ------------- Commit messages: - 8354214: Open source Swing tests Batch 2 Changes: https://git.openjdk.org/jdk/pull/24588/files Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=24588&range=00 Issue: https://bugs.openjdk.org/browse/JDK-8354214 Stats: 339 lines in 3 files changed: 339 ins; 0 del; 0 mod Patch: https://git.openjdk.org/jdk/pull/24588.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/24588/head:pull/24588 PR: https://git.openjdk.org/jdk/pull/24588 From mkartashev at openjdk.org Fri Apr 11 06:04:35 2025 From: mkartashev at openjdk.org (Maxim Kartashev) Date: Fri, 11 Apr 2025 06:04:35 GMT Subject: RFR: 8354191: GTK LaF should use pre-multiplied alpha same as cairo In-Reply-To: References: <-sAv6upz5pv3EA1zjjUvRUxNP1Tl75NJAwOX-df8Vbk=.442e3494-836b-4664-baf1-669fbd7532a0@github.com> Message-ID: On Fri, 11 Apr 2025 03:42:07 GMT, Sergey Bylokhov wrote: >> The pixels that cairo produces for GTK LaF to draw on a Swing component have their alpha components pre-multiplied as per [the documentation](https://www.cairographics.org/manual/cairo-Image-Surfaces.html?spm=a2ty_o01.29997173.0.0.540ac921z2EebT#cairo-format-t): >>> Pre-multiplied alpha is used. (That is, 50% transparent red is 0x80800000, not 0x80ff0000.) >> >> The BufferedImage created from those pixels, however, has its constructor's argument for `isRasterPremultiplied` set to `false` in `GTKEngine.finishPainting()`. This commit corrects that. >> >> In addition, since at least some "native" graphics color models also use pre-multiplied alpha (ex.: `GLXGraphicsConfig.getColorModel()`), `COLOR_MODELS` were modified to take advantage of that and avoid unnecessary re-calculations of image's pixels. > > src/java.desktop/share/classes/com/sun/java/swing/plaf/gtk/GTKEngine.java line 618: > >> 616: int index = transparency - 1; >> 617: if (COLOR_MODELS[index] == null) { >> 618: COLOR_MODELS[index] = GraphicsEnvironment.getLocalGraphicsEnvironment() > > How will it work if the configuration changes at runtime? There will be an additional pixel conversion effort from the outdated configuration's format to the new actual format when this image is used. In other words, status quo. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/24551#discussion_r2038850294 From azvegint at openjdk.org Fri Apr 11 06:12:30 2025 From: azvegint at openjdk.org (Alexander Zvegintsev) Date: Fri, 11 Apr 2025 06:12:30 GMT Subject: RFR: 8354317: [XWayland] Problem list two tests crashing XWayland server In-Reply-To: References: Message-ID: <_uGsh2X-qejvQKSsKEEJ5GgYEPVsGf48vdGhmAdxYJE=.991b5dc7-b778-4561-895a-6298f715beaa@github.com> On Fri, 11 Apr 2025 05:49:02 GMT, Jayathirth D V wrote: > Suggestion: Since we will be streamlining things to run on Ubuntu 24.04 & Wayland, we can use/add utility to determine whether we use Waylnad/Xorg and disable tests on particular windowing system. > > Recently in OpenJFX, i was able to use `test.util.isOnWayland()` to disable tests only in Wayland. It is already available in https://github.com/openjdk/jdk/blob/master/test/lib/jdk/test/lib/Platform.java#L474-L481 But it is mostly used to tune the test to make an additional action/skip the test due to some system limitation. And it can't be linked to an issue(maybe by adding some comment though). Problem list is a single file to look for all the failing tests linked to JBS issue (so you don't have to look through all tests to find tests that fail on Wayland). It seems more logical to introduce an option to add new functionality to the problem list itself, allowing to skip tests for specific display server on Linux ------------- PR Comment: https://git.openjdk.org/jdk/pull/24582#issuecomment-2795922144 From azvegint at openjdk.org Fri Apr 11 06:12:30 2025 From: azvegint at openjdk.org (Alexander Zvegintsev) Date: Fri, 11 Apr 2025 06:12:30 GMT Subject: Integrated: 8354317: [XWayland] Problem list two tests crashing XWayland server In-Reply-To: References: Message-ID: On Thu, 10 Apr 2025 16:35:33 GMT, Alexander Zvegintsev wrote: > Problem list two tests crashing XWayland server > Corresponding issue [JDK-8354097](https://bugs.openjdk.org/browse/JDK-8354097) This pull request has now been integrated. Changeset: d8bed693 Author: Alexander Zvegintsev URL: https://git.openjdk.org/jdk/commit/d8bed6937311c1613d432bed73983d00dfd2a14a Stats: 2 lines in 1 file changed: 2 ins; 0 del; 0 mod 8354317: [XWayland] Problem list two tests crashing XWayland server Reviewed-by: serb, jdv ------------- PR: https://git.openjdk.org/jdk/pull/24582 From tr at openjdk.org Fri Apr 11 06:38:29 2025 From: tr at openjdk.org (Tejesh R) Date: Fri, 11 Apr 2025 06:38:29 GMT Subject: RFR: JDK-8353486 : Open source Swing Tests - Set 4 [v3] In-Reply-To: References: Message-ID: <5wjOseTfA6sSwh7sBX8TTHnhco3A2Q7LSoUIxGHyR70=.0072835c-2888-4a0f-a914-797d7331bf60@github.com> On Tue, 8 Apr 2025 22:45:31 GMT, Harshitha Onkar wrote: >> Open-sourced the following Swing tests: >> >> 1. javax/swing/JFileChooser/bug4464774.java >> 2. javax/swing/JFileChooser/bug4522756.java >> 3. javax/swing/JFileChooser/bug4759934.java >> 4. javax/swing/JFileChooser/bug4943900.java >> 5. javax/swing/JOptionPane/bug4194862.java > > Harshitha Onkar has updated the pull request incrementally with one additional commit since the last revision: > > review update Marked as reviewed by tr (Reviewer). ------------- PR Review: https://git.openjdk.org/jdk/pull/24456#pullrequestreview-2759281752 From azvegint at openjdk.org Fri Apr 11 06:41:56 2025 From: azvegint at openjdk.org (Alexander Zvegintsev) Date: Fri, 11 Apr 2025 06:41:56 GMT Subject: RFR: 8353592: Open source several scrollbar tests Message-ID: Few scroll bar tests are open sourced. Testing looks good. ------------- Commit messages: - initial Changes: https://git.openjdk.org/jdk/pull/24590/files Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=24590&range=00 Issue: https://bugs.openjdk.org/browse/JDK-8353592 Stats: 382 lines in 3 files changed: 382 ins; 0 del; 0 mod Patch: https://git.openjdk.org/jdk/pull/24590.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/24590/head:pull/24590 PR: https://git.openjdk.org/jdk/pull/24590 From psadhukhan at openjdk.org Fri Apr 11 06:49:39 2025 From: psadhukhan at openjdk.org (Prasanta Sadhukhan) Date: Fri, 11 Apr 2025 06:49:39 GMT Subject: RFR: 8353592: Open source several scrollbar tests In-Reply-To: References: Message-ID: On Fri, 11 Apr 2025 06:37:58 GMT, Alexander Zvegintsev wrote: > Few scroll bar tests are open sourced. Testing looks good. Marked as reviewed by psadhukhan (Reviewer). ------------- PR Review: https://git.openjdk.org/jdk/pull/24590#pullrequestreview-2759310132 From ihse at openjdk.org Fri Apr 11 10:27:40 2025 From: ihse at openjdk.org (Magnus Ihse Bursie) Date: Fri, 11 Apr 2025 10:27:40 GMT Subject: RFR: 8354266: Fix non-UTF-8 text encoding In-Reply-To: References: Message-ID: On Fri, 11 Apr 2025 03:35:11 GMT, Sergey Bylokhov wrote: >> I have checked the entire code base for incorrect encodings, but luckily enough these were the only remaining problems I found. >> >> BOM (byte-order mark) is a method used for distinguishing big and little endian UTF-16 encodings. There is a special UTF-8 BOM, but it is discouraged. In the words of the Unicode Consortium: "Use of a BOM is neither required nor recommended for UTF-8". We have UTF-8 BOMs in a handful of files. These should be removed. >> >> Methodology used: >> >> I have run four different tools for using different heuristics for determining the encoding of a file: >> * chardetect (the original, slow-as-molasses Perl program, which also had the worst performing heuristics of all; I'll rate it 1/5) >> * uchardet (a modern version by freedesktop, used by e.g. Firefox) >> * enca (targeted towards obscure code pages) >> * libmagic / `file --mime-encoding` >> >> They all agreed on pure ASCII files (which is easy to check), and these I just ignored/accepted as good. The handling of pure binary files differed between the tools; most detected them as binary but some suggested arcane encodings for specific (often small) binary files. To keep my sanity, I decided that files ending in any of these extensions were binary, and I did not check them further: >> * `gif|png|ico|jpg|icns|tiff|wav|woff|woff2|jar|ttf|bmp|class|crt|jks|keystore|ks|db` >> >> From the remaining list of non-ascii, non-known-binary files I selected two overlapping and exhaustive subsets: >> * All files where at least one tool claimed it to be UTF-8 >> * All files where at least one tool claimed it to be *not* UTF-8 >> >> For the first subset, I checked every non-ASCII character (using `C_ALL=C ggrep -H --color='auto' -P -n "[^\x00-\x7F]" $(cat names-of-files-to-check.txt)`, and visually examining the results). At this stage, I found several files where unicode were unnecessarily used instead of pure ASCII, and I treated those files separately. Other from that, my inspection revealed no obvious encoding errors. This list comprised of about 2000 files, so I did not spend too much time on each file. The assumption, after all, was that these files are okay. >> >> For the second subset, I checked every non-ASCII character (using the same method). This list was about 300+ files. Most of them were okay far as I can tell; I can confirm encodings for European languages 100%, but JCK encodings could theoretically be wrong; they looked sane but I cannot read and confirm fully. Several were in fact pure... > > src/demo/share/java2d/J2DBench/resources/textdata/arabic.ut8.txt line 11: > >> 9: ???????? ???????????? ?????????????? "??????????????" ???????? ?????????? ?????? ???????? ???? ???????? ???????????? ?????????????????? ???????? ?????? ?????????? ???? ?????? ?????????????? ???? ?????????????? ??????????????????. ?????? ?????? ???????? ???????????? "??????????????" ???????? ???????? ???????? ???????????????? ???????????? ???????????????? ?????? ?????????????? ?????? ?????????? ????.????.????. (IBM)?? ???????? (APPLE)?? ???????????????????? ?????????????? (Hewlett-Packard) ?? ???????????????????? (Microsoft)?? ???????????????? (Oracle) ?? ???? (Sun) ????????????. ?????? ???? ?????????????????? ?????????????????? ?????????????? (?????? ?????? ?????????????? "????????" "JAVA" ???????? "?????? ???? ????" "XML" ???????? ???????????? ???????????? ??????????????????) ?????????? ?????????????? "??????????????". ?????????? ?????? ?????? ?? ?????? "??????????????" ???? ???????????????????? ???????????????? ???????????? ???????????????? ???????????????????? ???????? ????? ????? (ISO 10646) . >> 10: >> 11: ???? ???????? ???????????? "??????????????" ?????????????? ?????????????? ???????? ?????????????? ?????????????? ?????????? ???? ?????? ???????????????????? ?????????????? ???? ?????????? ?????????????????? ?????????? ???????????? ???? ????????????. ?????? ?????????????? "??????????????" ???? ???????? ?????????????????? ?????????? ?????? ?????????? ???????? ???????????? ???? ?????????????? ?????????????????? ?????????????????? ?????????????? ??????????????. ?????? ???? ?????????????? "??????????????" ???????????????? ?????????????? ???? ?????????? ???????????????? ?????? ???????????? ?????????????????? ?????? ???? ?????? ???? ?????????????? ???? ???????????????? ???????? ?????? ???? ???????? ???? ???????????? ?????????? ?????????? ?????? ???????????? ???????????? ?????????????? ???? ?????????? ???? ??????????. ?????????????? ?????? ?????????????? "??????????????" ?????????? ???????????????? ???? ???????????????? ?????? ?????????????? ???????????????? ???????????????? ?????? ?? ?? ?????????? ?????????????????? ???????? ?????????? ?????????????? ?????????????? ?????????????? ???????????????? ???????????? ???????? ?????? ???? ???????????? ?????? ????????????????. > > Looks like most of the changes in java2d/* are related to spaces at the end of the line? No, that are just incidental changes (see https://github.com/openjdk/jdk/pull/24566#issuecomment-2795201480). The actual change for the java2d files is the removal of the initial UTF-8 BOM. Github has a hard time showing this though, since the BOM is not visible. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/24566#discussion_r2039258980 From eirbjo at openjdk.org Fri Apr 11 10:27:40 2025 From: eirbjo at openjdk.org (Eirik =?UTF-8?B?QmrDuHJzbsO4cw==?=) Date: Fri, 11 Apr 2025 10:27:40 GMT Subject: RFR: 8354266: Fix non-UTF-8 text encoding In-Reply-To: References: Message-ID: On Fri, 11 Apr 2025 10:21:32 GMT, Magnus Ihse Bursie wrote: >> src/demo/share/java2d/J2DBench/resources/textdata/arabic.ut8.txt line 11: >> >>> 9: ???????? ???????????? ?????????????? "??????????????" ???????? ?????????? ?????? ???????? ???? ???????? ???????????? ?????????????????? ???????? ?????? ?????????? ???? ?????? ?????????????? ???? ?????????????? ??????????????????. ?????? ?????? ???????? ???????????? "??????????????" ???????? ???????? ???????? ???????????????? ???????????? ???????????????? ?????? ?????????????? ?????? ?????????? ????.????.????. (IBM)?? ???????? (APPLE)?? ???????????????????? ?????????????? (Hewlett-Packard) ?? ???????????????????? (Microsoft)?? ???????????????? (Oracle) ?? ???? (Sun) ????????????. ?????? ???? ?????????????????? ?????????????????? ?????????????? (?????? ?????? ?????????????? "????????" "JAVA" ???????? "?????? ???? ????" "XML" ???????? ???????????? ???????????? ??????????????????) ?????????? ?????????????? "??????????????". ?????????? ?????? ?????? ?? ?????? "??????????????" ???? ???????????????????? ???????????????? ???????????? ???????????????? ???????????????????? ???????? ???? ?????? (ISO 10646) . >>> 10: >>> 11: ???? ???????? ???????????? "??????????????" ?????????????? ?????????????? ???????? ?????????????? ?????????????? ?????????? ???? ?????? ???????????????????? ?????????????? ???? ?????????? ?????????????????? ?????????? ???????????? ???? ????????????. ?????? ?????????????? "??????????????" ???? ???????? ?????????????????? ?????????? ?????? ?????????? ???????? ???????????? ???? ?????????????? ?????????????????? ?????????????????? ?????????????? ??????????????. ?????? ???? ?????????????? "??????????????" ???????????????? ?????????????? ???? ?????????? ???????????????? ?????? ???????????? ?????????????????? ?????? ???? ?????? ???? ?????????????? ???? ???????????????? ???????? ?????? ???? ???????? ???? ???????????? ?????????? ?????????? ?????? ???????????? ???????????? ?????????????? ???? ?????????? ???? ??????????. ?????????????? ?????? ?????????????? "??????????????" ?????????? ???????????????? ???? ???????????????? ?????? ?????????????? ???????????????? ???????????????? ?????? ? ??? ?????????? ?????????????????? ???????? ?????????? ?????????????? ?????????????? ?????????????? ???????????????? ???????????? ???????? ?????? ???? ???????????? ?????? ????????????????. >> >> Looks like most of the changes in java2d/* are related to spaces at the end of the line? > > No, that are just incidental changes (see https://github.com/openjdk/jdk/pull/24566#issuecomment-2795201480). The actual change for the java2d files is the removal of the initial UTF-8 BOM. Github has a hard time showing this though, since the BOM is not visible. I found the side-by-side diff in IntelliJ useful here, as it said "UTF-8 BOM" vs. "UTF-8". ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/24566#discussion_r2039263227 From ihse at openjdk.org Fri Apr 11 10:27:40 2025 From: ihse at openjdk.org (Magnus Ihse Bursie) Date: Fri, 11 Apr 2025 10:27:40 GMT Subject: Integrated: 8354266: Fix non-UTF-8 text encoding In-Reply-To: References: Message-ID: On Thu, 10 Apr 2025 10:10:49 GMT, Magnus Ihse Bursie wrote: > I have checked the entire code base for incorrect encodings, but luckily enough these were the only remaining problems I found. > > BOM (byte-order mark) is a method used for distinguishing big and little endian UTF-16 encodings. There is a special UTF-8 BOM, but it is discouraged. In the words of the Unicode Consortium: "Use of a BOM is neither required nor recommended for UTF-8". We have UTF-8 BOMs in a handful of files. These should be removed. > > Methodology used: > > I have run four different tools for using different heuristics for determining the encoding of a file: > * chardetect (the original, slow-as-molasses Perl program, which also had the worst performing heuristics of all; I'll rate it 1/5) > * uchardet (a modern version by freedesktop, used by e.g. Firefox) > * enca (targeted towards obscure code pages) > * libmagic / `file --mime-encoding` > > They all agreed on pure ASCII files (which is easy to check), and these I just ignored/accepted as good. The handling of pure binary files differed between the tools; most detected them as binary but some suggested arcane encodings for specific (often small) binary files. To keep my sanity, I decided that files ending in any of these extensions were binary, and I did not check them further: > * `gif|png|ico|jpg|icns|tiff|wav|woff|woff2|jar|ttf|bmp|class|crt|jks|keystore|ks|db` > > From the remaining list of non-ascii, non-known-binary files I selected two overlapping and exhaustive subsets: > * All files where at least one tool claimed it to be UTF-8 > * All files where at least one tool claimed it to be *not* UTF-8 > > For the first subset, I checked every non-ASCII character (using `C_ALL=C ggrep -H --color='auto' -P -n "[^\x00-\x7F]" $(cat names-of-files-to-check.txt)`, and visually examining the results). At this stage, I found several files where unicode were unnecessarily used instead of pure ASCII, and I treated those files separately. Other from that, my inspection revealed no obvious encoding errors. This list comprised of about 2000 files, so I did not spend too much time on each file. The assumption, after all, was that these files are okay. > > For the second subset, I checked every non-ASCII character (using the same method). This list was about 300+ files. Most of them were okay far as I can tell; I can confirm encodings for European languages 100%, but JCK encodings could theoretically be wrong; they looked sane but I cannot read and confirm fully. Several were in fact pure binary files, but without any telling exten... This pull request has now been integrated. Changeset: d4e194bc Author: Magnus Ihse Bursie URL: https://git.openjdk.org/jdk/commit/d4e194bc463ff3ad09e55cbb96bea00283679ce6 Stats: 32 lines in 13 files changed: 0 ins; 2 del; 30 mod 8354266: Fix non-UTF-8 text encoding Reviewed-by: rgiulietti, erikj, naoto, eirbjo ------------- PR: https://git.openjdk.org/jdk/pull/24566 From myankelevich at openjdk.org Fri Apr 11 10:34:32 2025 From: myankelevich at openjdk.org (Mikhail Yankelevich) Date: Fri, 11 Apr 2025 10:34:32 GMT Subject: RFR: 8354214: Open source Swing tests Batch 2 In-Reply-To: References: Message-ID: <2g4NtlngI7Zv-kzD98lQ5bWcjcvb3BvF8tn3DVwbRV0=.84000f67-145e-453e-bb08-82a3fbaadc0a@github.com> On Fri, 11 Apr 2025 05:52:47 GMT, Jayathirth D V wrote: > Few swing JList tests are open sourced. test/jdk/javax/swing/JList/bug4618767.java line 29: > 27: * @summary First letter navigation in JList interferes with mnemonics > 28: * @key headful > 29: * @run main bug4618767 Nitpick: is this line necessary? test/jdk/javax/swing/JList/bug4618767.java line 55: > 53: public static void main(String[] args) throws Exception { > 54: try { > 55: listGainedFocusLatch = new CountDownLatch(1); Do you think it might be better to initialise it directly on line 52? private static CountDownLatch listGainedFocusLatch = new CountDownLatch(1); test/jdk/javax/swing/JList/bug4618767.java line 86: > 84: }); > 85: > 86: list = new JList(new String[] {"one", "two", "three", "four"}); Do you think it might be easier to read if this is initialised on line 49? private static final JList list = new JList(new String[] {"one", "two", "three", "four"}); and the same for line 69 `f = new JFrame("bug4618767");` I feel it is going to be easier to read if global variables were initialised at class level when possible, especially if they are not reassigned further. This way they can also be finalised. But if you feel it's ok as it is, I'm fine with it. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/24588#discussion_r2039272750 PR Review Comment: https://git.openjdk.org/jdk/pull/24588#discussion_r2039253130 PR Review Comment: https://git.openjdk.org/jdk/pull/24588#discussion_r2039255012 From myankelevich at openjdk.org Fri Apr 11 14:03:33 2025 From: myankelevich at openjdk.org (Mikhail Yankelevich) Date: Fri, 11 Apr 2025 14:03:33 GMT Subject: RFR: 8352682: Opensource JComponent tests [v2] In-Reply-To: References: Message-ID: <-tNQKJVWbQcccajq0yPD2o1UcBNzJgUow21pyW6jDAs=.bd547382-a5d6-462b-bb02-d1fd53b95f08@github.com> On Thu, 10 Apr 2025 12:32:02 GMT, Prasanta Sadhukhan wrote: >> Few JComponent tests are opensourced > > Prasanta Sadhukhan has updated the pull request incrementally with one additional commit since the last revision: > > Use lambda test/jdk/javax/swing/JComponent/bug4247610.java line 29: > 27: * @summary Tests an unnecessary repaint issue > 28: * @key headful > 29: * @run main bug4247610 Nitpick: is this needed? test/jdk/javax/swing/JComponent/bug4247610.java line 59: > 57: Robot robot = new Robot(); > 58: SwingUtilities.invokeAndWait(() -> { > 59: frame = new JFrame("bug4247610"); Do you think this might cleaner if it was initialised at line 51? Also would allow to make it final test/jdk/javax/swing/JComponent/bug4247610.java line 122: > 120: return !passFlag; > 121: } > 122: private static synchronized void fail() { I think these methods are a bit redundant, just add more code to read and understand. What about removing them and just renaming the flags `failed` and `traced`? What do you think? ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/24562#discussion_r2039549645 PR Review Comment: https://git.openjdk.org/jdk/pull/24562#discussion_r2039572120 PR Review Comment: https://git.openjdk.org/jdk/pull/24562#discussion_r2039548680 From honkar at openjdk.org Fri Apr 11 16:53:27 2025 From: honkar at openjdk.org (Harshitha Onkar) Date: Fri, 11 Apr 2025 16:53:27 GMT Subject: RFR: 8352682: Opensource JComponent tests [v2] In-Reply-To: References: Message-ID: On Thu, 10 Apr 2025 12:32:02 GMT, Prasanta Sadhukhan wrote: >> Few JComponent tests are opensourced > > Prasanta Sadhukhan has updated the pull request incrementally with one additional commit since the last revision: > > Use lambda test/jdk/javax/swing/JComponent/bug4247610.java line 103: > 101: robot.delay(200); > 102: robot.mousePress(InputEvent.BUTTON1_DOWN_MASK); > 103: robot.mouseRelease(InputEvent.BUTTON1_DOWN_MASK); Is is good to add some delay after button click ? test/jdk/javax/swing/JComponent/bug4247610.java line 110: > 108: > 109: private static volatile boolean traceFlag; > 110: private static volatile boolean passFlag = true; Can be moved to the top along with other variable declarations ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/24562#discussion_r2039914191 PR Review Comment: https://git.openjdk.org/jdk/pull/24562#discussion_r2039921991 From honkar at openjdk.org Fri Apr 11 16:53:28 2025 From: honkar at openjdk.org (Harshitha Onkar) Date: Fri, 11 Apr 2025 16:53:28 GMT Subject: RFR: 8352682: Opensource JComponent tests [v2] In-Reply-To: <-tNQKJVWbQcccajq0yPD2o1UcBNzJgUow21pyW6jDAs=.bd547382-a5d6-462b-bb02-d1fd53b95f08@github.com> References: <-tNQKJVWbQcccajq0yPD2o1UcBNzJgUow21pyW6jDAs=.bd547382-a5d6-462b-bb02-d1fd53b95f08@github.com> Message-ID: <_uetX6eAU7SHmEge4TvWQ5smCjpi5o2UCdF5eCmhKao=.24ba1a58-5a66-41c5-8b57-51e548871f3c@github.com> On Fri, 11 Apr 2025 13:16:20 GMT, Mikhail Yankelevich wrote: >> Prasanta Sadhukhan has updated the pull request incrementally with one additional commit since the last revision: >> >> Use lambda > > test/jdk/javax/swing/JComponent/bug4247610.java line 122: > >> 120: return !passFlag; >> 121: } >> 122: private static synchronized void fail() { > > I think these methods are a bit redundant, just add more code to read and understand. What about removing them and just renaming the flags `failed` and `traced`? > What do you think? I agree traceFlag and passFlag are declared as volatile vars , so all four synchronized methods look redundant and can be removed to simplify the code. These vars can be converted to CountDownLatch for stability. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/24562#discussion_r2039919304 From mickleness at gmail.com Fri Apr 11 16:58:24 2025 From: mickleness at gmail.com (Jeremy Wood) Date: Fri, 11 Apr 2025 16:58:24 +0000 Subject: Removing obsolete Aqua code Message-ID: in https://bugs.openjdk.org/browse/JDK-8344697 I pointed out that in Mac's Aqua L&F: we?re using AncestorListeners to help repaint JRootPane default buttons. Over a decade ago this logic was needed to emulate the native Aqua experience, but since around 2016 the default button in Aqua does NOT continually pulse. I?d like to remove this code, but I?m not sure how to proceed. Originally I planned to make a PR for 8344697 that removes the unused code. But after rebalancing the AWTEventMulticaster (in https://bugs.openjdk.org/browse/JDK-8342782 ), the performance problems observed in 8344697 do not reproduce. Should I: A. File a new ticket just to remove the obsolete code? B. Go ahead and name this new PR after 8344697 , even though that?s a little misleading now? C. Don?t pursue this, because without a concrete problem / business case the OpenJDK community shouldn?t focus on this tech debt. Thoughts? Regards, - Jeremy -------------- next part -------------- An HTML attachment was scrubbed... URL: From honkar at openjdk.org Fri Apr 11 17:06:38 2025 From: honkar at openjdk.org (Harshitha Onkar) Date: Fri, 11 Apr 2025 17:06:38 GMT Subject: RFR: 8353592: Open source several scrollbar tests In-Reply-To: References: Message-ID: On Fri, 11 Apr 2025 06:37:58 GMT, Alexander Zvegintsev wrote: > Few scroll bar tests are open sourced. Testing looks good. LGTM apart from minor suggestions test/jdk/java/awt/Scrollbar/ListScrollbarTest.java line 27: > 25: * @test > 26: * @bug 4029465 > 27: * @summary Win95 Multiselect List doesn't display scrollbar Suggestion: * @summary Win Multiselect List doesn't display scrollbar test/jdk/java/awt/Scrollbar/ListScrollbarTest.java line 93: > 91: private static void scrollbarCheck(Point point, boolean isScrollbarExpected) { > 92: Color pixelColor = robot.getPixelColor(point.x, point.y); > 93: boolean areColorsSimilar = areColorsSimilar(BG_COLOR, pixelColor, 5); Mino : tolerance can be declared as static final var ------------- Marked as reviewed by honkar (Reviewer). PR Review: https://git.openjdk.org/jdk/pull/24590#pullrequestreview-2760974722 PR Review Comment: https://git.openjdk.org/jdk/pull/24590#discussion_r2039934730 PR Review Comment: https://git.openjdk.org/jdk/pull/24590#discussion_r2039937362 From honkar at openjdk.org Fri Apr 11 17:24:27 2025 From: honkar at openjdk.org (Harshitha Onkar) Date: Fri, 11 Apr 2025 17:24:27 GMT Subject: RFR: 8354214: Open source Swing tests Batch 2 In-Reply-To: References: Message-ID: On Fri, 11 Apr 2025 05:52:47 GMT, Jayathirth D V wrote: > Few swing JList tests are open sourced. LGTM apart from minor suggestion added inline test/jdk/javax/swing/JList/bug4193267.java line 63: > 61: .instructions(INSTRUCTIONS) > 62: .columns(35) > 63: .testUI(initialize()) PassFailJFrame's ` .positionTestUI(WindowLayouts::rightOneRow)` can be used to position multiple windows side by side. test/jdk/javax/swing/JList/bug4618767.java line 51: > 49: private static JList list; > 50: private static boolean menuSelected; > 51: private static boolean failed; Since it is accessed on two different threads. Suggestion: private static volatile boolean failed; test/jdk/javax/swing/JList/bug4618767.java line 107: > 105: } > 106: Robot robot = new Robot(); > 107: robot.setAutoDelay(500); Can we reduce autoDelay to a smaller number? ------------- Marked as reviewed by honkar (Reviewer). PR Review: https://git.openjdk.org/jdk/pull/24588#pullrequestreview-2761018704 PR Review Comment: https://git.openjdk.org/jdk/pull/24588#discussion_r2039960865 PR Review Comment: https://git.openjdk.org/jdk/pull/24588#discussion_r2039967376 PR Review Comment: https://git.openjdk.org/jdk/pull/24588#discussion_r2039968810 From philip.race at oracle.com Fri Apr 11 17:41:33 2025 From: philip.race at oracle.com (Philip Race) Date: Fri, 11 Apr 2025 10:41:33 -0700 Subject: Removing obsolete Aqua code In-Reply-To: References: Message-ID: https://bugs.openjdk.org/browse/JDK-8344697 is closed as a dup. At this point I'd say A, although re-opening and renaming is possible. -phil On 4/11/25 9:58 AM, Jeremy Wood wrote: > in https://bugs.openjdk.org/browse/JDK-8344697?I pointed out that in > Mac's Aqua L&F: we?re using AncestorListeners to help repaint > JRootPane default buttons. > > Over a decade ago this logic was needed to emulate the native Aqua > experience, but since around 2016 the default button in Aqua does NOT > continually pulse. > > I?d like to remove this code, but I?m not sure how to proceed. > > Originally I planned to make a PR for 8344697 > ?that removes the unused > code. But after rebalancing the AWTEventMulticaster (in > https://bugs.openjdk.org/browse/JDK-8342782?), the performance > problems observed in8344697 > ?do not reproduce. > > Should I: > A. File a new ticket just to remove the obsolete code? > B. Go ahead and name this new PR after8344697 > ?, even though that?s a > little misleading now? > C. Don?t pursue this, because without a concrete problem / business > case the OpenJDK community shouldn?t focus on this tech debt. > > Thoughts? > > Regards, > ?- Jeremy -------------- next part -------------- An HTML attachment was scrubbed... URL: From honkar at openjdk.org Fri Apr 11 18:15:36 2025 From: honkar at openjdk.org (Harshitha Onkar) Date: Fri, 11 Apr 2025 18:15:36 GMT Subject: RFR: 8352908: Open source several swing tests batch1 In-Reply-To: References: Message-ID: On Wed, 9 Apr 2025 21:47:07 GMT, Damon Nguyen wrote: > Open-sourcing and standardizing several tests (JSplitPane JApplet JToolBar) LGTM apart from the suggestion to use `.setPreferredSize()` instead of `.setSize()` for JSplitPane test test/jdk/javax/swing/JSplitPane/bug4749792.java line 53: > 51: JPanel right = new JPanel(); > 52: left.setSize(200, 200); > 53: right.setSize(200, 200); You may want to use preferred size for right and left panes so that the JSplitPane divider is not skewed to the left. Suggestion: left.setPreferredSize(new Dimension(200, 200)); right.setPreferredSize(new Dimension(200, 200)); test/jdk/javax/swing/JSplitPane/bug4749792.java line 58: > 56: > 57: JPanel south = new JPanel(); > 58: south.setSize(new Dimension(20, 20)); Same with south and east panels - setPreferredSize() ------------- Marked as reviewed by honkar (Reviewer). PR Review: https://git.openjdk.org/jdk/pull/24559#pullrequestreview-2761178135 PR Review Comment: https://git.openjdk.org/jdk/pull/24559#discussion_r2040060795 PR Review Comment: https://git.openjdk.org/jdk/pull/24559#discussion_r2040062608 From aturbanov at openjdk.org Fri Apr 11 20:22:27 2025 From: aturbanov at openjdk.org (Andrey Turbanov) Date: Fri, 11 Apr 2025 20:22:27 GMT Subject: RFR: 8354214: Open source Swing tests Batch 2 In-Reply-To: References: Message-ID: On Fri, 11 Apr 2025 05:52:47 GMT, Jayathirth D V wrote: > Few swing JList tests are open sourced. test/jdk/javax/swing/JList/bug4193267.java line 84: > 82: jsp = new JScrollPane(lst); > 83: fr[0].add(jsp); > 84: fr[0].setSize(400,200); Suggestion: fr[0].setSize(400, 200); test/jdk/javax/swing/JList/bug4193267.java line 87: > 85: > 86: JPanel pL = new JPanel(); > 87: pL.setLayout(new GridLayout(2,1)); Suggestion: pL.setLayout(new GridLayout(2, 1)); test/jdk/javax/swing/JList/bug4193267.java line 92: > 90: > 91: JPanel p = new JPanel(); > 92: p.setLayout(new GridLayout(2,1)); Suggestion: p.setLayout(new GridLayout(2, 1)); test/jdk/javax/swing/JList/bug4193267.java line 103: > 101: > 102: fr[1] = new JFrame("Index"); > 103: fr[1].setSize(200,200); Suggestion: fr[1].setSize(200, 200); ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/24588#discussion_r2040252532 PR Review Comment: https://git.openjdk.org/jdk/pull/24588#discussion_r2040252689 PR Review Comment: https://git.openjdk.org/jdk/pull/24588#discussion_r2040252805 PR Review Comment: https://git.openjdk.org/jdk/pull/24588#discussion_r2040252950 From aturbanov at openjdk.org Fri Apr 11 20:30:28 2025 From: aturbanov at openjdk.org (Andrey Turbanov) Date: Fri, 11 Apr 2025 20:30:28 GMT Subject: RFR: 8353483: Open source some JProgressBar tests [v3] In-Reply-To: References: Message-ID: On Wed, 9 Apr 2025 18:22:56 GMT, Phil Race wrote: >> Open source 4 Swing JProgressBar tests. > > Phil Race has updated the pull request incrementally with one additional commit since the last revision: > > 8353483 test/jdk/javax/swing/JProgressBar/RightLeftOrientation.java line 81: > 79: static JPanel createBarSet(ComponentOrientation o) { > 80: JPanel panel = new JPanel(); > 81: panel.setLayout(new BoxLayout(panel,BoxLayout.Y_AXIS)); Suggestion: panel.setLayout(new BoxLayout(panel, BoxLayout.Y_AXIS)); test/jdk/javax/swing/JProgressBar/RightLeftOrientation.java line 104: > 102: ComponentOrientation o) { > 103: JPanel panel = new JPanel(); > 104: panel.setLayout(new BoxLayout(panel,BoxLayout.Y_AXIS)); Suggestion: panel.setLayout(new BoxLayout(panel, BoxLayout.Y_AXIS)); test/jdk/javax/swing/JProgressBar/RightLeftOrientation.java line 132: > 130: > 131: UIManager.setLookAndFeel(save); > 132: } catch(Exception e) { Suggestion: } catch (Exception e) { test/jdk/javax/swing/JProgressBar/bug4230391.java line 71: > 69: static JPanel createBarSet() { > 70: JPanel panel = new JPanel(); > 71: panel.setLayout(new BoxLayout(panel,BoxLayout.Y_AXIS)); Suggestion: panel.setLayout(new BoxLayout(panel, BoxLayout.Y_AXIS)); test/jdk/javax/swing/JProgressBar/bug4230391.java line 85: > 83: static JPanel createProgressBars(String name, String plaf) { > 84: JPanel panel = new JPanel(); > 85: panel.setLayout(new BoxLayout(panel,BoxLayout.X_AXIS)); Suggestion: panel.setLayout(new BoxLayout(panel, BoxLayout.X_AXIS)); test/jdk/javax/swing/JProgressBar/bug4230391.java line 124: > 122: JFrame frame = new JFrame("Progress Bar Insets Test"); > 123: Container contentPane = frame.getContentPane(); > 124: contentPane.setLayout(new BoxLayout(contentPane,BoxLayout.X_AXIS)); Suggestion: contentPane.setLayout(new BoxLayout(contentPane, BoxLayout.X_AXIS)); ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/24517#discussion_r2040259369 PR Review Comment: https://git.openjdk.org/jdk/pull/24517#discussion_r2040259501 PR Review Comment: https://git.openjdk.org/jdk/pull/24517#discussion_r2040259688 PR Review Comment: https://git.openjdk.org/jdk/pull/24517#discussion_r2040259930 PR Review Comment: https://git.openjdk.org/jdk/pull/24517#discussion_r2040260146 PR Review Comment: https://git.openjdk.org/jdk/pull/24517#discussion_r2040260255 From prr at openjdk.org Fri Apr 11 22:11:28 2025 From: prr at openjdk.org (Phil Race) Date: Fri, 11 Apr 2025 22:11:28 GMT Subject: RFR: 8353483: Open source some JProgressBar tests [v4] In-Reply-To: References: Message-ID: > Open source 4 Swing JProgressBar tests. Phil Race has updated the pull request incrementally with one additional commit since the last revision: 8353483 ------------- Changes: - all: https://git.openjdk.org/jdk/pull/24517/files - new: https://git.openjdk.org/jdk/pull/24517/files/829199d2..e9ab5712 Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=24517&range=03 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=24517&range=02-03 Stats: 6 lines in 2 files changed: 0 ins; 0 del; 6 mod Patch: https://git.openjdk.org/jdk/pull/24517.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/24517/head:pull/24517 PR: https://git.openjdk.org/jdk/pull/24517 From prr at openjdk.org Fri Apr 11 22:11:31 2025 From: prr at openjdk.org (Phil Race) Date: Fri, 11 Apr 2025 22:11:31 GMT Subject: RFR: 8353483: Open source some JProgressBar tests [v3] In-Reply-To: References: Message-ID: On Fri, 11 Apr 2025 20:26:38 GMT, Andrey Turbanov wrote: >> Phil Race has updated the pull request incrementally with one additional commit since the last revision: >> >> 8353483 > > test/jdk/javax/swing/JProgressBar/RightLeftOrientation.java line 81: > >> 79: static JPanel createBarSet(ComponentOrientation o) { >> 80: JPanel panel = new JPanel(); >> 81: panel.setLayout(new BoxLayout(panel,BoxLayout.Y_AXIS)); > > Suggestion: > > panel.setLayout(new BoxLayout(panel, BoxLayout.Y_AXIS)); fixed > test/jdk/javax/swing/JProgressBar/RightLeftOrientation.java line 104: > >> 102: ComponentOrientation o) { >> 103: JPanel panel = new JPanel(); >> 104: panel.setLayout(new BoxLayout(panel,BoxLayout.Y_AXIS)); > > Suggestion: > > panel.setLayout(new BoxLayout(panel, BoxLayout.Y_AXIS)); fixed > test/jdk/javax/swing/JProgressBar/RightLeftOrientation.java line 132: > >> 130: >> 131: UIManager.setLookAndFeel(save); >> 132: } catch(Exception e) { > > Suggestion: > > } catch (Exception e) { fixed > test/jdk/javax/swing/JProgressBar/bug4230391.java line 71: > >> 69: static JPanel createBarSet() { >> 70: JPanel panel = new JPanel(); >> 71: panel.setLayout(new BoxLayout(panel,BoxLayout.Y_AXIS)); > > Suggestion: > > panel.setLayout(new BoxLayout(panel, BoxLayout.Y_AXIS)); fixed > test/jdk/javax/swing/JProgressBar/bug4230391.java line 85: > >> 83: static JPanel createProgressBars(String name, String plaf) { >> 84: JPanel panel = new JPanel(); >> 85: panel.setLayout(new BoxLayout(panel,BoxLayout.X_AXIS)); > > Suggestion: > > panel.setLayout(new BoxLayout(panel, BoxLayout.X_AXIS)); fixed > test/jdk/javax/swing/JProgressBar/bug4230391.java line 124: > >> 122: JFrame frame = new JFrame("Progress Bar Insets Test"); >> 123: Container contentPane = frame.getContentPane(); >> 124: contentPane.setLayout(new BoxLayout(contentPane,BoxLayout.X_AXIS)); > > Suggestion: > > contentPane.setLayout(new BoxLayout(contentPane, BoxLayout.X_AXIS)); fixed ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/24517#discussion_r2040352480 PR Review Comment: https://git.openjdk.org/jdk/pull/24517#discussion_r2040352846 PR Review Comment: https://git.openjdk.org/jdk/pull/24517#discussion_r2040352586 PR Review Comment: https://git.openjdk.org/jdk/pull/24517#discussion_r2040352760 PR Review Comment: https://git.openjdk.org/jdk/pull/24517#discussion_r2040352645 PR Review Comment: https://git.openjdk.org/jdk/pull/24517#discussion_r2040352709 From honkar at openjdk.org Fri Apr 11 22:16:28 2025 From: honkar at openjdk.org (Harshitha Onkar) Date: Fri, 11 Apr 2025 22:16:28 GMT Subject: RFR: 8353483: Open source some JProgressBar tests [v4] In-Reply-To: References: Message-ID: On Fri, 11 Apr 2025 22:11:28 GMT, Phil Race wrote: >> Open source 4 Swing JProgressBar tests. > > Phil Race has updated the pull request incrementally with one additional commit since the last revision: > > 8353483 Marked as reviewed by honkar (Reviewer). ------------- PR Review: https://git.openjdk.org/jdk/pull/24517#pullrequestreview-2761684885 From serb at openjdk.org Sat Apr 12 23:39:27 2025 From: serb at openjdk.org (Sergey Bylokhov) Date: Sat, 12 Apr 2025 23:39:27 GMT Subject: Integrated: 8352922: Refactor client classes javadoc to use @throws instead of @exception In-Reply-To: References: Message-ID: On Wed, 26 Mar 2025 01:49:31 GMT, Sergey Bylokhov wrote: > Prevailing JDK coding practices use @throws rather than @exception. > Refactored javadoc in client code to follow this convention, similar requests in the past https://github.com/openjdk/jdk/pull/7675 and https://github.com/openjdk/jdk/pull/7644. This pull request has now been integrated. Changeset: ed756b97 Author: Sergey Bylokhov URL: https://git.openjdk.org/jdk/commit/ed756b970066493db85da50ace317ef977186acc Stats: 14 lines in 10 files changed: 0 ins; 0 del; 14 mod 8352922: Refactor client classes javadoc to use @throws instead of @exception Reviewed-by: prr ------------- PR: https://git.openjdk.org/jdk/pull/24239 From kizune at openjdk.org Sun Apr 13 03:34:50 2025 From: kizune at openjdk.org (Alexander Zuev) Date: Sun, 13 Apr 2025 03:34:50 GMT Subject: RFR: 8353655: Clean up and open source KeyEvent related tests (Part 1) Message-ID: Clean up and open source three tests related to the KeyEvent mechanics. ------------- Commit messages: - 8353655: Clean up and open source KeyEvent related tests (Part 1) Changes: https://git.openjdk.org/jdk/pull/24609/files Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=24609&range=00 Issue: https://bugs.openjdk.org/browse/JDK-8353655 Stats: 317 lines in 3 files changed: 317 ins; 0 del; 0 mod Patch: https://git.openjdk.org/jdk/pull/24609.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/24609/head:pull/24609 PR: https://git.openjdk.org/jdk/pull/24609 From kizune at openjdk.org Sun Apr 13 04:45:35 2025 From: kizune at openjdk.org (Alexander Zuev) Date: Sun, 13 Apr 2025 04:45:35 GMT Subject: RFR: 8354106: Clean up and open source KeyEvent related tests (Part 2) Message-ID: Clean up and open source two more tests related to KeyEvent mechanics. ------------- Commit messages: - Correct library path. - 8354106: Clean up and open source KeyEvent related tests (Part 2) Changes: https://git.openjdk.org/jdk/pull/24610/files Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=24610&range=00 Issue: https://bugs.openjdk.org/browse/JDK-8354106 Stats: 212 lines in 2 files changed: 212 ins; 0 del; 0 mod Patch: https://git.openjdk.org/jdk/pull/24610.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/24610/head:pull/24610 PR: https://git.openjdk.org/jdk/pull/24610 From mblaesing at openjdk.org Sun Apr 13 16:14:13 2025 From: mblaesing at openjdk.org (Matthias =?UTF-8?B?QmzDpHNpbmc=?=) Date: Sun, 13 Apr 2025 16:14:13 GMT Subject: RFR: 8353950: Clipboard interaction on Windows is unstable Message-ID: <5TFAUj4XaWqfrY9eWepypDQlUoLp4UXrKf29neAYIc4=.03ccc530-b287-4496-af89-943d603e81b8@github.com> - Introduce a lock into WClipboard that protects the code between openClipboard/closeClipboard invocations. The native side does not allow to open the clipboard multiple times or share the opened clipboard between multiple threads. - Remove of need to call openClipboard/closeClipboard from getClipboardFormats by using the win32 call GetUpdatedClipboardFormats - Prevent a race-condition by not registering the connection between java and native side of clipboard multiple time, but just at construction time. ------------- Commit messages: - 8353950: Ensure windows clipboard is not accessed concurrently - 8353950: Ensure JDK does not crash when running reproducer Changes: https://git.openjdk.org/jdk/pull/24614/files Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=24614&range=00 Issue: https://bugs.openjdk.org/browse/JDK-8353950 Stats: 92 lines in 3 files changed: 46 ins; 24 del; 22 mod Patch: https://git.openjdk.org/jdk/pull/24614.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/24614/head:pull/24614 PR: https://git.openjdk.org/jdk/pull/24614 From mblaesing at openjdk.org Sun Apr 13 16:16:26 2025 From: mblaesing at openjdk.org (Matthias =?UTF-8?B?QmzDpHNpbmc=?=) Date: Sun, 13 Apr 2025 16:16:26 GMT Subject: RFR: 8353950: Clipboard interaction on Windows is unstable In-Reply-To: <5TFAUj4XaWqfrY9eWepypDQlUoLp4UXrKf29neAYIc4=.03ccc530-b287-4496-af89-943d603e81b8@github.com> References: <5TFAUj4XaWqfrY9eWepypDQlUoLp4UXrKf29neAYIc4=.03ccc530-b287-4496-af89-943d603e81b8@github.com> Message-ID: On Sun, 13 Apr 2025 16:08:40 GMT, Matthias Bl?sing wrote: > - Introduce a lock into WClipboard that protects the code between > openClipboard/closeClipboard invocations. > The native side does not allow to open the clipboard multiple > times or share the opened clipboard between multiple threads. > > - Remove of need to call openClipboard/closeClipboard from > getClipboardFormats by using the win32 call > GetUpdatedClipboardFormats > > - Prevent a race-condition by not registering the connection > between java and native side of clipboard multiple time, but > just at construction time. Some further comments: - More information than provided in the PR summary can be found in the two commits, which represent the steps I took to to fix this. - From my testing this change also fixes JDK-8332271 - Testing: - fastdebug build does not hit asserts anymore for the reproducer code (See e893b368a0e32ff17c1182fb261e0561d48827d3 / issue report) - reproducer code for JDK-8332271 does not crash anymore. Code was run for multiple minutes and no crash was observed - tests from test/jdk/java/awt/Clipboard were run and tests succeeded in release and fastdebug configuration ------------- PR Comment: https://git.openjdk.org/jdk/pull/24614#issuecomment-2800014192 From duke at openjdk.org Mon Apr 14 12:50:32 2025 From: duke at openjdk.org (Hendrik Schick) Date: Mon, 14 Apr 2025 12:50:32 GMT Subject: RFR: 8353950: Clipboard interaction on Windows is unstable In-Reply-To: <5TFAUj4XaWqfrY9eWepypDQlUoLp4UXrKf29neAYIc4=.03ccc530-b287-4496-af89-943d603e81b8@github.com> References: <5TFAUj4XaWqfrY9eWepypDQlUoLp4UXrKf29neAYIc4=.03ccc530-b287-4496-af89-943d603e81b8@github.com> Message-ID: On Sun, 13 Apr 2025 16:08:40 GMT, Matthias Bl?sing wrote: > - Introduce a lock into WClipboard that protects the code between > openClipboard/closeClipboard invocations. > The native side does not allow to open the clipboard multiple > times or share the opened clipboard between multiple threads. > > - Remove of need to call openClipboard/closeClipboard from > getClipboardFormats by using the win32 call > GetUpdatedClipboardFormats > > - Prevent a race-condition by not registering the connection > between java and native side of clipboard multiple time, but > just at construction time. copyright year update is missing src/java.desktop/windows/classes/sun/awt/windows/WClipboard.java line 132: > 130: @Override > 131: public void closeClipboard() { > 132: if(clipboardLocked.isLocked()) { Suggestion: if (clipboardLocked.isLocked()) { ------------- PR Comment: https://git.openjdk.org/jdk/pull/24614#issuecomment-2800775858 PR Review Comment: https://git.openjdk.org/jdk/pull/24614#discussion_r2041600926 From abhiscxk at openjdk.org Mon Apr 14 12:50:59 2025 From: abhiscxk at openjdk.org (Abhishek Kumar) Date: Mon, 14 Apr 2025 12:50:59 GMT Subject: RFR: 8354106: Clean up and open source KeyEvent related tests (Part 2) In-Reply-To: References: Message-ID: On Sun, 13 Apr 2025 04:38:46 GMT, Alexander Zuev wrote: > Clean up and open source two more tests related to KeyEvent mechanics. Marked as reviewed by abhiscxk (Reviewer). test/jdk/java/awt/event/KeyEvent/KeyTest.java line 26: > 24: /* > 25: * @test > 26: * @bug 4151419, 4090870, 4169733 `Error. Parse Exception: Invalid or unrecognized bugid: 4151419,` No need of `comma` for multiple bugids Suggestion: * @bug 4151419 4090870 4169733 ------------- PR Review: https://git.openjdk.org/jdk/pull/24610#pullrequestreview-2763991085 PR Review Comment: https://git.openjdk.org/jdk/pull/24610#discussion_r2041932975 From aturbanov at openjdk.org Mon Apr 14 12:51:07 2025 From: aturbanov at openjdk.org (Andrey Turbanov) Date: Mon, 14 Apr 2025 12:51:07 GMT Subject: RFR: 8353655: Clean up and open source KeyEvent related tests (Part 1) In-Reply-To: References: Message-ID: On Sun, 13 Apr 2025 03:29:37 GMT, Alexander Zuev wrote: > Clean up and open source three tests related to the KeyEvent mechanics. test/jdk/java/awt/event/KeyEvent/HomeEndKeyTest.java line 100: > 98: protected void printKey(KeyEvent evt) { > 99: String str; > 100: switch(evt.getID()) { Suggestion: switch (evt.getID()) { test/jdk/java/awt/event/KeyEvent/NumpadTest.java line 90: > 88: > 89: protected void printKey(KeyEvent evt) { > 90: switch(evt.getID()) { Suggestion: switch (evt.getID()) { ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/24609#discussion_r2041948105 PR Review Comment: https://git.openjdk.org/jdk/pull/24609#discussion_r2041947616 From abhiscxk at openjdk.org Mon Apr 14 12:50:55 2025 From: abhiscxk at openjdk.org (Abhishek Kumar) Date: Mon, 14 Apr 2025 12:50:55 GMT Subject: RFR: 8353655: Clean up and open source KeyEvent related tests (Part 1) In-Reply-To: References: Message-ID: On Sun, 13 Apr 2025 03:29:37 GMT, Alexander Zuev wrote: > Clean up and open source three tests related to the KeyEvent mechanics. test/jdk/java/awt/event/KeyEvent/FrenchKeyboard.java line 27: > 25: * @test > 26: * @bug 4308606 > 27: * @summary Tests whether the keys on the numeric keyboard work Suggestion: * @summary Tests whether the keys on the numeric keyboard work test/jdk/java/awt/event/KeyEvent/FrenchKeyboard.java line 69: > 67: .awaitAndCheck(); > 68: } > 69: } Blank line after this ? test/jdk/java/awt/event/KeyEvent/HomeEndKeyTest.java line 109: > 107: case KeyEvent.KEY_TYPED: > 108: str = "KEY_TYPED"; > 109: break; `printKey` is not invoked from `keyTyped` method and this case statement won't be reachable. Can be removed safely. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/24609#discussion_r2041936093 PR Review Comment: https://git.openjdk.org/jdk/pull/24609#discussion_r2041935823 PR Review Comment: https://git.openjdk.org/jdk/pull/24609#discussion_r2041941812 From abhiscxk at openjdk.org Mon Apr 14 12:51:59 2025 From: abhiscxk at openjdk.org (Abhishek Kumar) Date: Mon, 14 Apr 2025 12:51:59 GMT Subject: RFR: 8353070: Clean up and open source couple AWT Graphics related tests (Part 1) In-Reply-To: References: Message-ID: <3Ef7nA62USZIQ8tyImP2J_weXWX4tQK1SZ0J_2dYsBM=.044497ed-285f-4287-97a2-a3c7dad7ee5d@github.com> On Sun, 6 Apr 2025 06:08:36 GMT, Alexander Zuev wrote: > Clean up and open source four tests, two manual and two automatic tests now. test/jdk/java/awt/Graphics/LineLocationTest.java line 98: > 96: > 97: class DrawScreen extends Canvas { > 98: public Dimension getPreferredSize() { Can add `@Override` for overridden methods here and in other tests too test/jdk/java/awt/Graphics/TallText.java line 28: > 26: * @bug 4844952 > 27: * @summary test large text draws properly to the screen > 28: * @key headful `headful` tag not needed test/jdk/java/awt/Graphics/TallText.java line 54: > 52: > 53: public void paint(Graphics g) { > 54: Font font = new Font("dialog", Font.PLAIN, 99); Suggestion: Font font = new Font(Font.DIALOG, Font.PLAIN, 99); ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/24472#discussion_r2041979466 PR Review Comment: https://git.openjdk.org/jdk/pull/24472#discussion_r2041983193 PR Review Comment: https://git.openjdk.org/jdk/pull/24472#discussion_r2041984017 From abhiscxk at openjdk.org Mon Apr 14 12:54:11 2025 From: abhiscxk at openjdk.org (Abhishek Kumar) Date: Mon, 14 Apr 2025 12:54:11 GMT Subject: RFR: 8353832: Opensource FontClass, Selection and Icon tests Message-ID: Font Class, Selection adn Icon related Applet tests are converted to manual and open sourced. ------------- Commit messages: - Remove unused variable, comment change - Applet test converted and open-sourced Changes: https://git.openjdk.org/jdk/pull/24615/files Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=24615&range=00 Issue: https://bugs.openjdk.org/browse/JDK-8353832 Stats: 350 lines in 4 files changed: 350 ins; 0 del; 0 mod Patch: https://git.openjdk.org/jdk/pull/24615.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/24615/head:pull/24615 PR: https://git.openjdk.org/jdk/pull/24615 From psadhukhan at openjdk.org Mon Apr 14 12:53:59 2025 From: psadhukhan at openjdk.org (Prasanta Sadhukhan) Date: Mon, 14 Apr 2025 12:53:59 GMT Subject: RFR: 8352682: Opensource JComponent tests [v3] In-Reply-To: References: Message-ID: <7JEA7mAXB16LcLS1oc_Zt4wN8upQ1YnpT9OiT6xcXuw=.14149bac-3c0f-480e-b25b-b586007484d2@github.com> > Few JComponent tests are opensourced Prasanta Sadhukhan has updated the pull request incrementally with one additional commit since the last revision: Redundant method removed ------------- Changes: - all: https://git.openjdk.org/jdk/pull/24562/files - new: https://git.openjdk.org/jdk/pull/24562/files/518da8f3..7eac686e Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=24562&range=02 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=24562&range=01-02 Stats: 23 lines in 1 file changed: 2 ins; 16 del; 5 mod Patch: https://git.openjdk.org/jdk/pull/24562.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/24562/head:pull/24562 PR: https://git.openjdk.org/jdk/pull/24562 From jdv at openjdk.org Mon Apr 14 12:54:15 2025 From: jdv at openjdk.org (Jayathirth D V) Date: Mon, 14 Apr 2025 12:54:15 GMT Subject: RFR: 8353832: Opensource FontClass, Selection and Icon tests In-Reply-To: References: Message-ID: On Mon, 14 Apr 2025 05:57:16 GMT, Abhishek Kumar wrote: > Font Class, Selection adn Icon related Applet tests are converted to manual and open sourced. Marked as reviewed by jdv (Reviewer). Marked as reviewed by jdv (Reviewer). ------------- PR Review: https://git.openjdk.org/jdk/pull/24615#pullrequestreview-2763656995 PR Review: https://git.openjdk.org/jdk/pull/24615#pullrequestreview-2763876643 From duke at openjdk.org Mon Apr 14 12:54:26 2025 From: duke at openjdk.org (Hendrik Schick) Date: Mon, 14 Apr 2025 12:54:26 GMT Subject: RFR: 8353832: Opensource FontClass, Selection and Icon tests In-Reply-To: References: Message-ID: On Mon, 14 Apr 2025 05:57:16 GMT, Abhishek Kumar wrote: > Font Class, Selection adn Icon related Applet tests are converted to manual and open sourced. test/jdk/java/awt/Selection/TestClipboard.java line 108: > 106: > 107: // See if the flavor is supported. This will result in a null > 108: // pointer exception on Solaris, but not NT Solaris is not supported anymore by the jdk. I would remove the comment. test/jdk/java/awt/Selection/TestClipboard.java line 109: > 107: // See if the flavor is supported. This will result in a null > 108: // pointer exception on Solaris, but not NT > 109: boolean isSupported = theTransfer.isDataFlavorSupported(myFlavor); Suggestion: theTransfer.isDataFlavorSupported(myFlavor); ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/24615#discussion_r2041512152 PR Review Comment: https://git.openjdk.org/jdk/pull/24615#discussion_r2041514429 From psadhukhan at openjdk.org Mon Apr 14 12:54:28 2025 From: psadhukhan at openjdk.org (Prasanta Sadhukhan) Date: Mon, 14 Apr 2025 12:54:28 GMT Subject: RFR: 8352682: Opensource JComponent tests [v2] In-Reply-To: References: Message-ID: On Fri, 11 Apr 2025 16:42:54 GMT, Harshitha Onkar wrote: >> Prasanta Sadhukhan has updated the pull request incrementally with one additional commit since the last revision: >> >> Use lambda > > test/jdk/javax/swing/JComponent/bug4247610.java line 103: > >> 101: robot.delay(200); >> 102: robot.mousePress(InputEvent.BUTTON1_DOWN_MASK); >> 103: robot.mouseRelease(InputEvent.BUTTON1_DOWN_MASK); > > Is is good to add some delay after button click ? No, it will add unnecessary delay and therefore unnecessary repaints which we are testing for.. > test/jdk/javax/swing/JComponent/bug4247610.java line 110: > >> 108: >> 109: private static volatile boolean traceFlag; >> 110: private static volatile boolean passFlag = true; > > Can be moved to the top along with other variable declarations ok..done.. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/24562#discussion_r2041398716 PR Review Comment: https://git.openjdk.org/jdk/pull/24562#discussion_r2041398829 From abhiscxk at openjdk.org Mon Apr 14 12:54:35 2025 From: abhiscxk at openjdk.org (Abhishek Kumar) Date: Mon, 14 Apr 2025 12:54:35 GMT Subject: RFR: 8353832: Opensource FontClass, Selection and Icon tests In-Reply-To: References: Message-ID: On Mon, 14 Apr 2025 06:49:37 GMT, Hendrik Schick wrote: >> Font Class, Selection adn Icon related Applet tests are converted to manual and open sourced. > > test/jdk/java/awt/Selection/TestClipboard.java line 109: > >> 107: // See if the flavor is supported. This will result in a null >> 108: // pointer exception on Solaris, but not NT >> 109: boolean isSupported = theTransfer.isDataFlavorSupported(myFlavor); > > Suggestion: > > theTransfer.isDataFlavorSupported(myFlavor); Updated ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/24615#discussion_r2041858034 From psadhukhan at openjdk.org Mon Apr 14 12:54:13 2025 From: psadhukhan at openjdk.org (Prasanta Sadhukhan) Date: Mon, 14 Apr 2025 12:54:13 GMT Subject: RFR: 8352682: Opensource JComponent tests [v2] In-Reply-To: <-tNQKJVWbQcccajq0yPD2o1UcBNzJgUow21pyW6jDAs=.bd547382-a5d6-462b-bb02-d1fd53b95f08@github.com> References: <-tNQKJVWbQcccajq0yPD2o1UcBNzJgUow21pyW6jDAs=.bd547382-a5d6-462b-bb02-d1fd53b95f08@github.com> Message-ID: On Fri, 11 Apr 2025 13:16:58 GMT, Mikhail Yankelevich wrote: >> Prasanta Sadhukhan has updated the pull request incrementally with one additional commit since the last revision: >> >> Use lambda > > test/jdk/javax/swing/JComponent/bug4247610.java line 29: > >> 27: * @summary Tests an unnecessary repaint issue >> 28: * @key headful >> 29: * @run main bug4247610 > > Nitpick: is this needed? no harm in keeping it > test/jdk/javax/swing/JComponent/bug4247610.java line 59: > >> 57: Robot robot = new Robot(); >> 58: SwingUtilities.invokeAndWait(() -> { >> 59: frame = new JFrame("bug4247610"); > > Do you think this might cleaner if it was initialised at line 51? Also would allow to make it final we need to do it in EDT ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/24562#discussion_r2041397922 PR Review Comment: https://git.openjdk.org/jdk/pull/24562#discussion_r2041398110 From psadhukhan at openjdk.org Mon Apr 14 12:54:41 2025 From: psadhukhan at openjdk.org (Prasanta Sadhukhan) Date: Mon, 14 Apr 2025 12:54:41 GMT Subject: RFR: 8352682: Opensource JComponent tests [v2] In-Reply-To: <_uetX6eAU7SHmEge4TvWQ5smCjpi5o2UCdF5eCmhKao=.24ba1a58-5a66-41c5-8b57-51e548871f3c@github.com> References: <-tNQKJVWbQcccajq0yPD2o1UcBNzJgUow21pyW6jDAs=.bd547382-a5d6-462b-bb02-d1fd53b95f08@github.com> <_uetX6eAU7SHmEge4TvWQ5smCjpi5o2UCdF5eCmhKao=.24ba1a58-5a66-41c5-8b57-51e548871f3c@github.com> Message-ID: On Fri, 11 Apr 2025 16:46:47 GMT, Harshitha Onkar wrote: >> test/jdk/javax/swing/JComponent/bug4247610.java line 122: >> >>> 120: return !passFlag; >>> 121: } >>> 122: private static synchronized void fail() { >> >> I think these methods are a bit redundant, just add more code to read and understand. What about removing them and just renaming the flags `failed` and `traced`? >> What do you think? > > I agree traceFlag and passFlag are declared as volatile vars , so all four synchronized methods look redundant and can be removed to simplify the code. > > These vars can be converted to CountDownLatch for stability. Ok. Redundant methods removed...utiliesed the vars.. CountDownLatch not needed as there's not indeterministic sleep in it, it is relying on flags which are deterministic in itself.. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/24562#discussion_r2041397571 From jdv at openjdk.org Mon Apr 14 12:54:44 2025 From: jdv at openjdk.org (Jayathirth D V) Date: Mon, 14 Apr 2025 12:54:44 GMT Subject: RFR: 8354214: Open source Swing tests Batch 2 [v2] In-Reply-To: References: Message-ID: <3gaoQQzBcs0U_33eYTfskJJuS-r65_TuBmQYY7VSYzg=.100ecdea-cdd3-4c59-9bc5-3e98b31a1be3@github.com> > Few swing JList tests are open sourced. Jayathirth D V has updated the pull request incrementally with one additional commit since the last revision: Update after review ------------- Changes: - all: https://git.openjdk.org/jdk/pull/24588/files - new: https://git.openjdk.org/jdk/pull/24588/files/8f8cb349..93791b9a Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=24588&range=01 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=24588&range=00-01 Stats: 13 lines in 2 files changed: 3 ins; 2 del; 8 mod Patch: https://git.openjdk.org/jdk/pull/24588.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/24588/head:pull/24588 PR: https://git.openjdk.org/jdk/pull/24588 From abhiscxk at openjdk.org Mon Apr 14 12:55:28 2025 From: abhiscxk at openjdk.org (Abhishek Kumar) Date: Mon, 14 Apr 2025 12:55:28 GMT Subject: RFR: 8354214: Open source Swing tests Batch 2 [v2] In-Reply-To: <3gaoQQzBcs0U_33eYTfskJJuS-r65_TuBmQYY7VSYzg=.100ecdea-cdd3-4c59-9bc5-3e98b31a1be3@github.com> References: <3gaoQQzBcs0U_33eYTfskJJuS-r65_TuBmQYY7VSYzg=.100ecdea-cdd3-4c59-9bc5-3e98b31a1be3@github.com> Message-ID: On Mon, 14 Apr 2025 11:41:31 GMT, Jayathirth D V wrote: >> Few swing JList tests are open sourced. > > Jayathirth D V has updated the pull request incrementally with one additional commit since the last revision: > > Update after review test/jdk/javax/swing/JList/bug4193267.java line 44: > 42: import java.awt.Color; > 43: import java.awt.FlowLayout; > 44: import java.awt.GridLayout; awt imports can be moved before swing here and in other tests too test/jdk/javax/swing/JList/bug4193267.java line 64: > 62: .positionTestUI(WindowLayouts::rightOneRow) > 63: .columns(35) > 64: .testUI(initialize()) Suggestion: .testUI(bug4193267::initialize) test/jdk/javax/swing/JList/bug4193267.java line 77: > 75: JList lst; > 76: JScrollPane jsp; > 77: JTextField first, last; Can be removed. test/jdk/javax/swing/JList/bug4193267.java line 80: > 78: JFrame[] fr = new JFrame[2]; > 79: fr[0] = new JFrame("JList"); > 80: lst = new JList(data); separate declaration can be removed for JList, JScrollPane and JTextField Suggestion: JList lst = new JList(data); test/jdk/javax/swing/JList/bug4193267.java line 83: > 81: lst.setLayoutOrientation(JList.VERTICAL_WRAP); > 82: lst.setVisibleRowCount(4); > 83: jsp = new JScrollPane(lst); Suggestion: JScrollPane jsp = new JScrollPane(lst); test/jdk/javax/swing/JList/bug4193267.java line 94: > 92: JPanel p = new JPanel(); > 93: p.setLayout(new GridLayout(2, 1)); > 94: first = new JTextField("0", 2); Suggestion: JTextField first = new JTextField("0", 2); test/jdk/javax/swing/JList/bug4193267.java line 98: > 96: first.setBackground(Color.white); > 97: p.add(first); > 98: last = new JTextField("9", 2); Suggestion: JTextField last = new JTextField("9", 2); test/jdk/javax/swing/JList/bug4249161.java line 59: > 57: .instructions(INSTRUCTIONS) > 58: .columns(35) > 59: .testUI(initialize()) Suggestion: .testUI(bug4249161::initialize) ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/24588#discussion_r2041949275 PR Review Comment: https://git.openjdk.org/jdk/pull/24588#discussion_r2041960565 PR Review Comment: https://git.openjdk.org/jdk/pull/24588#discussion_r2041958918 PR Review Comment: https://git.openjdk.org/jdk/pull/24588#discussion_r2041957565 PR Review Comment: https://git.openjdk.org/jdk/pull/24588#discussion_r2041957793 PR Review Comment: https://git.openjdk.org/jdk/pull/24588#discussion_r2041957997 PR Review Comment: https://git.openjdk.org/jdk/pull/24588#discussion_r2041958201 PR Review Comment: https://git.openjdk.org/jdk/pull/24588#discussion_r2041961750 From jdv at openjdk.org Mon Apr 14 12:55:50 2025 From: jdv at openjdk.org (Jayathirth D V) Date: Mon, 14 Apr 2025 12:55:50 GMT Subject: RFR: 8354214: Open source Swing tests Batch 2 [v2] In-Reply-To: References: Message-ID: On Fri, 11 Apr 2025 17:14:06 GMT, Harshitha Onkar wrote: >> Jayathirth D V has updated the pull request incrementally with one additional commit since the last revision: >> >> Update after review > > test/jdk/javax/swing/JList/bug4193267.java line 63: > >> 61: .instructions(INSTRUCTIONS) >> 62: .columns(35) >> 63: .testUI(initialize()) > > PassFailJFrame's ` .positionTestUI(WindowLayouts::rightOneRow)` can be used to position multiple windows side by side. Updated. > test/jdk/javax/swing/JList/bug4618767.java line 51: > >> 49: private static JList list; >> 50: private static boolean menuSelected; >> 51: private static boolean failed; > > Since it is accessed on two different threads. > > Suggestion: > > private static volatile boolean failed; Updated. > test/jdk/javax/swing/JList/bug4618767.java line 107: > >> 105: } >> 106: Robot robot = new Robot(); >> 107: robot.setAutoDelay(500); > > Can we reduce autoDelay to a smaller number? I was seeing some issues related to autoDelay in our CI, so used 500ms. I think it is resolved and we can keep it less. Updated to 200ms. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/24588#discussion_r2041456914 PR Review Comment: https://git.openjdk.org/jdk/pull/24588#discussion_r2041458969 PR Review Comment: https://git.openjdk.org/jdk/pull/24588#discussion_r2041462132 From jdv at openjdk.org Mon Apr 14 12:56:48 2025 From: jdv at openjdk.org (Jayathirth D V) Date: Mon, 14 Apr 2025 12:56:48 GMT Subject: RFR: 8354214: Open source Swing tests Batch 2 [v2] In-Reply-To: <2g4NtlngI7Zv-kzD98lQ5bWcjcvb3BvF8tn3DVwbRV0=.84000f67-145e-453e-bb08-82a3fbaadc0a@github.com> References: <2g4NtlngI7Zv-kzD98lQ5bWcjcvb3BvF8tn3DVwbRV0=.84000f67-145e-453e-bb08-82a3fbaadc0a@github.com> Message-ID: On Fri, 11 Apr 2025 10:31:14 GMT, Mikhail Yankelevich wrote: >> Jayathirth D V has updated the pull request incrementally with one additional commit since the last revision: >> >> Update after review > > test/jdk/javax/swing/JList/bug4618767.java line 29: > >> 27: * @summary First letter navigation in JList interferes with mnemonics >> 28: * @key headful >> 29: * @run main bug4618767 > > Nitpick: is this line necessary? Test will run without this line also. I just follow it as standard template. Will leave it as it is. > test/jdk/javax/swing/JList/bug4618767.java line 55: > >> 53: public static void main(String[] args) throws Exception { >> 54: try { >> 55: listGainedFocusLatch = new CountDownLatch(1); > > Do you think it might be better to initialise it directly on line 52? > > > private static CountDownLatch listGainedFocusLatch = new CountDownLatch(1); Better to do it. Updated. > test/jdk/javax/swing/JList/bug4618767.java line 86: > >> 84: }); >> 85: >> 86: list = new JList(new String[] {"one", "two", "three", "four"}); > > Do you think it might be easier to read if this is initialised on line 49? > > > private static final JList list = new JList(new String[] {"one", "two", "three", "four"}); > > > and the same for line 69 `f = new JFrame("bug4618767");` > > I feel it is going to be easier to read if global variables were initialised at class level when possible, especially if they are not reassigned further. This way they can also be finalised. But if you feel it's ok as it is, I'm fine with it. We can initialise JList early. JFrame related one will keep in same invokeAndWait() ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/24588#discussion_r2041458855 PR Review Comment: https://git.openjdk.org/jdk/pull/24588#discussion_r2041459538 PR Review Comment: https://git.openjdk.org/jdk/pull/24588#discussion_r2041460746 From jdv at openjdk.org Mon Apr 14 12:56:18 2025 From: jdv at openjdk.org (Jayathirth D V) Date: Mon, 14 Apr 2025 12:56:18 GMT Subject: RFR: 8354214: Open source Swing tests Batch 2 [v2] In-Reply-To: References: Message-ID: <0xk8TsOaIpy80nBT8nOl1oc9qXOunH6lzskwMubukXg=.1efc0fcc-0005-4c87-a422-a0a750ad6cb7@github.com> On Fri, 11 Apr 2025 20:19:30 GMT, Andrey Turbanov wrote: >> Jayathirth D V has updated the pull request incrementally with one additional commit since the last revision: >> >> Update after review > > test/jdk/javax/swing/JList/bug4193267.java line 84: > >> 82: jsp = new JScrollPane(lst); >> 83: fr[0].add(jsp); >> 84: fr[0].setSize(400,200); > > Suggestion: > > fr[0].setSize(400, 200); Updated. > test/jdk/javax/swing/JList/bug4193267.java line 87: > >> 85: >> 86: JPanel pL = new JPanel(); >> 87: pL.setLayout(new GridLayout(2,1)); > > Suggestion: > > pL.setLayout(new GridLayout(2, 1)); Updated. > test/jdk/javax/swing/JList/bug4193267.java line 92: > >> 90: >> 91: JPanel p = new JPanel(); >> 92: p.setLayout(new GridLayout(2,1)); > > Suggestion: > > p.setLayout(new GridLayout(2, 1)); Updated. > test/jdk/javax/swing/JList/bug4193267.java line 103: > >> 101: >> 102: fr[1] = new JFrame("Index"); >> 103: fr[1].setSize(200,200); > > Suggestion: > > fr[1].setSize(200, 200); Updated. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/24588#discussion_r2041457586 PR Review Comment: https://git.openjdk.org/jdk/pull/24588#discussion_r2041457722 PR Review Comment: https://git.openjdk.org/jdk/pull/24588#discussion_r2041457852 PR Review Comment: https://git.openjdk.org/jdk/pull/24588#discussion_r2041457978 From rmarchenko at openjdk.org Mon Apr 14 12:57:53 2025 From: rmarchenko at openjdk.org (Roman Marchenko) Date: Mon, 14 Apr 2025 12:57:53 GMT Subject: RFR: 8347826: Introspector shows wrong method list after 8071693 [v9] In-Reply-To: References: Message-ID: On Fri, 21 Mar 2025 19:31:15 GMT, Alexey Ivanov wrote: >> Roman Marchenko has updated the pull request incrementally with one additional commit since the last revision: >> >> Fixing review comments > > I ran this changes through CI testing, and the results are good. @aivanov-jdk and @azvegint Could you review the PR, please? ------------- PR Comment: https://git.openjdk.org/jdk/pull/23443#issuecomment-2801055882 From aivanov at openjdk.org Mon Apr 14 13:30:45 2025 From: aivanov at openjdk.org (Alexey Ivanov) Date: Mon, 14 Apr 2025 13:30:45 GMT Subject: RFR: 8347826: Introspector shows wrong method list after 8071693 [v9] In-Reply-To: References: Message-ID: On Fri, 21 Mar 2025 19:31:15 GMT, Alexey Ivanov wrote: >> Roman Marchenko has updated the pull request incrementally with one additional commit since the last revision: >> >> Fixing review comments > > I ran this changes through CI testing, and the results are good. > I do not have any other comments, @aivanov-jdk please take a look. > > @aivanov-jdk ?\ > Could you review the PR, please? I'm currently busy, I'll get to look at this PR as soon as I can. Does it make sense to expand tests to cover cases that @mrserb brought up? With module system and exported vs non-exported classes and interfaces? ------------- PR Comment: https://git.openjdk.org/jdk/pull/23443#issuecomment-2801716456 From abaya at openjdk.org Mon Apr 14 13:56:08 2025 From: abaya at openjdk.org (Anass Baya) Date: Mon, 14 Apr 2025 13:56:08 GMT Subject: RFR: 8354219 : Automate javax/swing/JComboBox/ComboPopupBug.java Message-ID: javax/swing/JComboBox/ComboPopupBug.java test automation ------------- Commit messages: - Test automation Changes: https://git.openjdk.org/jdk/pull/24624/files Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=24624&range=00 Issue: https://bugs.openjdk.org/browse/JDK-8354219 Stats: 64 lines in 1 file changed: 21 ins; 15 del; 28 mod Patch: https://git.openjdk.org/jdk/pull/24624.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/24624/head:pull/24624 PR: https://git.openjdk.org/jdk/pull/24624 From aivanov at openjdk.org Mon Apr 14 14:47:48 2025 From: aivanov at openjdk.org (Alexey Ivanov) Date: Mon, 14 Apr 2025 14:47:48 GMT Subject: RFR: 8354219 : Automate javax/swing/JComboBox/ComboPopupBug.java In-Reply-To: References: Message-ID: On Mon, 14 Apr 2025 13:50:54 GMT, Anass Baya wrote: > This test was designed to manually verify that clicking on the JComboBox when the frame containing it is about to close does not cause an IllegalStateException. > > The test allowed the tester extra time to click on the JComboBox when closing the frame by adding a Thread.sleep() in the close button handler. > > In this test, a JComboBox is displayed with a Close button at the bottom. The tester should click the Close button, then try to click the JComboBox arrow button to display the popup. > > In the automated test, we save the JComboBox location size before closing the frame. We then use this information to click on the JComboBox right before the frame is closed. Changes requested by aivanov (Reviewer). test/jdk/javax/swing/JComboBox/ComboPopupBug.java line 1: > 1: /* Please update the copyright year to `2024, 2025,` test/jdk/javax/swing/JComboBox/ComboPopupBug.java line 51: > 49: > 50: public static void main(String[] args) throws Exception { > 51: robot = JRobot.getRobot(); You don't use any of `JRobot` features, just use the `Robot` class: `new Robot()`. test/jdk/javax/swing/JComboBox/ComboPopupBug.java line 71: > 69: frame.setSize(200, 200); > 70: frame.setVisible(true); > 71: }); There must be `robot.waitForIdle` to ensure the UI becomes visible on the screen before you get the location of the combo box on the screen. It's also common to add `robot.delay(1000)`. test/jdk/javax/swing/JComboBox/ComboPopupBug.java line 80: > 78: } > 79: catch (Exception e) { > 80: throw new RuntimeException(e); Swing is not thread-safe, you should get the location and size on EDT too. Suggestion: try { SwingUtilities.invokeAndWait(() ->{ comboBoxLocation = comboBox.getLocationOnScreen(); comboBoxSize = comboBox.getSize(); closeButton.doClick(); }); } catch (Exception e) { throw new RuntimeException(e); test/jdk/javax/swing/JComboBox/ComboPopupBug.java line 80: > 78: } > 79: catch (Exception e) { > 80: throw new RuntimeException(e); There's no need to catch the exception, just let it propagate. test/jdk/javax/swing/JComboBox/ComboPopupBug.java line 89: > 87: public static void clickComboBox() { > 88: int padding = 10; > 89: robot.mouseMove(comboBoxLocation.x + comboBoxSize.width - padding, comboBoxLocation.y + comboBoxSize.height / 2); I'm sure this line doesn't fit into 80-column limit, I recommend wrapping it. Suggestion: robot.mouseMove(comboBoxLocation.x + comboBoxSize.width - padding, comboBoxLocation.y + comboBoxSize.height / 2); Padding or offset could be a constant declared statically. ------------- PR Review: https://git.openjdk.org/jdk/pull/24624#pullrequestreview-2764590444 PR Review Comment: https://git.openjdk.org/jdk/pull/24624#discussion_r2042302246 PR Review Comment: https://git.openjdk.org/jdk/pull/24624#discussion_r2042300846 PR Review Comment: https://git.openjdk.org/jdk/pull/24624#discussion_r2042306252 PR Review Comment: https://git.openjdk.org/jdk/pull/24624#discussion_r2042290016 PR Review Comment: https://git.openjdk.org/jdk/pull/24624#discussion_r2042292563 PR Review Comment: https://git.openjdk.org/jdk/pull/24624#discussion_r2042297780 From abaya at openjdk.org Mon Apr 14 14:57:46 2025 From: abaya at openjdk.org (Anass Baya) Date: Mon, 14 Apr 2025 14:57:46 GMT Subject: RFR: 8354219 : Automate javax/swing/JComboBox/ComboPopupBug.java In-Reply-To: References: Message-ID: On Mon, 14 Apr 2025 14:40:46 GMT, Alexey Ivanov wrote: >> This test was designed to manually verify that clicking on the JComboBox when the frame containing it is about to close does not cause an IllegalStateException. >> >> The test allowed the tester extra time to click on the JComboBox when closing the frame by adding a Thread.sleep() in the close button handler. >> >> In this test, a JComboBox is displayed with a Close button at the bottom. The tester should click the Close button, then try to click the JComboBox arrow button to display the popup. >> >> In the automated test, we save the JComboBox location size before closing the frame. We then use this information to click on the JComboBox right before the frame is closed. > > test/jdk/javax/swing/JComboBox/ComboPopupBug.java line 51: > >> 49: >> 50: public static void main(String[] args) throws Exception { >> 51: robot = JRobot.getRobot(); > > You don't use any of `JRobot` features, just use the `Robot` class: `new Robot()`. Thank you for your review @aivanov-jdk But I use the clickMouse() method! If I do that, I?ll need to replace it with something else. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/24624#discussion_r2042328630 From prr at openjdk.org Mon Apr 14 17:00:52 2025 From: prr at openjdk.org (Phil Race) Date: Mon, 14 Apr 2025 17:00:52 GMT Subject: Integrated: 8353483: Open source some JProgressBar tests In-Reply-To: References: Message-ID: On Tue, 8 Apr 2025 17:23:34 GMT, Phil Race wrote: > Open source 4 Swing JProgressBar tests. This pull request has now been integrated. Changeset: 46a6fc84 Author: Phil Race URL: https://git.openjdk.org/jdk/commit/46a6fc84ef17f38eedd49f59a3c05f7c95fe23bc Stats: 458 lines in 4 files changed: 458 ins; 0 del; 0 mod 8353483: Open source some JProgressBar tests Reviewed-by: honkar, serb ------------- PR: https://git.openjdk.org/jdk/pull/24517 From mblaesing at openjdk.org Mon Apr 14 17:19:19 2025 From: mblaesing at openjdk.org (Matthias =?UTF-8?B?QmzDpHNpbmc=?=) Date: Mon, 14 Apr 2025 17:19:19 GMT Subject: RFR: 8353950: Clipboard interaction on Windows is unstable [v2] In-Reply-To: <5TFAUj4XaWqfrY9eWepypDQlUoLp4UXrKf29neAYIc4=.03ccc530-b287-4496-af89-943d603e81b8@github.com> References: <5TFAUj4XaWqfrY9eWepypDQlUoLp4UXrKf29neAYIc4=.03ccc530-b287-4496-af89-943d603e81b8@github.com> Message-ID: > - Introduce a lock into WClipboard that protects the code between > openClipboard/closeClipboard invocations. > The native side does not allow to open the clipboard multiple > times or share the opened clipboard between multiple threads. > > - Remove of need to call openClipboard/closeClipboard from > getClipboardFormats by using the win32 call > GetUpdatedClipboardFormats > > - Prevent a race-condition by not registering the connection > between java and native side of clipboard multiple time, but > just at construction time. Matthias Bl?sing has updated the pull request incrementally with one additional commit since the last revision: Adress review comments: Update copyright years and fix whitespace in if condition ------------- Changes: - all: https://git.openjdk.org/jdk/pull/24614/files - new: https://git.openjdk.org/jdk/pull/24614/files/24c0d0a5..4fa4ef90 Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=24614&range=01 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=24614&range=00-01 Stats: 4 lines in 3 files changed: 0 ins; 0 del; 4 mod Patch: https://git.openjdk.org/jdk/pull/24614.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/24614/head:pull/24614 PR: https://git.openjdk.org/jdk/pull/24614 From aivanov at openjdk.org Mon Apr 14 18:21:42 2025 From: aivanov at openjdk.org (Alexey Ivanov) Date: Mon, 14 Apr 2025 18:21:42 GMT Subject: RFR: 8354219 : Automate javax/swing/JComboBox/ComboPopupBug.java In-Reply-To: References: Message-ID: On Mon, 14 Apr 2025 14:36:26 GMT, Alexey Ivanov wrote: >> This test was designed to manually verify that clicking on the JComboBox when the frame containing it is about to close does not cause an IllegalStateException. >> >> The test allowed the tester extra time to click on the JComboBox when closing the frame by adding a Thread.sleep() in the close button handler. >> >> In this test, a JComboBox is displayed with a Close button at the bottom. The tester should click the Close button, then try to click the JComboBox arrow button to display the popup. >> >> In the automated test, we save the JComboBox location size before closing the frame. We then use this information to click on the JComboBox right before the frame is closed. > > test/jdk/javax/swing/JComboBox/ComboPopupBug.java line 80: > >> 78: } >> 79: catch (Exception e) { >> 80: throw new RuntimeException(e); > > Swing is not thread-safe, you should get the location and size on EDT too. > Suggestion: > > try { > SwingUtilities.invokeAndWait(() ->{ > comboBoxLocation = comboBox.getLocationOnScreen(); > comboBoxSize = comboBox.getSize(); > > closeButton.doClick(); > }); > } > catch (Exception e) { > throw new RuntimeException(e); By the way, since the `closeButton` is clicked on EDT, as it should, you can put both `comboBoxLocation` and `comboBoxSize` into `clickComboBox()` where they're used. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/24624#discussion_r2042673896 From aivanov at openjdk.org Mon Apr 14 18:24:40 2025 From: aivanov at openjdk.org (Alexey Ivanov) Date: Mon, 14 Apr 2025 18:24:40 GMT Subject: RFR: 8354219 : Automate javax/swing/JComboBox/ComboPopupBug.java In-Reply-To: References: Message-ID: On Mon, 14 Apr 2025 14:54:44 GMT, Anass Baya wrote: >> test/jdk/javax/swing/JComboBox/ComboPopupBug.java line 51: >> >>> 49: >>> 50: public static void main(String[] args) throws Exception { >>> 51: robot = JRobot.getRobot(); >> >> You don't use any of `JRobot` features, just use the `Robot` class: `new Robot()`. > > Thank you for your review @aivanov-jdk > But I use the clickMouse() method! If I use the Robot class, I?ll need to replace it with something else. I see, I didn't notice it. You can use the `Robot` method `mousePress` followed by `mouseRelease`; some people like when there's no dependency on test libraries. It's up to you to decide. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/24624#discussion_r2042678140 From duke at openjdk.org Mon Apr 14 21:03:21 2025 From: duke at openjdk.org (Pabulaner IV) Date: Mon, 14 Apr 2025 21:03:21 GMT Subject: RFR: 8332947: [macos] java.awt.desktop.OpenURIHandler is not receiving events Message-ID: When trying to register an open URI handler when using JavaFX with a native menu, this task fails on Mac. Either the native menu is not shown or the URIs are not received. This pull request fixes this issue if AWT is registered after JavaFX, so that AWT runs embedded inside JavaFX. It fixes this by introducing a native event to AWT, which can be used by JavaFX to forward events such as an openURL event. JavaFX Pull Request: https://github.com/openjdk/jfx/pull/1755 Co-Author: @FlorianKirmaier ------------- Commit messages: - 8332947: [macos] java.awt.desktop.OpenURIHandler is not receiving events Changes: https://git.openjdk.org/jdk/pull/24379/files Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=24379&range=00 Issue: https://bugs.openjdk.org/browse/JDK-8332947 Stats: 39 lines in 1 file changed: 26 ins; 13 del; 0 mod Patch: https://git.openjdk.org/jdk/pull/24379.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/24379/head:pull/24379 PR: https://git.openjdk.org/jdk/pull/24379 From duke at openjdk.org Mon Apr 14 21:03:21 2025 From: duke at openjdk.org (Pabulaner IV) Date: Mon, 14 Apr 2025 21:03:21 GMT Subject: RFR: 8332947: [macos] java.awt.desktop.OpenURIHandler is not receiving events In-Reply-To: References: Message-ID: On Wed, 2 Apr 2025 14:15:28 GMT, Pabulaner IV wrote: > When trying to register an open URI handler when using JavaFX with a native menu, this task fails on Mac. > Either the native menu is not shown or the URIs are not received. > > This pull request fixes this issue if AWT is registered after JavaFX, so that AWT runs embedded inside JavaFX. > It fixes this by introducing a native event to AWT, which can be used by JavaFX to forward events such as an openURL event. > > JavaFX Pull Request: https://github.com/openjdk/jfx/pull/1755 > Co-Author: @FlorianKirmaier Are there any news on my OCA status? ------------- PR Comment: https://git.openjdk.org/jdk/pull/24379#issuecomment-2787017001 From prr at openjdk.org Mon Apr 14 22:02:10 2025 From: prr at openjdk.org (Phil Race) Date: Mon, 14 Apr 2025 22:02:10 GMT Subject: RFR: 8139228: JFileChooser renders file names as HTML document In-Reply-To: References: Message-ID: On Fri, 4 Apr 2025 07:21:35 GMT, Tejesh R wrote: > 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 not taken care in any of these renderers, JLabel renders them as HTML document if nothing is set or specified. > The fix is to get "html.disable" property from JFileChooser and set the same to JLabel component which renders and set Directory name. Hence applications can either enable/disable this property and control HTML rendering of directory name. Marked as reviewed by prr (Reviewer). ------------- PR Review: https://git.openjdk.org/jdk/pull/24439#pullrequestreview-2765804459 From azvegint at openjdk.org Mon Apr 14 22:09:57 2025 From: azvegint at openjdk.org (Alexander Zvegintsev) Date: Mon, 14 Apr 2025 22:09:57 GMT Subject: RFR: 8353592: Open source several scrollbar tests In-Reply-To: References: Message-ID: On Fri, 11 Apr 2025 16:57:34 GMT, Harshitha Onkar wrote: >> Few scroll bar tests are open sourced. Testing looks good. > > test/jdk/java/awt/Scrollbar/ListScrollbarTest.java line 27: > >> 25: * @test >> 26: * @bug 4029465 >> 27: * @summary Win95 Multiselect List doesn't display scrollbar > > Suggestion: > > * @summary Win Multiselect List doesn't display scrollbar I prefer to keep the original issue title. > test/jdk/java/awt/Scrollbar/ListScrollbarTest.java line 93: > >> 91: private static void scrollbarCheck(Point point, boolean isScrollbarExpected) { >> 92: Color pixelColor = robot.getPixelColor(point.x, point.y); >> 93: boolean areColorsSimilar = areColorsSimilar(BG_COLOR, pixelColor, 5); > > Mino : tolerance can be declared as static final var Let's keep it local as it is only used once. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/24590#discussion_r2043004754 PR Review Comment: https://git.openjdk.org/jdk/pull/24590#discussion_r2043015632 From azvegint at openjdk.org Mon Apr 14 22:09:56 2025 From: azvegint at openjdk.org (Alexander Zvegintsev) Date: Mon, 14 Apr 2025 22:09:56 GMT Subject: RFR: 8353592: Open source several scrollbar tests In-Reply-To: References: Message-ID: <7C_aJDTl4OGa6MOuj91Fa-fs8tiaQhOB7r25BrWS0qo=.33d1fc31-7335-415f-b9a6-39942e0cc64c@github.com> On Fri, 11 Apr 2025 06:37:58 GMT, Alexander Zvegintsev wrote: > Few scroll bar tests are open sourced. Testing looks good. ------------- PR Review: https://git.openjdk.org/jdk/pull/24590#pullrequestreview-2765796427 From azvegint at openjdk.org Mon Apr 14 22:09:58 2025 From: azvegint at openjdk.org (Alexander Zvegintsev) Date: Mon, 14 Apr 2025 22:09:58 GMT Subject: Integrated: 8353592: Open source several scrollbar tests In-Reply-To: References: Message-ID: On Fri, 11 Apr 2025 06:37:58 GMT, Alexander Zvegintsev wrote: > Few scroll bar tests are open sourced. Testing looks good. This pull request has now been integrated. Changeset: 5280b7b0 Author: Alexander Zvegintsev URL: https://git.openjdk.org/jdk/commit/5280b7b031bb3dc44fb923c3be7ae04ec22fd364 Stats: 382 lines in 3 files changed: 382 ins; 0 del; 0 mod 8353592: Open source several scrollbar tests Reviewed-by: psadhukhan, honkar ------------- PR: https://git.openjdk.org/jdk/pull/24590 From kcr at openjdk.org Mon Apr 14 22:13:47 2025 From: kcr at openjdk.org (Kevin Rushforth) Date: Mon, 14 Apr 2025 22:13:47 GMT Subject: RFR: 8332947: [macos] java.awt.desktop.OpenURIHandler is not receiving events In-Reply-To: References: Message-ID: On Wed, 2 Apr 2025 14:15:28 GMT, Pabulaner IV wrote: > When trying to register an open URI handler when using JavaFX with a native menu, this task fails on Mac. > Either the native menu is not shown or the URIs are not received. > > This pull request fixes this issue if AWT is registered after JavaFX, so that AWT runs embedded inside JavaFX. > It fixes this by introducing a native event to AWT, which can be used by JavaFX to forward events such as an openURL event. > > JavaFX Pull Request: https://github.com/openjdk/jfx/pull/1755 > Co-Author: @FlorianKirmaier As mentioned in [this comment of PR openjfx#1755](https://github.com/openjdk/jfx/pull/1755#issuecomment-2803089437), this fix will need to be tested both with and without the fix for the JavaFX half of the bug to ensure that there are no regressions (and no surprises) when running an unfixed JavaFX with a fixed JDK or vice versa, ------------- PR Comment: https://git.openjdk.org/jdk/pull/24379#issuecomment-2803161128 From honkar at openjdk.org Tue Apr 15 00:04:09 2025 From: honkar at openjdk.org (Harshitha Onkar) Date: Tue, 15 Apr 2025 00:04:09 GMT Subject: RFR: JDK-8353319 : Open source Swing tests - Set 3 Message-ID: Following tests are updates as part of this PR: 1. javax/swing/JRootPane/bug4614623.java - manual 2. javax/swing/JTabbedPane/bug4613811.java - manual 3. javax/swing/JWindow/bug4251781.java - manual 4. javax/swing/JFrame/bug4419914.java - manual, updated existing test by adding JWindow, JDialog cases. ------------- Commit messages: - swing tests Set3 Changes: https://git.openjdk.org/jdk/pull/24639/files Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=24639&range=00 Issue: https://bugs.openjdk.org/browse/JDK-8353319 Stats: 343 lines in 4 files changed: 325 ins; 0 del; 18 mod Patch: https://git.openjdk.org/jdk/pull/24639.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/24639/head:pull/24639 PR: https://git.openjdk.org/jdk/pull/24639 From honkar at openjdk.org Tue Apr 15 00:11:42 2025 From: honkar at openjdk.org (Harshitha Onkar) Date: Tue, 15 Apr 2025 00:11:42 GMT Subject: RFR: 8354214: Open source Swing tests Batch 2 [v2] In-Reply-To: <3gaoQQzBcs0U_33eYTfskJJuS-r65_TuBmQYY7VSYzg=.100ecdea-cdd3-4c59-9bc5-3e98b31a1be3@github.com> References: <3gaoQQzBcs0U_33eYTfskJJuS-r65_TuBmQYY7VSYzg=.100ecdea-cdd3-4c59-9bc5-3e98b31a1be3@github.com> Message-ID: On Mon, 14 Apr 2025 12:54:44 GMT, Jayathirth D V wrote: >> Few swing JList tests are open sourced. > > Jayathirth D V has updated the pull request incrementally with one additional commit since the last revision: > > Update after review Marked as reviewed by honkar (Reviewer). ------------- PR Review: https://git.openjdk.org/jdk/pull/24588#pullrequestreview-2766087311 From honkar at openjdk.org Tue Apr 15 00:16:49 2025 From: honkar at openjdk.org (Harshitha Onkar) Date: Tue, 15 Apr 2025 00:16:49 GMT Subject: RFR: 8353007: Open some JComboBox bugs 2 [v2] In-Reply-To: <-H-tGx9WgKTmLYP7_SxcvaBT0uN27cGdKEZ6tVtUz90=.f8a341f8-4a3c-4d13-885c-1b93f28da699@github.com> References: <-H-tGx9WgKTmLYP7_SxcvaBT0uN27cGdKEZ6tVtUz90=.f8a341f8-4a3c-4d13-885c-1b93f28da699@github.com> Message-ID: On Wed, 9 Apr 2025 00:32:23 GMT, Alisen Chung wrote: >> Updating and opening some tests > > Alisen Chung has updated the pull request incrementally with one additional commit since the last revision: > > update jtreg @alisenchung jtreg path updated but couple of suggestions are pending update yet. ------------- PR Comment: https://git.openjdk.org/jdk/pull/24496#issuecomment-2803381789 From honkar at openjdk.org Tue Apr 15 00:40:41 2025 From: honkar at openjdk.org (Harshitha Onkar) Date: Tue, 15 Apr 2025 00:40:41 GMT Subject: RFR: 8354451: Open source some more Swing popup menu tests In-Reply-To: References: Message-ID: On Mon, 14 Apr 2025 21:52:02 GMT, Phil Race wrote: > Open source some more Swing menu tests test/jdk/javax/swing/JPopupMenu/bug4212464.java line 54: > 52: > 53: static String strMetal = "Metal"; > 54: static String metalClassName = "javax.swing.plaf.metal.MetalLookAndFeel"; Extra space can be removed. test/jdk/javax/swing/JPopupMenu/bug4234793.java line 64: > 62: * 2. The mouse is clicked on another component. > 63: * > 64: * @test `@test` not required here test/jdk/javax/swing/JPopupMenu/bug4234793.java line 84: > 82: > 83: Notice each time you perform a hide/cancel action an appropriate message should > 84: appear in the log area _"Click to display the menu, then to hide it, LEFT click on the window background."_ does not produce PopupMenu cancelled msg for the 2 menus on the menubar and the combobox menu. But clicking the mouse on another component does cause the popup cancelled msg to be displayed. test/jdk/javax/swing/JPopupMenu/bug4234793.java line 194: > 192: > 193: //message.setText(msg); > 194: //message.repaint(); Commented lines can be removed. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/24636#discussion_r2043230778 PR Review Comment: https://git.openjdk.org/jdk/pull/24636#discussion_r2043237791 PR Review Comment: https://git.openjdk.org/jdk/pull/24636#discussion_r2043237822 PR Review Comment: https://git.openjdk.org/jdk/pull/24636#discussion_r2043240833 From honkar at openjdk.org Tue Apr 15 00:47:42 2025 From: honkar at openjdk.org (Harshitha Onkar) Date: Tue, 15 Apr 2025 00:47:42 GMT Subject: RFR: 8354451: Open source some more Swing popup menu tests In-Reply-To: References: Message-ID: On Tue, 15 Apr 2025 00:33:31 GMT, Harshitha Onkar wrote: >> Open source some more Swing menu tests > > test/jdk/javax/swing/JPopupMenu/bug4234793.java line 84: > >> 82: >> 83: Notice each time you perform a hide/cancel action an appropriate message should >> 84: appear in the log area > > _"Click to display the menu, then to hide it, LEFT click on the window background."_ does not produce PopupMenu cancelled msg for the 2 menus on the menubar and the combobox menu. But clicking the mouse on another component does cause the popup cancelled msg to be displayed. I didn't notice it earlier ... I see why the msg is not logged in PFJ.logArea. The "popupMenuWillBecomeInvisible: " needs to be added to the PFJ.log() instead of standard out. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/24636#discussion_r2043247341 From honkar at openjdk.org Tue Apr 15 00:51:47 2025 From: honkar at openjdk.org (Harshitha Onkar) Date: Tue, 15 Apr 2025 00:51:47 GMT Subject: RFR: 8354451: Open source some more Swing popup menu tests In-Reply-To: References: Message-ID: On Mon, 14 Apr 2025 21:52:02 GMT, Phil Race wrote: > Open source some more Swing menu tests test/jdk/javax/swing/JPopupMenu/bug4234793.java line 178: > 176: comboPanel.add(combo); > 177: > 178: //JLabel message = new JLabel("Message area"); Commented stmts can be removed. test/jdk/javax/swing/JPopupMenu/bug4234793.java line 243: > 241: public void popupMenuWillBecomeVisible(PopupMenuEvent e) { > 242: Object source = e.getSource(); > 243: setMessage("popupmenu visible: " + source.getClass().getName()); Here and at other locations Suggestion: PassFailJFrame.log("popupmenu visible: " + source.getClass().getName()); test/jdk/javax/swing/JPopupMenu/bug4234793.java line 248: > 246: public void popupMenuWillBecomeInvisible(PopupMenuEvent e) { > 247: Object source = e.getSource(); > 248: System.out.println("popupMenuWillBecomeInvisible: " + source.getClass().getName()); Suggestion: PassFailJFrame.log("popupMenuWillBecomeInvisible: " + source.getClass().getName()); ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/24636#discussion_r2043251119 PR Review Comment: https://git.openjdk.org/jdk/pull/24636#discussion_r2043249646 PR Review Comment: https://git.openjdk.org/jdk/pull/24636#discussion_r2043250194 From abhiscxk at openjdk.org Tue Apr 15 04:35:43 2025 From: abhiscxk at openjdk.org (Abhishek Kumar) Date: Tue, 15 Apr 2025 04:35:43 GMT Subject: RFR: JDK-8353319 : Open source Swing tests - Set 3 In-Reply-To: References: Message-ID: <9jvfiW39d1WlIGj3eHwba62BmDHB5p8foGmpeqw0qSI=.029fd692-f9cc-4ae8-8617-78a4b1df38a9@github.com> On Mon, 14 Apr 2025 23:58:40 GMT, Harshitha Onkar wrote: > Following tests are updates as part of this PR: > > 1. javax/swing/JRootPane/bug4614623.java - manual > 2. javax/swing/JTabbedPane/bug4613811.java - manual > 3. javax/swing/JWindow/bug4251781.java - manual > 4. javax/swing/JFrame/bug4419914.java - manual, updated existing test by adding JWindow, JDialog cases. test/jdk/javax/swing/JFrame/bug4419914.java line 69: > 67: END CENTER START > 68: > 69: 3. Press on the "START" button in case JWindow & JDialog and "NORTH" Suggestion: 3. Press on the "START" button in case of JWindow & JDialog and "NORTH" test/jdk/javax/swing/JFrame/bug4419914.java line 91: > 89: .title("Tab movement Instructions") > 90: .instructions(INSTRUCTIONS) > 91: .rows((int) INSTRUCTIONS.lines().count() + 2) setting row count is optional, can be removed. test/jdk/javax/swing/JFrame/bug4419914.java line 93: > 91: .rows((int) INSTRUCTIONS.lines().count() + 2) > 92: .columns(45) > 93: .testTimeOut(15) I guess time out of 10 is sufficient for this test to verify. test/jdk/javax/swing/JFrame/bug4419914.java line 95: > 93: .testTimeOut(15) > 94: .testUI(bug4419914::createAndShowUI) > 95: .positionTestUI(WindowLayouts::rightOneRow) I find `WindowLayouts::rightOneColumn` suitable for the testUIs alignment. Test windows are aligned vertically which looks better than horizontal alignment. test/jdk/javax/swing/JFrame/bug4419914.java line 144: > 142: window.add(new JButton("END"), BorderLayout.LINE_END); > 143: > 144: JButton quitButton = new JButton("Quit"); For consistency with other UI component's text Suggestion: JButton quitButton = new JButton("QUIT"); test/jdk/javax/swing/JRootPane/bug4614623.java line 50: > 48: 2) Release the Alt key, the selection background (light grey) > 49: should appear around the File menu. Compare "About" menu > 50: with "File" menu to see the light grey selection background. Either use `""` for all the occurrence of menus else remove it for consistency Suggestion: should appear around the File menu. Compare About menu with File menu to see the light grey selection background. test/jdk/javax/swing/JRootPane/bug4614623.java line 62: > 60: .instructions(INSTRUCTIONS) > 61: .columns(62) > 62: .rows(12) Column of 35 looks much better than 62. You can remove setting up rows explicitly. test/jdk/javax/swing/JTabbedPane/bug4613811.java line 48: > 46: > 47: If the last tab (Tab 5) is visible, the right arrow > 48: button should be disabled. on macOS, When the 1st tab is visible, the left arrow is not at all visible and right arrow is not visible for 5th tab. I guess they are either not rendered or hidden. Need to modify test instruction as per the platform. test/jdk/javax/swing/JTabbedPane/bug4613811.java line 57: > 55: .title("Test Instructions") > 56: .instructions(INSTRUCTIONS) > 57: .columns(40) width of 30 should be enough ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/24639#discussion_r2043525793 PR Review Comment: https://git.openjdk.org/jdk/pull/24639#discussion_r2043542819 PR Review Comment: https://git.openjdk.org/jdk/pull/24639#discussion_r2043543351 PR Review Comment: https://git.openjdk.org/jdk/pull/24639#discussion_r2043530095 PR Review Comment: https://git.openjdk.org/jdk/pull/24639#discussion_r2043537364 PR Review Comment: https://git.openjdk.org/jdk/pull/24639#discussion_r2043546404 PR Review Comment: https://git.openjdk.org/jdk/pull/24639#discussion_r2043545250 PR Review Comment: https://git.openjdk.org/jdk/pull/24639#discussion_r2043555188 PR Review Comment: https://git.openjdk.org/jdk/pull/24639#discussion_r2043551372 From tr at openjdk.org Tue Apr 15 05:25:29 2025 From: tr at openjdk.org (Tejesh R) Date: Tue, 15 Apr 2025 05:25:29 GMT Subject: RFR: 8353958: Open source several AWT ScrollPane tests - Batch 2 Message-ID: <4vl6h3xyMQB1Qk0ZqdGk2iNi6mgf8gw4XW3m81ScExI=.a94ef19f-1081-404d-a26e-1b857b5563bf@github.com> Open source these AWT ScrollPane tests: java/awt/ScrollPane/ScrollPaneSize/ScrollPaneSize.java java/awt/ScrollPane/ScrollPaneAsNeededTest/ScrollPaneAsNeededTest.java java/awt/ScrollPane/ScrollPaneComponentTest/ScrollPaneComponentTest.java java/awt/ScrollPane/ScrollPaneScrollType/ScrollPaneEventType.java java/awt/ScrollPane/ScrollPanechildViewportTest/ScrollPanechildViewportTest.java ------------- Commit messages: - Open source Changes: https://git.openjdk.org/jdk/pull/24647/files Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=24647&range=00 Issue: https://bugs.openjdk.org/browse/JDK-8353958 Stats: 520 lines in 6 files changed: 520 ins; 0 del; 0 mod Patch: https://git.openjdk.org/jdk/pull/24647.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/24647/head:pull/24647 PR: https://git.openjdk.org/jdk/pull/24647 From tr at openjdk.org Tue Apr 15 06:20:33 2025 From: tr at openjdk.org (Tejesh R) Date: Tue, 15 Apr 2025 06:20:33 GMT Subject: RFR: 8353445: Open source several AWT Menu tests - Batch 1 Message-ID: Open source these AWT Menu tests: java/awt/Menu/MenuVisibilityTest/MenuVisibilityTest.java java/awt/Menu/MenuActionEventTest/MenuActionEventTest.java java/awt/Menu/RmInHideTest/RmInHideTest.java java/awt/Menu/SetShortCutTest/SetShortCutTest.java ------------- Commit messages: - Open source Changes: https://git.openjdk.org/jdk/pull/24649/files Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=24649&range=00 Issue: https://bugs.openjdk.org/browse/JDK-8353445 Stats: 449 lines in 5 files changed: 449 ins; 0 del; 0 mod Patch: https://git.openjdk.org/jdk/pull/24649.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/24649/head:pull/24649 PR: https://git.openjdk.org/jdk/pull/24649 From jdv at openjdk.org Tue Apr 15 07:15:42 2025 From: jdv at openjdk.org (Jayathirth D V) Date: Tue, 15 Apr 2025 07:15:42 GMT Subject: RFR: 8354163: Open source Swing tests Batch 1 Message-ID: <_H6tpZ-QTV_X-_gJyeae4tUEv5MHoJJARZulAm6gMiE=.61283363-0859-4993-83aa-c2baad7b1cfa@github.com> Few Swing AbstractButton, JList and JMenu tests are open sourced. ------------- Commit messages: - Update - 8354163: Open source Swing tests Batch 1 Changes: https://git.openjdk.org/jdk/pull/24650/files Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=24650&range=00 Issue: https://bugs.openjdk.org/browse/JDK-8354163 Stats: 666 lines in 5 files changed: 666 ins; 0 del; 0 mod Patch: https://git.openjdk.org/jdk/pull/24650.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/24650/head:pull/24650 PR: https://git.openjdk.org/jdk/pull/24650 From psadhukhan at openjdk.org Tue Apr 15 07:33:56 2025 From: psadhukhan at openjdk.org (Prasanta Sadhukhan) Date: Tue, 15 Apr 2025 07:33:56 GMT Subject: RFR: 8354163: Open source Swing tests Batch 1 In-Reply-To: <_H6tpZ-QTV_X-_gJyeae4tUEv5MHoJJARZulAm6gMiE=.61283363-0859-4993-83aa-c2baad7b1cfa@github.com> References: <_H6tpZ-QTV_X-_gJyeae4tUEv5MHoJJARZulAm6gMiE=.61283363-0859-4993-83aa-c2baad7b1cfa@github.com> Message-ID: On Tue, 15 Apr 2025 07:09:51 GMT, Jayathirth D V wrote: > Few Swing AbstractButton, JList and JMenu tests are open sourced. test/jdk/javax/swing/AbstractButton/bug4133768.java line 41: > 39: import javax.swing.JToggleButton; > 40: import javax.swing.SwingUtilities; > 41: import java.awt.Color; nitpicking.. awt imports should be before swing. test/jdk/javax/swing/AbstractButton/bug4133768.java line 54: > 52: private static AbstractButton[] buttons; > 53: private static Point buttonLocation; > 54: private static int buttonWidth, buttonHeight; different line declaration needed.. test/jdk/javax/swing/AbstractButton/bug4391622.java line 32: > 30: import javax.swing.JToolBar; > 31: import javax.swing.SwingUtilities; > 32: import java.awt.Color; same test/jdk/javax/swing/AbstractButton/bug4391622.java line 54: > 52: private static JFrame f; > 53: private static Point buttonLocation; > 54: private static int buttonWidth, buttonHeight; different line test/jdk/javax/swing/JList/bug4251306.java line 37: > 35: import javax.swing.SwingUtilities; > 36: import java.awt.Robot; > 37: import java.awt.event.FocusAdapter; same test/jdk/javax/swing/JMenu/bug4624845.java line 56: > 54: private static int subMenuHeight; > 55: private static int menuItemWidth; > 56: private static int menuItemHeight; should be volatile ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/24650#discussion_r2043841369 PR Review Comment: https://git.openjdk.org/jdk/pull/24650#discussion_r2043842296 PR Review Comment: https://git.openjdk.org/jdk/pull/24650#discussion_r2043846784 PR Review Comment: https://git.openjdk.org/jdk/pull/24650#discussion_r2043847039 PR Review Comment: https://git.openjdk.org/jdk/pull/24650#discussion_r2043848118 PR Review Comment: https://git.openjdk.org/jdk/pull/24650#discussion_r2043850693 From psadhukhan at openjdk.org Tue Apr 15 07:33:58 2025 From: psadhukhan at openjdk.org (Prasanta Sadhukhan) Date: Tue, 15 Apr 2025 07:33:58 GMT Subject: RFR: 8354163: Open source Swing tests Batch 1 In-Reply-To: References: <_H6tpZ-QTV_X-_gJyeae4tUEv5MHoJJARZulAm6gMiE=.61283363-0859-4993-83aa-c2baad7b1cfa@github.com> Message-ID: On Tue, 15 Apr 2025 07:26:58 GMT, Prasanta Sadhukhan wrote: >> Few Swing AbstractButton, JList and JMenu tests are open sourced. > > test/jdk/javax/swing/AbstractButton/bug4133768.java line 54: > >> 52: private static AbstractButton[] buttons; >> 53: private static Point buttonLocation; >> 54: private static int buttonWidth, buttonHeight; > > different line declaration needed.. also these vars needed volatile.. > test/jdk/javax/swing/AbstractButton/bug4391622.java line 54: > >> 52: private static JFrame f; >> 53: private static Point buttonLocation; >> 54: private static int buttonWidth, buttonHeight; > > different line volatile ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/24650#discussion_r2043846400 PR Review Comment: https://git.openjdk.org/jdk/pull/24650#discussion_r2043847394 From jdv at openjdk.org Tue Apr 15 07:40:35 2025 From: jdv at openjdk.org (Jayathirth D V) Date: Tue, 15 Apr 2025 07:40:35 GMT Subject: RFR: 8354214: Open source Swing tests Batch 2 [v3] In-Reply-To: References: Message-ID: <7lxblp7ta8bTZIvFmcH7EtbeFw0w0rsyAhnL7TrMIFs=.a8522a3c-dd0e-4967-bd19-3ebcd9dfdcbf@github.com> > Few swing JList tests are open sourced. Jayathirth D V has updated the pull request incrementally with one additional commit since the last revision: Update after review comments ------------- Changes: - all: https://git.openjdk.org/jdk/pull/24588/files - new: https://git.openjdk.org/jdk/pull/24588/files/93791b9a..b0ac7140 Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=24588&range=02 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=24588&range=01-02 Stats: 39 lines in 3 files changed: 15 ins; 15 del; 9 mod Patch: https://git.openjdk.org/jdk/pull/24588.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/24588/head:pull/24588 PR: https://git.openjdk.org/jdk/pull/24588 From jdv at openjdk.org Tue Apr 15 07:40:39 2025 From: jdv at openjdk.org (Jayathirth D V) Date: Tue, 15 Apr 2025 07:40:39 GMT Subject: RFR: 8354214: Open source Swing tests Batch 2 [v2] In-Reply-To: References: <3gaoQQzBcs0U_33eYTfskJJuS-r65_TuBmQYY7VSYzg=.100ecdea-cdd3-4c59-9bc5-3e98b31a1be3@github.com> Message-ID: On Mon, 14 Apr 2025 11:26:18 GMT, Abhishek Kumar wrote: >> Jayathirth D V has updated the pull request incrementally with one additional commit since the last revision: >> >> Update after review > > test/jdk/javax/swing/JList/bug4193267.java line 44: > >> 42: import java.awt.Color; >> 43: import java.awt.FlowLayout; >> 44: import java.awt.GridLayout; > > awt imports can be moved before swing here and in other tests too Updated. > test/jdk/javax/swing/JList/bug4193267.java line 64: > >> 62: .positionTestUI(WindowLayouts::rightOneRow) >> 63: .columns(35) >> 64: .testUI(initialize()) > > Suggestion: > > .testUI(bug4193267::initialize) Updated. > test/jdk/javax/swing/JList/bug4193267.java line 77: > >> 75: JList lst; >> 76: JScrollPane jsp; >> 77: JTextField first, last; > > Can be removed. Updated. > test/jdk/javax/swing/JList/bug4193267.java line 80: > >> 78: JFrame[] fr = new JFrame[2]; >> 79: fr[0] = new JFrame("JList"); >> 80: lst = new JList(data); > > separate declaration can be removed for JList, JScrollPane and JTextField > > Suggestion: > > JList lst = new JList(data); Updated. > test/jdk/javax/swing/JList/bug4193267.java line 83: > >> 81: lst.setLayoutOrientation(JList.VERTICAL_WRAP); >> 82: lst.setVisibleRowCount(4); >> 83: jsp = new JScrollPane(lst); > > Suggestion: > > JScrollPane jsp = new JScrollPane(lst); Updated. > test/jdk/javax/swing/JList/bug4193267.java line 94: > >> 92: JPanel p = new JPanel(); >> 93: p.setLayout(new GridLayout(2, 1)); >> 94: first = new JTextField("0", 2); > > Suggestion: > > JTextField first = new JTextField("0", 2); Updated. > test/jdk/javax/swing/JList/bug4193267.java line 98: > >> 96: first.setBackground(Color.white); >> 97: p.add(first); >> 98: last = new JTextField("9", 2); > > Suggestion: > > JTextField last = new JTextField("9", 2); Updated. > test/jdk/javax/swing/JList/bug4249161.java line 59: > >> 57: .instructions(INSTRUCTIONS) >> 58: .columns(35) >> 59: .testUI(initialize()) > > Suggestion: > > .testUI(bug4249161::initialize) Updated. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/24588#discussion_r2043828131 PR Review Comment: https://git.openjdk.org/jdk/pull/24588#discussion_r2043829261 PR Review Comment: https://git.openjdk.org/jdk/pull/24588#discussion_r2043834068 PR Review Comment: https://git.openjdk.org/jdk/pull/24588#discussion_r2043834326 PR Review Comment: https://git.openjdk.org/jdk/pull/24588#discussion_r2043834665 PR Review Comment: https://git.openjdk.org/jdk/pull/24588#discussion_r2043835525 PR Review Comment: https://git.openjdk.org/jdk/pull/24588#discussion_r2043835852 PR Review Comment: https://git.openjdk.org/jdk/pull/24588#discussion_r2043837819 From jdv at openjdk.org Tue Apr 15 08:03:16 2025 From: jdv at openjdk.org (Jayathirth D V) Date: Tue, 15 Apr 2025 08:03:16 GMT Subject: RFR: 8354163: Open source Swing tests Batch 1 [v2] In-Reply-To: References: <_H6tpZ-QTV_X-_gJyeae4tUEv5MHoJJARZulAm6gMiE=.61283363-0859-4993-83aa-c2baad7b1cfa@github.com> Message-ID: On Tue, 15 Apr 2025 07:26:44 GMT, Prasanta Sadhukhan wrote: >> Jayathirth D V has updated the pull request incrementally with one additional commit since the last revision: >> >> Update after review comments > > test/jdk/javax/swing/AbstractButton/bug4133768.java line 41: > >> 39: import javax.swing.JToggleButton; >> 40: import javax.swing.SwingUtilities; >> 41: import java.awt.Color; > > nitpicking.. awt imports should be before swing. Updated. > test/jdk/javax/swing/AbstractButton/bug4391622.java line 32: > >> 30: import javax.swing.JToolBar; >> 31: import javax.swing.SwingUtilities; >> 32: import java.awt.Color; > > same Updated. > test/jdk/javax/swing/JList/bug4251306.java line 37: > >> 35: import javax.swing.SwingUtilities; >> 36: import java.awt.Robot; >> 37: import java.awt.event.FocusAdapter; > > same Updated. > test/jdk/javax/swing/JMenu/bug4624845.java line 56: > >> 54: private static int subMenuHeight; >> 55: private static int menuItemWidth; >> 56: private static int menuItemHeight; > > should be volatile Updated. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/24650#discussion_r2043870949 PR Review Comment: https://git.openjdk.org/jdk/pull/24650#discussion_r2043884229 PR Review Comment: https://git.openjdk.org/jdk/pull/24650#discussion_r2043887001 PR Review Comment: https://git.openjdk.org/jdk/pull/24650#discussion_r2043892430 From jdv at openjdk.org Tue Apr 15 08:03:17 2025 From: jdv at openjdk.org (Jayathirth D V) Date: Tue, 15 Apr 2025 08:03:17 GMT Subject: RFR: 8354163: Open source Swing tests Batch 1 [v2] In-Reply-To: References: <_H6tpZ-QTV_X-_gJyeae4tUEv5MHoJJARZulAm6gMiE=.61283363-0859-4993-83aa-c2baad7b1cfa@github.com> Message-ID: On Tue, 15 Apr 2025 07:28:39 GMT, Prasanta Sadhukhan wrote: >> test/jdk/javax/swing/AbstractButton/bug4133768.java line 54: >> >>> 52: private static AbstractButton[] buttons; >>> 53: private static Point buttonLocation; >>> 54: private static int buttonWidth, buttonHeight; >> >> different line declaration needed.. > > also these vars needed volatile.. Updated. >> test/jdk/javax/swing/AbstractButton/bug4391622.java line 54: >> >>> 52: private static JFrame f; >>> 53: private static Point buttonLocation; >>> 54: private static int buttonWidth, buttonHeight; >> >> different line > > volatile Updated. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/24650#discussion_r2043881930 PR Review Comment: https://git.openjdk.org/jdk/pull/24650#discussion_r2043885836 From jdv at openjdk.org Tue Apr 15 08:03:16 2025 From: jdv at openjdk.org (Jayathirth D V) Date: Tue, 15 Apr 2025 08:03:16 GMT Subject: RFR: 8354163: Open source Swing tests Batch 1 [v2] In-Reply-To: <_H6tpZ-QTV_X-_gJyeae4tUEv5MHoJJARZulAm6gMiE=.61283363-0859-4993-83aa-c2baad7b1cfa@github.com> References: <_H6tpZ-QTV_X-_gJyeae4tUEv5MHoJJARZulAm6gMiE=.61283363-0859-4993-83aa-c2baad7b1cfa@github.com> Message-ID: > Few Swing AbstractButton, JList and JMenu tests are open sourced. Jayathirth D V has updated the pull request incrementally with one additional commit since the last revision: Update after review comments ------------- Changes: - all: https://git.openjdk.org/jdk/pull/24650/files - new: https://git.openjdk.org/jdk/pull/24650/files/b9d1c4d6..442353fd Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=24650&range=01 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=24650&range=00-01 Stats: 61 lines in 4 files changed: 25 ins; 23 del; 13 mod Patch: https://git.openjdk.org/jdk/pull/24650.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/24650/head:pull/24650 PR: https://git.openjdk.org/jdk/pull/24650 From psadhukhan at openjdk.org Tue Apr 15 08:15:41 2025 From: psadhukhan at openjdk.org (Prasanta Sadhukhan) Date: Tue, 15 Apr 2025 08:15:41 GMT Subject: RFR: 8354163: Open source Swing tests Batch 1 [v2] In-Reply-To: References: <_H6tpZ-QTV_X-_gJyeae4tUEv5MHoJJARZulAm6gMiE=.61283363-0859-4993-83aa-c2baad7b1cfa@github.com> Message-ID: On Tue, 15 Apr 2025 08:03:16 GMT, Jayathirth D V wrote: >> Few Swing AbstractButton, JList and JMenu tests are open sourced. > > Jayathirth D V has updated the pull request incrementally with one additional commit since the last revision: > > Update after review comments Marked as reviewed by psadhukhan (Reviewer). ------------- PR Review: https://git.openjdk.org/jdk/pull/24650#pullrequestreview-2767291156 From psadhukhan at openjdk.org Tue Apr 15 08:27:49 2025 From: psadhukhan at openjdk.org (Prasanta Sadhukhan) Date: Tue, 15 Apr 2025 08:27:49 GMT Subject: RFR: 8353958: Open source several AWT ScrollPane tests - Batch 2 In-Reply-To: <4vl6h3xyMQB1Qk0ZqdGk2iNi6mgf8gw4XW3m81ScExI=.a94ef19f-1081-404d-a26e-1b857b5563bf@github.com> References: <4vl6h3xyMQB1Qk0ZqdGk2iNi6mgf8gw4XW3m81ScExI=.a94ef19f-1081-404d-a26e-1b857b5563bf@github.com> Message-ID: <4VtGDH51-LpaA0pZoPHzmobjuLjyJRQQQv1UKq6kSUU=.565182f9-bd22-409b-802d-8d78838f62c0@github.com> On Tue, 15 Apr 2025 05:19:38 GMT, Tejesh R wrote: > Open source these AWT ScrollPane tests: > > java/awt/ScrollPane/ScrollPaneSize/ScrollPaneSize.java > java/awt/ScrollPane/ScrollPaneAsNeededTest/ScrollPaneAsNeededTest.java > java/awt/ScrollPane/ScrollPaneComponentTest/ScrollPaneComponentTest.java > java/awt/ScrollPane/ScrollPaneScrollType/ScrollPaneEventType.java > java/awt/ScrollPane/ScrollPanechildViewportTest/ScrollPanechildViewportTest.java Marked as reviewed by psadhukhan (Reviewer). ------------- PR Review: https://git.openjdk.org/jdk/pull/24647#pullrequestreview-2767334049 From jdv at openjdk.org Tue Apr 15 08:44:49 2025 From: jdv at openjdk.org (Jayathirth D V) Date: Tue, 15 Apr 2025 08:44:49 GMT Subject: Integrated: 8354163: Open source Swing tests Batch 1 In-Reply-To: <_H6tpZ-QTV_X-_gJyeae4tUEv5MHoJJARZulAm6gMiE=.61283363-0859-4993-83aa-c2baad7b1cfa@github.com> References: <_H6tpZ-QTV_X-_gJyeae4tUEv5MHoJJARZulAm6gMiE=.61283363-0859-4993-83aa-c2baad7b1cfa@github.com> Message-ID: On Tue, 15 Apr 2025 07:09:51 GMT, Jayathirth D V wrote: > Few Swing AbstractButton, JList and JMenu tests are open sourced. This pull request has now been integrated. Changeset: b7837843 Author: Jayathirth D V URL: https://git.openjdk.org/jdk/commit/b78378437cf911a527331e6aaf36f968169c0574 Stats: 668 lines in 5 files changed: 668 ins; 0 del; 0 mod 8354163: Open source Swing tests Batch 1 Reviewed-by: psadhukhan ------------- PR: https://git.openjdk.org/jdk/pull/24650 From abhiscxk at openjdk.org Tue Apr 15 09:41:32 2025 From: abhiscxk at openjdk.org (Abhishek Kumar) Date: Tue, 15 Apr 2025 09:41:32 GMT Subject: RFR: 8354493: Opensource Several MultiScreen and Insets related tests Message-ID: Several multi screen related Applet tests are converted to manual and open sourced. ------------- Commit messages: - Applet test converted and open-sourced Changes: https://git.openjdk.org/jdk/pull/24654/files Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=24654&range=00 Issue: https://bugs.openjdk.org/browse/JDK-8354493 Stats: 481 lines in 3 files changed: 481 ins; 0 del; 0 mod Patch: https://git.openjdk.org/jdk/pull/24654.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/24654/head:pull/24654 PR: https://git.openjdk.org/jdk/pull/24654 From tr at openjdk.org Tue Apr 15 10:09:43 2025 From: tr at openjdk.org (Tejesh R) Date: Tue, 15 Apr 2025 10:09:43 GMT Subject: RFR: 8352793: Open source several AWT TextComponent tests - Batch 1 Message-ID: Open source these AWT TextComponent tests: java/awt/TextComponent/BackgroundTest/BackgroundTest.java java/awt/TextComponent/DisableTest/DisableTest.java java/awt/TextComponent/TextFieldMargin/TextFieldMargin.java java/awt/TextComponent/ModifiersTest/ModifiersTest.java ------------- Commit messages: - Open source Changes: https://git.openjdk.org/jdk/pull/24656/files Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=24656&range=00 Issue: https://bugs.openjdk.org/browse/JDK-8352793 Stats: 380 lines in 4 files changed: 380 ins; 0 del; 0 mod Patch: https://git.openjdk.org/jdk/pull/24656.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/24656/head:pull/24656 PR: https://git.openjdk.org/jdk/pull/24656 From tr at openjdk.org Tue Apr 15 10:55:43 2025 From: tr at openjdk.org (Tejesh R) Date: Tue, 15 Apr 2025 10:55:43 GMT Subject: RFR: 8354493: Opensource Several MultiScreen and Insets related tests In-Reply-To: References: Message-ID: On Tue, 15 Apr 2025 09:35:27 GMT, Abhishek Kumar wrote: > Several multi screen related Applet tests are converted to manual and open sourced. test/jdk/java/awt/Multiscreen/DialogTest.java line 232: > 230: > 231: public String toString() { > 232: return "Screen " + num + (frameOwned ? " Frame-owned" : " Dialog-owned") + (modal ? " modal " : " non-modal ") + Column length to be limited to 80. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/24654#discussion_r2044244352 From tr at openjdk.org Tue Apr 15 11:02:39 2025 From: tr at openjdk.org (Tejesh R) Date: Tue, 15 Apr 2025 11:02:39 GMT Subject: RFR: 8352865: Open source several AWT TextComponent tests - Batch 2 [v2] In-Reply-To: References: Message-ID: > Open source these AWT TextComponent tests: > > java/awt/TextComponent/SelectionAndCaretColor/SelectionAndCaretColor.java > java/awt/TextComponent/SelectionTest/SelectionTest.java > java/awt/TextComponent/CorrectTextComponentSelectionTest/CorrectTextComponentSelectionTest.java > java/awt/TextComponent/AltPlusNumberKeyCombinationsTest/AltPlusNumberKeyCombinationsTest.java Tejesh R has updated the pull request incrementally with one additional commit since the last revision: Updated review comments ------------- Changes: - all: https://git.openjdk.org/jdk/pull/24477/files - new: https://git.openjdk.org/jdk/pull/24477/files/4a35b8c1..f2262cfa Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=24477&range=01 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=24477&range=00-01 Stats: 11 lines in 2 files changed: 5 ins; 0 del; 6 mod Patch: https://git.openjdk.org/jdk/pull/24477.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/24477/head:pull/24477 PR: https://git.openjdk.org/jdk/pull/24477 From tr at openjdk.org Tue Apr 15 11:02:40 2025 From: tr at openjdk.org (Tejesh R) Date: Tue, 15 Apr 2025 11:02:40 GMT Subject: RFR: 8352865: Open source several AWT TextComponent tests - Batch 2 [v2] In-Reply-To: References: Message-ID: On Mon, 7 Apr 2025 09:04:29 GMT, Hendrik Schick wrote: >> Tejesh R has updated the pull request incrementally with one additional commit since the last revision: >> >> Updated review comments > > test/jdk/java/awt/TextComponent/AltPlusNumberKeyCombinationsTest.java line 43: > >> 41: String INSTRUCTIONS = """ >> 42: [WINDOWS PLATFORM ONLY] >> 43: Please do the following steps for the both TextField and TextArea: > > Suggestion: > > Please do the following steps for both TextField and TextArea: Updated. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/24477#discussion_r2044258877 From tr at openjdk.org Tue Apr 15 11:02:41 2025 From: tr at openjdk.org (Tejesh R) Date: Tue, 15 Apr 2025 11:02:41 GMT Subject: RFR: 8352865: Open source several AWT TextComponent tests - Batch 2 [v2] In-Reply-To: References: Message-ID: On Fri, 11 Apr 2025 04:14:49 GMT, Sergey Bylokhov wrote: >> Tejesh R has updated the pull request incrementally with one additional commit since the last revision: >> >> Updated review comments > > test/jdk/java/awt/TextComponent/SelectionAndCaretColor.java line 130: > >> 128: }); >> 129: if (flips != 6) { >> 130: throw new RuntimeException("Invalid number of flips: " + flips + " instead of 6"); > > Please wrap the long lines to a maximum of 80 characters per line. Updated. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/24477#discussion_r2044258763 From duke at openjdk.org Tue Apr 15 11:12:57 2025 From: duke at openjdk.org (Hendrik Schick) Date: Tue, 15 Apr 2025 11:12:57 GMT Subject: RFR: 8354451: Open source some more Swing popup menu tests In-Reply-To: References: Message-ID: On Mon, 14 Apr 2025 21:52:02 GMT, Phil Race wrote: > Open source some more Swing menu tests test/jdk/javax/swing/JPopupMenu/bug4212464.java line 125: > 123: public void actionPerformed(ActionEvent e) { > 124: String str = e.getActionCommand(); > 125: if(str.equals(metalClassName) || str.equals(motifClassName)) { Suggestion: if (str.equals(metalClassName) || str.equals(motifClassName)) { test/jdk/javax/swing/JPopupMenu/bug4234793.java line 125: > 123: // CTRL-down will show the popup. > 124: panel.getInputMap().put(KeyStroke.getKeyStroke( > 125: KeyEvent.VK_DOWN,InputEvent.CTRL_MASK),"OPEN_POPUP"); Suggestion: KeyEvent.VK_DOWN,InputEvent.CTRL_MASK), "OPEN_POPUP"); test/jdk/javax/swing/JPopupMenu/bug4234793.java line 158: > 156: } > 157: > 158: static class PopupHandler extends AbstractAction{ Suggestion: static class PopupHandler extends AbstractAction { test/jdk/javax/swing/JPopupMenu/bug4234793.java line 159: > 157: > 158: static class PopupHandler extends AbstractAction{ > 159: public void actionPerformed(ActionEvent e){ Suggestion: public void actionPerformed(ActionEvent e) { test/jdk/javax/swing/JPopupMenu/bug4234793.java line 160: > 158: static class PopupHandler extends AbstractAction{ > 159: public void actionPerformed(ActionEvent e){ > 160: if(!popupMenu.isVisible()) Suggestion: if (!popupMenu.isVisible()) test/jdk/javax/swing/JPopupMenu/bug4234793.java line 207: > 205: > 206: menubar.add(menu); > 207: for(int i = 0; i < 10; i ++) { Suggestion: for (int i = 0; i < 10; i ++) { ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/24636#discussion_r2044277465 PR Review Comment: https://git.openjdk.org/jdk/pull/24636#discussion_r2044274534 PR Review Comment: https://git.openjdk.org/jdk/pull/24636#discussion_r2044275722 PR Review Comment: https://git.openjdk.org/jdk/pull/24636#discussion_r2044275500 PR Review Comment: https://git.openjdk.org/jdk/pull/24636#discussion_r2044275298 PR Review Comment: https://git.openjdk.org/jdk/pull/24636#discussion_r2044270452 From jdv at openjdk.org Tue Apr 15 12:26:48 2025 From: jdv at openjdk.org (Jayathirth D V) Date: Tue, 15 Apr 2025 12:26:48 GMT Subject: RFR: 8353589: Open source a few Swing menu-related tests [v2] In-Reply-To: References: Message-ID: <1SImoFvQsMhYzQjuHev3da_6NdJhf3YFq6NSaffohNM=.d4b04fbe-cd2f-4c0e-87df-cd00265566da@github.com> On Mon, 7 Apr 2025 16:41:37 GMT, Phil Race wrote: >> Open source a few tests related to Swing menus. > > Phil Race has updated the pull request incrementally with one additional commit since the last revision: > > 8353589 LGTM. Also tested them on my macOS machine. ------------- Marked as reviewed by jdv (Reviewer). PR Review: https://git.openjdk.org/jdk/pull/24457#pullrequestreview-2768052632 From jdv at openjdk.org Tue Apr 15 12:39:46 2025 From: jdv at openjdk.org (Jayathirth D V) Date: Tue, 15 Apr 2025 12:39:46 GMT Subject: RFR: 8352865: Open source several AWT TextComponent tests - Batch 2 [v2] In-Reply-To: References: Message-ID: On Tue, 15 Apr 2025 11:02:39 GMT, Tejesh R wrote: >> Open source these AWT TextComponent tests: >> >> java/awt/TextComponent/SelectionAndCaretColor/SelectionAndCaretColor.java >> java/awt/TextComponent/SelectionTest/SelectionTest.java >> java/awt/TextComponent/CorrectTextComponentSelectionTest/CorrectTextComponentSelectionTest.java >> java/awt/TextComponent/AltPlusNumberKeyCombinationsTest/AltPlusNumberKeyCombinationsTest.java > > Tejesh R has updated the pull request incrementally with one additional commit since the last revision: > > Updated review comments Marked as reviewed by jdv (Reviewer). test/jdk/java/awt/TextComponent/AltPlusNumberKeyCombinationsTest.java line 65: > 63: > 64: public static Frame initialize() { > 65: Frame f; Declaration and initialization can de done at same place. ------------- PR Review: https://git.openjdk.org/jdk/pull/24477#pullrequestreview-2768066004 PR Review Comment: https://git.openjdk.org/jdk/pull/24477#discussion_r2044413103 From duke at openjdk.org Tue Apr 15 12:43:47 2025 From: duke at openjdk.org (Hendrik Schick) Date: Tue, 15 Apr 2025 12:43:47 GMT Subject: RFR: 8354451: Open source some more Swing popup menu tests In-Reply-To: References: Message-ID: On Mon, 14 Apr 2025 21:52:02 GMT, Phil Race wrote: > Open source some more Swing menu tests test/jdk/javax/swing/JPopupMenu/bug4234793.java line 241: > 239: // PopupMenuListener methods. > 240: > 241: public void popupMenuWillBecomeVisible(PopupMenuEvent e) { Suggestion: public void popupMenuWillBecomeVisible(PopupMenuEvent e) { ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/24636#discussion_r2044437104 From jdv at openjdk.org Tue Apr 15 12:53:47 2025 From: jdv at openjdk.org (Jayathirth D V) Date: Tue, 15 Apr 2025 12:53:47 GMT Subject: RFR: 8352682: Opensource JComponent tests [v3] In-Reply-To: <7JEA7mAXB16LcLS1oc_Zt4wN8upQ1YnpT9OiT6xcXuw=.14149bac-3c0f-480e-b25b-b586007484d2@github.com> References: <7JEA7mAXB16LcLS1oc_Zt4wN8upQ1YnpT9OiT6xcXuw=.14149bac-3c0f-480e-b25b-b586007484d2@github.com> Message-ID: <6XvwlSoy6lemoYdiWhK8Hujg2kEQqQDvlIgO-z8MFDo=.e293cdff-2105-4035-9316-6785db46f46b@github.com> On Mon, 14 Apr 2025 12:53:59 GMT, Prasanta Sadhukhan wrote: >> Few JComponent tests are opensourced > > Prasanta Sadhukhan has updated the pull request incrementally with one additional commit since the last revision: > > Redundant method removed Marked as reviewed by jdv (Reviewer). ------------- PR Review: https://git.openjdk.org/jdk/pull/24562#pullrequestreview-2768138069 From abhiscxk at openjdk.org Tue Apr 15 13:01:50 2025 From: abhiscxk at openjdk.org (Abhishek Kumar) Date: Tue, 15 Apr 2025 13:01:50 GMT Subject: RFR: 8354214: Open source Swing tests Batch 2 [v3] In-Reply-To: <7lxblp7ta8bTZIvFmcH7EtbeFw0w0rsyAhnL7TrMIFs=.a8522a3c-dd0e-4967-bd19-3ebcd9dfdcbf@github.com> References: <7lxblp7ta8bTZIvFmcH7EtbeFw0w0rsyAhnL7TrMIFs=.a8522a3c-dd0e-4967-bd19-3ebcd9dfdcbf@github.com> Message-ID: On Tue, 15 Apr 2025 07:40:35 GMT, Jayathirth D V wrote: >> Few swing JList tests are open sourced. > > Jayathirth D V has updated the pull request incrementally with one additional commit since the last revision: > > Update after review comments LGTM now. ------------- Marked as reviewed by abhiscxk (Reviewer). PR Review: https://git.openjdk.org/jdk/pull/24588#pullrequestreview-2768167498 From abaya at openjdk.org Tue Apr 15 13:50:01 2025 From: abaya at openjdk.org (Anass Baya) Date: Tue, 15 Apr 2025 13:50:01 GMT Subject: RFR: 8354219 : Automate javax/swing/JComboBox/ComboPopupBug.java [v2] In-Reply-To: References: Message-ID: > This test was designed to manually verify that clicking on the JComboBox when the frame containing it is about to close does not cause an IllegalStateException. > > The test allowed the tester extra time to click on the JComboBox when closing the frame by adding a Thread.sleep() in the close button handler. > > In this test, a JComboBox is displayed with a Close button at the bottom. The tester should click the Close button, then try to click the JComboBox arrow button to display the popup. > > In the automated test, we save the JComboBox location size before closing the frame. We then use this information to click on the JComboBox right before the frame is closed. Anass Baya has updated the pull request incrementally with one additional commit since the last revision: Use Robot class Update copyright get comboBox size and location under the EDT ------------- Changes: - all: https://git.openjdk.org/jdk/pull/24624/files - new: https://git.openjdk.org/jdk/pull/24624/files/58ea5fa5..740c890c Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=24624&range=01 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=24624&range=00-01 Stats: 17 lines in 1 file changed: 4 ins; 1 del; 12 mod Patch: https://git.openjdk.org/jdk/pull/24624.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/24624/head:pull/24624 PR: https://git.openjdk.org/jdk/pull/24624 From duke at openjdk.org Tue Apr 15 14:01:41 2025 From: duke at openjdk.org (Hendrik Schick) Date: Tue, 15 Apr 2025 14:01:41 GMT Subject: RFR: JDK-8353319 : Open source Swing tests - Set 3 In-Reply-To: References: Message-ID: On Mon, 14 Apr 2025 23:58:40 GMT, Harshitha Onkar wrote: > Following tests are updates as part of this PR: > > 1. javax/swing/JRootPane/bug4614623.java - manual > 2. javax/swing/JTabbedPane/bug4613811.java - manual > 3. javax/swing/JWindow/bug4251781.java - manual > 4. javax/swing/JFrame/bug4419914.java - manual, updated existing test by adding JWindow, JDialog cases. test/jdk/javax/swing/JFrame/bug4419914.java line 28: > 26: * @bug 4419914 > 27: * @summary Tests that tab movement is correct in RTL component orientation. > 28: * @library /java/awt/regtesthelpers copyright year update is missing ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/24639#discussion_r2044624731 From abaya at openjdk.org Tue Apr 15 14:06:56 2025 From: abaya at openjdk.org (Anass Baya) Date: Tue, 15 Apr 2025 14:06:56 GMT Subject: RFR: 8354219 : Automate javax/swing/JComboBox/ComboPopupBug.java [v3] In-Reply-To: References: Message-ID: > This test was designed to manually verify that clicking on the JComboBox when the frame containing it is about to close does not cause an IllegalStateException. > > The test allowed the tester extra time to click on the JComboBox when closing the frame by adding a Thread.sleep() in the close button handler. > > In this test, a JComboBox is displayed with a Close button at the bottom. The tester should click the Close button, then try to click the JComboBox arrow button to display the popup. > > In the automated test, we save the JComboBox location size before closing the frame. We then use this information to click on the JComboBox right before the frame is closed. Anass Baya has updated the pull request incrementally with one additional commit since the last revision: Puting both comboBoxLocation and comboBoxSize into clickComboBox().sed. ------------- Changes: - all: https://git.openjdk.org/jdk/pull/24624/files - new: https://git.openjdk.org/jdk/pull/24624/files/740c890c..a925cc21 Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=24624&range=02 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=24624&range=01-02 Stats: 8 lines in 1 file changed: 3 ins; 4 del; 1 mod Patch: https://git.openjdk.org/jdk/pull/24624.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/24624/head:pull/24624 PR: https://git.openjdk.org/jdk/pull/24624 From duke at openjdk.org Tue Apr 15 14:31:53 2025 From: duke at openjdk.org (Hendrik Schick) Date: Tue, 15 Apr 2025 14:31:53 GMT Subject: RFR: 8353958: Open source several AWT ScrollPane tests - Batch 2 In-Reply-To: <4vl6h3xyMQB1Qk0ZqdGk2iNi6mgf8gw4XW3m81ScExI=.a94ef19f-1081-404d-a26e-1b857b5563bf@github.com> References: <4vl6h3xyMQB1Qk0ZqdGk2iNi6mgf8gw4XW3m81ScExI=.a94ef19f-1081-404d-a26e-1b857b5563bf@github.com> Message-ID: <5Xcnjw6EDJ1EeHcixvdUsHqWCc3GEMB1iUx6SGmoQYY=.b6589326-2b4d-495b-b25a-67f6187757de@github.com> On Tue, 15 Apr 2025 05:19:38 GMT, Tejesh R wrote: > Open source these AWT ScrollPane tests: > > java/awt/ScrollPane/ScrollPaneSize/ScrollPaneSize.java > java/awt/ScrollPane/ScrollPaneAsNeededTest/ScrollPaneAsNeededTest.java > java/awt/ScrollPane/ScrollPaneComponentTest/ScrollPaneComponentTest.java > java/awt/ScrollPane/ScrollPaneScrollType/ScrollPaneEventType.java > java/awt/ScrollPane/ScrollPanechildViewportTest/ScrollPanechildViewportTest.java test/jdk/java/awt/ScrollPane/ScrollPaneComponentTest.java line 52: > 50: in the Frame titled 'ScrollPane Component Test' > 51: 2. Click the button labeled 'Remove and add back > 52: ScrollPane Contents Suggestion: ScrollPane Contents' ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/24647#discussion_r2044744576 From abhiscxk at openjdk.org Tue Apr 15 16:03:55 2025 From: abhiscxk at openjdk.org (Abhishek Kumar) Date: Tue, 15 Apr 2025 16:03:55 GMT Subject: RFR: 8354493: Opensource Several MultiScreen and Insets related tests [v2] In-Reply-To: References: Message-ID: > Several multi screen related Applet tests are converted to manual and open sourced. Abhishek Kumar has updated the pull request incrementally with one additional commit since the last revision: Limit to 80 cols ------------- Changes: - all: https://git.openjdk.org/jdk/pull/24654/files - new: https://git.openjdk.org/jdk/pull/24654/files/264e8bb3..f16a018c Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=24654&range=01 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=24654&range=00-01 Stats: 13 lines in 3 files changed: 6 ins; 0 del; 7 mod Patch: https://git.openjdk.org/jdk/pull/24654.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/24654/head:pull/24654 PR: https://git.openjdk.org/jdk/pull/24654 From abhiscxk at openjdk.org Tue Apr 15 16:03:56 2025 From: abhiscxk at openjdk.org (Abhishek Kumar) Date: Tue, 15 Apr 2025 16:03:56 GMT Subject: RFR: 8354493: Opensource Several MultiScreen and Insets related tests [v2] In-Reply-To: References: Message-ID: On Tue, 15 Apr 2025 10:50:31 GMT, Tejesh R wrote: >> Abhishek Kumar has updated the pull request incrementally with one additional commit since the last revision: >> >> Limit to 80 cols > > test/jdk/java/awt/Multiscreen/DialogTest.java line 232: > >> 230: >> 231: public String toString() { >> 232: return "Screen " + num + (frameOwned ? " Frame-owned" : " Dialog-owned") + (modal ? " modal " : " non-modal ") + > > Column length to be limited to 80. Updated ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/24654#discussion_r2044975757 From honkar at openjdk.org Tue Apr 15 17:20:16 2025 From: honkar at openjdk.org (Harshitha Onkar) Date: Tue, 15 Apr 2025 17:20:16 GMT Subject: RFR: JDK-8353319 : Open source Swing tests - Set 3 [v2] In-Reply-To: References: Message-ID: > Following tests are updates as part of this PR: > > 1. javax/swing/JRootPane/bug4614623.java - manual > 2. javax/swing/JTabbedPane/bug4613811.java - manual > 3. javax/swing/JWindow/bug4251781.java - manual > 4. javax/swing/JFrame/bug4419914.java - manual, updated existing test by adding JWindow, JDialog cases. Harshitha Onkar has updated the pull request incrementally with two additional commits since the last revision: - review update - review update ------------- Changes: - all: https://git.openjdk.org/jdk/pull/24639/files - new: https://git.openjdk.org/jdk/pull/24639/files/37c7e636..82f4d35a Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=24639&range=01 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=24639&range=00-01 Stats: 11 lines in 3 files changed: 0 ins; 1 del; 10 mod Patch: https://git.openjdk.org/jdk/pull/24639.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/24639/head:pull/24639 PR: https://git.openjdk.org/jdk/pull/24639 From honkar at openjdk.org Tue Apr 15 17:20:17 2025 From: honkar at openjdk.org (Harshitha Onkar) Date: Tue, 15 Apr 2025 17:20:17 GMT Subject: RFR: JDK-8353319 : Open source Swing tests - Set 3 [v2] In-Reply-To: <9jvfiW39d1WlIGj3eHwba62BmDHB5p8foGmpeqw0qSI=.029fd692-f9cc-4ae8-8617-78a4b1df38a9@github.com> References: <9jvfiW39d1WlIGj3eHwba62BmDHB5p8foGmpeqw0qSI=.029fd692-f9cc-4ae8-8617-78a4b1df38a9@github.com> Message-ID: On Tue, 15 Apr 2025 04:22:15 GMT, Abhishek Kumar wrote: >> Harshitha Onkar has updated the pull request incrementally with two additional commits since the last revision: >> >> - review update >> - review update > > test/jdk/javax/swing/JRootPane/bug4614623.java line 62: > >> 60: .instructions(INSTRUCTIONS) >> 61: .columns(62) >> 62: .rows(12) > > Column of 35 looks much better than 62. > You can remove setting up rows explicitly. The current setting looks good on Windows LAF (monospaced font in instructions window) ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/24639#discussion_r2045107486 From honkar at openjdk.org Tue Apr 15 17:23:48 2025 From: honkar at openjdk.org (Harshitha Onkar) Date: Tue, 15 Apr 2025 17:23:48 GMT Subject: RFR: 8352682: Opensource JComponent tests [v3] In-Reply-To: <7JEA7mAXB16LcLS1oc_Zt4wN8upQ1YnpT9OiT6xcXuw=.14149bac-3c0f-480e-b25b-b586007484d2@github.com> References: <7JEA7mAXB16LcLS1oc_Zt4wN8upQ1YnpT9OiT6xcXuw=.14149bac-3c0f-480e-b25b-b586007484d2@github.com> Message-ID: On Mon, 14 Apr 2025 12:53:59 GMT, Prasanta Sadhukhan wrote: >> Few JComponent tests are opensourced > > Prasanta Sadhukhan has updated the pull request incrementally with one additional commit since the last revision: > > Redundant method removed Marked as reviewed by honkar (Reviewer). ------------- PR Review: https://git.openjdk.org/jdk/pull/24562#pullrequestreview-2769222709 From ngubarkov at openjdk.org Tue Apr 15 17:30:44 2025 From: ngubarkov at openjdk.org (Nikita Gubarkov) Date: Tue, 15 Apr 2025 17:30:44 GMT Subject: RFR: 8353230: Emoji rendering regression after JDK-8208377 In-Reply-To: <-N8_d2SHcl-h9yG8t6-WKGF_nGLJZQTu4ymMD2oPGrg=.651c8251-b235-4681-b82a-4ee680eb6593@github.com> References: <-N8_d2SHcl-h9yG8t6-WKGF_nGLJZQTu4ymMD2oPGrg=.651c8251-b235-4681-b82a-4ee680eb6593@github.com> Message-ID: On Thu, 3 Apr 2025 11:23:42 GMT, Daniel Gredler wrote: > It looks like this regression actually fits into a longer series of fixes / regressions in this area: > > - [JDK-4517298](https://bugs.openjdk.org/browse/JDK-4517298) fixed metrics for zero-width characters, but broke some ligatures / glyph substitutions > - [JDK-7017058](https://bugs.openjdk.org/browse/JDK-7017058) fixed the ligatures / glyph substitutions, but broke some zero-width metrics > - [JDK-8208377](https://bugs.openjdk.org/browse/JDK-8208377) fixed some metrics and rendering for zero-width characters, but broke some ligatures / glyph substitutions > - Now, with this PR, we aim to fix the ligatures without re-breaking zero-width metrics and display > > We have two different types of use cases pulling `CharToGlyphMapper` in two different directions: the users who need raw, untransformed glyph info, and the users who need normalized / transformed glyph info. > > It looks to me like, in the current code base, the only `CharToGlyphMapper` user which requires raw font data is HarfBuzz (explicitly confirmed with the HarfBuzz team here: https://github.com/harfbuzz/harfbuzz/discussions/5234). > > The regression mechanism at play here is that the HarfBuzz font callbacks are currently providing HarfBuzz with transformed glyph info (e.g. ZWJ -> INVISIBLE_GLYPH_ID), which prevents HarfBuzz from recognizing and applying the correct font GSUB substitutions (which involve ZWJ). > > In order to fix this without (yet again) breaking metrics and display behavior elsewhere, I've added two methods to `CharToGlyphMapper` which provide access to raw glyph info, to be used by the HarfBuzz font callbacks: `charToGlyphRaw(int)` and `charToVariationGlyphRaw(int)`. > > Note two intricacies related to `CompositeGlyphMapper`: > 1. We need to be careful to only cache raw (untransformed) values, to avoid conflicts between requests for a raw version of a glyph and a transformed version of the same glyph. Another option would have been two separate caches, but I don't think that's necessary. > 2. Consumers who are using `CompositeGlyphMapper.SLOTMASK` to check glyph slots (e.g. `FontRunIterator` and `CTextPipe`) will "see" invisible glyphs as having come from slot 0. This isn't new, and I think it's OK, but something to be aware of. > > The glyph cache handling in `CCharToGlyphMapper` (for macOS) also requires care to avoid mixing value types. > > Please also note that I'm not sure if the tweak to `sunFont.c` is being tested, since FFM is being used by default for HarfBuzz integration. (Is there a plan to remove... We had similar emoji-related regressions at JetBrains. Although our font-related code diverged from OpenJDK a bit, porting this patch seems to resolve them too. I am not an OpenJDK reviewer, but LGTM nevertheless. ------------- PR Comment: https://git.openjdk.org/jdk/pull/24412#issuecomment-2806961451 From kizune at openjdk.org Tue Apr 15 17:35:10 2025 From: kizune at openjdk.org (Alexander Zuev) Date: Tue, 15 Apr 2025 17:35:10 GMT Subject: RFR: 8354106: Clean up and open source KeyEvent related tests (Part 2) [v2] In-Reply-To: References: Message-ID: > Clean up and open source two more tests related to KeyEvent mechanics. Alexander Zuev has updated the pull request incrementally with one additional commit since the last revision: Fixed bug ids list ------------- Changes: - all: https://git.openjdk.org/jdk/pull/24610/files - new: https://git.openjdk.org/jdk/pull/24610/files/bb982766..e029a9ba Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=24610&range=01 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=24610&range=00-01 Stats: 1 line in 1 file changed: 0 ins; 0 del; 1 mod Patch: https://git.openjdk.org/jdk/pull/24610.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/24610/head:pull/24610 PR: https://git.openjdk.org/jdk/pull/24610 From kizune at openjdk.org Tue Apr 15 17:35:11 2025 From: kizune at openjdk.org (Alexander Zuev) Date: Tue, 15 Apr 2025 17:35:11 GMT Subject: RFR: 8354106: Clean up and open source KeyEvent related tests (Part 2) [v2] In-Reply-To: References: Message-ID: On Mon, 14 Apr 2025 11:15:28 GMT, Abhishek Kumar wrote: >> Alexander Zuev has updated the pull request incrementally with one additional commit since the last revision: >> >> Fixed bug ids list > > test/jdk/java/awt/event/KeyEvent/KeyTest.java line 26: > >> 24: /* >> 25: * @test >> 26: * @bug 4151419, 4090870, 4169733 > > `Error. Parse Exception: Invalid or unrecognized bugid: 4151419,` > No need of `comma` for multiple bugids > > Suggestion: > > * @bug 4151419 4090870 4169733 Fixed. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/24610#discussion_r2045135538 From rmahajan at openjdk.org Tue Apr 15 17:47:50 2025 From: rmahajan at openjdk.org (Rajat Mahajan) Date: Tue, 15 Apr 2025 17:47:50 GMT Subject: RFR: 8351884: Refactor bug8033699.java test code In-Reply-To: References: Message-ID: <5Q4kCVIA0nBz4_ui4iIuwtCzaJUZ22LHQDwW6bHxgQE=.63849b3a-e34f-4501-9229-161bdae0d3bd@github.com> On Wed, 2 Apr 2025 17:34:34 GMT, Rajat Mahajan wrote: > Details: > Refactored code as requested in the Bug description. > > Tested and verified the test passes. Can someone please review this? , it has been more than 10 days that it has been out there. Thank you! ------------- PR Comment: https://git.openjdk.org/jdk/pull/24384#issuecomment-2807008094 From abhiscxk at openjdk.org Tue Apr 15 18:03:58 2025 From: abhiscxk at openjdk.org (Abhishek Kumar) Date: Tue, 15 Apr 2025 18:03:58 GMT Subject: RFR: 8354106: Clean up and open source KeyEvent related tests (Part 2) [v2] In-Reply-To: References: Message-ID: On Tue, 15 Apr 2025 17:35:10 GMT, Alexander Zuev wrote: >> Clean up and open source two more tests related to KeyEvent mechanics. > > Alexander Zuev has updated the pull request incrementally with one additional commit since the last revision: > > Fixed bug ids list LGTM ------------- Marked as reviewed by abhiscxk (Reviewer). PR Review: https://git.openjdk.org/jdk/pull/24610#pullrequestreview-2769321231 From kizune at openjdk.org Tue Apr 15 18:29:12 2025 From: kizune at openjdk.org (Alexander Zuev) Date: Tue, 15 Apr 2025 18:29:12 GMT Subject: RFR: 8353655: Clean up and open source KeyEvent related tests (Part 1) [v2] In-Reply-To: References: Message-ID: <876oRDLZI4QM5sR0Zjb7sKIpdTno-DGzaThDgBbrM6I=.551b5dc1-e498-4858-a62b-b1f507f679f0@github.com> > Clean up and open source three tests related to the KeyEvent mechanics. Alexander Zuev has updated the pull request incrementally with one additional commit since the last revision: Small fixes based on review comments ------------- Changes: - all: https://git.openjdk.org/jdk/pull/24609/files - new: https://git.openjdk.org/jdk/pull/24609/files/af6ca77b..b8761634 Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=24609&range=01 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=24609&range=00-01 Stats: 6 lines in 3 files changed: 1 ins; 3 del; 2 mod Patch: https://git.openjdk.org/jdk/pull/24609.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/24609/head:pull/24609 PR: https://git.openjdk.org/jdk/pull/24609 From kizune at openjdk.org Tue Apr 15 18:29:12 2025 From: kizune at openjdk.org (Alexander Zuev) Date: Tue, 15 Apr 2025 18:29:12 GMT Subject: RFR: 8353655: Clean up and open source KeyEvent related tests (Part 1) [v2] In-Reply-To: References: Message-ID: On Mon, 14 Apr 2025 11:17:55 GMT, Abhishek Kumar wrote: >> Alexander Zuev has updated the pull request incrementally with one additional commit since the last revision: >> >> Small fixes based on review comments > > test/jdk/java/awt/event/KeyEvent/FrenchKeyboard.java line 27: > >> 25: * @test >> 26: * @bug 4308606 >> 27: * @summary Tests whether the keys on the numeric keyboard work > > Suggestion: > > * @summary Tests whether the keys on the numeric keyboard work Fixed. > test/jdk/java/awt/event/KeyEvent/FrenchKeyboard.java line 69: > >> 67: .awaitAndCheck(); >> 68: } >> 69: } > > Blank line after this ? Fixed. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/24609#discussion_r2045222220 PR Review Comment: https://git.openjdk.org/jdk/pull/24609#discussion_r2045221736 From duke at openjdk.org Tue Apr 15 19:17:45 2025 From: duke at openjdk.org (Hendrik Schick) Date: Tue, 15 Apr 2025 19:17:45 GMT Subject: RFR: 8353958: Open source several AWT ScrollPane tests - Batch 2 In-Reply-To: <4vl6h3xyMQB1Qk0ZqdGk2iNi6mgf8gw4XW3m81ScExI=.a94ef19f-1081-404d-a26e-1b857b5563bf@github.com> References: <4vl6h3xyMQB1Qk0ZqdGk2iNi6mgf8gw4XW3m81ScExI=.a94ef19f-1081-404d-a26e-1b857b5563bf@github.com> Message-ID: On Tue, 15 Apr 2025 05:19:38 GMT, Tejesh R wrote: > Open source these AWT ScrollPane tests: > > java/awt/ScrollPane/ScrollPaneSize/ScrollPaneSize.java > java/awt/ScrollPane/ScrollPaneAsNeededTest/ScrollPaneAsNeededTest.java > java/awt/ScrollPane/ScrollPaneComponentTest/ScrollPaneComponentTest.java > java/awt/ScrollPane/ScrollPaneScrollType/ScrollPaneEventType.java > java/awt/ScrollPane/ScrollPanechildViewportTest/ScrollPanechildViewportTest.java test/jdk/java/awt/ScrollPane/ScrollPaneSize.java line 97: > 95: add(b3 = new Button("Button3")); > 96: > 97: setBackground(Color.white); background color set twice? test/jdk/java/awt/ScrollPane/ScrollPanechildViewportTest.java line 129: > 127: public Dimension getPreferredSize() { > 128: Dimension d = null; > 129: Dimension pd = ((ScrollPane) getParent()).getViewportSize(); use switch expression (instead of switch statement) to assign a value to d? ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/24647#discussion_r2045294917 PR Review Comment: https://git.openjdk.org/jdk/pull/24647#discussion_r2045290720 From dnguyen at openjdk.org Tue Apr 15 19:37:47 2025 From: dnguyen at openjdk.org (Damon Nguyen) Date: Tue, 15 Apr 2025 19:37:47 GMT Subject: RFR: 8352908: Open source several swing tests batch1 [v2] In-Reply-To: References: Message-ID: <1t12ZHJAHsWYEbK-_G7duGXPub79Vy5kBmu_Q2uVW8o=.e8763932-b053-43d2-8fd0-922e1a64a2b1@github.com> > Open-sourcing and standardizing several tests (JSplitPane JApplet JToolBar) Damon Nguyen has updated the pull request incrementally with one additional commit since the last revision: Update to setPreferredSize ------------- Changes: - all: https://git.openjdk.org/jdk/pull/24559/files - new: https://git.openjdk.org/jdk/pull/24559/files/81cdcd45..87a4df05 Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=24559&range=01 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=24559&range=00-01 Stats: 4 lines in 1 file changed: 0 ins; 0 del; 4 mod Patch: https://git.openjdk.org/jdk/pull/24559.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/24559/head:pull/24559 PR: https://git.openjdk.org/jdk/pull/24559 From dnguyen at openjdk.org Tue Apr 15 19:37:48 2025 From: dnguyen at openjdk.org (Damon Nguyen) Date: Tue, 15 Apr 2025 19:37:48 GMT Subject: RFR: 8352908: Open source several swing tests batch1 [v2] In-Reply-To: References: Message-ID: On Fri, 11 Apr 2025 18:05:15 GMT, Harshitha Onkar wrote: >> Damon Nguyen has updated the pull request incrementally with one additional commit since the last revision: >> >> Update to setPreferredSize > > test/jdk/javax/swing/JSplitPane/bug4749792.java line 53: > >> 51: JPanel right = new JPanel(); >> 52: left.setSize(200, 200); >> 53: right.setSize(200, 200); > > You may want to use preferred size for right and left panes so that the JSplitPane divider is not skewed to the left. > > Suggestion: > > left.setPreferredSize(new Dimension(200, 200)); > right.setPreferredSize(new Dimension(200, 200)); Updated, thanks! > test/jdk/javax/swing/JSplitPane/bug4749792.java line 58: > >> 56: >> 57: JPanel south = new JPanel(); >> 58: south.setSize(new Dimension(20, 20)); > > Same with south and east panels - setPreferredSize() Also updated ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/24559#discussion_r2045322901 PR Review Comment: https://git.openjdk.org/jdk/pull/24559#discussion_r2045323290 From dnguyen at openjdk.org Tue Apr 15 19:38:53 2025 From: dnguyen at openjdk.org (Damon Nguyen) Date: Tue, 15 Apr 2025 19:38:53 GMT Subject: Integrated: 8353000: Open source several swing tests batch2 In-Reply-To: References: Message-ID: On Wed, 9 Apr 2025 22:17:35 GMT, Damon Nguyen wrote: > Open-sourcing and standardizing several tests (metal) This pull request has now been integrated. Changeset: 4e3f1848 Author: Damon Nguyen URL: https://git.openjdk.org/jdk/commit/4e3f1848eeb28a78d71c6ffbda31279cee3fc5ea Stats: 484 lines in 6 files changed: 484 ins; 0 del; 0 mod 8353000: Open source several swing tests batch2 Reviewed-by: azvegint ------------- PR: https://git.openjdk.org/jdk/pull/24560 From honkar at openjdk.org Tue Apr 15 19:57:58 2025 From: honkar at openjdk.org (Harshitha Onkar) Date: Tue, 15 Apr 2025 19:57:58 GMT Subject: RFR: 8351884: Refactor bug8033699.java test code In-Reply-To: References: Message-ID: <3Ezp0nCMjUqfV09qmnDDMHax4O-E-cZIxjS3XldEG1c=.a2f0629d-f200-4248-bcea-7144fb3ad2e5@github.com> On Wed, 2 Apr 2025 17:34:34 GMT, Rajat Mahajan wrote: > Details: > Refactored code as requested in the Bug description. > > Tested and verified the test passes. LGTM apart from minor inline suggestion. Since the test has lot of tab movements, does CI testing look good on all platforms on multiple runs (repeat) ? test/jdk/javax/swing/JRadioButton/8033699/bug8033699.java line 181: > 179: mainFrame.getContentPane() > 180: .setLayout(new BoxLayout(mainFrame.getContentPane(), > 181: BoxLayout.Y_AXIS)); Minor nit: Can be simplified by removing .getContentPane() from ln#170-173) as well similar to the following. Suggestion: mainFrame.setLayout(new BoxLayout(mainFrame.getContentPane(), BoxLayout.Y_AXIS)); ------------- Marked as reviewed by honkar (Reviewer). PR Review: https://git.openjdk.org/jdk/pull/24384#pullrequestreview-2769620853 PR Review Comment: https://git.openjdk.org/jdk/pull/24384#discussion_r2045355995 From kizune at openjdk.org Tue Apr 15 20:09:58 2025 From: kizune at openjdk.org (Alexander Zuev) Date: Tue, 15 Apr 2025 20:09:58 GMT Subject: RFR: 8354451: Open source some more Swing popup menu tests In-Reply-To: References: Message-ID: On Mon, 14 Apr 2025 21:52:02 GMT, Phil Race wrote: > Open source some more Swing menu tests Marked as reviewed by kizune (Reviewer). ------------- PR Review: https://git.openjdk.org/jdk/pull/24636#pullrequestreview-2769672456 From duke at openjdk.org Tue Apr 15 20:21:55 2025 From: duke at openjdk.org (Hendrik Schick) Date: Tue, 15 Apr 2025 20:21:55 GMT Subject: RFR: 8354493: Opensource Several MultiScreen and Insets related tests [v2] In-Reply-To: References: Message-ID: On Tue, 15 Apr 2025 16:03:55 GMT, Abhishek Kumar wrote: >> Several multi screen related Applet tests are converted to manual and open sourced. > > Abhishek Kumar has updated the pull request incrementally with one additional commit since the last revision: > > Limit to 80 cols test/jdk/java/awt/Multiscreen/DialogTest.java line 193: > 191: public Dialog createDialog() { > 192: GraphicsConfiguration gc = gds[num].getDefaultConfiguration(); > 193: String title = toString(); unused, use variable instead of toString() afterwards? test/jdk/java/awt/Multiscreen/DialogTest.java line 210: > 208: } > 209: } else { > 210: if (frameOwned) { this code part is in 'if' and 'else' path, can be done before. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/24654#discussion_r2045407427 PR Review Comment: https://git.openjdk.org/jdk/pull/24654#discussion_r2045409738 From duke at openjdk.org Tue Apr 15 20:25:45 2025 From: duke at openjdk.org (Hendrik Schick) Date: Tue, 15 Apr 2025 20:25:45 GMT Subject: RFR: 8354451: Open source some more Swing popup menu tests In-Reply-To: References: Message-ID: On Mon, 14 Apr 2025 21:52:02 GMT, Phil Race wrote: > Open source some more Swing menu tests test/jdk/javax/swing/JPopupMenu/bug4234793.java line 161: > 159: public void actionPerformed(ActionEvent e){ > 160: if(!popupMenu.isVisible()) > 161: popupMenu.show((Component)e.getSource(),40,40); Suggestion: popupMenu.show((Component) e.getSource(), 40, 40); ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/24636#discussion_r2045415294 From prr at openjdk.org Tue Apr 15 22:18:12 2025 From: prr at openjdk.org (Phil Race) Date: Tue, 15 Apr 2025 22:18:12 GMT Subject: RFR: 8354552: Open source a few Swing tests Message-ID: <2FMzPdjd71su2fN0Bt1Msp6n1J6OEgk9daKDNpmv-HI=.a1596969-234a-482f-9c09-2505efaf74f1@github.com> Open source a few Swing regression tests. ------------- Commit messages: - 8354552 - 83545528354552owd Changes: https://git.openjdk.org/jdk/pull/24668/files Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=24668&range=00 Issue: https://bugs.openjdk.org/browse/JDK-8354552 Stats: 323 lines in 4 files changed: 323 ins; 0 del; 0 mod Patch: https://git.openjdk.org/jdk/pull/24668.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/24668/head:pull/24668 PR: https://git.openjdk.org/jdk/pull/24668 From dnguyen at openjdk.org Tue Apr 15 22:32:51 2025 From: dnguyen at openjdk.org (Damon Nguyen) Date: Tue, 15 Apr 2025 22:32:51 GMT Subject: RFR: 8353213: Open source several swing tests batch3 Message-ID: Open-sourcing and standardizing several tests (basic) ------------- Commit messages: - Update headers - Initial opening of tests - Merge branch 'master' of github.com:DamonGuy/jdk - Merge branch 'master' of github.com:DamonGuy/jdk - Merge branch 'master' of github.com:DamonGuy/jdk - Merge branch 'master' of github.com:DamonGuy/jdk - Initial commit for backout Changes: https://git.openjdk.org/jdk/pull/24670/files Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=24670&range=00 Issue: https://bugs.openjdk.org/browse/JDK-8353213 Stats: 296 lines in 4 files changed: 296 ins; 0 del; 0 mod Patch: https://git.openjdk.org/jdk/pull/24670.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/24670/head:pull/24670 PR: https://git.openjdk.org/jdk/pull/24670 From honkar at openjdk.org Tue Apr 15 22:42:42 2025 From: honkar at openjdk.org (Harshitha Onkar) Date: Tue, 15 Apr 2025 22:42:42 GMT Subject: RFR: 8352908: Open source several swing tests batch1 [v2] In-Reply-To: <1t12ZHJAHsWYEbK-_G7duGXPub79Vy5kBmu_Q2uVW8o=.e8763932-b053-43d2-8fd0-922e1a64a2b1@github.com> References: <1t12ZHJAHsWYEbK-_G7duGXPub79Vy5kBmu_Q2uVW8o=.e8763932-b053-43d2-8fd0-922e1a64a2b1@github.com> Message-ID: On Tue, 15 Apr 2025 19:37:47 GMT, Damon Nguyen wrote: >> Open-sourcing and standardizing several tests (JSplitPane JApplet JToolBar) > > Damon Nguyen has updated the pull request incrementally with one additional commit since the last revision: > > Update to setPreferredSize Marked as reviewed by honkar (Reviewer). ------------- PR Review: https://git.openjdk.org/jdk/pull/24559#pullrequestreview-2770080511 From prr at openjdk.org Tue Apr 15 22:45:04 2025 From: prr at openjdk.org (Phil Race) Date: Tue, 15 Apr 2025 22:45:04 GMT Subject: RFR: 8354451: Open source some more Swing popup menu tests [v2] In-Reply-To: References: Message-ID: > Open source some more Swing menu tests Phil Race has updated the pull request incrementally with one additional commit since the last revision: 8354451 ------------- Changes: - all: https://git.openjdk.org/jdk/pull/24636/files - new: https://git.openjdk.org/jdk/pull/24636/files/f4e10c45..47f76fa9 Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=24636&range=01 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=24636&range=00-01 Stats: 30 lines in 2 files changed: 1 ins; 14 del; 15 mod Patch: https://git.openjdk.org/jdk/pull/24636.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/24636/head:pull/24636 PR: https://git.openjdk.org/jdk/pull/24636 From prr at openjdk.org Tue Apr 15 22:45:05 2025 From: prr at openjdk.org (Phil Race) Date: Tue, 15 Apr 2025 22:45:05 GMT Subject: RFR: 8354451: Open source some more Swing popup menu tests [v2] In-Reply-To: References: Message-ID: <0itzhdSbIRf2oCMR_EQlkfhGF_h5l-ONoKCrVyMWoig=.1a4decb4-abe7-4766-bc3a-ed64563e3eac@github.com> On Tue, 15 Apr 2025 00:23:52 GMT, Harshitha Onkar wrote: >> Phil Race has updated the pull request incrementally with one additional commit since the last revision: >> >> 8354451 > > test/jdk/javax/swing/JPopupMenu/bug4212464.java line 54: > >> 52: >> 53: static String strMetal = "Metal"; >> 54: static String metalClassName = "javax.swing.plaf.metal.MetalLookAndFeel"; > > Extra space can be removed. Ok ... > test/jdk/javax/swing/JPopupMenu/bug4234793.java line 64: > >> 62: * 2. The mouse is clicked on another component. >> 63: * >> 64: * @test > > `@test` not required here ok > test/jdk/javax/swing/JPopupMenu/bug4234793.java line 178: > >> 176: comboPanel.add(combo); >> 177: >> 178: //JLabel message = new JLabel("Message area"); > > Commented stmts can be removed. yes > test/jdk/javax/swing/JPopupMenu/bug4234793.java line 194: > >> 192: >> 193: //message.setText(msg); >> 194: //message.repaint(); > > This method looks redundant and can be removed, PFJ.log() can be used directly instead. I agree. > test/jdk/javax/swing/JPopupMenu/bug4234793.java line 243: > >> 241: public void popupMenuWillBecomeVisible(PopupMenuEvent e) { >> 242: Object source = e.getSource(); >> 243: setMessage("popupmenu visible: " + source.getClass().getName()); > > Here and at other locations > Suggestion: > > PassFailJFrame.log("popupmenu visible: " + source.getClass().getName()); done > test/jdk/javax/swing/JPopupMenu/bug4234793.java line 248: > >> 246: public void popupMenuWillBecomeInvisible(PopupMenuEvent e) { >> 247: Object source = e.getSource(); >> 248: System.out.println("popupMenuWillBecomeInvisible: " + source.getClass().getName()); > > Suggestion: > > PassFailJFrame.log("popupMenuWillBecomeInvisible: " + source.getClass().getName()); fixed ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/24636#discussion_r2045632471 PR Review Comment: https://git.openjdk.org/jdk/pull/24636#discussion_r2045634024 PR Review Comment: https://git.openjdk.org/jdk/pull/24636#discussion_r2045636984 PR Review Comment: https://git.openjdk.org/jdk/pull/24636#discussion_r2045637457 PR Review Comment: https://git.openjdk.org/jdk/pull/24636#discussion_r2045638576 PR Review Comment: https://git.openjdk.org/jdk/pull/24636#discussion_r2045638432 From prr at openjdk.org Tue Apr 15 22:45:06 2025 From: prr at openjdk.org (Phil Race) Date: Tue, 15 Apr 2025 22:45:06 GMT Subject: RFR: 8354451: Open source some more Swing popup menu tests [v2] In-Reply-To: References: Message-ID: On Tue, 15 Apr 2025 11:10:19 GMT, Hendrik Schick wrote: >> Phil Race has updated the pull request incrementally with one additional commit since the last revision: >> >> 8354451 > > test/jdk/javax/swing/JPopupMenu/bug4212464.java line 125: > >> 123: public void actionPerformed(ActionEvent e) { >> 124: String str = e.getActionCommand(); >> 125: if(str.equals(metalClassName) || str.equals(motifClassName)) { > > Suggestion: > > if (str.equals(metalClassName) || str.equals(motifClassName)) { updated > test/jdk/javax/swing/JPopupMenu/bug4234793.java line 125: > >> 123: // CTRL-down will show the popup. >> 124: panel.getInputMap().put(KeyStroke.getKeyStroke( >> 125: KeyEvent.VK_DOWN,InputEvent.CTRL_MASK),"OPEN_POPUP"); > > Suggestion: > > KeyEvent.VK_DOWN,InputEvent.CTRL_MASK), "OPEN_POPUP"); done > test/jdk/javax/swing/JPopupMenu/bug4234793.java line 158: > >> 156: } >> 157: >> 158: static class PopupHandler extends AbstractAction{ > > Suggestion: > > static class PopupHandler extends AbstractAction { done > test/jdk/javax/swing/JPopupMenu/bug4234793.java line 159: > >> 157: >> 158: static class PopupHandler extends AbstractAction{ >> 159: public void actionPerformed(ActionEvent e){ > > Suggestion: > > public void actionPerformed(ActionEvent e) { done > test/jdk/javax/swing/JPopupMenu/bug4234793.java line 160: > >> 158: static class PopupHandler extends AbstractAction{ >> 159: public void actionPerformed(ActionEvent e){ >> 160: if(!popupMenu.isVisible()) > > Suggestion: > > if (!popupMenu.isVisible()) done > test/jdk/javax/swing/JPopupMenu/bug4234793.java line 161: > >> 159: public void actionPerformed(ActionEvent e){ >> 160: if(!popupMenu.isVisible()) >> 161: popupMenu.show((Component)e.getSource(),40,40); > > Suggestion: > > popupMenu.show((Component) e.getSource(), 40, 40); done > test/jdk/javax/swing/JPopupMenu/bug4234793.java line 207: > >> 205: >> 206: menubar.add(menu); >> 207: for(int i = 0; i < 10; i ++) { > > Suggestion: > > for (int i = 0; i < 10; i ++) { done > test/jdk/javax/swing/JPopupMenu/bug4234793.java line 241: > >> 239: // PopupMenuListener methods. >> 240: >> 241: public void popupMenuWillBecomeVisible(PopupMenuEvent e) { > > Suggestion: > > public void popupMenuWillBecomeVisible(PopupMenuEvent e) { done ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/24636#discussion_r2045632986 PR Review Comment: https://git.openjdk.org/jdk/pull/24636#discussion_r2045642697 PR Review Comment: https://git.openjdk.org/jdk/pull/24636#discussion_r2045641614 PR Review Comment: https://git.openjdk.org/jdk/pull/24636#discussion_r2045641977 PR Review Comment: https://git.openjdk.org/jdk/pull/24636#discussion_r2045641078 PR Review Comment: https://git.openjdk.org/jdk/pull/24636#discussion_r2045641750 PR Review Comment: https://git.openjdk.org/jdk/pull/24636#discussion_r2045639391 PR Review Comment: https://git.openjdk.org/jdk/pull/24636#discussion_r2045639103 From prr at openjdk.org Tue Apr 15 22:45:06 2025 From: prr at openjdk.org (Phil Race) Date: Tue, 15 Apr 2025 22:45:06 GMT Subject: RFR: 8354451: Open source some more Swing popup menu tests [v2] In-Reply-To: References: Message-ID: On Tue, 15 Apr 2025 00:44:17 GMT, Harshitha Onkar wrote: >> test/jdk/javax/swing/JPopupMenu/bug4234793.java line 84: >> >>> 82: >>> 83: Notice each time you perform a hide/cancel action an appropriate message should >>> 84: appear in the log area >> >> _"Click to display the menu, then to hide it, LEFT click on the window background."_ does not produce PopupMenu cancelled msg for the 2 menus on the menubar and the combobox menu. But clicking the mouse on another component does cause the popup cancelled msg to be displayed. > > I didn't notice it earlier, but I see why the msg was not logged in PFJ.logArea. > The "popupMenuWillBecomeInvisible: " needs to be added to the PFJ.log() instead of standard out. I have decided I should just kill setMessage and call PassFailFrame.log directly ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/24636#discussion_r2045636262 From dnguyen at openjdk.org Tue Apr 15 23:51:09 2025 From: dnguyen at openjdk.org (Damon Nguyen) Date: Tue, 15 Apr 2025 23:51:09 GMT Subject: Integrated: 8352908: Open source several swing tests batch1 In-Reply-To: References: Message-ID: On Wed, 9 Apr 2025 21:47:07 GMT, Damon Nguyen wrote: > Open-sourcing and standardizing several tests (JSplitPane JApplet JToolBar) This pull request has now been integrated. Changeset: a2dc9c71 Author: Damon Nguyen URL: https://git.openjdk.org/jdk/commit/a2dc9c71e47a1cdf70ab351c557a5f1835eb5f4a Stats: 353 lines in 4 files changed: 353 ins; 0 del; 0 mod 8352908: Open source several swing tests batch1 Reviewed-by: honkar ------------- PR: https://git.openjdk.org/jdk/pull/24559 From dnguyen at openjdk.org Wed Apr 16 00:03:47 2025 From: dnguyen at openjdk.org (Damon Nguyen) Date: Wed, 16 Apr 2025 00:03:47 GMT Subject: RFR: 8354552: Open source a few Swing tests In-Reply-To: <2FMzPdjd71su2fN0Bt1Msp6n1J6OEgk9daKDNpmv-HI=.a1596969-234a-482f-9c09-2505efaf74f1@github.com> References: <2FMzPdjd71su2fN0Bt1Msp6n1J6OEgk9daKDNpmv-HI=.a1596969-234a-482f-9c09-2505efaf74f1@github.com> Message-ID: On Tue, 15 Apr 2025 22:13:09 GMT, Phil Race wrote: > Open source a few Swing regression tests. Ran all manual tests. LGTM. test/jdk/javax/swing/JLabel/bug4945795.java line 61: > 59: JFrame mainFrame = new JFrame("Bug4945795"); > 60: try { > 61: UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName()); Not sure if it makes much of a difference or is any better, but I was previously instructed to set `UIManager.setLookAndFeel("com.sun.java.swing.plaf.windows.WindowsLookAndFeel");` explicitly instead. Test runs fine anyway. ------------- Marked as reviewed by dnguyen (Committer). PR Review: https://git.openjdk.org/jdk/pull/24668#pullrequestreview-2770230881 PR Review Comment: https://git.openjdk.org/jdk/pull/24668#discussion_r2045739102 From dnguyen at openjdk.org Wed Apr 16 00:10:22 2025 From: dnguyen at openjdk.org (Damon Nguyen) Date: Wed, 16 Apr 2025 00:10:22 GMT Subject: RFR: 8353661: Open source several swing tests batch5 Message-ID: Open-sourcing and standardizing several tests (windows & JSlider) ------------- Commit messages: - Initial opening - Merge branch 'master' of github.com:DamonGuy/jdk - Merge branch 'master' of github.com:DamonGuy/jdk - Merge branch 'master' of github.com:DamonGuy/jdk - Merge branch 'master' of github.com:DamonGuy/jdk - Initial commit for backout Changes: https://git.openjdk.org/jdk/pull/24671/files Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=24671&range=00 Issue: https://bugs.openjdk.org/browse/JDK-8353661 Stats: 436 lines in 4 files changed: 436 ins; 0 del; 0 mod Patch: https://git.openjdk.org/jdk/pull/24671.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/24671/head:pull/24671 PR: https://git.openjdk.org/jdk/pull/24671 From dnguyen at openjdk.org Wed Apr 16 00:14:40 2025 From: dnguyen at openjdk.org (Damon Nguyen) Date: Wed, 16 Apr 2025 00:14:40 GMT Subject: RFR: 8352793: Open source several AWT TextComponent tests - Batch 1 In-Reply-To: References: Message-ID: <86l3sL1pdP5JpssRYjdmTJSOrwv-Ge2Vn7sn5qBHtcg=.42dfff35-35dc-4076-be58-3c3b15ee3872@github.com> On Tue, 15 Apr 2025 10:03:42 GMT, Tejesh R wrote: > Open source these AWT TextComponent tests: > > java/awt/TextComponent/BackgroundTest/BackgroundTest.java > java/awt/TextComponent/DisableTest/DisableTest.java > java/awt/TextComponent/TextFieldMargin/TextFieldMargin.java > java/awt/TextComponent/ModifiersTest/ModifiersTest.java Tested all apps manually and they pass. One comment regarding numbering of steps. test/jdk/java/awt/TextComponent/BackgroundTest.java line 57: > 55: On linux and macos it will match the environment settings. > 56: If the TextField or the TextArea do not change colors as described, > 57: the test FAILS. Suggestion: 3. Press the "DisableText" button. The first TextField and TextArea should change colors to the default disabled color. On Windows, this is usually gray. On linux and macos it will match the environment settings. If the TextField or the TextArea do not change colors as described, the test FAILS. The instructions jump from step #2 to #4 when I was following the test. The subsequent numbers need to be adjusted as well. Test itself passes locally for me though. ------------- PR Review: https://git.openjdk.org/jdk/pull/24656#pullrequestreview-2770250791 PR Review Comment: https://git.openjdk.org/jdk/pull/24656#discussion_r2045754813 From psadhukhan at openjdk.org Wed Apr 16 04:02:50 2025 From: psadhukhan at openjdk.org (Prasanta Sadhukhan) Date: Wed, 16 Apr 2025 04:02:50 GMT Subject: Integrated: 8352682: Opensource JComponent tests In-Reply-To: References: Message-ID: On Thu, 10 Apr 2025 06:36:49 GMT, Prasanta Sadhukhan wrote: > Few JComponent tests are opensourced This pull request has now been integrated. Changeset: 55afcb57 Author: Prasanta Sadhukhan URL: https://git.openjdk.org/jdk/commit/55afcb57a5d9dbc7bfad75e35df6b96932f6b074 Stats: 252 lines in 3 files changed: 252 ins; 0 del; 0 mod 8352682: Opensource JComponent tests Reviewed-by: jdv, honkar ------------- PR: https://git.openjdk.org/jdk/pull/24562 From prr at openjdk.org Wed Apr 16 04:43:42 2025 From: prr at openjdk.org (Phil Race) Date: Wed, 16 Apr 2025 04:43:42 GMT Subject: RFR: 8354273: Restore even more pointless unicode characters to ASCII [v2] In-Reply-To: References: Message-ID: On Thu, 10 Apr 2025 10:36:31 GMT, Magnus Ihse Bursie wrote: >> As a follow-up to [JDK-8354213](https://bugs.openjdk.org/browse/JDK-8354213), I found some additional places where unicode characters are unnecessarily used instead of pure ASCII. > > Magnus Ihse Bursie has updated the pull request incrementally with one additional commit since the last revision: > > Remove incorrectly copied "?anchor" src/java.xml/share/legal/xhtml11.md line 50: > 48: or derived from [title and URI of the W3C document]." > 49: > 50: Disclaimers ?anchor Did that come from an upstream file ? test/jdk/java/awt/geom/Path2D/GetBounds2DPrecisionTest.java line 193: > 191: if (str.length() >= DIGIT_COUNT) { > 192: str = str.substring(0,DIGIT_COUNT-1)+"..."; > 193: } How did you test this ? Please say more than tiers 1-3 .. because this test isn't run until tier4. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/24567#discussion_r2046043831 PR Review Comment: https://git.openjdk.org/jdk/pull/24567#discussion_r2046047435 From jdv at openjdk.org Wed Apr 16 04:51:58 2025 From: jdv at openjdk.org (Jayathirth D V) Date: Wed, 16 Apr 2025 04:51:58 GMT Subject: Integrated: 8354214: Open source Swing tests Batch 2 In-Reply-To: References: Message-ID: <6hbdw6fChROOyQb9H6v974SYu-xXehnHbufEWsnT3mY=.7bc57295-d5ec-44d1-b19c-40187e10a58b@github.com> On Fri, 11 Apr 2025 05:52:47 GMT, Jayathirth D V wrote: > Few swing JList tests are open sourced. This pull request has now been integrated. Changeset: 2be5bc84 Author: Jayathirth D V URL: https://git.openjdk.org/jdk/commit/2be5bc847a444f08a4ebb41b58e8a2bf4553d621 Stats: 340 lines in 3 files changed: 340 ins; 0 del; 0 mod 8354214: Open source Swing tests Batch 2 Reviewed-by: abhiscxk, honkar ------------- PR: https://git.openjdk.org/jdk/pull/24588 From psadhukhan at openjdk.org Wed Apr 16 05:47:47 2025 From: psadhukhan at openjdk.org (Prasanta Sadhukhan) Date: Wed, 16 Apr 2025 05:47:47 GMT Subject: RFR: 8354552: Open source a few Swing tests In-Reply-To: References: <2FMzPdjd71su2fN0Bt1Msp6n1J6OEgk9daKDNpmv-HI=.a1596969-234a-482f-9c09-2505efaf74f1@github.com> Message-ID: On Wed, 16 Apr 2025 00:00:59 GMT, Damon Nguyen wrote: >> Open source a few Swing regression tests. > > test/jdk/javax/swing/JLabel/bug4945795.java line 61: > >> 59: JFrame mainFrame = new JFrame("Bug4945795"); >> 60: try { >> 61: UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName()); > > Not sure if it makes much of a difference or is any better, but I was previously instructed to set `UIManager.setLookAndFeel("com.sun.java.swing.plaf.windows.WindowsLookAndFeel");` explicitly instead. Test runs fine anyway. I left a comment > > We can set > UIManager.setLookAndFeel("com.sun.java.swing.plaf.windows.WindowsLookAndFeel"); > in main and throw exception if cannot be set so that it can be done before initializing PFJ ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/24668#discussion_r2046117640 From jwaters at openjdk.org Wed Apr 16 06:07:48 2025 From: jwaters at openjdk.org (Julian Waters) Date: Wed, 16 Apr 2025 06:07:48 GMT Subject: RFR: 8342869: Errors related to unused code on Windows after 8339120 in awt In-Reply-To: References: Message-ID: On Wed, 23 Oct 2024 05:07:37 GMT, Julian Waters wrote: > After 8339120, gcc began catching many different instances of unused code in the Windows specific codebase. Some of these seem to be bugs. I've taken the effort to mark out all the relevant globals and locals that trigger the unused warnings and addressed all of them by commenting out the code as appropriate. I am confident that in many cases this simplistic approach of commenting out code does not fix the underlying issue, and the warning actually found a bug that should be fixed. In these instances, I will be aiming to fix these bugs with help from reviewers, so I recommend anyone reviewing who knows more about the code than I do to see whether there is indeed a bug that needs fixing in a different way than what I did > > build.log on release configuration: > > C:/users/vertig0/downloads/eclipse-committers-2023-12-r-win32-x86_64/workspace/jdk/src/java.desktop/windows/native/libawt/windows/awt_Component.cpp:3560:39: warning: '_VKS_ALT_MASK' defined but not used [-Wunused-const-variable=] > 3560 | static const UINT _VKS_ALT_MASK = 0x04; > | ^~~~~~~~~~~~~ > C:/users/vertig0/downloads/eclipse-committers-2023-12-r-win32-x86_64/workspace/jdk/src/java.desktop/windows/native/libawt/windows/awt_Font.cpp: In member function 'void CSegTable::MakeTable()': > C:/users/vertig0/downloads/eclipse-committers-2023-12-r-win32-x86_64/workspace/jdk/src/java.desktop/windows/native/libawt/windows/awt_Font.cpp:1361:14: warning: typedef 'PSUBTABLE' locally defined but not used [-Wunused-local-typedefs] > 1361 | } SUBTABLE, *PSUBTABLE; > | ^~~~~~~~~ > C:/users/vertig0/downloads/eclipse-committers-2023-12-r-win32-x86_64/workspace/jdk/src/java.desktop/windows/native/libawt/windows/awt_Font.cpp: In member function 'virtual void CEUDCSegTable::Create(LPCWSTR)': > C:/users/vertig0/downloads/eclipse-committers-2023-12-r-win32-x86_64/workspace/jdk/src/java.desktop/windows/native/libawt/windows/awt_Font.cpp:1588:10: warning: typedef 'PHEAD' locally defined but not used [-Wunused-local-typedefs] > 1588 | } HEAD, *PHEAD; > | ^~~~~ > C:/users/vertig0/downloads/eclipse-committers-2023-12-r-win32-x86_64/workspace/jdk/src/java.desktop/windows/native/libawt/windows/awt_Font.cpp:1595:11: warning: typedef 'PENTRY' locally defined but not used [-Wunused-local-typedefs] > 1595 | } ENTRY, *PENTRY; > | ^~~~~~ > C:/users/vertig0/downloads/eclipse-committers-2023-12-r-win32-x86_64/workspace/jdk/src/java.desktop/windows/... No. ------------- PR Comment: https://git.openjdk.org/jdk/pull/21655#issuecomment-2808470368 From abhiscxk at openjdk.org Wed Apr 16 06:09:46 2025 From: abhiscxk at openjdk.org (Abhishek Kumar) Date: Wed, 16 Apr 2025 06:09:46 GMT Subject: RFR: 8353655: Clean up and open source KeyEvent related tests (Part 1) [v2] In-Reply-To: <876oRDLZI4QM5sR0Zjb7sKIpdTno-DGzaThDgBbrM6I=.551b5dc1-e498-4858-a62b-b1f507f679f0@github.com> References: <876oRDLZI4QM5sR0Zjb7sKIpdTno-DGzaThDgBbrM6I=.551b5dc1-e498-4858-a62b-b1f507f679f0@github.com> Message-ID: On Tue, 15 Apr 2025 18:29:12 GMT, Alexander Zuev wrote: >> Clean up and open source three tests related to the KeyEvent mechanics. > > Alexander Zuev has updated the pull request incrementally with one additional commit since the last revision: > > Small fixes based on review comments LGTM ------------- Marked as reviewed by abhiscxk (Reviewer). PR Review: https://git.openjdk.org/jdk/pull/24609#pullrequestreview-2771046469 From abhiscxk at openjdk.org Wed Apr 16 06:17:27 2025 From: abhiscxk at openjdk.org (Abhishek Kumar) Date: Wed, 16 Apr 2025 06:17:27 GMT Subject: RFR: 8354493: Opensource Several MultiScreen and Insets related tests [v3] In-Reply-To: References: Message-ID: > Several multi screen related Applet tests are converted to manual and open sourced. Abhishek Kumar has updated the pull request incrementally with one additional commit since the last revision: Remove unused variable ------------- Changes: - all: https://git.openjdk.org/jdk/pull/24654/files - new: https://git.openjdk.org/jdk/pull/24654/files/f16a018c..e07c51a1 Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=24654&range=02 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=24654&range=01-02 Stats: 2 lines in 1 file changed: 0 ins; 2 del; 0 mod Patch: https://git.openjdk.org/jdk/pull/24654.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/24654/head:pull/24654 PR: https://git.openjdk.org/jdk/pull/24654 From abhiscxk at openjdk.org Wed Apr 16 06:17:27 2025 From: abhiscxk at openjdk.org (Abhishek Kumar) Date: Wed, 16 Apr 2025 06:17:27 GMT Subject: RFR: 8354493: Opensource Several MultiScreen and Insets related tests [v2] In-Reply-To: References: Message-ID: <6eQE9NTVuYaT8Kv4zT3hzScNXmHSqGk-elcDKtrPER4=.df9c7291-c042-485f-8224-1e45eda8cd59@github.com> On Tue, 15 Apr 2025 20:18:49 GMT, Hendrik Schick wrote: >> Abhishek Kumar has updated the pull request incrementally with one additional commit since the last revision: >> >> Limit to 80 cols > > test/jdk/java/awt/Multiscreen/DialogTest.java line 210: > >> 208: } >> 209: } else { >> 210: if (frameOwned) { > > this code part is in 'if' and 'else' path, can be done before. No.. there is a difference. One is for `JDialog` and other is for `Dialog` ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/24654#discussion_r2046152978 From abhiscxk at openjdk.org Wed Apr 16 06:47:43 2025 From: abhiscxk at openjdk.org (Abhishek Kumar) Date: Wed, 16 Apr 2025 06:47:43 GMT Subject: RFR: JDK-8353319 : Open source Swing tests - Set 3 [v2] In-Reply-To: References: Message-ID: On Tue, 15 Apr 2025 17:20:16 GMT, Harshitha Onkar wrote: >> Following tests are updates as part of this PR: >> >> 1. javax/swing/JRootPane/bug4614623.java - manual >> 2. javax/swing/JTabbedPane/bug4613811.java - manual >> 3. javax/swing/JWindow/bug4251781.java - manual >> 4. javax/swing/JFrame/bug4419914.java - manual, updated existing test by adding JWindow, JDialog cases. > > Harshitha Onkar has updated the pull request incrementally with two additional commits since the last revision: > > - review update > - review update test/jdk/javax/swing/JRootPane/bug4614623.java line 49: > 47: the "File" menu should now be underlined. > 48: 2) Release the Alt key, the selection background (light grey) > 49: should appear around the File menu. Compare "About" menu Suggestion: should appear around the "File" menu. Compare "About" menu test/jdk/javax/swing/JRootPane/bug4614623.java line 59: > 57: > 58: PassFailJFrame.builder() > 59: .title("Test Instructions") Setting title is redundant. You can remove it and the default title would be `Test File Name` + `Test Instructions` ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/24639#discussion_r2046194711 PR Review Comment: https://git.openjdk.org/jdk/pull/24639#discussion_r2046196782 From abhiscxk at openjdk.org Wed Apr 16 06:47:44 2025 From: abhiscxk at openjdk.org (Abhishek Kumar) Date: Wed, 16 Apr 2025 06:47:44 GMT Subject: RFR: JDK-8353319 : Open source Swing tests - Set 3 [v2] In-Reply-To: <9jvfiW39d1WlIGj3eHwba62BmDHB5p8foGmpeqw0qSI=.029fd692-f9cc-4ae8-8617-78a4b1df38a9@github.com> References: <9jvfiW39d1WlIGj3eHwba62BmDHB5p8foGmpeqw0qSI=.029fd692-f9cc-4ae8-8617-78a4b1df38a9@github.com> Message-ID: On Tue, 15 Apr 2025 04:32:12 GMT, Abhishek Kumar wrote: >> Harshitha Onkar has updated the pull request incrementally with two additional commits since the last revision: >> >> - review update >> - review update > > test/jdk/javax/swing/JTabbedPane/bug4613811.java line 48: > >> 46: >> 47: If the last tab (Tab 5) is visible, the right arrow >> 48: button should be disabled. > > on macOS, > > When the 1st tab is visible, the left arrow is not at all visible and right arrow is not visible for 5th tab. I guess they are either not rendered or hidden. > > Need to modify test instruction as per the platform. Did you miss this? ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/24639#discussion_r2046197926 From aturbanov at openjdk.org Wed Apr 16 08:14:49 2025 From: aturbanov at openjdk.org (Andrey Turbanov) Date: Wed, 16 Apr 2025 08:14:49 GMT Subject: RFR: 8352793: Open source several AWT TextComponent tests - Batch 1 In-Reply-To: References: Message-ID: On Tue, 15 Apr 2025 10:03:42 GMT, Tejesh R wrote: > Open source these AWT TextComponent tests: > > java/awt/TextComponent/BackgroundTest/BackgroundTest.java > java/awt/TextComponent/DisableTest/DisableTest.java > java/awt/TextComponent/TextFieldMargin/TextFieldMargin.java > java/awt/TextComponent/ModifiersTest/ModifiersTest.java test/jdk/java/awt/TextComponent/DisableTest.java line 88: > 86: ActionListener al = ev -> { > 87: boolean enable = (ev.getSource() == be); > 88: Iterator iterator = comps.iterator(); while(iterator.hasNext()) { Let's move `while (iterator.hasNext()) {` to a separate line ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/24656#discussion_r2046355717 From aturbanov at openjdk.org Wed Apr 16 08:15:44 2025 From: aturbanov at openjdk.org (Andrey Turbanov) Date: Wed, 16 Apr 2025 08:15:44 GMT Subject: RFR: 8354451: Open source some more Swing popup menu tests [v2] In-Reply-To: References: Message-ID: On Tue, 15 Apr 2025 22:45:04 GMT, Phil Race wrote: >> Open source some more Swing menu tests > > Phil Race has updated the pull request incrementally with one additional commit since the last revision: > > 8354451 test/jdk/javax/swing/JPopupMenu/bug4234793.java line 97: > 95: } > 96: > 97: private static String[] numData = { Suggestion: private static String[] numData = { test/jdk/javax/swing/JPopupMenu/bug4234793.java line 101: > 99: }; > 100: > 101: private static String[] dayData = { Suggestion: private static String[] dayData = { test/jdk/javax/swing/JPopupMenu/bug4234793.java line 105: > 103: }; > 104: > 105: private static char[] mnDayData = { Suggestion: private static char[] mnDayData = { ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/24636#discussion_r2046356964 PR Review Comment: https://git.openjdk.org/jdk/pull/24636#discussion_r2046357163 PR Review Comment: https://git.openjdk.org/jdk/pull/24636#discussion_r2046357321 From aturbanov at openjdk.org Wed Apr 16 08:21:24 2025 From: aturbanov at openjdk.org (Andrey Turbanov) Date: Wed, 16 Apr 2025 08:21:24 GMT Subject: RFR: 8354789: Unnecessary null check in sun.awt.windows.WToolkit.getFontPeer Message-ID: There is redundant `null` comparison in `sun.awt.windows.WToolkit.getFontPeer` Local variable `retval` can't be null after new object assignment. https://github.com/openjdk/jdk/blob/24de9dee80738fe6ab1fc726b071546c85bbf79a/src/java.desktop/windows/classes/sun/awt/windows/WToolkit.java#L604-L605 ------------- Commit messages: - [PATCH] Unnecessary null check in sun.awt.windows.WToolkit.getFontPeer Changes: https://git.openjdk.org/jdk/pull/23150/files Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=23150&range=00 Issue: https://bugs.openjdk.org/browse/JDK-8354789 Stats: 9 lines in 1 file changed: 0 ins; 2 del; 7 mod Patch: https://git.openjdk.org/jdk/pull/23150.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/23150/head:pull/23150 PR: https://git.openjdk.org/jdk/pull/23150 From tr at openjdk.org Wed Apr 16 08:21:24 2025 From: tr at openjdk.org (Tejesh R) Date: Wed, 16 Apr 2025 08:21:24 GMT Subject: RFR: 8354789: Unnecessary null check in sun.awt.windows.WToolkit.getFontPeer In-Reply-To: References: Message-ID: On Thu, 16 Jan 2025 12:03:50 GMT, Andrey Turbanov wrote: > There is redundant `null` comparison in `sun.awt.windows.WToolkit.getFontPeer` > Local variable `retval` can't be null after new object assignment. > https://github.com/openjdk/jdk/blob/24de9dee80738fe6ab1fc726b071546c85bbf79a/src/java.desktop/windows/classes/sun/awt/windows/WToolkit.java#L604-L605 LGTM ------------- Marked as reviewed by tr (Reviewer). PR Review: https://git.openjdk.org/jdk/pull/23150#pullrequestreview-2680597233 From achung at openjdk.org Wed Apr 16 08:22:19 2025 From: achung at openjdk.org (Alisen Chung) Date: Wed, 16 Apr 2025 08:22:19 GMT Subject: RFR: 8352905: Open some JComboBox bugs 1 [v2] In-Reply-To: References: Message-ID: > Updating and opening some tests Alisen Chung has updated the pull request incrementally with two additional commits since the last revision: - update tests - update tests ------------- Changes: - all: https://git.openjdk.org/jdk/pull/24495/files - new: https://git.openjdk.org/jdk/pull/24495/files/6e4520de..57bb0878 Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=24495&range=01 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=24495&range=00-01 Stats: 147 lines in 4 files changed: 43 ins; 27 del; 77 mod Patch: https://git.openjdk.org/jdk/pull/24495.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/24495/head:pull/24495 PR: https://git.openjdk.org/jdk/pull/24495 From achung at openjdk.org Wed Apr 16 08:22:19 2025 From: achung at openjdk.org (Alisen Chung) Date: Wed, 16 Apr 2025 08:22:19 GMT Subject: RFR: 8352905: Open some JComboBox bugs 1 [v2] In-Reply-To: References: Message-ID: <80rzmZEJ_FVuMR-5Alb_XwUXOKATH01KxOOkL6J_rm8=.22f231ab-ffa1-4036-8dfa-de8562ec8c19@github.com> On Fri, 11 Apr 2025 03:52:05 GMT, Sergey Bylokhov wrote: >> Alisen Chung has updated the pull request incrementally with two additional commits since the last revision: >> >> - update tests >> - update tests > > test/jdk/javax/swing/JComboBox/bug4166593.java line 65: > >> 63: } >> 64: >> 65: if (frame != null) { > > frame is initialized on a different thread and accessed here without proper synchronization. > > same issue with numberOfActionEvents added volatile to numberOfActionEvents, moved all access of frame into EDT ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/24495#discussion_r2046368944 From aturbanov at openjdk.org Wed Apr 16 08:24:38 2025 From: aturbanov at openjdk.org (Andrey Turbanov) Date: Wed, 16 Apr 2025 08:24:38 GMT Subject: RFR: 8354791: Use Hashtable.putIfAbsent in CSS constructor Message-ID: We can use Hashtable.putIfAbsent instead of pair `get`/`put` methods. It's faster and cleaner. ------------- Commit messages: - [PATCH] CSS. Use Hashtable.putIfAbsent instead of pair get/put Changes: https://git.openjdk.org/jdk/pull/22032/files Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=22032&range=00 Issue: https://bugs.openjdk.org/browse/JDK-8354791 Stats: 6 lines in 1 file changed: 0 ins; 4 del; 2 mod Patch: https://git.openjdk.org/jdk/pull/22032.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/22032/head:pull/22032 PR: https://git.openjdk.org/jdk/pull/22032 From achung at openjdk.org Wed Apr 16 08:25:49 2025 From: achung at openjdk.org (Alisen Chung) Date: Wed, 16 Apr 2025 08:25:49 GMT Subject: RFR: 8353007: Open some JComboBox bugs 2 [v2] In-Reply-To: References: Message-ID: On Wed, 9 Apr 2025 00:13:38 GMT, Harshitha Onkar wrote: >> Alisen Chung has updated the pull request incrementally with one additional commit since the last revision: >> >> update jtreg > > test/jdk/javax/swing/JComboBox/bug4201964.java line 79: > >> 77: frame.add(panel); >> 78: frame.setLocationRelativeTo(null); >> 79: frame.pack(); > > frame.setSize() instead of pack() ? I thought pack was more standard to use? I only used setSize for the JInternalFrame test because pack doesn't work well with JIF ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/24496#discussion_r2046376952 From achung at openjdk.org Wed Apr 16 08:33:38 2025 From: achung at openjdk.org (Alisen Chung) Date: Wed, 16 Apr 2025 08:33:38 GMT Subject: RFR: 8353007: Open some JComboBox bugs 2 [v3] In-Reply-To: References: Message-ID: > Updating and opening some tests Alisen Chung has updated the pull request incrementally with one additional commit since the last revision: update tests ------------- Changes: - all: https://git.openjdk.org/jdk/pull/24496/files - new: https://git.openjdk.org/jdk/pull/24496/files/97c86bb9..24f40ddf Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=24496&range=02 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=24496&range=01-02 Stats: 34 lines in 4 files changed: 4 ins; 4 del; 26 mod Patch: https://git.openjdk.org/jdk/pull/24496.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/24496/head:pull/24496 PR: https://git.openjdk.org/jdk/pull/24496 From psadhukhan at openjdk.org Wed Apr 16 08:36:48 2025 From: psadhukhan at openjdk.org (Prasanta Sadhukhan) Date: Wed, 16 Apr 2025 08:36:48 GMT Subject: RFR: 8352905: Open some JComboBox bugs 1 [v2] In-Reply-To: References: Message-ID: On Wed, 16 Apr 2025 08:22:19 GMT, Alisen Chung wrote: >> Updating and opening some tests > > Alisen Chung has updated the pull request incrementally with two additional commits since the last revision: > > - update tests > - update tests Marked as reviewed by psadhukhan (Reviewer). ------------- PR Review: https://git.openjdk.org/jdk/pull/24495#pullrequestreview-2771660010 From jdv at openjdk.org Wed Apr 16 08:46:32 2025 From: jdv at openjdk.org (Jayathirth D V) Date: Wed, 16 Apr 2025 08:46:32 GMT Subject: RFR: 8354285: Open source Swing tests Batch 3 Message-ID: Open source some of the swing LAF tests ------------- Commit messages: - 8354285: Open source Swing tests Batch 3 Changes: https://git.openjdk.org/jdk/pull/24677/files Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=24677&range=00 Issue: https://bugs.openjdk.org/browse/JDK-8354285 Stats: 257 lines in 3 files changed: 257 ins; 0 del; 0 mod Patch: https://git.openjdk.org/jdk/pull/24677.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/24677/head:pull/24677 PR: https://git.openjdk.org/jdk/pull/24677 From zjx001202 at gmail.com Wed Apr 16 10:04:20 2025 From: zjx001202 at gmail.com (Glavo) Date: Wed, 16 Apr 2025 18:04:20 +0800 Subject: Proposal: A new common Image API Message-ID: Currently, there are multiple different image APIs in the Java ecosystem: AWT, JavaFX, Android, etc. What's worse, the Android platform does not provide support for AWT, making the Java ecosystem even more fragmented. There are some obvious problems with the current situation: * Third-party libraries that need an image API are difficult to be universal. A practical example: Apache Commons Imaging has been in the alpha stage and cannot release version 1.0. The main reason is that it depends on `java.awt.image`, so it doesn't work on Android. We hope to solve this problem before the official release. * Different image APIs have to repeatedly implement support for reading the same image format (such as JPEG). In fact, AWT, JavaFX, and Android now each implement reading JPEG images. This is a waste. I thought we might be able to create a new module independent of java.desktop that provides a common abstraction for images. It should: * Provides common Image and ImageProvider interfaces that can be implemented by different providers. * Provides a unified abstraction for colors, color spaces, pixel formats, etc. * Provides general and extensible image I/O support. Read/write support should only need to be implemented once per image format. It should be bidirectionally compatible with `javax.imageio`: The implementation of either API can be accessed through the other API. I want to know if this is an idea worth putting into practice? I'm not an expert in this field, so I'm worried about creating designs with many flaws. Therefore, I haven't attempted to implement it yet. If anyone is willing to implement it, I'd like to help. I had sent an email a few days ago but no one responded, so I re-edited it and sent this one. Glavo -------------- next part -------------- An HTML attachment was scrubbed... URL: From ihse at openjdk.org Wed Apr 16 10:11:57 2025 From: ihse at openjdk.org (Magnus Ihse Bursie) Date: Wed, 16 Apr 2025 10:11:57 GMT Subject: RFR: 8354273: Restore even more pointless unicode characters to ASCII [v2] In-Reply-To: References: Message-ID: On Wed, 16 Apr 2025 04:39:22 GMT, Phil Race wrote: >> Magnus Ihse Bursie has updated the pull request incrementally with one additional commit since the last revision: >> >> Remove incorrectly copied "?anchor" > > src/java.xml/share/legal/xhtml11.md line 50: > >> 48: or derived from [title and URI of the W3C document]." >> 49: >> 50: Disclaimers ?anchor > > Did that come from an upstream file ? No, it is copy/pasted from a textual rendering of the html file specified in the URL above. This is what you get if you na?vely select the text in Firefox and press Ctrl-C. The `?anchor` part is not rendered on screen. > test/jdk/java/awt/geom/Path2D/GetBounds2DPrecisionTest.java line 193: > >> 191: if (str.length() >= DIGIT_COUNT) { >> 192: str = str.substring(0,DIGIT_COUNT-1)+"..."; >> 193: } > > How did you test this ? Please say more than tiers 1-3 .. because this test isn't run until tier4. I did not test tier4. Will do so now. Thanks! ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/24567#discussion_r2046572753 PR Review Comment: https://git.openjdk.org/jdk/pull/24567#discussion_r2046573122 From abhiscxk at openjdk.org Wed Apr 16 10:12:05 2025 From: abhiscxk at openjdk.org (Abhishek Kumar) Date: Wed, 16 Apr 2025 10:12:05 GMT Subject: Integrated: 8353832: Opensource FontClass, Selection and Icon tests In-Reply-To: References: Message-ID: On Mon, 14 Apr 2025 05:57:16 GMT, Abhishek Kumar wrote: > Font Class, Selection adn Icon related Applet tests are converted to manual and open sourced. This pull request has now been integrated. Changeset: 8c6b611f Author: Abhishek Kumar URL: https://git.openjdk.org/jdk/commit/8c6b611f35af22af5b6c3eb663b30985857c1da3 Stats: 350 lines in 4 files changed: 350 ins; 0 del; 0 mod 8353832: Opensource FontClass, Selection and Icon tests Reviewed-by: jdv ------------- PR: https://git.openjdk.org/jdk/pull/24615 From azvegint at openjdk.org Wed Apr 16 10:16:29 2025 From: azvegint at openjdk.org (Alexander Zvegintsev) Date: Wed, 16 Apr 2025 10:16:29 GMT Subject: RFR: 8354561: Open source several swing tests batch0 Message-ID: Few more tests open sourced: javax/swing/JTextArea/4474400/bug4474400.java javax/swing/border/TitledBorder/TransparentTitleTest.java javax/swing/JComboBox/4139900/bug4139900.java javax/swing/JComboBox/4174876/bug4174876.java ------------- Commit messages: - 8354561: Open source several swing tests batch0 Changes: https://git.openjdk.org/jdk/pull/24680/files Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=24680&range=00 Issue: https://bugs.openjdk.org/browse/JDK-8354561 Stats: 397 lines in 4 files changed: 397 ins; 0 del; 0 mod Patch: https://git.openjdk.org/jdk/pull/24680.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/24680/head:pull/24680 PR: https://git.openjdk.org/jdk/pull/24680 From dmarkov at openjdk.org Wed Apr 16 10:28:46 2025 From: dmarkov at openjdk.org (Dmitry Markov) Date: Wed, 16 Apr 2025 10:28:46 GMT Subject: RFR: 8351884: Refactor bug8033699.java test code In-Reply-To: References: Message-ID: <2j_TaiT6bhQ22BHzsiVW7R1gR8q6tFywpJEiFz6W50s=.607315a2-2394-4d39-b6b3-d491485ba640@github.com> On Wed, 2 Apr 2025 17:34:34 GMT, Rajat Mahajan wrote: > Details: > Refactored code as requested in the Bug description. > > Tested and verified the test passes. Marked as reviewed by dmarkov (Reviewer). ------------- PR Review: https://git.openjdk.org/jdk/pull/24384#pullrequestreview-2772017051 From tr at openjdk.org Wed Apr 16 10:33:05 2025 From: tr at openjdk.org (Tejesh R) Date: Wed, 16 Apr 2025 10:33:05 GMT Subject: RFR: 8353446: Open source several AWT Menu tests - Batch 2 Message-ID: Open source these AWT Menu tests: java/awt/Menu/OnFlyRepaintMenuTest/OnFlyRepaintMenuTest.java java/awt/Menu/DestroyMenuTest/DestroyMenuTest.java java/awt/Menu/MenuAddRemoveCrash/MenuAddRemoveCrash.java java/awt/Menu/MenuZOrderTest/MenuZOrderTest.java ------------- Commit messages: - Open source Changes: https://git.openjdk.org/jdk/pull/24681/files Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=24681&range=00 Issue: https://bugs.openjdk.org/browse/JDK-8353446 Stats: 605 lines in 5 files changed: 605 ins; 0 del; 0 mod Patch: https://git.openjdk.org/jdk/pull/24681.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/24681/head:pull/24681 PR: https://git.openjdk.org/jdk/pull/24681 From jpai at openjdk.org Wed Apr 16 11:30:01 2025 From: jpai at openjdk.org (Jaikiran Pai) Date: Wed, 16 Apr 2025 11:30:01 GMT Subject: Integrated: Merge ed30fce6df57b1cbf7a6efebabc3558550f8ec16 Message-ID: This brings in the CPU25_04 changes into the master branch. ------------- Commit messages: The merge commit only contains trivial merges, so no merge-specific webrevs have been generated. Changes: https://git.openjdk.org/jdk/pull/24683/files Stats: 0 lines in 0 files changed: 0 ins; 0 del; 0 mod Patch: https://git.openjdk.org/jdk/pull/24683.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/24683/head:pull/24683 PR: https://git.openjdk.org/jdk/pull/24683 From dfuchs at openjdk.org Wed Apr 16 11:30:01 2025 From: dfuchs at openjdk.org (Daniel Fuchs) Date: Wed, 16 Apr 2025 11:30:01 GMT Subject: Integrated: Merge ed30fce6df57b1cbf7a6efebabc3558550f8ec16 In-Reply-To: References: Message-ID: On Wed, 16 Apr 2025 11:20:36 GMT, Jaikiran Pai wrote: > This brings in the CPU25_04 changes into the master branch. LGTM ------------- Marked as reviewed by dfuchs (Reviewer). PR Review: https://git.openjdk.org/jdk/pull/24683#pullrequestreview-2772164693 From tr at openjdk.org Wed Apr 16 11:30:16 2025 From: tr at openjdk.org (Tejesh R) Date: Wed, 16 Apr 2025 11:30:16 GMT Subject: RFR: 8353957: Open source several AWT ScrollPane tests - Batch 1 Message-ID: Open source these AWT ScrollPane tests: java/awt/ScrollPane/ScrollPaneFlicker/ScrollPaneFlicker.java java/awt/ScrollPane/ScrollbarsAsNeeded/ScrollbarsAsNeededTest.java java/awt/ScrollPane/ScrollPanePaint/ScrollPanePaint.java java/awt/ScrollPane/ScrollPositionTest/ScrollPositionTest.java ------------- Commit messages: - Open source - Open source Changes: https://git.openjdk.org/jdk/pull/24684/files Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=24684&range=00 Issue: https://bugs.openjdk.org/browse/JDK-8353957 Stats: 525 lines in 5 files changed: 525 ins; 0 del; 0 mod Patch: https://git.openjdk.org/jdk/pull/24684.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/24684/head:pull/24684 PR: https://git.openjdk.org/jdk/pull/24684 From jpai at openjdk.org Wed Apr 16 11:30:02 2025 From: jpai at openjdk.org (Jaikiran Pai) Date: Wed, 16 Apr 2025 11:30:02 GMT Subject: Integrated: Merge ed30fce6df57b1cbf7a6efebabc3558550f8ec16 In-Reply-To: References: Message-ID: <5aoSWv3V3dVlk0FcmcAt3FpvLoE6CxWrTpYmPU5wyfw=.99fdb614-63cc-4cef-8442-b9d55f328d37@github.com> On Wed, 16 Apr 2025 11:20:36 GMT, Jaikiran Pai wrote: > This brings in the CPU25_04 changes into the master branch. Thank you Daniel for the review. ------------- PR Comment: https://git.openjdk.org/jdk/pull/24683#issuecomment-2809280611 From jpai at openjdk.org Wed Apr 16 11:30:02 2025 From: jpai at openjdk.org (Jaikiran Pai) Date: Wed, 16 Apr 2025 11:30:02 GMT Subject: Integrated: Merge ed30fce6df57b1cbf7a6efebabc3558550f8ec16 In-Reply-To: References: Message-ID: On Wed, 16 Apr 2025 11:20:36 GMT, Jaikiran Pai wrote: > This brings in the CPU25_04 changes into the master branch. This pull request has now been integrated. Changeset: c6243fc2 Author: Jaikiran Pai URL: https://git.openjdk.org/jdk/commit/c6243fc27fafb1ff89f8610ead3acd87030caf95 Stats: 301 lines in 11 files changed: 223 ins; 25 del; 53 mod Merge Reviewed-by: dfuchs ------------- PR: https://git.openjdk.org/jdk/pull/24683 From abhiscxk at openjdk.org Wed Apr 16 11:33:27 2025 From: abhiscxk at openjdk.org (Abhishek Kumar) Date: Wed, 16 Apr 2025 11:33:27 GMT Subject: RFR: 8354365: Opensource few Modal and Full Screen related tests Message-ID: Few Modal and Full Screen related tests are converted from applet and open sourced. ------------- Commit messages: - Typo in Problemlist file - Converted from applet and open sourced Changes: https://git.openjdk.org/jdk/pull/24685/files Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=24685&range=00 Issue: https://bugs.openjdk.org/browse/JDK-8354365 Stats: 488 lines in 5 files changed: 488 ins; 0 del; 0 mod Patch: https://git.openjdk.org/jdk/pull/24685.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/24685/head:pull/24685 PR: https://git.openjdk.org/jdk/pull/24685 From psadhukhan at openjdk.org Wed Apr 16 12:41:45 2025 From: psadhukhan at openjdk.org (Prasanta Sadhukhan) Date: Wed, 16 Apr 2025 12:41:45 GMT Subject: RFR: 8354493: Opensource Several MultiScreen and Insets related tests [v3] In-Reply-To: References: Message-ID: <_XuvKbHBmJvoHikOF0R3NSqwxHlDdh7fkFjcUrAXq-M=.7a2f78b1-1107-4982-a0b2-6090783517e1@github.com> On Wed, 16 Apr 2025 06:17:27 GMT, Abhishek Kumar wrote: >> Several multi screen related Applet tests are converted to manual and open sourced. > > Abhishek Kumar has updated the pull request incrementally with one additional commit since the last revision: > > Remove unused variable Marked as reviewed by psadhukhan (Reviewer). test/jdk/java/awt/Multiscreen/DialogTest.java line 101: > 99: .columns(40) > 100: .logArea(5) > 101: .testUI(obj::init) No need to create "obj"..we can call DialogTest.init directly.. test/jdk/java/awt/Multiscreen/IMCandidateWindowTest.java line 75: > 73: > 74: String INSTRUCTIONS = """ > 75: Platform: windows this can be removed or rephrased "This test is for windows" ------------- PR Review: https://git.openjdk.org/jdk/pull/24654#pullrequestreview-2772358999 PR Review Comment: https://git.openjdk.org/jdk/pull/24654#discussion_r2046834357 PR Review Comment: https://git.openjdk.org/jdk/pull/24654#discussion_r2046836826 From aivanov at openjdk.org Wed Apr 16 12:44:45 2025 From: aivanov at openjdk.org (Alexey Ivanov) Date: Wed, 16 Apr 2025 12:44:45 GMT Subject: RFR: 8354789: Unnecessary null check in sun.awt.windows.WToolkit.getFontPeer In-Reply-To: References: Message-ID: <1gzVlKRJm6zoHED20S49sZglo8XqgqfFw0mcGXdFYQM=.52b26563-ba80-4b07-9fdc-4dfd595f860a@github.com> On Thu, 16 Jan 2025 12:03:50 GMT, Andrey Turbanov wrote: > There is redundant `null` comparison in `sun.awt.windows.WToolkit.getFontPeer` > Local variable `retval` can't be null after new object assignment. > https://github.com/openjdk/jdk/blob/24de9dee80738fe6ab1fc726b071546c85bbf79a/src/java.desktop/windows/classes/sun/awt/windows/WToolkit.java#L604-L605 Looks good to me, however, I think we can improve the code further? What do you think? src/java.desktop/windows/classes/sun/awt/windows/WToolkit.java line 595: > 593: > 594: @Override > 595: public FontPeer getFontPeer(String name, int style) { I suggest refactoring the code further? public FontPeer getFontPeer(String name, int style) { String lcName = name.toLowerCase(); if (null != cacheFontPeer) { FontPeer cachedVal = cacheFontPeer.get(lcName + style); if (null != cachedVal) { return cachedVal; } } FontPeer retval = new WFontPeer(name, style); if (null == cacheFontPeer) { cacheFontPeer = new Hashtable<>(5, 0.9f); } if (null != cacheFontPeer) { cacheFontPeer.put(lcName + style, retval); } return retval; } Isn't this version clearer? ------------- PR Review: https://git.openjdk.org/jdk/pull/23150#pullrequestreview-2772370543 PR Review Comment: https://git.openjdk.org/jdk/pull/23150#discussion_r2046841311 From aivanov at openjdk.org Wed Apr 16 12:46:48 2025 From: aivanov at openjdk.org (Alexey Ivanov) Date: Wed, 16 Apr 2025 12:46:48 GMT Subject: RFR: 8354791: Use Hashtable.putIfAbsent in CSS constructor In-Reply-To: References: Message-ID: On Tue, 12 Nov 2024 09:13:07 GMT, Andrey Turbanov wrote: > We can use Hashtable.putIfAbsent instead of pair `get`/`put` methods. > It's faster and cleaner. Marked as reviewed by aivanov (Reviewer). ------------- PR Review: https://git.openjdk.org/jdk/pull/22032#pullrequestreview-2772382527 From psadhukhan at openjdk.org Wed Apr 16 12:51:40 2025 From: psadhukhan at openjdk.org (Prasanta Sadhukhan) Date: Wed, 16 Apr 2025 12:51:40 GMT Subject: RFR: 8354561: Open source several swing tests batch0 In-Reply-To: References: Message-ID: On Wed, 16 Apr 2025 10:09:48 GMT, Alexander Zvegintsev wrote: > Few more tests open sourced: > > javax/swing/JTextArea/4474400/bug4474400.java > javax/swing/border/TitledBorder/TransparentTitleTest.java > javax/swing/JComboBox/4139900/bug4139900.java > javax/swing/JComboBox/4174876/bug4174876.java Marked as reviewed by psadhukhan (Reviewer). ------------- PR Review: https://git.openjdk.org/jdk/pull/24680#pullrequestreview-2772402966 From aturbanov at openjdk.org Wed Apr 16 13:06:27 2025 From: aturbanov at openjdk.org (Andrey Turbanov) Date: Wed, 16 Apr 2025 13:06:27 GMT Subject: RFR: 8354789: Unnecessary null check in sun.awt.windows.WToolkit.getFontPeer [v2] In-Reply-To: References: Message-ID: > There is redundant `null` comparison in `sun.awt.windows.WToolkit.getFontPeer` > Local variable `retval` can't be null after new object assignment. > https://github.com/openjdk/jdk/blob/24de9dee80738fe6ab1fc726b071546c85bbf79a/src/java.desktop/windows/classes/sun/awt/windows/WToolkit.java#L604-L605 Andrey Turbanov has updated the pull request incrementally with one additional commit since the last revision: 8354789: Unnecessary null check in sun.awt.windows.WToolkit.getFontPeer ------------- Changes: - all: https://git.openjdk.org/jdk/pull/23150/files - new: https://git.openjdk.org/jdk/pull/23150/files/ebb84a5d..ce662e8c Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=23150&range=01 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=23150&range=00-01 Stats: 5 lines in 1 file changed: 0 ins; 1 del; 4 mod Patch: https://git.openjdk.org/jdk/pull/23150.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/23150/head:pull/23150 PR: https://git.openjdk.org/jdk/pull/23150 From aivanov at openjdk.org Wed Apr 16 13:14:45 2025 From: aivanov at openjdk.org (Alexey Ivanov) Date: Wed, 16 Apr 2025 13:14:45 GMT Subject: RFR: 8354789: Unnecessary null check in sun.awt.windows.WToolkit.getFontPeer [v2] In-Reply-To: References: Message-ID: On Wed, 16 Apr 2025 13:06:27 GMT, Andrey Turbanov wrote: >> There is redundant `null` comparison in `sun.awt.windows.WToolkit.getFontPeer` >> Local variable `retval` can't be null after new object assignment. >> https://github.com/openjdk/jdk/blob/24de9dee80738fe6ab1fc726b071546c85bbf79a/src/java.desktop/windows/classes/sun/awt/windows/WToolkit.java#L604-L605 > > Andrey Turbanov has updated the pull request incrementally with one additional commit since the last revision: > > 8354789: Unnecessary null check in sun.awt.windows.WToolkit.getFontPeer Other than the minor nit, looks good to me. src/java.desktop/windows/classes/sun/awt/windows/WToolkit.java line 602: > 600: return cachedVal; > 601: } > 602: } Suggestion: } I'd put a blank line here to separate the logic of fetching a cached value from putting a new value to the cache. ------------- Marked as reviewed by aivanov (Reviewer). PR Review: https://git.openjdk.org/jdk/pull/23150#pullrequestreview-2772482026 PR Review Comment: https://git.openjdk.org/jdk/pull/23150#discussion_r2046902864 From tr at openjdk.org Wed Apr 16 13:19:50 2025 From: tr at openjdk.org (Tejesh R) Date: Wed, 16 Apr 2025 13:19:50 GMT Subject: RFR: 8352865: Open source several AWT TextComponent tests - Batch 2 [v3] In-Reply-To: References: Message-ID: <63oZ4i-lJaupiVpNrLi4RyzitZLFhf5bMlHOqyz03zw=.1d251849-0cf6-4c07-9b7d-ee40af994b02@github.com> > Open source these AWT TextComponent tests: > > java/awt/TextComponent/SelectionAndCaretColor/SelectionAndCaretColor.java > java/awt/TextComponent/SelectionTest/SelectionTest.java > java/awt/TextComponent/CorrectTextComponentSelectionTest/CorrectTextComponentSelectionTest.java > java/awt/TextComponent/AltPlusNumberKeyCombinationsTest/AltPlusNumberKeyCombinationsTest.java Tejesh R has updated the pull request incrementally with one additional commit since the last revision: Updated review comments ------------- Changes: - all: https://git.openjdk.org/jdk/pull/24477/files - new: https://git.openjdk.org/jdk/pull/24477/files/f2262cfa..95550bc1 Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=24477&range=02 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=24477&range=01-02 Stats: 6 lines in 1 file changed: 0 ins; 3 del; 3 mod Patch: https://git.openjdk.org/jdk/pull/24477.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/24477/head:pull/24477 PR: https://git.openjdk.org/jdk/pull/24477 From tr at openjdk.org Wed Apr 16 13:19:51 2025 From: tr at openjdk.org (Tejesh R) Date: Wed, 16 Apr 2025 13:19:51 GMT Subject: RFR: 8352865: Open source several AWT TextComponent tests - Batch 2 [v2] In-Reply-To: References: Message-ID: On Tue, 15 Apr 2025 12:28:33 GMT, Jayathirth D V wrote: >> Tejesh R has updated the pull request incrementally with one additional commit since the last revision: >> >> Updated review comments > > test/jdk/java/awt/TextComponent/AltPlusNumberKeyCombinationsTest.java line 65: > >> 63: >> 64: public static Frame initialize() { >> 65: Frame f; > > Declaration and initialization can de done at same place. Updated. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/24477#discussion_r2046914302 From tr at openjdk.org Wed Apr 16 13:38:24 2025 From: tr at openjdk.org (Tejesh R) Date: Wed, 16 Apr 2025 13:38:24 GMT Subject: RFR: 8353958: Open source several AWT ScrollPane tests - Batch 2 [v2] In-Reply-To: <4vl6h3xyMQB1Qk0ZqdGk2iNi6mgf8gw4XW3m81ScExI=.a94ef19f-1081-404d-a26e-1b857b5563bf@github.com> References: <4vl6h3xyMQB1Qk0ZqdGk2iNi6mgf8gw4XW3m81ScExI=.a94ef19f-1081-404d-a26e-1b857b5563bf@github.com> Message-ID: <7VJMU3B7XypQaP79QFOUDsuHlE3Gb8zrIV-vhl0N7OU=.69e1bebd-faaf-4108-a5e7-b4eecb206cc9@github.com> > Open source these AWT ScrollPane tests: > > java/awt/ScrollPane/ScrollPaneSize/ScrollPaneSize.java > java/awt/ScrollPane/ScrollPaneAsNeededTest/ScrollPaneAsNeededTest.java > java/awt/ScrollPane/ScrollPaneComponentTest/ScrollPaneComponentTest.java > java/awt/ScrollPane/ScrollPaneScrollType/ScrollPaneEventType.java > java/awt/ScrollPane/ScrollPanechildViewportTest/ScrollPanechildViewportTest.java Tejesh R has updated the pull request incrementally with one additional commit since the last revision: Updated review comments ------------- Changes: - all: https://git.openjdk.org/jdk/pull/24647/files - new: https://git.openjdk.org/jdk/pull/24647/files/8cefd215..44c6fb25 Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=24647&range=01 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=24647&range=00-01 Stats: 10 lines in 3 files changed: 0 ins; 3 del; 7 mod Patch: https://git.openjdk.org/jdk/pull/24647.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/24647/head:pull/24647 PR: https://git.openjdk.org/jdk/pull/24647 From tr at openjdk.org Wed Apr 16 13:38:25 2025 From: tr at openjdk.org (Tejesh R) Date: Wed, 16 Apr 2025 13:38:25 GMT Subject: RFR: 8353958: Open source several AWT ScrollPane tests - Batch 2 [v2] In-Reply-To: <5Xcnjw6EDJ1EeHcixvdUsHqWCc3GEMB1iUx6SGmoQYY=.b6589326-2b4d-495b-b25a-67f6187757de@github.com> References: <4vl6h3xyMQB1Qk0ZqdGk2iNi6mgf8gw4XW3m81ScExI=.a94ef19f-1081-404d-a26e-1b857b5563bf@github.com> <5Xcnjw6EDJ1EeHcixvdUsHqWCc3GEMB1iUx6SGmoQYY=.b6589326-2b4d-495b-b25a-67f6187757de@github.com> Message-ID: On Tue, 15 Apr 2025 14:29:20 GMT, Hendrik Schick wrote: >> Tejesh R has updated the pull request incrementally with one additional commit since the last revision: >> >> Updated review comments > > test/jdk/java/awt/ScrollPane/ScrollPaneComponentTest.java line 52: > >> 50: in the Frame titled 'ScrollPane Component Test' >> 51: 2. Click the button labeled 'Remove and add back >> 52: ScrollPane Contents > > Suggestion: > > ScrollPane Contents' Updated. > test/jdk/java/awt/ScrollPane/ScrollPaneSize.java line 97: > >> 95: add(b3 = new Button("Button3")); >> 96: >> 97: setBackground(Color.white); > > background color set twice? Updated. > test/jdk/java/awt/ScrollPane/ScrollPanechildViewportTest.java line 129: > >> 127: public Dimension getPreferredSize() { >> 128: Dimension d = null; >> 129: Dimension pd = ((ScrollPane) getParent()).getViewportSize(); > > use switch expression (instead of switch statement) to assign a value to d? Updated. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/24647#discussion_r2046952883 PR Review Comment: https://git.openjdk.org/jdk/pull/24647#discussion_r2046953107 PR Review Comment: https://git.openjdk.org/jdk/pull/24647#discussion_r2046953022 From tr at openjdk.org Wed Apr 16 13:41:33 2025 From: tr at openjdk.org (Tejesh R) Date: Wed, 16 Apr 2025 13:41:33 GMT Subject: RFR: 8352793: Open source several AWT TextComponent tests - Batch 1 [v2] In-Reply-To: References: Message-ID: > Open source these AWT TextComponent tests: > > java/awt/TextComponent/BackgroundTest/BackgroundTest.java > java/awt/TextComponent/DisableTest/DisableTest.java > java/awt/TextComponent/TextFieldMargin/TextFieldMargin.java > java/awt/TextComponent/ModifiersTest/ModifiersTest.java Tejesh R has updated the pull request incrementally with one additional commit since the last revision: Updated review comments ------------- Changes: - all: https://git.openjdk.org/jdk/pull/24656/files - new: https://git.openjdk.org/jdk/pull/24656/files/9e007c49..bfcc025b Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=24656&range=01 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=24656&range=00-01 Stats: 5 lines in 2 files changed: 1 ins; 0 del; 4 mod Patch: https://git.openjdk.org/jdk/pull/24656.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/24656/head:pull/24656 PR: https://git.openjdk.org/jdk/pull/24656 From tr at openjdk.org Wed Apr 16 13:41:33 2025 From: tr at openjdk.org (Tejesh R) Date: Wed, 16 Apr 2025 13:41:33 GMT Subject: RFR: 8352793: Open source several AWT TextComponent tests - Batch 1 [v2] In-Reply-To: <86l3sL1pdP5JpssRYjdmTJSOrwv-Ge2Vn7sn5qBHtcg=.42dfff35-35dc-4076-be58-3c3b15ee3872@github.com> References: <86l3sL1pdP5JpssRYjdmTJSOrwv-Ge2Vn7sn5qBHtcg=.42dfff35-35dc-4076-be58-3c3b15ee3872@github.com> Message-ID: On Wed, 16 Apr 2025 00:08:40 GMT, Damon Nguyen wrote: >> Tejesh R has updated the pull request incrementally with one additional commit since the last revision: >> >> Updated review comments > > test/jdk/java/awt/TextComponent/BackgroundTest.java line 57: > >> 55: On linux and macos it will match the environment settings. >> 56: If the TextField or the TextArea do not change colors as described, >> 57: the test FAILS. > > Suggestion: > > 3. Press the "DisableText" button. > The first TextField and TextArea should change colors to the > default disabled color. On Windows, this is usually gray. > On linux and macos it will match the environment settings. > If the TextField or the TextArea do not change colors as described, > the test FAILS. > > > The instructions jump from step #2 to #4 when I was following the test. The subsequent numbers need to be adjusted as well. Test itself passes locally for me though. Updated. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/24656#discussion_r2046962483 From tr at openjdk.org Wed Apr 16 13:41:33 2025 From: tr at openjdk.org (Tejesh R) Date: Wed, 16 Apr 2025 13:41:33 GMT Subject: RFR: 8352793: Open source several AWT TextComponent tests - Batch 1 [v2] In-Reply-To: References: Message-ID: On Wed, 16 Apr 2025 08:12:27 GMT, Andrey Turbanov wrote: >> Tejesh R has updated the pull request incrementally with one additional commit since the last revision: >> >> Updated review comments > > test/jdk/java/awt/TextComponent/DisableTest.java line 88: > >> 86: ActionListener al = ev -> { >> 87: boolean enable = (ev.getSource() == be); >> 88: Iterator iterator = comps.iterator(); while(iterator.hasNext()) { > > Let's move `while (iterator.hasNext()) {` to a separate line Updated. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/24656#discussion_r2046962838 From aturbanov at openjdk.org Wed Apr 16 13:43:42 2025 From: aturbanov at openjdk.org (Andrey Turbanov) Date: Wed, 16 Apr 2025 13:43:42 GMT Subject: RFR: 8354789: Unnecessary null check in sun.awt.windows.WToolkit.getFontPeer [v3] In-Reply-To: References: Message-ID: > There is redundant `null` comparison in `sun.awt.windows.WToolkit.getFontPeer` > Local variable `retval` can't be null after new object assignment. > https://github.com/openjdk/jdk/blob/24de9dee80738fe6ab1fc726b071546c85bbf79a/src/java.desktop/windows/classes/sun/awt/windows/WToolkit.java#L604-L605 Andrey Turbanov has updated the pull request incrementally with one additional commit since the last revision: add empty line ------------- Changes: - all: https://git.openjdk.org/jdk/pull/23150/files - new: https://git.openjdk.org/jdk/pull/23150/files/ce662e8c..2003d375 Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=23150&range=02 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=23150&range=01-02 Stats: 1 line in 1 file changed: 1 ins; 0 del; 0 mod Patch: https://git.openjdk.org/jdk/pull/23150.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/23150/head:pull/23150 PR: https://git.openjdk.org/jdk/pull/23150 From aivanov at openjdk.org Wed Apr 16 13:43:42 2025 From: aivanov at openjdk.org (Alexey Ivanov) Date: Wed, 16 Apr 2025 13:43:42 GMT Subject: RFR: 8354789: Unnecessary null check in sun.awt.windows.WToolkit.getFontPeer [v3] In-Reply-To: References: Message-ID: On Wed, 16 Apr 2025 13:40:10 GMT, Andrey Turbanov wrote: >> There is redundant `null` comparison in `sun.awt.windows.WToolkit.getFontPeer` >> Local variable `retval` can't be null after new object assignment. >> https://github.com/openjdk/jdk/blob/24de9dee80738fe6ab1fc726b071546c85bbf79a/src/java.desktop/windows/classes/sun/awt/windows/WToolkit.java#L604-L605 > > Andrey Turbanov has updated the pull request incrementally with one additional commit since the last revision: > > add empty line Marked as reviewed by aivanov (Reviewer). ------------- PR Review: https://git.openjdk.org/jdk/pull/23150#pullrequestreview-2772576230 From tr at openjdk.org Wed Apr 16 14:14:51 2025 From: tr at openjdk.org (Tejesh R) Date: Wed, 16 Apr 2025 14:14:51 GMT Subject: RFR: 8354365: Opensource few Modal and Full Screen related tests In-Reply-To: References: Message-ID: On Wed, 16 Apr 2025 11:27:22 GMT, Abhishek Kumar wrote: > Few Modal and Full Screen related tests are converted from applet and open sourced. test/jdk/java/awt/FullScreen/NonfocusableFrameFullScreenTest.java line 128: > 126: frame.setAlwaysOnTop(true); > 127: } > 128: frame.validate(); Is `frame.validate()` required? test/jdk/java/awt/Modal/NativeDialogToFrontBackTest.java line 115: > 113: control.setSize(200, 200); > 114: blocked.setVisible(true); > 115: return control; Can u send the Frame list to PassFailJFrame and placement also can be handled their. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/24685#discussion_r2046986019 PR Review Comment: https://git.openjdk.org/jdk/pull/24685#discussion_r2047029272 From tr at openjdk.org Wed Apr 16 14:22:42 2025 From: tr at openjdk.org (Tejesh R) Date: Wed, 16 Apr 2025 14:22:42 GMT Subject: RFR: 8354561: Open source several swing tests batch0 In-Reply-To: References: Message-ID: <1-LdBGdR1nf1C9fVkykAcGmTU3jdD-5seHMuhqcCmSo=.1cf8d364-81f7-46af-a431-a55e12bb0720@github.com> On Wed, 16 Apr 2025 10:09:48 GMT, Alexander Zvegintsev wrote: > Few more tests open sourced: > > javax/swing/JTextArea/4474400/bug4474400.java > javax/swing/border/TitledBorder/TransparentTitleTest.java > javax/swing/JComboBox/4139900/bug4139900.java > javax/swing/JComboBox/4174876/bug4174876.java test/jdk/javax/swing/JComboBox/bug4139900.java line 107: > 105: }; > 106: > 107: button.addActionListener( actionListener ); Suggestion: button.addActionListener(actionListener); test/jdk/javax/swing/JComboBox/bug4174876.java line 26: > 24: /* > 25: * @test > 26: * @bug 4174876 Test summary is missing. test/jdk/javax/swing/JComboBox/bug4474400.java line 59: > 57: > 58: private static JComponent createTestUI() { > 59: JTextArea textArea; Can be defined and initialised where its used. test/jdk/javax/swing/border/TransparentTitleTest.java line 66: > 64: JFrame frame = new JFrame("TransparentTitleTest"); > 65: > 66: frame.setLayout(new GridLayout(3,6,5,5)); Suggestion: frame.setLayout(new GridLayout(3, 6, 5, 5)); ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/24680#discussion_r2047036528 PR Review Comment: https://git.openjdk.org/jdk/pull/24680#discussion_r2047038295 PR Review Comment: https://git.openjdk.org/jdk/pull/24680#discussion_r2047043354 PR Review Comment: https://git.openjdk.org/jdk/pull/24680#discussion_r2047046646 From dnguyen at openjdk.org Wed Apr 16 16:52:38 2025 From: dnguyen at openjdk.org (Damon Nguyen) Date: Wed, 16 Apr 2025 16:52:38 GMT Subject: RFR: 8354873: javax/swing/plaf/metal/MetalIconFactory/bug4952462.java failing on CI Message-ID: Test has a check for a red-ish color, but the range for the green and the blue values were too loose. A light enough grey would still pass (ex: 200, 190, 190). Reduced these from 200 to 80. Checked the color 200, 80, 80 on an rgb color wheel to decide that this color was red enough as the beginning to a passing rgb value. ------------- Commit messages: - Adjust red color range - Merge branch 'master' of github.com:DamonGuy/jdk - Merge branch 'master' of github.com:DamonGuy/jdk - Merge branch 'master' of github.com:DamonGuy/jdk - Merge branch 'master' of github.com:DamonGuy/jdk - Merge branch 'master' of github.com:DamonGuy/jdk - Initial commit for backout Changes: https://git.openjdk.org/jdk/pull/24693/files Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=24693&range=00 Issue: https://bugs.openjdk.org/browse/JDK-8354873 Stats: 1 line in 1 file changed: 0 ins; 0 del; 1 mod Patch: https://git.openjdk.org/jdk/pull/24693.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/24693/head:pull/24693 PR: https://git.openjdk.org/jdk/pull/24693 From honkar at openjdk.org Wed Apr 16 17:02:52 2025 From: honkar at openjdk.org (Harshitha Onkar) Date: Wed, 16 Apr 2025 17:02:52 GMT Subject: RFR: 8354873: javax/swing/plaf/metal/MetalIconFactory/bug4952462.java failing on CI In-Reply-To: References: Message-ID: <7nYlHDgLGXEEEcHY1gQ-OGjAxgm_q2SpUqXo8pdT6Oc=.0ae89c6c-2156-45c5-b0d4-219711e6fbfb@github.com> On Wed, 16 Apr 2025 16:46:02 GMT, Damon Nguyen wrote: > Test has a check for a red-ish color, but the range for the green and the blue values were too loose. A light enough grey would still pass (ex: 200, 190, 190). Reduced these from 200 to 80. Checked the color 200, 80, 80 on an rgb color wheel to decide that this color was red enough as the beginning to a passing rgb value. It is better to test it at uiScale of 1 especially on windows to avoid fractional pixels side effects with `robot.getPixelColor` although this might not be a problem on CI. ` * @run main/othervm -Dsun.java2d.uiScale=1 bug4952462` Can we change the line where the current theme is queried from AppContext to setting it explicitly ? ` MetalTheme theme = (MetalTheme) AppContext.getAppContext().get("currentMetalTheme");` to MetalLookAndFeel.setCurrentTheme(new OceanTheme()); UIManager.setLookAndFeel("javax.swing.plaf.metal.MetalLookAndFeel"); ------------- PR Comment: https://git.openjdk.org/jdk/pull/24693#issuecomment-2810182036 From dnguyen at openjdk.org Wed Apr 16 17:13:43 2025 From: dnguyen at openjdk.org (Damon Nguyen) Date: Wed, 16 Apr 2025 17:13:43 GMT Subject: RFR: 8354873: javax/swing/plaf/metal/MetalIconFactory/bug4952462.java failing on CI [v2] In-Reply-To: References: Message-ID: > Test has a check for a red-ish color, but the range for the green and the blue values were too loose. A light enough grey would still pass (ex: 200, 190, 190). Reduced these from 200 to 80. Checked the color 200, 80, 80 on an rgb color wheel to decide that this color was red enough as the beginning to a passing rgb value. Damon Nguyen has updated the pull request incrementally with one additional commit since the last revision: Review comments ------------- Changes: - all: https://git.openjdk.org/jdk/pull/24693/files - new: https://git.openjdk.org/jdk/pull/24693/files/5294aaff..494930d0 Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=24693&range=01 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=24693&range=00-01 Stats: 49 lines in 1 file changed: 13 ins; 21 del; 15 mod Patch: https://git.openjdk.org/jdk/pull/24693.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/24693/head:pull/24693 PR: https://git.openjdk.org/jdk/pull/24693 From dnguyen at openjdk.org Wed Apr 16 17:13:44 2025 From: dnguyen at openjdk.org (Damon Nguyen) Date: Wed, 16 Apr 2025 17:13:44 GMT Subject: RFR: 8354873: javax/swing/plaf/metal/MetalIconFactory/bug4952462.java failing on CI In-Reply-To: <7nYlHDgLGXEEEcHY1gQ-OGjAxgm_q2SpUqXo8pdT6Oc=.0ae89c6c-2156-45c5-b0d4-219711e6fbfb@github.com> References: <7nYlHDgLGXEEEcHY1gQ-OGjAxgm_q2SpUqXo8pdT6Oc=.0ae89c6c-2156-45c5-b0d4-219711e6fbfb@github.com> Message-ID: On Wed, 16 Apr 2025 17:00:00 GMT, Harshitha Onkar wrote: > It is better to test it at uiScale of 1 especially on windows to avoid fractional pixels side effects with `robot.getPixelColor` although this might not be a problem on CI. > > ` * @run main/othervm -Dsun.java2d.uiScale=1 bug4952462` > > Can we change the line where the current theme is queried from AppContext to setting it explicitly ? > > ` MetalTheme theme = (MetalTheme) AppContext.getAppContext().get("currentMetalTheme");` > > to > > ``` > MetalLookAndFeel.setCurrentTheme(new OceanTheme()); > UIManager.setLookAndFeel("javax.swing.plaf.metal.MetalLookAndFeel"); > ``` Updated. Thanks for the tip ------------- PR Comment: https://git.openjdk.org/jdk/pull/24693#issuecomment-2810204856 From honkar at openjdk.org Wed Apr 16 17:18:56 2025 From: honkar at openjdk.org (Harshitha Onkar) Date: Wed, 16 Apr 2025 17:18:56 GMT Subject: RFR: 8354873: javax/swing/plaf/metal/MetalIconFactory/bug4952462.java failing on CI [v2] In-Reply-To: References: Message-ID: On Wed, 16 Apr 2025 17:13:43 GMT, Damon Nguyen wrote: >> Test has a check for a red-ish color, but the range for the green and the blue values were too loose. A light enough grey would still pass (ex: 200, 190, 190). Reduced these from 200 to 80. Checked the color 200, 80, 80 on an rgb color wheel to decide that this color was red enough as the beginning to a passing rgb value. > > Damon Nguyen has updated the pull request incrementally with one additional commit since the last revision: > > Review comments Marked as reviewed by honkar (Reviewer). ------------- PR Review: https://git.openjdk.org/jdk/pull/24693#pullrequestreview-2773279691 From dnguyen at openjdk.org Wed Apr 16 17:22:50 2025 From: dnguyen at openjdk.org (Damon Nguyen) Date: Wed, 16 Apr 2025 17:22:50 GMT Subject: Integrated: 8354873: javax/swing/plaf/metal/MetalIconFactory/bug4952462.java failing on CI In-Reply-To: References: Message-ID: On Wed, 16 Apr 2025 16:46:02 GMT, Damon Nguyen wrote: > Test has a check for a red-ish color, but the range for the green and the blue values were too loose. A light enough grey would still pass (ex: 200, 190, 190). Reduced these from 200 to 80. Checked the color 200, 80, 80 on an rgb color wheel to decide that this color was red enough as the beginning to a passing rgb value. This pull request has now been integrated. Changeset: d80db00f Author: Damon Nguyen URL: https://git.openjdk.org/jdk/commit/d80db00f8221b95ab767bb84d06b83a83ba4cd4c Stats: 49 lines in 1 file changed: 13 ins; 21 del; 15 mod 8354873: javax/swing/plaf/metal/MetalIconFactory/bug4952462.java failing on CI Reviewed-by: honkar ------------- PR: https://git.openjdk.org/jdk/pull/24693 From prr at openjdk.org Wed Apr 16 18:08:00 2025 From: prr at openjdk.org (Phil Race) Date: Wed, 16 Apr 2025 18:08:00 GMT Subject: Integrated: 8353589: Open source a few Swing menu-related tests In-Reply-To: References: Message-ID: <2smjbwlCGhPbj_A9fRNaa69zF5nB3EIsDcBkkatPup4=.3e5c5e44-b36e-4a6d-a3a8-5c33467fc6cf@github.com> On Fri, 4 Apr 2025 20:30:50 GMT, Phil Race wrote: > Open source a few tests related to Swing menus. This pull request has now been integrated. Changeset: 98dac46a Author: Phil Race URL: https://git.openjdk.org/jdk/commit/98dac46aac2cea9790c1275208cc4c92e8e9a98a Stats: 294 lines in 3 files changed: 294 ins; 0 del; 0 mod 8353589: Open source a few Swing menu-related tests Reviewed-by: jdv, honkar ------------- PR: https://git.openjdk.org/jdk/pull/24457 From prr at openjdk.org Wed Apr 16 18:08:50 2025 From: prr at openjdk.org (Phil Race) Date: Wed, 16 Apr 2025 18:08:50 GMT Subject: RFR: 8352865: Open source several AWT TextComponent tests - Batch 2 [v3] In-Reply-To: <63oZ4i-lJaupiVpNrLi4RyzitZLFhf5bMlHOqyz03zw=.1d251849-0cf6-4c07-9b7d-ee40af994b02@github.com> References: <63oZ4i-lJaupiVpNrLi4RyzitZLFhf5bMlHOqyz03zw=.1d251849-0cf6-4c07-9b7d-ee40af994b02@github.com> Message-ID: On Wed, 16 Apr 2025 13:19:50 GMT, Tejesh R wrote: >> Open source these AWT TextComponent tests: >> >> java/awt/TextComponent/SelectionAndCaretColor/SelectionAndCaretColor.java >> java/awt/TextComponent/SelectionTest/SelectionTest.java >> java/awt/TextComponent/CorrectTextComponentSelectionTest/CorrectTextComponentSelectionTest.java >> java/awt/TextComponent/AltPlusNumberKeyCombinationsTest/AltPlusNumberKeyCombinationsTest.java > > Tejesh R has updated the pull request incrementally with one additional commit since the last revision: > > Updated review comments Marked as reviewed by prr (Reviewer). ------------- PR Review: https://git.openjdk.org/jdk/pull/24477#pullrequestreview-2773407761 From prr at openjdk.org Wed Apr 16 18:58:43 2025 From: prr at openjdk.org (Phil Race) Date: Wed, 16 Apr 2025 18:58:43 GMT Subject: RFR: 8353007: Open some JComboBox bugs 2 [v3] In-Reply-To: References: Message-ID: On Wed, 16 Apr 2025 08:33:38 GMT, Alisen Chung wrote: >> Updating and opening some tests > > Alisen Chung has updated the pull request incrementally with one additional commit since the last revision: > > update tests test/jdk/javax/swing/JComboBox/bug4201964.java line 52: > 50: UIManager.setLookAndFeel("com.sun.java.swing.plaf.windows.WindowsLookAndFeel"); > 51: } catch (Exception e) { > 52: throw new jtreg.SkippedException("Couldn't load the Windows look and feel."); Usually we treat this an automatic failure -eg JPassFailJFrame.forceFail("...") ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/24496#discussion_r2047555788 From prr at openjdk.org Wed Apr 16 19:08:17 2025 From: prr at openjdk.org (Phil Race) Date: Wed, 16 Apr 2025 19:08:17 GMT Subject: RFR: 8334016: Make PrintNullString.java semi-automatic In-Reply-To: References: Message-ID: On Tue, 8 Apr 2025 08:58:45 GMT, Renjith Kannath Pariyangad wrote: > Hi Reviewers, > > I have updated the test and made it semi-automatic (need to click "Print") . Test will initiate a print and result will be generated automatic. > > Please review and let me know your suggestions. I don't think these changes are worth doing. What I would do is make the test completely automated. You don't need a user to create a printerjob any more - although you did when this test was first written Also you can print to file so you don't even need to waste paper. ------------- PR Comment: https://git.openjdk.org/jdk/pull/24501#issuecomment-2810496099 From prr at openjdk.org Wed Apr 16 19:09:51 2025 From: prr at openjdk.org (Phil Race) Date: Wed, 16 Apr 2025 19:09:51 GMT Subject: RFR: 8354077: Get rid of offscreenSharingEnabled windows flag In-Reply-To: References: Message-ID: <7xsRc-y-GTPObnuJXsbcCH4Ossnqr7J101MCXk12jrY=.1cd9bfbb-bf5e-446d-a107-e5b2969648ba@github.com> On Wed, 9 Apr 2025 03:16:38 GMT, Sergey Bylokhov wrote: > Another unused obsoleted flag removed (offscreenSharingEnabled) from WindowsFlags. Its last usage was eliminated by [JDK-6725214](https://bugs.openjdk.org/browse/JDk-6725214) ("D3D: forward-port the new pipeline from 6u10"), see [commit](https://github.com/openjdk/jdk/commit/e4c9db984fe1a3a9d06fb60e333e92df3b165454#diff-c27da1eb4bdc7e69158f38ab3e7a1aa02b074c131c18ad15d04d0f88f169febeL319). > > Interestingly, the original JDK 6u10 changes marked many options as "Obsoleted" (see [System Properties for Java 2D Technology](https://docs.oracle.com/javase/8/docs/technotes/guides/2d/flags.html)). Some of them later were removed in JDK 9 via [JDK-8155682](https://bugs.openjdk.org/browse/JDK-8155682) ("Get rid of legacy Windows Flags for DX"). > > However, two obsoleted flags remain: > - **sun.java2d.noddraw**: Obsoleted in: Java SE 6 Update 10, which contains a new implementation of D3D support. Setting sun.java2d.noddraw=true is now interpreted exactly the same as disabling that via sun.java2d.d3d=false. > Intended use: To turn off the Java 2D system's use of DirectDraw and Direct3D completely. > Introduced: 1.2 > Default value: false > How to use: Setting this flag to true turns off DirectDraw usage, which sometimes helps to get rid of rendering problems on Win32. > - **sun.java2d.ddoffscreen**: Obsoleted in: Java SE 6 Update 10 > Intended use: To turn on hardware-accelerated scaling when the DirectDraw/Direct3D pipeline is in use. > Introduced: 1.2 > Default value: false > How to use: Setting this flag to true enables hardware-accelerated scaling if the DirectDraw/Direct3D pipeline is in use. DirectDraw/Direct3D hardware scaling is disabled by default to avoid rendering artifacts in existing applications. These rendering artifacts are caused by possible inconsistencies between the scale method that the software scaling operation uses (nearest neighbor) and the different scale methods that video cards use. Certain events that occur while an application is running might cause a scaled image to be rendered partially with hardware scaling operations and partially with software scaling operations, resulting in an inconsistent appearance. For now, you can enable acceleration by setting the ddscale flag to true. > > Should we: > - Continue supporting these indefinitely, or > - Mark them as deprecated for removal in some upcoming release? This is fine. But much worse than these being in the code is that we still document them ! https://docs.oracle.com/en/java/javase/17/troubleshoot/java-2d-pipeline-rendering-and-properties.html#GUID-DEA4F3FC-87F5-4196-A295-30A559982B10 I have it on my to-do list to re-write that entire out of date doc. ------------- Marked as reviewed by prr (Reviewer). PR Review: https://git.openjdk.org/jdk/pull/24534#pullrequestreview-2773582047 From prr at openjdk.org Wed Apr 16 19:44:45 2025 From: prr at openjdk.org (Phil Race) Date: Wed, 16 Apr 2025 19:44:45 GMT Subject: RFR: 8354191: GTK LaF should use pre-multiplied alpha same as cairo In-Reply-To: <-sAv6upz5pv3EA1zjjUvRUxNP1Tl75NJAwOX-df8Vbk=.442e3494-836b-4664-baf1-669fbd7532a0@github.com> References: <-sAv6upz5pv3EA1zjjUvRUxNP1Tl75NJAwOX-df8Vbk=.442e3494-836b-4664-baf1-669fbd7532a0@github.com> Message-ID: On Wed, 9 Apr 2025 14:42:05 GMT, Maxim Kartashev wrote: > The pixels that cairo produces for GTK LaF to draw on a Swing component have their alpha components pre-multiplied as per [the documentation](https://www.cairographics.org/manual/cairo-Image-Surfaces.html?spm=a2ty_o01.29997173.0.0.540ac921z2EebT#cairo-format-t): >> Pre-multiplied alpha is used. (That is, 50% transparent red is 0x80800000, not 0x80ff0000.) > > The BufferedImage created from those pixels, however, has its constructor's argument for `isRasterPremultiplied` set to `false` in `GTKEngine.finishPainting()`. This commit corrects that. > > In addition, since at least some "native" graphics color models also use pre-multiplied alpha (ex.: `GLXGraphicsConfig.getColorModel()`), `COLOR_MODELS` were modified to take advantage of that and avoid unnecessary re-calculations of image's pixels. Marked as reviewed by prr (Reviewer). ------------- PR Review: https://git.openjdk.org/jdk/pull/24551#pullrequestreview-2773660471 From prr at openjdk.org Wed Apr 16 19:47:57 2025 From: prr at openjdk.org (Phil Race) Date: Wed, 16 Apr 2025 19:47:57 GMT Subject: RFR: 8353655: Clean up and open source KeyEvent related tests (Part 1) [v2] In-Reply-To: <876oRDLZI4QM5sR0Zjb7sKIpdTno-DGzaThDgBbrM6I=.551b5dc1-e498-4858-a62b-b1f507f679f0@github.com> References: <876oRDLZI4QM5sR0Zjb7sKIpdTno-DGzaThDgBbrM6I=.551b5dc1-e498-4858-a62b-b1f507f679f0@github.com> Message-ID: On Tue, 15 Apr 2025 18:29:12 GMT, Alexander Zuev wrote: >> Clean up and open source three tests related to the KeyEvent mechanics. > > Alexander Zuev has updated the pull request incrementally with one additional commit since the last revision: > > Small fixes based on review comments test/jdk/java/awt/event/KeyEvent/FrenchKeyboard.java line 26: > 24: /* > 25: * @test > 26: * @bug 4308606 can you add @key i18n I'd like us to start tracking tests that require some locale-specific set up. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/24609#discussion_r2047636200 From prr at openjdk.org Wed Apr 16 19:48:58 2025 From: prr at openjdk.org (Phil Race) Date: Wed, 16 Apr 2025 19:48:58 GMT Subject: RFR: 8354106: Clean up and open source KeyEvent related tests (Part 2) [v2] In-Reply-To: References: Message-ID: On Tue, 15 Apr 2025 17:35:10 GMT, Alexander Zuev wrote: >> Clean up and open source two more tests related to KeyEvent mechanics. > > Alexander Zuev has updated the pull request incrementally with one additional commit since the last revision: > > Fixed bug ids list Marked as reviewed by prr (Reviewer). ------------- PR Review: https://git.openjdk.org/jdk/pull/24610#pullrequestreview-2773667942 From dnguyen at openjdk.org Wed Apr 16 20:04:52 2025 From: dnguyen at openjdk.org (Damon Nguyen) Date: Wed, 16 Apr 2025 20:04:52 GMT Subject: RFR: JDK-8353319 : Open source Swing tests - Set 3 [v2] In-Reply-To: References: <9jvfiW39d1WlIGj3eHwba62BmDHB5p8foGmpeqw0qSI=.029fd692-f9cc-4ae8-8617-78a4b1df38a9@github.com> Message-ID: On Wed, 16 Apr 2025 06:44:55 GMT, Abhishek Kumar wrote: >> test/jdk/javax/swing/JTabbedPane/bug4613811.java line 48: >> >>> 46: >>> 47: If the last tab (Tab 5) is visible, the right arrow >>> 48: button should be disabled. >> >> on macOS, >> >> When the 1st tab is visible, the left arrow is not at all visible and right arrow is not visible for 5th tab. I guess they are either not rendered or hidden. >> >> Need to modify test instruction as per the platform. > > Did you miss this? Confirmed the same. May be platform specific. ![image](https://github.com/user-attachments/assets/532cd1cd-93ef-4e4a-b810-de75cf1484ef) ![image](https://github.com/user-attachments/assets/d910e179-cd45-4eca-a00a-3099e66801c3) ![image](https://github.com/user-attachments/assets/249fa7a9-f2d1-4578-bfbb-44e38d40fabd) ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/24639#discussion_r2047661243 From honkar at openjdk.org Wed Apr 16 20:11:03 2025 From: honkar at openjdk.org (Harshitha Onkar) Date: Wed, 16 Apr 2025 20:11:03 GMT Subject: RFR: JDK-8354340 : Open source Swing Tests - Set 6 Message-ID: Following tests are open-sourced in this PR: - javax/swing/JViewport/ScrollRectToVisibleTest3.java - automated - javax/swing/JViewport/SetViewRepaint.java - manual ------------- Commit messages: - swing tests set6 Changes: https://git.openjdk.org/jdk/pull/24697/files Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=24697&range=00 Issue: https://bugs.openjdk.org/browse/JDK-8354340 Stats: 280 lines in 2 files changed: 280 ins; 0 del; 0 mod Patch: https://git.openjdk.org/jdk/pull/24697.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/24697/head:pull/24697 PR: https://git.openjdk.org/jdk/pull/24697 From honkar at openjdk.org Wed Apr 16 20:20:24 2025 From: honkar at openjdk.org (Harshitha Onkar) Date: Wed, 16 Apr 2025 20:20:24 GMT Subject: RFR: JDK-8354340 : Open source Swing Tests - Set 6 [v2] In-Reply-To: References: Message-ID: <1Syw2cSgOGu6f7c16RtqseXcMtyEIbe4WDH3-Z8Yxbg=.29867e2a-728d-42e6-b040-f526be6af5fc@github.com> > Following tests are open-sourced in this PR: > > - javax/swing/JViewport/ScrollRectToVisibleTest3.java - automated > - javax/swing/JViewport/SetViewRepaint.java - manual Harshitha Onkar has updated the pull request incrementally with one additional commit since the last revision: extra newline ------------- Changes: - all: https://git.openjdk.org/jdk/pull/24697/files - new: https://git.openjdk.org/jdk/pull/24697/files/b0976048..99311ed0 Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=24697&range=01 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=24697&range=00-01 Stats: 1 line in 1 file changed: 0 ins; 1 del; 0 mod Patch: https://git.openjdk.org/jdk/pull/24697.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/24697/head:pull/24697 PR: https://git.openjdk.org/jdk/pull/24697 From prr at openjdk.org Wed Apr 16 20:33:07 2025 From: prr at openjdk.org (Phil Race) Date: Wed, 16 Apr 2025 20:33:07 GMT Subject: RFR: 8354451: Open source some more Swing popup menu tests [v2] In-Reply-To: References: Message-ID: <6URmGDFwbsoOdmIlng3K6i4GpZx4QecMJfH-0DnLg4U=.82d31037-0f0b-4eab-91b0-8e59582f4939@github.com> On Wed, 16 Apr 2025 08:13:15 GMT, Andrey Turbanov wrote: >> Phil Race has updated the pull request incrementally with one additional commit since the last revision: >> >> 8354451 > > test/jdk/javax/swing/JPopupMenu/bug4234793.java line 97: > >> 95: } >> 96: >> 97: private static String[] numData = { > > Suggestion: > > private static String[] numData = { updated ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/24636#discussion_r2047698710 From prr at openjdk.org Wed Apr 16 20:33:06 2025 From: prr at openjdk.org (Phil Race) Date: Wed, 16 Apr 2025 20:33:06 GMT Subject: RFR: 8354451: Open source some more Swing popup menu tests [v3] In-Reply-To: References: Message-ID: > Open source some more Swing menu tests Phil Race has updated the pull request incrementally with one additional commit since the last revision: 8354451 ------------- Changes: - all: https://git.openjdk.org/jdk/pull/24636/files - new: https://git.openjdk.org/jdk/pull/24636/files/47f76fa9..ee9b400b Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=24636&range=02 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=24636&range=01-02 Stats: 3 lines in 1 file changed: 0 ins; 0 del; 3 mod Patch: https://git.openjdk.org/jdk/pull/24636.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/24636/head:pull/24636 PR: https://git.openjdk.org/jdk/pull/24636 From honkar at openjdk.org Wed Apr 16 20:42:28 2025 From: honkar at openjdk.org (Harshitha Onkar) Date: Wed, 16 Apr 2025 20:42:28 GMT Subject: RFR: JDK-8353942 : Open source Swing Tests - Set 5 Message-ID: Following test are open-sourced in this PR: - javax/swing/DataTransfer/DragOverFeedbackTest.java - manual - javax/swing/DataTransfer/ListDragOverFeedbackTest.java - manual - javax/swing/DataTransfer/bug4655513.java - automated - javax/swing/SwingUtilities/bug4369355.java - automated - javax/swing/SwingUtilities/bug4967768.java - manual ------------- Commit messages: - swing tests set5 Changes: https://git.openjdk.org/jdk/pull/24698/files Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=24698&range=00 Issue: https://bugs.openjdk.org/browse/JDK-8353942 Stats: 493 lines in 5 files changed: 493 ins; 0 del; 0 mod Patch: https://git.openjdk.org/jdk/pull/24698.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/24698/head:pull/24698 PR: https://git.openjdk.org/jdk/pull/24698 From prr at openjdk.org Wed Apr 16 20:42:43 2025 From: prr at openjdk.org (Phil Race) Date: Wed, 16 Apr 2025 20:42:43 GMT Subject: RFR: 8354451: Open source some more Swing popup menu tests [v2] In-Reply-To: <6URmGDFwbsoOdmIlng3K6i4GpZx4QecMJfH-0DnLg4U=.82d31037-0f0b-4eab-91b0-8e59582f4939@github.com> References: <6URmGDFwbsoOdmIlng3K6i4GpZx4QecMJfH-0DnLg4U=.82d31037-0f0b-4eab-91b0-8e59582f4939@github.com> Message-ID: <7b2Ty5C4Qni_rvtk-4L9x9MqND48B4WLeg7O718UEHw=.76c05f36-8cf4-4092-b121-0f30ac3dd4ea@github.com> On Wed, 16 Apr 2025 20:29:49 GMT, Phil Race wrote: >> test/jdk/javax/swing/JPopupMenu/bug4234793.java line 97: >> >>> 95: } >>> 96: >>> 97: private static String[] numData = { >> >> Suggestion: >> >> private static String[] numData = { > > updated fixed ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/24636#discussion_r2047715907 From prr at openjdk.org Wed Apr 16 20:42:44 2025 From: prr at openjdk.org (Phil Race) Date: Wed, 16 Apr 2025 20:42:44 GMT Subject: RFR: 8354451: Open source some more Swing popup menu tests [v2] In-Reply-To: References: Message-ID: On Wed, 16 Apr 2025 08:13:27 GMT, Andrey Turbanov wrote: >> Phil Race has updated the pull request incrementally with one additional commit since the last revision: >> >> 8354451 > > test/jdk/javax/swing/JPopupMenu/bug4234793.java line 105: > >> 103: }; >> 104: >> 105: private static char[] mnDayData = { > > Suggestion: > > private static char[] mnDayData = { fixed ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/24636#discussion_r2047716176 From prr at openjdk.org Wed Apr 16 20:46:45 2025 From: prr at openjdk.org (Phil Race) Date: Wed, 16 Apr 2025 20:46:45 GMT Subject: RFR: 8353958: Open source several AWT ScrollPane tests - Batch 2 [v2] In-Reply-To: <7VJMU3B7XypQaP79QFOUDsuHlE3Gb8zrIV-vhl0N7OU=.69e1bebd-faaf-4108-a5e7-b4eecb206cc9@github.com> References: <4vl6h3xyMQB1Qk0ZqdGk2iNi6mgf8gw4XW3m81ScExI=.a94ef19f-1081-404d-a26e-1b857b5563bf@github.com> <7VJMU3B7XypQaP79QFOUDsuHlE3Gb8zrIV-vhl0N7OU=.69e1bebd-faaf-4108-a5e7-b4eecb206cc9@github.com> Message-ID: On Wed, 16 Apr 2025 13:38:24 GMT, Tejesh R wrote: >> Open source these AWT ScrollPane tests: >> >> java/awt/ScrollPane/ScrollPaneSize/ScrollPaneSize.java >> java/awt/ScrollPane/ScrollPaneAsNeededTest/ScrollPaneAsNeededTest.java >> java/awt/ScrollPane/ScrollPaneComponentTest/ScrollPaneComponentTest.java >> java/awt/ScrollPane/ScrollPaneScrollType/ScrollPaneEventType.java >> java/awt/ScrollPane/ScrollPanechildViewportTest/ScrollPanechildViewportTest.java > > Tejesh R has updated the pull request incrementally with one additional commit since the last revision: > > Updated review comments Marked as reviewed by prr (Reviewer). test/jdk/java/awt/ScrollPane/ScrollPaneComponentTest.java line 95: > 93: gr.drawLine(295, 295, 5, 295); > 94: gr.drawLine(5, 295, 5, 5); > 95: System.out.println("Painted!!"); I guess all these printlns are harmless but only someone reviewing the jtreg logs will ever see them. ------------- PR Review: https://git.openjdk.org/jdk/pull/24647#pullrequestreview-2773800730 PR Review Comment: https://git.openjdk.org/jdk/pull/24647#discussion_r2047720225 From prr at openjdk.org Wed Apr 16 20:48:45 2025 From: prr at openjdk.org (Phil Race) Date: Wed, 16 Apr 2025 20:48:45 GMT Subject: RFR: 8354552: Open source a few Swing tests In-Reply-To: References: <2FMzPdjd71su2fN0Bt1Msp6n1J6OEgk9daKDNpmv-HI=.a1596969-234a-482f-9c09-2505efaf74f1@github.com> Message-ID: On Wed, 16 Apr 2025 05:45:08 GMT, Prasanta Sadhukhan wrote: >> test/jdk/javax/swing/JLabel/bug4945795.java line 61: >> >>> 59: JFrame mainFrame = new JFrame("Bug4945795"); >>> 60: try { >>> 61: UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName()); >> >> Not sure if it makes much of a difference or is any better, but I was previously instructed to set `UIManager.setLookAndFeel("com.sun.java.swing.plaf.windows.WindowsLookAndFeel");` explicitly instead. Test runs fine anyway. > > I left a comment > >> >> We can set >> UIManager.setLookAndFeel("com.sun.java.swing.plaf.windows.WindowsLookAndFeel"); >> in main and throw exception if cannot be set so that it can be done before initializing PFJ (1) Personally I've thought about complaining about all the tests that hardwire the internal class name of a a platform L&F so setLookAndFeel("com.sun.java.swing.plaf.windows.WindowsLookAndFeel"); is what seems more wrong to me. (2) "I left a comment" yes I know, but I don't think it is necessary or better. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/24668#discussion_r2047728249 From dnguyen at openjdk.org Wed Apr 16 20:56:41 2025 From: dnguyen at openjdk.org (Damon Nguyen) Date: Wed, 16 Apr 2025 20:56:41 GMT Subject: RFR: JDK-8353942 : Open source Swing Tests - Set 5 In-Reply-To: References: Message-ID: On Wed, 16 Apr 2025 20:37:19 GMT, Harshitha Onkar wrote: > Following test are open-sourced in this PR: > > - javax/swing/DataTransfer/DragOverFeedbackTest.java - manual > - javax/swing/DataTransfer/ListDragOverFeedbackTest.java - manual > - javax/swing/DataTransfer/bug4655513.java - automated > - javax/swing/SwingUtilities/bug4369355.java - automated > - javax/swing/SwingUtilities/bug4967768.java - manual All tests (manual and automatic) pass and LGTM except maybe the `Oops` button test. I left a couple of comments. test/jdk/javax/swing/DataTransfer/ListDragOverFeedbackTest.java line 101: > 99: list2.setLayoutOrientation(JList.VERTICAL_WRAP); > 100: list2.setTransferHandler(handler); > 101: list2.setBorder(BorderFactory.createLineBorder(Color.BLACK)); The first two lists seem to be cut off on MacOS at least. The test itself works and passes. Screenshot 2025-04-16 at 1 46 16?PM test/jdk/javax/swing/SwingUtilities/bug4369355.java line 88: > 86: } > 87: } > 88: Extra newline at the EOF. test/jdk/javax/swing/SwingUtilities/bug4967768.java line 64: > 62: panel.add(but); > 63: return panel; > 64: } I don't see an underline under the `p` in `Oops` unless I'm misunderstanding the test. I'm on MacOS 15.4. Screenshot 2025-04-16 at 1 50 55?PM ------------- PR Review: https://git.openjdk.org/jdk/pull/24698#pullrequestreview-2773823817 PR Review Comment: https://git.openjdk.org/jdk/pull/24698#discussion_r2047746400 PR Review Comment: https://git.openjdk.org/jdk/pull/24698#discussion_r2047738055 PR Review Comment: https://git.openjdk.org/jdk/pull/24698#discussion_r2047741869 From prr at openjdk.org Wed Apr 16 20:59:48 2025 From: prr at openjdk.org (Phil Race) Date: Wed, 16 Apr 2025 20:59:48 GMT Subject: RFR: 8353445: Open source several AWT Menu tests - Batch 1 In-Reply-To: References: Message-ID: On Tue, 15 Apr 2025 06:14:33 GMT, Tejesh R wrote: > Open source these AWT Menu tests: > > java/awt/Menu/MenuVisibilityTest/MenuVisibilityTest.java > java/awt/Menu/MenuActionEventTest/MenuActionEventTest.java > java/awt/Menu/RmInHideTest/RmInHideTest.java > java/awt/Menu/SetShortCutTest/SetShortCutTest.java test/jdk/java/awt/Menu/MenuActionEventTest.java line 45: > 43: String INSTRUCTIONS = """ > 44: 1. Click on the Menu and then on Menuitem on the frame. > 45: 2. If you find the following message being printed:, printed in the test log area ... test/jdk/java/awt/Menu/MenuActionEventTest.java line 73: > 71: } > 72: > 73: class _Menu extends Menu { can all these additional classes be static nested classes ? test/jdk/java/awt/Menu/MenuVisibilityTest.java line 43: > 41: 1. Press on a MenuBar with a long name. > 42: 2. Select "First item" in an opened menu. > 43: If you see that "First menu item was pressed" press PASS see it where ? tell the tester where to look. test/jdk/java/awt/Menu/MenuVisibilityTest.java line 47: > 45: """; > 46: PassFailJFrame.builder() > 47: .title("Test Instructions") no need for that test/jdk/java/awt/Menu/RmInHideTest.java line 81: > 79: } > 80: > 81: class RmInHideTestFrame extends Frame implements ActionListener { static nested ? test/jdk/java/awt/Menu/SetShortCutTest.java line 73: > 71: } > 72: > 73: class TestMenuShortCut extends Frame implements ActionListener { static nested ? ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/24649#discussion_r2047738583 PR Review Comment: https://git.openjdk.org/jdk/pull/24649#discussion_r2047737805 PR Review Comment: https://git.openjdk.org/jdk/pull/24649#discussion_r2047741366 PR Review Comment: https://git.openjdk.org/jdk/pull/24649#discussion_r2047741855 PR Review Comment: https://git.openjdk.org/jdk/pull/24649#discussion_r2047746287 PR Review Comment: https://git.openjdk.org/jdk/pull/24649#discussion_r2047750939 From prr at openjdk.org Wed Apr 16 21:02:50 2025 From: prr at openjdk.org (Phil Race) Date: Wed, 16 Apr 2025 21:02:50 GMT Subject: RFR: 8352793: Open source several AWT TextComponent tests - Batch 1 [v2] In-Reply-To: References: Message-ID: On Wed, 16 Apr 2025 13:41:33 GMT, Tejesh R wrote: >> Open source these AWT TextComponent tests: >> >> java/awt/TextComponent/BackgroundTest/BackgroundTest.java >> java/awt/TextComponent/DisableTest/DisableTest.java >> java/awt/TextComponent/TextFieldMargin/TextFieldMargin.java >> java/awt/TextComponent/ModifiersTest/ModifiersTest.java > > Tejesh R has updated the pull request incrementally with one additional commit since the last revision: > > Updated review comments test/jdk/java/awt/TextComponent/BackgroundTest.java line 70: > 68: > 69: PassFailJFrame.builder() > 70: .title("Test Instructions") not needed test/jdk/java/awt/TextComponent/DisableTest.java line 56: > 54: > 55: PassFailJFrame.builder() > 56: .title("Test Instructions") not needed test/jdk/java/awt/TextComponent/ModifiersTest.java line 49: > 47: """; > 48: PassFailJFrame.builder() > 49: .title("Test Instructions") not needed test/jdk/java/awt/TextComponent/TextFieldMargin.java line 48: > 46: """; > 47: PassFailJFrame.builder() > 48: .title("Test Instructions") not needed ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/24656#discussion_r2047753949 PR Review Comment: https://git.openjdk.org/jdk/pull/24656#discussion_r2047754776 PR Review Comment: https://git.openjdk.org/jdk/pull/24656#discussion_r2047755014 PR Review Comment: https://git.openjdk.org/jdk/pull/24656#discussion_r2047756040 From prr at openjdk.org Wed Apr 16 21:04:51 2025 From: prr at openjdk.org (Phil Race) Date: Wed, 16 Apr 2025 21:04:51 GMT Subject: RFR: 8353213: Open source several swing tests batch3 In-Reply-To: References: Message-ID: On Tue, 15 Apr 2025 22:28:01 GMT, Damon Nguyen wrote: > Open-sourcing and standardizing several tests (basic) Marked as reviewed by prr (Reviewer). ------------- PR Review: https://git.openjdk.org/jdk/pull/24670#pullrequestreview-2773851456 From honkar at openjdk.org Wed Apr 16 21:08:47 2025 From: honkar at openjdk.org (Harshitha Onkar) Date: Wed, 16 Apr 2025 21:08:47 GMT Subject: RFR: JDK-8353942 : Open source Swing Tests - Set 5 In-Reply-To: References: Message-ID: On Wed, 16 Apr 2025 20:52:28 GMT, Damon Nguyen wrote: >> Following test are open-sourced in this PR: >> >> - javax/swing/DataTransfer/DragOverFeedbackTest.java - manual >> - javax/swing/DataTransfer/ListDragOverFeedbackTest.java - manual >> - javax/swing/DataTransfer/bug4655513.java - automated >> - javax/swing/SwingUtilities/bug4369355.java - automated >> - javax/swing/SwingUtilities/bug4967768.java - manual > > test/jdk/javax/swing/SwingUtilities/bug4967768.java line 64: > >> 62: panel.add(but); >> 63: return panel; >> 64: } > > I don't see an underline under the `p` in `Oops` unless I'm misunderstanding the test. I'm on MacOS 15.4. > > Screenshot 2025-04-16 at 1 50 55?PM This test is not applicable for macOS. I may have missed adding the` @requires (os.family != "mac")` tag. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/24698#discussion_r2047761518 From honkar at openjdk.org Wed Apr 16 21:13:46 2025 From: honkar at openjdk.org (Harshitha Onkar) Date: Wed, 16 Apr 2025 21:13:46 GMT Subject: RFR: JDK-8353942 : Open source Swing Tests - Set 5 [v2] In-Reply-To: References: Message-ID: > Following test are open-sourced in this PR: > > - javax/swing/DataTransfer/DragOverFeedbackTest.java - manual > - javax/swing/DataTransfer/ListDragOverFeedbackTest.java - manual > - javax/swing/DataTransfer/bug4655513.java - automated > - javax/swing/SwingUtilities/bug4369355.java - automated > - javax/swing/SwingUtilities/bug4967768.java - manual Harshitha Onkar has updated the pull request incrementally with one additional commit since the last revision: @requires tag ------------- Changes: - all: https://git.openjdk.org/jdk/pull/24698/files - new: https://git.openjdk.org/jdk/pull/24698/files/2852e377..32ad29e7 Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=24698&range=01 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=24698&range=00-01 Stats: 3 lines in 3 files changed: 1 ins; 1 del; 1 mod Patch: https://git.openjdk.org/jdk/pull/24698.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/24698/head:pull/24698 PR: https://git.openjdk.org/jdk/pull/24698 From honkar at openjdk.org Wed Apr 16 21:13:47 2025 From: honkar at openjdk.org (Harshitha Onkar) Date: Wed, 16 Apr 2025 21:13:47 GMT Subject: RFR: JDK-8353942 : Open source Swing Tests - Set 5 [v2] In-Reply-To: References: Message-ID: <7RP4cP8sk6ZHdhmozj8HR5CSTSooSohPHQnnNOzWCro=.ceff36c1-d75d-4414-aaef-ae098770412f@github.com> On Wed, 16 Apr 2025 20:53:38 GMT, Damon Nguyen wrote: >> Harshitha Onkar has updated the pull request incrementally with one additional commit since the last revision: >> >> @requires tag > > test/jdk/javax/swing/DataTransfer/ListDragOverFeedbackTest.java line 101: > >> 99: list2.setLayoutOrientation(JList.VERTICAL_WRAP); >> 100: list2.setTransferHandler(handler); >> 101: list2.setBorder(BorderFactory.createLineBorder(Color.BLACK)); > > The first two lists seem to be cut off on MacOS at least. The test itself works and passes. > > Screenshot 2025-04-16 at 1 46 16?PM Increased frame size. Can you plz check again. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/24698#discussion_r2047766869 From dnguyen at openjdk.org Wed Apr 16 21:25:45 2025 From: dnguyen at openjdk.org (Damon Nguyen) Date: Wed, 16 Apr 2025 21:25:45 GMT Subject: RFR: JDK-8353942 : Open source Swing Tests - Set 5 [v2] In-Reply-To: References: Message-ID: On Wed, 16 Apr 2025 21:13:46 GMT, Harshitha Onkar wrote: >> Following test are open-sourced in this PR: >> >> - javax/swing/DataTransfer/DragOverFeedbackTest.java - manual >> - javax/swing/DataTransfer/ListDragOverFeedbackTest.java - manual >> - javax/swing/DataTransfer/bug4655513.java - automated >> - javax/swing/SwingUtilities/bug4369355.java - automated >> - javax/swing/SwingUtilities/bug4967768.java - manual > > Harshitha Onkar has updated the pull request incrementally with one additional commit since the last revision: > > @requires tag Marked as reviewed by dnguyen (Committer). ------------- PR Review: https://git.openjdk.org/jdk/pull/24698#pullrequestreview-2773887060 From dnguyen at openjdk.org Wed Apr 16 21:25:46 2025 From: dnguyen at openjdk.org (Damon Nguyen) Date: Wed, 16 Apr 2025 21:25:46 GMT Subject: RFR: JDK-8353942 : Open source Swing Tests - Set 5 [v2] In-Reply-To: <7RP4cP8sk6ZHdhmozj8HR5CSTSooSohPHQnnNOzWCro=.ceff36c1-d75d-4414-aaef-ae098770412f@github.com> References: <7RP4cP8sk6ZHdhmozj8HR5CSTSooSohPHQnnNOzWCro=.ceff36c1-d75d-4414-aaef-ae098770412f@github.com> Message-ID: On Wed, 16 Apr 2025 21:09:52 GMT, Harshitha Onkar wrote: >> test/jdk/javax/swing/DataTransfer/ListDragOverFeedbackTest.java line 101: >> >>> 99: list2.setLayoutOrientation(JList.VERTICAL_WRAP); >>> 100: list2.setTransferHandler(handler); >>> 101: list2.setBorder(BorderFactory.createLineBorder(Color.BLACK)); >> >> The first two lists seem to be cut off on MacOS at least. The test itself works and passes. >> >> Screenshot 2025-04-16 at 1 46 16?PM > > Increased frame size. Can you plz check again. Still slightly cut off for the first list. But I guess that one doesn't matter as much since 10, 11, 12, 13, and 14 aren't even visible. That one is supposed to have no wrap too. LGTM now Screenshot 2025-04-16 at 2 21 03?PM ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/24698#discussion_r2047780609 From serb at openjdk.org Wed Apr 16 22:06:42 2025 From: serb at openjdk.org (Sergey Bylokhov) Date: Wed, 16 Apr 2025 22:06:42 GMT Subject: RFR: 8354191: GTK LaF should use pre-multiplied alpha same as cairo In-Reply-To: References: <-sAv6upz5pv3EA1zjjUvRUxNP1Tl75NJAwOX-df8Vbk=.442e3494-836b-4664-baf1-669fbd7532a0@github.com> Message-ID: <_TAnbmIhxwUh0cg6HowhONB20oc3ghXDdqX9s7yPbnY=.ec14b60e-7d1d-4039-918a-baee8bb15258@github.com> On Fri, 11 Apr 2025 06:01:32 GMT, Maxim Kartashev wrote: >> src/java.desktop/share/classes/com/sun/java/swing/plaf/gtk/GTKEngine.java line 618: >> >>> 616: int index = transparency - 1; >>> 617: if (COLOR_MODELS[index] == null) { >>> 618: COLOR_MODELS[index] = GraphicsEnvironment.getLocalGraphicsEnvironment() >> >> How will it work if the configuration changes at runtime? > > There will be an additional pixel conversion effort from the outdated configuration's format to the new actual format when this image is used. In other words, status quo. You are right - as long as the old and new formats are mostly compatible the impact should be minimal. But in the worst case we might fall back to some slower blits. However with the current DirectColorModel, we are likely to hit optimized paths for most target formats. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/24551#discussion_r2047832260 From serb at openjdk.org Wed Apr 16 22:13:44 2025 From: serb at openjdk.org (Sergey Bylokhov) Date: Wed, 16 Apr 2025 22:13:44 GMT Subject: RFR: 8352407: PixelInterleavedSampleModel with unused components throws RasterFormatException: Incorrect pixel stride [v2] In-Reply-To: References: <0IkJpQYFv_3lUjxKvd1T0EqtOeO4wN5XYEX1pJFf6Pc=.0eac5063-1b53-461b-8bc8-ca1320147a5a@github.com> <7PoUZmVaNchLPzKKv-Y2Kb3K2iTCIwF_GBxWgYOeSj8=.7c57eb44-10de-4e95-9fea-07ea39ed53ee@github.com> <9t4GmM3f624NKzcRzc1I4m-jDABNjukX93uJiEge0Bs=.b3a8c0f9-cd9c-4f61-9d80-700e5d37fcc7@github.com> Message-ID: On Thu, 3 Apr 2025 09:26:03 GMT, Nikita Gubarkov wrote: >>>I just accepted any pixel-interleaved surface with 4-byte stride and assumed that I can blit it directly. >> >> So you implemented logic similar to [this one](https://github.com/openjdk/jdk/blob/bd74922157230c866802b4c5269da81e872525aa/src/java.desktop/share/native/libawt/java2d/loops/LoopMacros.h#L847). >> >> I haven?t found yet whether we have logic to fall back to a "generic Java loop" if the gap is not stored in the array and that memcpy fails. If we?re missing this, we should either: >> >> - Add the fallback, >> - Implement another version of the loop that handles the tail, or >> - Update the current ISOSCALE_BLIT. >> >> A similar approach could be implemented for Vulkan as well. > > I get the idea. Actually, my Vulkan blit routines know the component order (needed for swizzling anyway), so instead of copying `scanlineStride` or `width * pixelStride`, I can copy `(width - 1) * pixelStride + maxBandOffset + 1` (I don't like breaking the alignment at the end, but anyway). > However, supporting the gap at the end of the pixel seems like a lot of burden to me - not all current code seems to consider this possibility and for the future code it's too easy to get wrong. > > Some side thoughts: I think we rely on predefined formats and loops too much. As I already mentioned, `SurfaceDataRasInfo` doesn't have info about its bands and doesn't even have a total size. We rely on specific loops registered for specific surface types, which only works well when we created those surfaces by ourselves. Example: > I profiled Intellij IDEA to see which blit loops are often used there and noticed that icons are loaded as 4-byte RGBA images. See the issue? That's a `TYPE_CUSTOM` image with some generic `SurfaceType` - it doesn't have native raster ops initialized, so it can only go through a generic software loop! That's how I came to https://github.com/openjdk/jdk/pull/24378. So what I was trying to do with that Vulkan work is to make it more generic - register loops for more generic surface types and dynamically inspect their properties to see whether we can actually do an optimal blit. And given that 99% of the time those are 3/4-bytes per pixel RGBA/ARGB/BGR/etc., it's very easy to generalize, but we don't seem to have enough flexibility for that. There is no reason to change our current implementation of ComponentSampleModel, since a similar raster can be created manually and should be properly handled by accelerated pipelines. DataBuffer manualBuffer = new DataBufferByte( scanlineStride * (SIZE - 1) + pixelStride * SIZE ); WritableRaster manualRaster = Raster.createWritableRaster(sampleModel, manualBuffer, null); BufferedImage manualImage = new BufferedImage(colorModel, manualRaster, isAlphaPremultiplied, null); ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/24111#discussion_r2047838110 From serb at openjdk.org Wed Apr 16 22:19:44 2025 From: serb at openjdk.org (Sergey Bylokhov) Date: Wed, 16 Apr 2025 22:19:44 GMT Subject: RFR: 8352905: Open some JComboBox bugs 1 [v2] In-Reply-To: References: Message-ID: On Wed, 16 Apr 2025 08:22:19 GMT, Alisen Chung wrote: >> Updating and opening some tests > > Alisen Chung has updated the pull request incrementally with two additional commits since the last revision: > > - update tests > - update tests test/jdk/javax/swing/JComboBox/bug4530952.java line 84: > 82: robot.delay(250); > 83: > 84: if (frame != null) { frame initialized on a different thread. test/jdk/javax/swing/JComboBox/bug4530952.java line 88: > 86: } > 87: > 88: if (!passed()) { pass is set to true on EDT ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/24495#discussion_r2047842422 PR Review Comment: https://git.openjdk.org/jdk/pull/24495#discussion_r2047843760 From serb at openjdk.org Wed Apr 16 22:20:44 2025 From: serb at openjdk.org (Sergey Bylokhov) Date: Wed, 16 Apr 2025 22:20:44 GMT Subject: RFR: 8352865: Open source several AWT TextComponent tests - Batch 2 [v3] In-Reply-To: <63oZ4i-lJaupiVpNrLi4RyzitZLFhf5bMlHOqyz03zw=.1d251849-0cf6-4c07-9b7d-ee40af994b02@github.com> References: <63oZ4i-lJaupiVpNrLi4RyzitZLFhf5bMlHOqyz03zw=.1d251849-0cf6-4c07-9b7d-ee40af994b02@github.com> Message-ID: <0xT-DpO4QC0gAnl7KIyDUJ0NSMP7s5NxAaK9SQABLhw=.93ea61ef-06b7-4376-8e72-5d5f252a7639@github.com> On Wed, 16 Apr 2025 13:19:50 GMT, Tejesh R wrote: >> Open source these AWT TextComponent tests: >> >> java/awt/TextComponent/SelectionAndCaretColor/SelectionAndCaretColor.java >> java/awt/TextComponent/SelectionTest/SelectionTest.java >> java/awt/TextComponent/CorrectTextComponentSelectionTest/CorrectTextComponentSelectionTest.java >> java/awt/TextComponent/AltPlusNumberKeyCombinationsTest/AltPlusNumberKeyCombinationsTest.java > > Tejesh R has updated the pull request incrementally with one additional commit since the last revision: > > Updated review comments Marked as reviewed by serb (Reviewer). ------------- PR Review: https://git.openjdk.org/jdk/pull/24477#pullrequestreview-2773988985 From serb at openjdk.org Wed Apr 16 22:25:41 2025 From: serb at openjdk.org (Sergey Bylokhov) Date: Wed, 16 Apr 2025 22:25:41 GMT Subject: RFR: 8139228: JFileChooser renders file names as HTML document In-Reply-To: References: Message-ID: On Fri, 4 Apr 2025 07:21:35 GMT, Tejesh R wrote: > 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 not taken care in any of these renderers, JLabel renders them as HTML document if nothing is set or specified. > The fix is to get "html.disable" property from JFileChooser and set the same to JLabel component which renders and set Directory name. Hence applications can either enable/disable this property and control HTML rendering of directory name. test/jdk/javax/swing/JFileChooser/HTMLFileName.java line 43: > 41: static File directory; > 42: public static void main(String[] args) throws Exception { > 43: String INSTRUCTIONS = """ Why the windows is skipped? Don't you need to check all L&F and platforms? as of now you validated metal(default on linux) and aqua(default on mac). ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/24439#discussion_r2047849118 From serb at openjdk.org Wed Apr 16 22:30:42 2025 From: serb at openjdk.org (Sergey Bylokhov) Date: Wed, 16 Apr 2025 22:30:42 GMT Subject: RFR: JDK-8353942 : Open source Swing Tests - Set 5 [v2] In-Reply-To: References: Message-ID: On Wed, 16 Apr 2025 21:13:46 GMT, Harshitha Onkar wrote: >> Following test are open-sourced in this PR: >> >> - javax/swing/DataTransfer/DragOverFeedbackTest.java - manual >> - javax/swing/DataTransfer/ListDragOverFeedbackTest.java - manual >> - javax/swing/DataTransfer/bug4655513.java - automated >> - javax/swing/SwingUtilities/bug4369355.java - automated >> - javax/swing/SwingUtilities/bug4967768.java - manual > > Harshitha Onkar has updated the pull request incrementally with one additional commit since the last revision: > > @requires tag test/jdk/javax/swing/DataTransfer/bug4655513.java line 76: > 74: robot.delay(500); > 75: > 76: if (!editor.getText().contains(LINK_URL)) { editor initialized on EDT ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/24698#discussion_r2047852552 From serb at openjdk.org Wed Apr 16 22:31:41 2025 From: serb at openjdk.org (Sergey Bylokhov) Date: Wed, 16 Apr 2025 22:31:41 GMT Subject: RFR: JDK-8354340 : Open source Swing Tests - Set 6 [v2] In-Reply-To: <1Syw2cSgOGu6f7c16RtqseXcMtyEIbe4WDH3-Z8Yxbg=.29867e2a-728d-42e6-b040-f526be6af5fc@github.com> References: <1Syw2cSgOGu6f7c16RtqseXcMtyEIbe4WDH3-Z8Yxbg=.29867e2a-728d-42e6-b040-f526be6af5fc@github.com> Message-ID: On Wed, 16 Apr 2025 20:20:24 GMT, Harshitha Onkar wrote: >> Following tests are open-sourced in this PR: >> >> - javax/swing/JViewport/ScrollRectToVisibleTest3.java - automated >> - javax/swing/JViewport/SetViewRepaint.java - manual > > Harshitha Onkar has updated the pull request incrementally with one additional commit since the last revision: > > extra newline test/jdk/javax/swing/JViewport/ScrollRectToVisibleTest3.java line 67: > 65: Rectangle frameBounds = Util.invokeOnEDT(() -> getComponentBounds(frame)); > 66: robot.delay(100); > 67: Point scrollBtnLoc = Util.getCenterPoint(scrollButton); scrollButton initialized on EDT ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/24697#discussion_r2047853378 From serb at openjdk.org Wed Apr 16 22:37:43 2025 From: serb at openjdk.org (Sergey Bylokhov) Date: Wed, 16 Apr 2025 22:37:43 GMT Subject: RFR: 8353957: Open source several AWT ScrollPane tests - Batch 1 In-Reply-To: References: Message-ID: On Wed, 16 Apr 2025 11:24:47 GMT, Tejesh R wrote: > Open source these AWT ScrollPane tests: > > java/awt/ScrollPane/ScrollPaneFlicker/ScrollPaneFlicker.java > java/awt/ScrollPane/ScrollbarsAsNeeded/ScrollbarsAsNeededTest.java > java/awt/ScrollPane/ScrollPanePaint/ScrollPanePaint.java > java/awt/ScrollPane/ScrollPositionTest/ScrollPositionTest.java test/jdk/java/awt/ScrollPane/ScrollPanePaint.java line 32: > 30: * > 31: * US Government Users Restricted Rights - Use, duplication or disclosure > 32: * restricted by GSA ADP Schedule Contract with IBM Corp. is this license could be accepted by the OpenJDK? ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/24684#discussion_r2047861239 From serb at openjdk.org Wed Apr 16 22:39:43 2025 From: serb at openjdk.org (Sergey Bylokhov) Date: Wed, 16 Apr 2025 22:39:43 GMT Subject: RFR: 8339561: The test/jdk/java/awt/Paint/ListRepaint.java may fail after JDK-8327401 [v6] In-Reply-To: References: Message-ID: On Tue, 4 Mar 2025 21:19:09 GMT, Alexey Ivanov wrote: >> I think as of now it should be good enough, why do you think volatile will not help here? > >> I think as of now it should be good enough > > That's the problem, the presence of the `volatile` modifier creates a false sense of thread-safety, this is why I'd rather not add it. > >> why do you think volatile will not help here? > > The `volatile` modifier guarantees that a thread which reads from the `volatile` field will see everything that occurred before a (new) reference was written to the `volatile` field. Yet there are no guarantees another thread will see any modifications to fields of the object the reference to which is stored in the `volatile` field. > > And this test does exactly this: it writes a reference into the `currentState` field and then it modifies the fields of the object stored in `currentState`. There are no guarantees that `currentState.setAction(true)` will result in `currentState.getAction()` returning `true`. > > If you also declare `TestState.action` as `volatile` or use `AtomicBoolean`, it could be enough to safely access the `currentState` field from two threads. Other fields are final, so they can't be modified, and therefore they don't change after another thread sees the reference to `TestState` object. @aivanov-jdk Do you have any other comments? ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/20861#discussion_r2047865655 From achung at openjdk.org Wed Apr 16 23:25:08 2025 From: achung at openjdk.org (Alisen Chung) Date: Wed, 16 Apr 2025 23:25:08 GMT Subject: RFR: 8354466: Open some misc Swing bugs 9 Message-ID: Updating and opening some misc swing bugs ------------- Commit messages: - opening tests Changes: https://git.openjdk.org/jdk/pull/24703/files Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=24703&range=00 Issue: https://bugs.openjdk.org/browse/JDK-8354466 Stats: 175 lines in 2 files changed: 175 ins; 0 del; 0 mod Patch: https://git.openjdk.org/jdk/pull/24703.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/24703/head:pull/24703 PR: https://git.openjdk.org/jdk/pull/24703 From honkar at openjdk.org Wed Apr 16 23:53:41 2025 From: honkar at openjdk.org (Harshitha Onkar) Date: Wed, 16 Apr 2025 23:53:41 GMT Subject: RFR: JDK-8354340 : Open source Swing Tests - Set 6 [v2] In-Reply-To: References: <1Syw2cSgOGu6f7c16RtqseXcMtyEIbe4WDH3-Z8Yxbg=.29867e2a-728d-42e6-b040-f526be6af5fc@github.com> Message-ID: On Wed, 16 Apr 2025 22:28:49 GMT, Sergey Bylokhov wrote: >> Harshitha Onkar has updated the pull request incrementally with one additional commit since the last revision: >> >> extra newline > > test/jdk/javax/swing/JViewport/ScrollRectToVisibleTest3.java line 67: > >> 65: Rectangle frameBounds = Util.invokeOnEDT(() -> getComponentBounds(frame)); >> 66: robot.delay(100); >> 67: Point scrollBtnLoc = Util.getCenterPoint(scrollButton); > > scrollButton initialized on EDT [Util.getCenterPoint()](https://github.com/openjdk/jdk/blob/db2dffb6e5fed3773080581350f7f5c0bcff8f35/test/jdk/javax/swing/regtesthelpers/Util.java#L197) is invoked on EDT. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/24697#discussion_r2047946302 From honkar at openjdk.org Wed Apr 16 23:59:26 2025 From: honkar at openjdk.org (Harshitha Onkar) Date: Wed, 16 Apr 2025 23:59:26 GMT Subject: RFR: JDK-8353942 : Open source Swing Tests - Set 5 [v3] In-Reply-To: References: Message-ID: > Following test are open-sourced in this PR: > > - javax/swing/DataTransfer/DragOverFeedbackTest.java - manual > - javax/swing/DataTransfer/ListDragOverFeedbackTest.java - manual > - javax/swing/DataTransfer/bug4655513.java - automated > - javax/swing/SwingUtilities/bug4369355.java - automated > - javax/swing/SwingUtilities/bug4967768.java - manual Harshitha Onkar has updated the pull request incrementally with one additional commit since the last revision: editor on EDT ------------- Changes: - all: https://git.openjdk.org/jdk/pull/24698/files - new: https://git.openjdk.org/jdk/pull/24698/files/32ad29e7..8935321e Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=24698&range=02 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=24698&range=01-02 Stats: 5 lines in 1 file changed: 2 ins; 0 del; 3 mod Patch: https://git.openjdk.org/jdk/pull/24698.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/24698/head:pull/24698 PR: https://git.openjdk.org/jdk/pull/24698 From honkar at openjdk.org Wed Apr 16 23:59:26 2025 From: honkar at openjdk.org (Harshitha Onkar) Date: Wed, 16 Apr 2025 23:59:26 GMT Subject: RFR: JDK-8353942 : Open source Swing Tests - Set 5 [v2] In-Reply-To: References: Message-ID: On Wed, 16 Apr 2025 22:27:38 GMT, Sergey Bylokhov wrote: >> Harshitha Onkar has updated the pull request incrementally with one additional commit since the last revision: >> >> @requires tag > > test/jdk/javax/swing/DataTransfer/bug4655513.java line 76: > >> 74: robot.delay(500); >> 75: >> 76: if (!editor.getText().contains(LINK_URL)) { > > editor initialized on EDT Updated. Wrapped the condition in EDT ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/24698#discussion_r2047953613 From honkar at openjdk.org Thu Apr 17 00:19:19 2025 From: honkar at openjdk.org (Harshitha Onkar) Date: Thu, 17 Apr 2025 00:19:19 GMT Subject: RFR: JDK-8353319 : Open source Swing tests - Set 3 [v3] In-Reply-To: References: Message-ID: > Following tests are updates as part of this PR: > > 1. javax/swing/JRootPane/bug4614623.java - manual > 2. javax/swing/JTabbedPane/bug4613811.java - manual > 3. javax/swing/JWindow/bug4251781.java - manual > 4. javax/swing/JFrame/bug4419914.java - manual, updated existing test by adding JWindow, JDialog cases. Harshitha Onkar has updated the pull request incrementally with one additional commit since the last revision: test instruction updated for macOS ------------- Changes: - all: https://git.openjdk.org/jdk/pull/24639/files - new: https://git.openjdk.org/jdk/pull/24639/files/82f4d35a..79a7ca60 Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=24639&range=02 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=24639&range=01-02 Stats: 13 lines in 2 files changed: 8 ins; 1 del; 4 mod Patch: https://git.openjdk.org/jdk/pull/24639.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/24639/head:pull/24639 PR: https://git.openjdk.org/jdk/pull/24639 From honkar at openjdk.org Thu Apr 17 00:19:19 2025 From: honkar at openjdk.org (Harshitha Onkar) Date: Thu, 17 Apr 2025 00:19:19 GMT Subject: RFR: JDK-8353319 : Open source Swing tests - Set 3 [v3] In-Reply-To: References: <9jvfiW39d1WlIGj3eHwba62BmDHB5p8foGmpeqw0qSI=.029fd692-f9cc-4ae8-8617-78a4b1df38a9@github.com> Message-ID: On Wed, 16 Apr 2025 20:02:17 GMT, Damon Nguyen wrote: >> Did you miss this? > > Confirmed the same. May be platform specific. > ![image](https://github.com/user-attachments/assets/532cd1cd-93ef-4e4a-b810-de75cf1484ef) > ![image](https://github.com/user-attachments/assets/d910e179-cd45-4eca-a00a-3099e66801c3) > ![image](https://github.com/user-attachments/assets/249fa7a9-f2d1-4578-bfbb-44e38d40fabd) Test Instructions updated for macOS ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/24639#discussion_r2047972911 From azvegint at openjdk.org Thu Apr 17 01:30:00 2025 From: azvegint at openjdk.org (Alexander Zvegintsev) Date: Thu, 17 Apr 2025 01:30:00 GMT Subject: RFR: JDK-8354340 : Open source Swing Tests - Set 6 [v2] In-Reply-To: <1Syw2cSgOGu6f7c16RtqseXcMtyEIbe4WDH3-Z8Yxbg=.29867e2a-728d-42e6-b040-f526be6af5fc@github.com> References: <1Syw2cSgOGu6f7c16RtqseXcMtyEIbe4WDH3-Z8Yxbg=.29867e2a-728d-42e6-b040-f526be6af5fc@github.com> Message-ID: <6rJVrDWqy3RCf9HsnhTYkLzlk99gMyuO_6VPWNEhbqw=.8cd72ab1-26af-4efe-8dcc-1df9f8dfeed5@github.com> On Wed, 16 Apr 2025 20:20:24 GMT, Harshitha Onkar wrote: >> Following tests are open-sourced in this PR: >> >> - javax/swing/JViewport/ScrollRectToVisibleTest3.java - automated >> - javax/swing/JViewport/SetViewRepaint.java - manual > > Harshitha Onkar has updated the pull request incrementally with one additional commit since the last revision: > > extra newline Marked as reviewed by azvegint (Reviewer). ------------- PR Review: https://git.openjdk.org/jdk/pull/24697#pullrequestreview-2774292699 From azvegint at openjdk.org Thu Apr 17 01:52:47 2025 From: azvegint at openjdk.org (Alexander Zvegintsev) Date: Thu, 17 Apr 2025 01:52:47 GMT Subject: RFR: JDK-8353486 : Open source Swing Tests - Set 4 [v3] In-Reply-To: References: Message-ID: On Tue, 8 Apr 2025 22:45:31 GMT, Harshitha Onkar wrote: >> Open-sourced the following Swing tests: >> >> 1. javax/swing/JFileChooser/bug4464774.java >> 2. javax/swing/JFileChooser/bug4522756.java >> 3. javax/swing/JFileChooser/bug4759934.java >> 4. javax/swing/JFileChooser/bug4943900.java >> 5. javax/swing/JOptionPane/bug4194862.java > > Harshitha Onkar has updated the pull request incrementally with one additional commit since the last revision: > > review update test/jdk/javax/swing/JFileChooser/bug4943900.java line 43: > 41: private static final String INSTRUCTIONS = """ > 42: 1. Click "Show FileChooser" button below, FileChooser dialog must > 43: appear. I do not see the "Show FileChooser" button, the file chooser showed automatically. However, it is shown in an unobvious way (code-wise), via the `frame.add(fc);` call (and later the `setVisible(true)` call on the JFrame shows it). Is this intentional? ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/24456#discussion_r2048060182 From azvegint at openjdk.org Thu Apr 17 02:01:42 2025 From: azvegint at openjdk.org (Alexander Zvegintsev) Date: Thu, 17 Apr 2025 02:01:42 GMT Subject: RFR: 8354561: Open source several swing tests batch0 [v2] In-Reply-To: References: Message-ID: <1TVLT8SYNn1C5ddWj3GkaxDyL3td5-nUBE2Va3yautA=.29242f16-d5b3-4388-a8df-31d45045fa0c@github.com> > Few more tests open sourced: > > javax/swing/JTextArea/4474400/bug4474400.java > javax/swing/border/TitledBorder/TransparentTitleTest.java > javax/swing/JComboBox/4139900/bug4139900.java > javax/swing/JComboBox/4174876/bug4174876.java Alexander Zvegintsev has updated the pull request incrementally with one additional commit since the last revision: review comments ------------- Changes: - all: https://git.openjdk.org/jdk/pull/24680/files - new: https://git.openjdk.org/jdk/pull/24680/files/08a7e843..08a5a85a Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=24680&range=01 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=24680&range=00-01 Stats: 5 lines in 4 files changed: 1 ins; 1 del; 3 mod Patch: https://git.openjdk.org/jdk/pull/24680.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/24680/head:pull/24680 PR: https://git.openjdk.org/jdk/pull/24680 From azvegint at openjdk.org Thu Apr 17 02:21:29 2025 From: azvegint at openjdk.org (Alexander Zvegintsev) Date: Thu, 17 Apr 2025 02:21:29 GMT Subject: RFR: 8354701: Open source few JToolTip tests Message-ID: Few more tests are open sourced: - javax/swing/JToolTip/4225314/bug4225314.java manual - javax/swing/JToolTip/TooltipTest/TooltipTest.java manual - javax/swing/JToolTip/4255441/bug4255441.java manual ------------- Commit messages: - 8354701: Open source few JToolTip tests Changes: https://git.openjdk.org/jdk/pull/24708/files Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=24708&range=00 Issue: https://bugs.openjdk.org/browse/JDK-8354701 Stats: 226 lines in 3 files changed: 226 ins; 0 del; 0 mod Patch: https://git.openjdk.org/jdk/pull/24708.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/24708/head:pull/24708 PR: https://git.openjdk.org/jdk/pull/24708 From philip.race at oracle.com Thu Apr 17 04:09:59 2025 From: philip.race at oracle.com (Philip Race) Date: Wed, 16 Apr 2025 21:09:59 -0700 Subject: Proposal: A new common Image API In-Reply-To: References: Message-ID: <484ae025-47dc-462e-b6bd-e4fce3252005@oracle.com> First, note than John Neffenger replied to this but only on openjfx-dev and the first thing I saw was the reply and couldn't see the original. After some consternation I tracked down this cross-post. Here's a link to the reply https://mail.openjdk.org/pipermail/openjfx-dev/2025-April/053616.html A fundamental problem is that all the users need to be able to produce and consume the data. So there either needs to be a module dependency (not viable) or an agreed format (are we really going to define an image format which encapsulates everything, including the multi-frame GIF support) and then everyone needs a reader and don't forget writers and they need to be able to do .. so much .. I just don't see a viable path here. And several (8 ?) years ago, I pondered some way to separate image handling from the desktop module to see if a server app could use it without pulling in AWT but the intra-package dependencies made it impossible without changes I didn't even figure out if they were possible. -phil. On 4/16/25 3:04 AM, Glavo wrote: > Currently, there are multiple different image APIs in the Java > ecosystem: AWT, JavaFX, Android, etc. > What's worse, the Android platform does not provide support for AWT, > making the Java ecosystem even more fragmented. > > There are some obvious problems with the current situation: > > * Third-party libraries that need an image API are difficult to be > universal. > ? A practical example: Apache Commons Imaging has been in the alpha > stage and cannot release version 1.0. > ? The main reason is that it depends on `java.awt.image`, so it > doesn't work on Android. > ? We hope to solve this problem before the official release. > * Different image APIs have to repeatedly implement support for > reading the same image format (such as JPEG). > ? In fact, AWT, JavaFX, and Android now each implement reading JPEG > images. > ? This is a waste. > > I thought we might be able to create a new module independent of > java.desktop that provides a common abstraction for images. > It should: > > * Provides common Image and ImageProvider interfaces that can be > implemented by different providers. > * Provides a unified abstraction for colors, color spaces, pixel > formats, etc. > * Provides general and extensible image I/O support. > ? Read/write support should only need to be implemented once per image > format. > ? It should be bidirectionally compatible with `javax.imageio`: > ? The implementation of either API can be accessed through the other API. > > I want to know if this is an idea worth putting into practice? > I'm not an expert in this field, so I'm worried about creating designs > with many flaws. > Therefore, I haven't attempted to implement it yet. > If anyone is willing to implement it, I'd like to help. > > I had sent an email a few days ago but no one responded, so I > re-edited it and sent this one. > > Glavo > From abhiscxk at openjdk.org Thu Apr 17 04:27:46 2025 From: abhiscxk at openjdk.org (Abhishek Kumar) Date: Thu, 17 Apr 2025 04:27:46 GMT Subject: RFR: 8354285: Open source Swing tests Batch 3 In-Reply-To: References: Message-ID: <3jciEoCab3HDbqiqkezqnJQlXjll3cJ1eY7wJpo7-bA=.d9feb26c-236d-474c-b963-489aed52430d@github.com> On Wed, 16 Apr 2025 08:42:20 GMT, Jayathirth D V wrote: > Open source some of the swing LAF tests test/jdk/com/sun/java/swing/plaf/windows/MenuItem/4685843/bug4685843.java line 75: > 73: > 74: jMenu.setText("File"); > 75: jMenuItem.setText("JMenuItem"); minor changes: You can pass the text while initializing for JMenu, JMenuItem, JCheckBoxMenuItem and JRadioButtonMenuItem. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/24677#discussion_r2048207175 From abhiscxk at openjdk.org Thu Apr 17 04:29:42 2025 From: abhiscxk at openjdk.org (Abhishek Kumar) Date: Thu, 17 Apr 2025 04:29:42 GMT Subject: RFR: 8354418: Open source Swing tests Batch 4 In-Reply-To: References: Message-ID: On Wed, 16 Apr 2025 08:54:29 GMT, Jayathirth D V wrote: > Open source some of the swing windows LAF tests test/jdk/com/sun/java/swing/plaf/windows/MenuItem/AcceleratorDelimiter/WindowsLAFMenuAcceleratorDelimiter.java line 64: > 62: Windows = "+". > 63: > 64: This test is for Windows platform only. You can move this line at the start of the instruction ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/24678#discussion_r2048208000 From psadhukhan at openjdk.org Thu Apr 17 05:16:44 2025 From: psadhukhan at openjdk.org (Prasanta Sadhukhan) Date: Thu, 17 Apr 2025 05:16:44 GMT Subject: RFR: 8354552: Open source a few Swing tests In-Reply-To: <2FMzPdjd71su2fN0Bt1Msp6n1J6OEgk9daKDNpmv-HI=.a1596969-234a-482f-9c09-2505efaf74f1@github.com> References: <2FMzPdjd71su2fN0Bt1Msp6n1J6OEgk9daKDNpmv-HI=.a1596969-234a-482f-9c09-2505efaf74f1@github.com> Message-ID: On Tue, 15 Apr 2025 22:13:09 GMT, Phil Race wrote: > Open source a few Swing regression tests. Marked as reviewed by psadhukhan (Reviewer). ------------- PR Review: https://git.openjdk.org/jdk/pull/24668#pullrequestreview-2774594125 From abhiscxk at openjdk.org Thu Apr 17 05:43:16 2025 From: abhiscxk at openjdk.org (Abhishek Kumar) Date: Thu, 17 Apr 2025 05:43:16 GMT Subject: RFR: 8354493: Opensource Several MultiScreen and Insets related tests [v4] In-Reply-To: References: Message-ID: > Several multi screen related Applet tests are converted to manual and open sourced. Abhishek Kumar has updated the pull request incrementally with one additional commit since the last revision: Minor updates ------------- Changes: - all: https://git.openjdk.org/jdk/pull/24654/files - new: https://git.openjdk.org/jdk/pull/24654/files/e07c51a1..fd57f445 Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=24654&range=03 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=24654&range=02-03 Stats: 15 lines in 3 files changed: 0 ins; 5 del; 10 mod Patch: https://git.openjdk.org/jdk/pull/24654.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/24654/head:pull/24654 PR: https://git.openjdk.org/jdk/pull/24654 From psadhukhan at openjdk.org Thu Apr 17 05:51:47 2025 From: psadhukhan at openjdk.org (Prasanta Sadhukhan) Date: Thu, 17 Apr 2025 05:51:47 GMT Subject: RFR: 8354493: Opensource Several MultiScreen and Insets related tests [v4] In-Reply-To: References: Message-ID: On Thu, 17 Apr 2025 05:43:16 GMT, Abhishek Kumar wrote: >> Several multi screen related Applet tests are converted to manual and open sourced. > > Abhishek Kumar has updated the pull request incrementally with one additional commit since the last revision: > > Minor updates Marked as reviewed by psadhukhan (Reviewer). ------------- PR Review: https://git.openjdk.org/jdk/pull/24654#pullrequestreview-2774646198 From jdv at openjdk.org Thu Apr 17 06:04:00 2025 From: jdv at openjdk.org (Jayathirth D V) Date: Thu, 17 Apr 2025 06:04:00 GMT Subject: RFR: 8354900: javax/swing/AbstractButton/bug4133768.java failing on macosx-aarch64 Message-ID: javax/swing/AbstractButton/bug4133768.java was automated and open-sourced recently and it fails intermittently in CI. Looks like when we have mouse pointer at same location from where we are picking UI color from robot, it picks wrong color. Updated test to have mouse pointer to be at different place from where we are picking roll-over color of buttons. Also made other changes to make test more robust. With all these changes test now passes all the time in CI. ------------- Commit messages: - 8354900: javax/swing/AbstractButton/bug4133768.java failing on macosx-aarch64 Changes: https://git.openjdk.org/jdk/pull/24712/files Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=24712&range=00 Issue: https://bugs.openjdk.org/browse/JDK-8354900 Stats: 29 lines in 1 file changed: 18 ins; 3 del; 8 mod Patch: https://git.openjdk.org/jdk/pull/24712.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/24712/head:pull/24712 PR: https://git.openjdk.org/jdk/pull/24712 From jdv at openjdk.org Thu Apr 17 06:07:03 2025 From: jdv at openjdk.org (Jayathirth D V) Date: Thu, 17 Apr 2025 06:07:03 GMT Subject: RFR: 8354285: Open source Swing tests Batch 3 [v2] In-Reply-To: <3jciEoCab3HDbqiqkezqnJQlXjll3cJ1eY7wJpo7-bA=.d9feb26c-236d-474c-b963-489aed52430d@github.com> References: <3jciEoCab3HDbqiqkezqnJQlXjll3cJ1eY7wJpo7-bA=.d9feb26c-236d-474c-b963-489aed52430d@github.com> Message-ID: <8W8GlhZvchHDk45uzok6a-7-Lgowp8W43Pp1r4XodKQ=.1afea38a-3933-4dee-bef1-8c3da7c5ba01@github.com> On Thu, 17 Apr 2025 04:24:57 GMT, Abhishek Kumar wrote: >> Jayathirth D V has updated the pull request incrementally with one additional commit since the last revision: >> >> Update after review > > test/jdk/com/sun/java/swing/plaf/windows/MenuItem/4685843/bug4685843.java line 75: > >> 73: >> 74: jMenu.setText("File"); >> 75: jMenuItem.setText("JMenuItem"); > > minor changes: > You can pass the text while initializing for JMenu, JMenuItem, JCheckBoxMenuItem and JRadioButtonMenuItem. Updated. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/24677#discussion_r2048292925 From jdv at openjdk.org Thu Apr 17 06:07:03 2025 From: jdv at openjdk.org (Jayathirth D V) Date: Thu, 17 Apr 2025 06:07:03 GMT Subject: RFR: 8354285: Open source Swing tests Batch 3 [v2] In-Reply-To: References: Message-ID: > Open source some of the swing LAF tests Jayathirth D V has updated the pull request incrementally with one additional commit since the last revision: Update after review ------------- Changes: - all: https://git.openjdk.org/jdk/pull/24677/files - new: https://git.openjdk.org/jdk/pull/24677/files/134db5ba..6236d223 Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=24677&range=01 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=24677&range=00-01 Stats: 8 lines in 1 file changed: 0 ins; 4 del; 4 mod Patch: https://git.openjdk.org/jdk/pull/24677.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/24677/head:pull/24677 PR: https://git.openjdk.org/jdk/pull/24677 From jdv at openjdk.org Thu Apr 17 06:10:28 2025 From: jdv at openjdk.org (Jayathirth D V) Date: Thu, 17 Apr 2025 06:10:28 GMT Subject: RFR: 8354418: Open source Swing tests Batch 4 [v2] In-Reply-To: References: Message-ID: > Open source some of the swing windows LAF tests Jayathirth D V has updated the pull request incrementally with one additional commit since the last revision: Update after review comment ------------- Changes: - all: https://git.openjdk.org/jdk/pull/24678/files - new: https://git.openjdk.org/jdk/pull/24678/files/ca48ef19..d9bf040d Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=24678&range=01 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=24678&range=00-01 Stats: 2 lines in 1 file changed: 0 ins; 2 del; 0 mod Patch: https://git.openjdk.org/jdk/pull/24678.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/24678/head:pull/24678 PR: https://git.openjdk.org/jdk/pull/24678 From jdv at openjdk.org Thu Apr 17 06:10:28 2025 From: jdv at openjdk.org (Jayathirth D V) Date: Thu, 17 Apr 2025 06:10:28 GMT Subject: RFR: 8354418: Open source Swing tests Batch 4 [v2] In-Reply-To: References: Message-ID: On Thu, 17 Apr 2025 04:25:59 GMT, Abhishek Kumar wrote: >> Jayathirth D V has updated the pull request incrementally with one additional commit since the last revision: >> >> Update after review comment > > test/jdk/com/sun/java/swing/plaf/windows/MenuItem/AcceleratorDelimiter/WindowsLAFMenuAcceleratorDelimiter.java line 64: > >> 62: Windows = "+". >> 63: >> 64: This test is for Windows platform only. > > You can move this line at the start of the instruction Removed it, since test can be run only in windows. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/24678#discussion_r2048296220 From abhiscxk at openjdk.org Thu Apr 17 06:31:03 2025 From: abhiscxk at openjdk.org (Abhishek Kumar) Date: Thu, 17 Apr 2025 06:31:03 GMT Subject: RFR: 8354365: Opensource few Modal and Full Screen related tests [v2] In-Reply-To: References: Message-ID: > Few Modal and Full Screen related tests are converted from applet and open sourced. Abhishek Kumar has updated the pull request incrementally with one additional commit since the last revision: Review fix ------------- Changes: - all: https://git.openjdk.org/jdk/pull/24685/files - new: https://git.openjdk.org/jdk/pull/24685/files/6eaa3526..82991942 Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=24685&range=01 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=24685&range=00-01 Stats: 8 lines in 2 files changed: 2 ins; 2 del; 4 mod Patch: https://git.openjdk.org/jdk/pull/24685.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/24685/head:pull/24685 PR: https://git.openjdk.org/jdk/pull/24685 From abhiscxk at openjdk.org Thu Apr 17 06:31:04 2025 From: abhiscxk at openjdk.org (Abhishek Kumar) Date: Thu, 17 Apr 2025 06:31:04 GMT Subject: RFR: 8354365: Opensource few Modal and Full Screen related tests [v2] In-Reply-To: References: Message-ID: On Wed, 16 Apr 2025 13:49:49 GMT, Tejesh R wrote: >> Abhishek Kumar has updated the pull request incrementally with one additional commit since the last revision: >> >> Review fix > > test/jdk/java/awt/FullScreen/NonfocusableFrameFullScreenTest.java line 128: > >> 126: frame.setAlwaysOnTop(true); >> 127: } >> 128: frame.validate(); > > Is `frame.validate()` required? Yes, it is required to for the re-layout of test UI. Although I have remove `frame.pack()` and increased the frame width initially. Otherwise, when the button text is `Set Not Always On Top`, it is not able to have complete text. > test/jdk/java/awt/Modal/NativeDialogToFrontBackTest.java line 115: > >> 113: control.setSize(200, 200); >> 114: blocked.setVisible(true); >> 115: return control; > > Can u send the Frame list to PassFailJFrame and placement also can be handled their. Updated. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/24685#discussion_r2048319326 PR Review Comment: https://git.openjdk.org/jdk/pull/24685#discussion_r2048319404 From tr at openjdk.org Thu Apr 17 06:35:41 2025 From: tr at openjdk.org (Tejesh R) Date: Thu, 17 Apr 2025 06:35:41 GMT Subject: RFR: 8354365: Opensource few Modal and Full Screen related tests [v2] In-Reply-To: References: Message-ID: <3h9CDNASvklNjBeXzoz16CQV3oqC3_elbujkIyTbiFo=.8804b258-97fb-494e-8b76-6689143ba5bd@github.com> On Thu, 17 Apr 2025 06:31:03 GMT, Abhishek Kumar wrote: >> Few Modal and Full Screen related tests are converted from applet and open sourced. > > Abhishek Kumar has updated the pull request incrementally with one additional commit since the last revision: > > Review fix Marked as reviewed by tr (Reviewer). ------------- PR Review: https://git.openjdk.org/jdk/pull/24685#pullrequestreview-2774722935 From tr at openjdk.org Thu Apr 17 06:35:42 2025 From: tr at openjdk.org (Tejesh R) Date: Thu, 17 Apr 2025 06:35:42 GMT Subject: RFR: 8354493: Opensource Several MultiScreen and Insets related tests [v4] In-Reply-To: References: Message-ID: On Thu, 17 Apr 2025 05:43:16 GMT, Abhishek Kumar wrote: >> Several multi screen related Applet tests are converted to manual and open sourced. > > Abhishek Kumar has updated the pull request incrementally with one additional commit since the last revision: > > Minor updates Marked as reviewed by tr (Reviewer). ------------- PR Review: https://git.openjdk.org/jdk/pull/24654#pullrequestreview-2774723578 From tr at openjdk.org Thu Apr 17 06:42:51 2025 From: tr at openjdk.org (Tejesh R) Date: Thu, 17 Apr 2025 06:42:51 GMT Subject: Integrated: 8352865: Open source several AWT TextComponent tests - Batch 2 In-Reply-To: References: Message-ID: On Mon, 7 Apr 2025 07:24:31 GMT, Tejesh R wrote: > Open source these AWT TextComponent tests: > > java/awt/TextComponent/SelectionAndCaretColor/SelectionAndCaretColor.java > java/awt/TextComponent/SelectionTest/SelectionTest.java > java/awt/TextComponent/CorrectTextComponentSelectionTest/CorrectTextComponentSelectionTest.java > java/awt/TextComponent/AltPlusNumberKeyCombinationsTest/AltPlusNumberKeyCombinationsTest.java This pull request has now been integrated. Changeset: 3d0feba0 Author: Tejesh R URL: https://git.openjdk.org/jdk/commit/3d0feba00a1c1ef7627880859a093bb00eb8fc4c Stats: 450 lines in 5 files changed: 450 ins; 0 del; 0 mod 8352865: Open source several AWT TextComponent tests - Batch 2 Reviewed-by: prr, serb, jdv ------------- PR: https://git.openjdk.org/jdk/pull/24477 From tr at openjdk.org Thu Apr 17 06:43:52 2025 From: tr at openjdk.org (Tejesh R) Date: Thu, 17 Apr 2025 06:43:52 GMT Subject: Integrated: 8353958: Open source several AWT ScrollPane tests - Batch 2 In-Reply-To: <4vl6h3xyMQB1Qk0ZqdGk2iNi6mgf8gw4XW3m81ScExI=.a94ef19f-1081-404d-a26e-1b857b5563bf@github.com> References: <4vl6h3xyMQB1Qk0ZqdGk2iNi6mgf8gw4XW3m81ScExI=.a94ef19f-1081-404d-a26e-1b857b5563bf@github.com> Message-ID: On Tue, 15 Apr 2025 05:19:38 GMT, Tejesh R wrote: > Open source these AWT ScrollPane tests: > > java/awt/ScrollPane/ScrollPaneSize/ScrollPaneSize.java > java/awt/ScrollPane/ScrollPaneAsNeededTest/ScrollPaneAsNeededTest.java > java/awt/ScrollPane/ScrollPaneComponentTest/ScrollPaneComponentTest.java > java/awt/ScrollPane/ScrollPaneScrollType/ScrollPaneEventType.java > java/awt/ScrollPane/ScrollPanechildViewportTest/ScrollPanechildViewportTest.java This pull request has now been integrated. Changeset: e00355a0 Author: Tejesh R URL: https://git.openjdk.org/jdk/commit/e00355a036936c5290cf8d85fd3c4f743b0ad23a Stats: 517 lines in 6 files changed: 517 ins; 0 del; 0 mod 8353958: Open source several AWT ScrollPane tests - Batch 2 Reviewed-by: prr, psadhukhan ------------- PR: https://git.openjdk.org/jdk/pull/24647 From duke at openjdk.org Thu Apr 17 06:45:41 2025 From: duke at openjdk.org (duke) Date: Thu, 17 Apr 2025 06:45:41 GMT Subject: RFR: 8354191: GTK LaF should use pre-multiplied alpha same as cairo In-Reply-To: <-sAv6upz5pv3EA1zjjUvRUxNP1Tl75NJAwOX-df8Vbk=.442e3494-836b-4664-baf1-669fbd7532a0@github.com> References: <-sAv6upz5pv3EA1zjjUvRUxNP1Tl75NJAwOX-df8Vbk=.442e3494-836b-4664-baf1-669fbd7532a0@github.com> Message-ID: On Wed, 9 Apr 2025 14:42:05 GMT, Maxim Kartashev wrote: > The pixels that cairo produces for GTK LaF to draw on a Swing component have their alpha components pre-multiplied as per [the documentation](https://www.cairographics.org/manual/cairo-Image-Surfaces.html?spm=a2ty_o01.29997173.0.0.540ac921z2EebT#cairo-format-t): >> Pre-multiplied alpha is used. (That is, 50% transparent red is 0x80800000, not 0x80ff0000.) > > The BufferedImage created from those pixels, however, has its constructor's argument for `isRasterPremultiplied` set to `false` in `GTKEngine.finishPainting()`. This commit corrects that. > > In addition, since at least some "native" graphics color models also use pre-multiplied alpha (ex.: `GLXGraphicsConfig.getColorModel()`), `COLOR_MODELS` were modified to take advantage of that and avoid unnecessary re-calculations of image's pixels. @mkartashev Your change (at version a5de12d505cfc2bddd3b13db4e39d0a4329f27bd) is now ready to be sponsored by a Committer. ------------- PR Comment: https://git.openjdk.org/jdk/pull/24551#issuecomment-2811951519 From mkartashev at openjdk.org Thu Apr 17 07:01:52 2025 From: mkartashev at openjdk.org (Maxim Kartashev) Date: Thu, 17 Apr 2025 07:01:52 GMT Subject: Integrated: 8354191: GTK LaF should use pre-multiplied alpha same as cairo In-Reply-To: <-sAv6upz5pv3EA1zjjUvRUxNP1Tl75NJAwOX-df8Vbk=.442e3494-836b-4664-baf1-669fbd7532a0@github.com> References: <-sAv6upz5pv3EA1zjjUvRUxNP1Tl75NJAwOX-df8Vbk=.442e3494-836b-4664-baf1-669fbd7532a0@github.com> Message-ID: On Wed, 9 Apr 2025 14:42:05 GMT, Maxim Kartashev wrote: > The pixels that cairo produces for GTK LaF to draw on a Swing component have their alpha components pre-multiplied as per [the documentation](https://www.cairographics.org/manual/cairo-Image-Surfaces.html?spm=a2ty_o01.29997173.0.0.540ac921z2EebT#cairo-format-t): >> Pre-multiplied alpha is used. (That is, 50% transparent red is 0x80800000, not 0x80ff0000.) > > The BufferedImage created from those pixels, however, has its constructor's argument for `isRasterPremultiplied` set to `false` in `GTKEngine.finishPainting()`. This commit corrects that. > > In addition, since at least some "native" graphics color models also use pre-multiplied alpha (ex.: `GLXGraphicsConfig.getColorModel()`), `COLOR_MODELS` were modified to take advantage of that and avoid unnecessary re-calculations of image's pixels. This pull request has now been integrated. Changeset: a4e9da37 Author: Maxim Kartashev Committer: Alexey Ushakov URL: https://git.openjdk.org/jdk/commit/a4e9da3747fe0a3c27e414787eaa97f80b24f5de Stats: 22 lines in 1 file changed: 12 ins; 7 del; 3 mod 8354191: GTK LaF should use pre-multiplied alpha same as cairo Reviewed-by: avu, prr ------------- PR: https://git.openjdk.org/jdk/pull/24551 From jdv at openjdk.org Thu Apr 17 09:21:50 2025 From: jdv at openjdk.org (Jayathirth D V) Date: Thu, 17 Apr 2025 09:21:50 GMT Subject: RFR: 8354365: Opensource few Modal and Full Screen related tests [v2] In-Reply-To: References: Message-ID: On Thu, 17 Apr 2025 06:31:03 GMT, Abhishek Kumar wrote: >> Few Modal and Full Screen related tests are converted from applet and open sourced. > > Abhishek Kumar has updated the pull request incrementally with one additional commit since the last revision: > > Review fix Marked as reviewed by jdv (Reviewer). ------------- PR Review: https://git.openjdk.org/jdk/pull/24685#pullrequestreview-2775121442 From aivanov at openjdk.org Thu Apr 17 09:38:49 2025 From: aivanov at openjdk.org (Alexey Ivanov) Date: Thu, 17 Apr 2025 09:38:49 GMT Subject: RFR: 8339561: The test/jdk/java/awt/Paint/ListRepaint.java may fail after JDK-8327401 [v6] In-Reply-To: References: Message-ID: On Wed, 16 Apr 2025 22:36:50 GMT, Sergey Bylokhov wrote: >>> I think as of now it should be good enough >> >> That's the problem, the presence of the `volatile` modifier creates a false sense of thread-safety, this is why I'd rather not add it. >> >>> why do you think volatile will not help here? >> >> The `volatile` modifier guarantees that a thread which reads from the `volatile` field will see everything that occurred before a (new) reference was written to the `volatile` field. Yet there are no guarantees another thread will see any modifications to fields of the object the reference to which is stored in the `volatile` field. >> >> And this test does exactly this: it writes a reference into the `currentState` field and then it modifies the fields of the object stored in `currentState`. There are no guarantees that `currentState.setAction(true)` will result in `currentState.getAction()` returning `true`. >> >> If you also declare `TestState.action` as `volatile` or use `AtomicBoolean`, it could be enough to safely access the `currentState` field from two threads. Other fields are final, so they can't be modified, and therefore they don't change after another thread sees the reference to `TestState` object. > > @aivanov-jdk Do you have any other comments? Sorry, for the delay, I've been busy recently. I'll take another look as soon as possible. Thank you for your understanding. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/20861#discussion_r2048598821 From aivanov at openjdk.org Thu Apr 17 09:42:03 2025 From: aivanov at openjdk.org (Alexey Ivanov) Date: Thu, 17 Apr 2025 09:42:03 GMT Subject: RFR: 8139228: JFileChooser renders file names as HTML document In-Reply-To: References: Message-ID: On Wed, 16 Apr 2025 22:23:26 GMT, Sergey Bylokhov wrote: > Why the windows is skipped? Because it's impossible to create a file with `` in the name on Windows. > Don't you need to check all L&F and platforms? as of now you validated metal(default on linux) and aqua(default on mac). A good point. Validating other L&F would be good. I wonder if the test can be automated, it would make validating all L&F so much easier. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/24439#discussion_r2048603388 From tr at openjdk.org Thu Apr 17 09:54:27 2025 From: tr at openjdk.org (Tejesh R) Date: Thu, 17 Apr 2025 09:54:27 GMT Subject: RFR: 8352793: Open source several AWT TextComponent tests - Batch 1 [v3] In-Reply-To: References: Message-ID: <7sw9lmEN6f9hE7q0cIJkveWe1J6jQINnLUmZnFNpffo=.8be1bfc6-f3d6-42b9-86ee-49344eec1f01@github.com> > Open source these AWT TextComponent tests: > > java/awt/TextComponent/BackgroundTest/BackgroundTest.java > java/awt/TextComponent/DisableTest/DisableTest.java > java/awt/TextComponent/TextFieldMargin/TextFieldMargin.java > java/awt/TextComponent/ModifiersTest/ModifiersTest.java Tejesh R has updated the pull request incrementally with one additional commit since the last revision: Updated review comments ------------- Changes: - all: https://git.openjdk.org/jdk/pull/24656/files - new: https://git.openjdk.org/jdk/pull/24656/files/bfcc025b..9eb0c845 Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=24656&range=02 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=24656&range=01-02 Stats: 4 lines in 4 files changed: 0 ins; 4 del; 0 mod Patch: https://git.openjdk.org/jdk/pull/24656.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/24656/head:pull/24656 PR: https://git.openjdk.org/jdk/pull/24656 From tr at openjdk.org Thu Apr 17 09:54:27 2025 From: tr at openjdk.org (Tejesh R) Date: Thu, 17 Apr 2025 09:54:27 GMT Subject: RFR: 8352793: Open source several AWT TextComponent tests - Batch 1 [v2] In-Reply-To: References: Message-ID: On Wed, 16 Apr 2025 20:58:02 GMT, Phil Race wrote: >> Tejesh R has updated the pull request incrementally with one additional commit since the last revision: >> >> Updated review comments > > test/jdk/java/awt/TextComponent/BackgroundTest.java line 70: > >> 68: >> 69: PassFailJFrame.builder() >> 70: .title("Test Instructions") > > not needed Updated. > test/jdk/java/awt/TextComponent/DisableTest.java line 56: > >> 54: >> 55: PassFailJFrame.builder() >> 56: .title("Test Instructions") > > not needed Updated. > test/jdk/java/awt/TextComponent/ModifiersTest.java line 49: > >> 47: """; >> 48: PassFailJFrame.builder() >> 49: .title("Test Instructions") > > not needed Updated. > test/jdk/java/awt/TextComponent/TextFieldMargin.java line 48: > >> 46: """; >> 47: PassFailJFrame.builder() >> 48: .title("Test Instructions") > > not needed Updated. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/24656#discussion_r2048623087 PR Review Comment: https://git.openjdk.org/jdk/pull/24656#discussion_r2048623006 PR Review Comment: https://git.openjdk.org/jdk/pull/24656#discussion_r2048622909 PR Review Comment: https://git.openjdk.org/jdk/pull/24656#discussion_r2048622836 From tr at openjdk.org Thu Apr 17 10:37:44 2025 From: tr at openjdk.org (Tejesh R) Date: Thu, 17 Apr 2025 10:37:44 GMT Subject: RFR: 8353445: Open source several AWT Menu tests - Batch 1 [v2] In-Reply-To: References: Message-ID: > Open source these AWT Menu tests: > > java/awt/Menu/MenuVisibilityTest/MenuVisibilityTest.java > java/awt/Menu/MenuActionEventTest/MenuActionEventTest.java > java/awt/Menu/RmInHideTest/RmInHideTest.java > java/awt/Menu/SetShortCutTest/SetShortCutTest.java Tejesh R has updated the pull request incrementally with one additional commit since the last revision: Updated review comments ------------- Changes: - all: https://git.openjdk.org/jdk/pull/24649/files - new: https://git.openjdk.org/jdk/pull/24649/files/3dd0bd8c..6702f514 Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=24649&range=01 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=24649&range=00-01 Stats: 162 lines in 4 files changed: 31 ins; 33 del; 98 mod Patch: https://git.openjdk.org/jdk/pull/24649.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/24649/head:pull/24649 PR: https://git.openjdk.org/jdk/pull/24649 From tr at openjdk.org Thu Apr 17 10:37:47 2025 From: tr at openjdk.org (Tejesh R) Date: Thu, 17 Apr 2025 10:37:47 GMT Subject: RFR: 8353445: Open source several AWT Menu tests - Batch 1 [v2] In-Reply-To: References: Message-ID: On Wed, 16 Apr 2025 20:51:27 GMT, Phil Race wrote: >> Tejesh R has updated the pull request incrementally with one additional commit since the last revision: >> >> Updated review comments > > test/jdk/java/awt/Menu/MenuActionEventTest.java line 45: > >> 43: String INSTRUCTIONS = """ >> 44: 1. Click on the Menu and then on Menuitem on the frame. >> 45: 2. If you find the following message being printed:, > > printed in the test log area ... Updated. > test/jdk/java/awt/Menu/MenuActionEventTest.java line 73: > >> 71: } >> 72: >> 73: class _Menu extends Menu { > > can all these additional classes be static nested classes ? Updated. > test/jdk/java/awt/Menu/MenuVisibilityTest.java line 43: > >> 41: 1. Press on a MenuBar with a long name. >> 42: 2. Select "First item" in an opened menu. >> 43: If you see that "First menu item was pressed" press PASS > > see it where ? tell the tester where to look. Updated. > test/jdk/java/awt/Menu/MenuVisibilityTest.java line 47: > >> 45: """; >> 46: PassFailJFrame.builder() >> 47: .title("Test Instructions") > > no need for that Updated. > test/jdk/java/awt/Menu/RmInHideTest.java line 81: > >> 79: } >> 80: >> 81: class RmInHideTestFrame extends Frame implements ActionListener { > > static nested ? Updated. > test/jdk/java/awt/Menu/SetShortCutTest.java line 73: > >> 71: } >> 72: >> 73: class TestMenuShortCut extends Frame implements ActionListener { > > static nested ? Updated. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/24649#discussion_r2048682970 PR Review Comment: https://git.openjdk.org/jdk/pull/24649#discussion_r2048682875 PR Review Comment: https://git.openjdk.org/jdk/pull/24649#discussion_r2048683046 PR Review Comment: https://git.openjdk.org/jdk/pull/24649#discussion_r2048683139 PR Review Comment: https://git.openjdk.org/jdk/pull/24649#discussion_r2048683207 PR Review Comment: https://git.openjdk.org/jdk/pull/24649#discussion_r2048683271 From tr at openjdk.org Thu Apr 17 10:47:47 2025 From: tr at openjdk.org (Tejesh R) Date: Thu, 17 Apr 2025 10:47:47 GMT Subject: RFR: 8139228: JFileChooser renders file names as HTML document In-Reply-To: References: Message-ID: On Thu, 17 Apr 2025 09:38:43 GMT, Alexey Ivanov wrote: >> test/jdk/javax/swing/JFileChooser/HTMLFileName.java line 43: >> >>> 41: static File directory; >>> 42: public static void main(String[] args) throws Exception { >>> 43: String INSTRUCTIONS = """ >> >> Why the windows is skipped? >> Don't you need to check all L&F and platforms? as of now you validated metal(default on linux) and aqua(default on mac). > >> Why the windows is skipped? > > Because it's impossible to create a file with `` in the name on Windows. > >> Don't you need to check all L&F and platforms? as of now you validated metal(default on linux) and aqua(default on mac). > > A good point. Validating other L&F would be good. > > I wonder if the test can be automated, it would make validating all L&F so much easier. Making an automated test would be difficult, because the text/html is totally OS and L&F dependant. Example without fix in macos the file name will be empty on filepane and in combobox it shows as HTML text. But it doesn't hold the same for other L&F and in linux. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/24439#discussion_r2048697846 From tr at openjdk.org Thu Apr 17 10:56:57 2025 From: tr at openjdk.org (Tejesh R) Date: Thu, 17 Apr 2025 10:56:57 GMT Subject: RFR: 8353957: Open source several AWT ScrollPane tests - Batch 1 In-Reply-To: References: Message-ID: On Wed, 16 Apr 2025 22:34:46 GMT, Sergey Bylokhov wrote: >> Open source these AWT ScrollPane tests: >> >> java/awt/ScrollPane/ScrollPaneFlicker/ScrollPaneFlicker.java >> java/awt/ScrollPane/ScrollbarsAsNeeded/ScrollbarsAsNeededTest.java >> java/awt/ScrollPane/ScrollPanePaint/ScrollPanePaint.java >> java/awt/ScrollPane/ScrollPositionTest/ScrollPositionTest.java > > test/jdk/java/awt/ScrollPane/ScrollPanePaint.java line 32: > >> 30: * >> 31: * US Government Users Restricted Rights - Use, duplication or disclosure >> 32: * restricted by GSA ADP Schedule Contract with IBM Corp. > > is this license could be accepted by the OpenJDK? I hope so, I've seen some instances in other tests too. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/24684#discussion_r2048708797 From aivanov at openjdk.org Thu Apr 17 10:57:46 2025 From: aivanov at openjdk.org (Alexey Ivanov) Date: Thu, 17 Apr 2025 10:57:46 GMT Subject: RFR: 8139228: JFileChooser renders file names as HTML document In-Reply-To: References: Message-ID: On Thu, 17 Apr 2025 10:44:57 GMT, Tejesh R wrote: >>> Why the windows is skipped? >> >> Because it's impossible to create a file with `` in the name on Windows. >> >>> Don't you need to check all L&F and platforms? as of now you validated metal(default on linux) and aqua(default on mac). >> >> A good point. Validating other L&Fs would be good. >> >> I wonder if the test can be automated, it would make validating all L&F so much easier. > > Making an automated test would be difficult, because the text/html is totally OS and L&F dependant. Example without fix in macos the file name will be empty on filepane and in combobox it shows as HTML text. But it doesn't hold the same for other L&F and in linux. OS or L&F dependant? macOS uses Aqua by default, Linux uses Metal by default. The behaviour in different L&F could be different. The test may be customised for a L&F if needed? and it's likely required. I haven't looked into it yet, so I can't suggest anything. Exploring the possibility of making the test automatic is worth the effort. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/24439#discussion_r2048708247 From tr at openjdk.org Thu Apr 17 10:57:47 2025 From: tr at openjdk.org (Tejesh R) Date: Thu, 17 Apr 2025 10:57:47 GMT Subject: RFR: 8139228: JFileChooser renders file names as HTML document In-Reply-To: References: Message-ID: On Thu, 17 Apr 2025 10:53:17 GMT, Alexey Ivanov wrote: >> Making an automated test would be difficult, because the text/html is totally OS and L&F dependant. Example without fix in macos the file name will be empty on filepane and in combobox it shows as HTML text. But it doesn't hold the same for other L&F and in linux. > > OS or L&F dependant? > > macOS uses Aqua by default, Linux uses Metal by default. The behaviour in different L&F could be different. > > The test may be customised for a L&F if needed? and it's likely required. I haven't looked into it yet, so I can't suggest anything. Exploring the possibility of making the test automatic is worth the effort. Dependant on L&F I hope. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/24439#discussion_r2048710599 From duke at openjdk.org Thu Apr 17 10:58:46 2025 From: duke at openjdk.org (Hendrik Schick) Date: Thu, 17 Apr 2025 10:58:46 GMT Subject: RFR: 8354701: Open source few JToolTip tests In-Reply-To: References: Message-ID: On Thu, 17 Apr 2025 02:15:30 GMT, Alexander Zvegintsev wrote: > Few more tests are open sourced: > > - javax/swing/JToolTip/4225314/bug4225314.java manual > - javax/swing/JToolTip/TooltipTest/TooltipTest.java manual > - javax/swing/JToolTip/4255441/bug4255441.java manual test/jdk/javax/swing/JToolTip/TooltipTest.java line 47: > 45: text which is red then test passes, otherwise it fails (bug 4207474). > 46: > 47: 2. Move the mouse over the button labeled "Long tip". If the\s Suggestion: 2. Move the mouse over the button labeled "Long tip". If the ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/24708#discussion_r2048712365 From duke at openjdk.org Thu Apr 17 11:18:53 2025 From: duke at openjdk.org (Hendrik Schick) Date: Thu, 17 Apr 2025 11:18:53 GMT Subject: RFR: 8354365: Opensource few Modal and Full Screen related tests [v2] In-Reply-To: References: Message-ID: On Thu, 17 Apr 2025 06:31:03 GMT, Abhishek Kumar wrote: >> Few Modal and Full Screen related tests are converted from applet and open sourced. > > Abhishek Kumar has updated the pull request incrementally with one additional commit since the last revision: > > Review fix test/jdk/java/awt/FullScreen/NonfocusableFrameFullScreenTest.java line 59: > 57: 3. Press "To Windowed" button: > 58: The frame should return to its original size. > 59: The frame shouldn't be alwayOnTop. Suggestion: The frame shouldn't be alwaysOnTop. ? test/jdk/java/awt/FullScreen/NonfocusableFrameFullScreenTest.java line 80: > 78: private NonfocusableFrameFullScreenTest() { > 79: Button b = new Button("Show Frame"); > 80: b.addActionListener(new ActionListener() { lambda can be used here and on subsequent action listeners. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/24685#discussion_r2048734748 PR Review Comment: https://git.openjdk.org/jdk/pull/24685#discussion_r2048735333 From duke at openjdk.org Thu Apr 17 11:21:55 2025 From: duke at openjdk.org (Hendrik Schick) Date: Thu, 17 Apr 2025 11:21:55 GMT Subject: RFR: 8354365: Opensource few Modal and Full Screen related tests [v2] In-Reply-To: References: Message-ID: On Thu, 17 Apr 2025 06:31:03 GMT, Abhishek Kumar wrote: >> Few Modal and Full Screen related tests are converted from applet and open sourced. > > Abhishek Kumar has updated the pull request incrementally with one additional commit since the last revision: > > Review fix test/jdk/java/awt/Modal/DialogLosesFocusTest.java line 105: > 103: try { > 104: Thread.sleep(t); > 105: } catch (Exception z) {} Suggestion: } catch (Exception _) {} should work to use an unnamed variable here? ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/24685#discussion_r2048740878 From jdv at openjdk.org Thu Apr 17 11:36:46 2025 From: jdv at openjdk.org (Jayathirth D V) Date: Thu, 17 Apr 2025 11:36:46 GMT Subject: RFR: 8354451: Open source some more Swing popup menu tests [v3] In-Reply-To: References: Message-ID: On Wed, 16 Apr 2025 20:33:06 GMT, Phil Race wrote: >> Open source some more Swing menu tests > > Phil Race has updated the pull request incrementally with one additional commit since the last revision: > > 8354451 Can we automate test/jdk/javax/swing/JPopupMenu/bug4188832.java ? Or do we want to visually verify that subMenu's are rendered? LGTM and verified the tests. ------------- Marked as reviewed by jdv (Reviewer). PR Review: https://git.openjdk.org/jdk/pull/24636#pullrequestreview-2775432445 From psadhukhan at openjdk.org Thu Apr 17 12:07:46 2025 From: psadhukhan at openjdk.org (Prasanta Sadhukhan) Date: Thu, 17 Apr 2025 12:07:46 GMT Subject: RFR: 8354466: Open some misc Swing bugs 9 In-Reply-To: References: Message-ID: On Wed, 16 Apr 2025 23:19:31 GMT, Alisen Chung wrote: > Updating and opening some misc swing bugs test/jdk/javax/swing/JSplitPane/bug4820080.java line 38: > 36: * @bug 4820080 7175397 > 37: * @summary RFE: Cannot Change the JSplitPane Divider Color while dragging > 38: * @library /open/test/jdk/java/awt/regtesthelpers library path needs to be corrected ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/24703#discussion_r2048806865 From aturbanov at openjdk.org Thu Apr 17 12:17:59 2025 From: aturbanov at openjdk.org (Andrey Turbanov) Date: Thu, 17 Apr 2025 12:17:59 GMT Subject: RFR: 8354944: Remove unnecessary PartiallyOrderedSet.nodes Message-ID: <11dR4gRM1RWgmx8FloFzy3dfZOwn3zIPjiD0690ZdEw=.2662d35c-e7bf-400f-a224-df53967202eb@github.com> We can use `javax.imageio.spi.PartiallyOrderedSet#poNodes` directly ------------- Commit messages: - [PATCH] Remove unnecessary PartiallyOrderedSet.nodes Changes: https://git.openjdk.org/jdk/pull/24699/files Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=24699&range=00 Issue: https://bugs.openjdk.org/browse/JDK-8354944 Stats: 9 lines in 1 file changed: 0 ins; 4 del; 5 mod Patch: https://git.openjdk.org/jdk/pull/24699.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/24699/head:pull/24699 PR: https://git.openjdk.org/jdk/pull/24699 From serb at openjdk.org Thu Apr 17 12:17:59 2025 From: serb at openjdk.org (Sergey Bylokhov) Date: Thu, 17 Apr 2025 12:17:59 GMT Subject: RFR: 8354944: Remove unnecessary PartiallyOrderedSet.nodes In-Reply-To: <11dR4gRM1RWgmx8FloFzy3dfZOwn3zIPjiD0690ZdEw=.2662d35c-e7bf-400f-a224-df53967202eb@github.com> References: <11dR4gRM1RWgmx8FloFzy3dfZOwn3zIPjiD0690ZdEw=.2662d35c-e7bf-400f-a224-df53967202eb@github.com> Message-ID: On Wed, 16 Apr 2025 20:50:24 GMT, Andrey Turbanov wrote: > We can use `javax.imageio.spi.PartiallyOrderedSet#poNodes` directly looks fine ------------- PR Comment: https://git.openjdk.org/jdk/pull/24699#issuecomment-2810952819 From abhiscxk at openjdk.org Thu Apr 17 12:31:48 2025 From: abhiscxk at openjdk.org (Abhishek Kumar) Date: Thu, 17 Apr 2025 12:31:48 GMT Subject: RFR: 8354365: Opensource few Modal and Full Screen related tests [v3] In-Reply-To: References: Message-ID: > Few Modal and Full Screen related tests are converted from applet and open sourced. Abhishek Kumar has updated the pull request incrementally with one additional commit since the last revision: Typo fix ------------- Changes: - all: https://git.openjdk.org/jdk/pull/24685/files - new: https://git.openjdk.org/jdk/pull/24685/files/82991942..db1ca090 Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=24685&range=02 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=24685&range=01-02 Stats: 1 line in 1 file changed: 0 ins; 0 del; 1 mod Patch: https://git.openjdk.org/jdk/pull/24685.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/24685/head:pull/24685 PR: https://git.openjdk.org/jdk/pull/24685 From abhiscxk at openjdk.org Thu Apr 17 12:31:51 2025 From: abhiscxk at openjdk.org (Abhishek Kumar) Date: Thu, 17 Apr 2025 12:31:51 GMT Subject: RFR: 8354365: Opensource few Modal and Full Screen related tests [v2] In-Reply-To: References: Message-ID: On Thu, 17 Apr 2025 11:14:02 GMT, Hendrik Schick wrote: >> Abhishek Kumar has updated the pull request incrementally with one additional commit since the last revision: >> >> Review fix > > test/jdk/java/awt/FullScreen/NonfocusableFrameFullScreenTest.java line 59: > >> 57: 3. Press "To Windowed" button: >> 58: The frame should return to its original size. >> 59: The frame shouldn't be alwayOnTop. > > Suggestion: > > The frame shouldn't be alwaysOnTop. > > ? updated > test/jdk/java/awt/FullScreen/NonfocusableFrameFullScreenTest.java line 80: > >> 78: private NonfocusableFrameFullScreenTest() { >> 79: Button b = new Button("Show Frame"); >> 80: b.addActionListener(new ActionListener() { > > lambda can be used here and on subsequent action listeners. Not the only way to be done. This seems good to me for now. > test/jdk/java/awt/Modal/DialogLosesFocusTest.java line 105: > >> 103: try { >> 104: Thread.sleep(t); >> 105: } catch (Exception z) {} > > Suggestion: > > } catch (Exception _) {} > > should work to use an unnamed variable here? Not mandatory. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/24685#discussion_r2048841163 PR Review Comment: https://git.openjdk.org/jdk/pull/24685#discussion_r2048841055 PR Review Comment: https://git.openjdk.org/jdk/pull/24685#discussion_r2048838714 From abhiscxk at openjdk.org Thu Apr 17 12:34:51 2025 From: abhiscxk at openjdk.org (Abhishek Kumar) Date: Thu, 17 Apr 2025 12:34:51 GMT Subject: RFR: 8354285: Open source Swing tests Batch 3 [v2] In-Reply-To: References: Message-ID: On Thu, 17 Apr 2025 06:07:03 GMT, Jayathirth D V wrote: >> Open source some of the swing LAF tests > > Jayathirth D V has updated the pull request incrementally with one additional commit since the last revision: > > Update after review Marked as reviewed by abhiscxk (Reviewer). ------------- PR Review: https://git.openjdk.org/jdk/pull/24677#pullrequestreview-2775572124 From abhiscxk at openjdk.org Thu Apr 17 12:34:57 2025 From: abhiscxk at openjdk.org (Abhishek Kumar) Date: Thu, 17 Apr 2025 12:34:57 GMT Subject: Integrated: 8354493: Opensource Several MultiScreen and Insets related tests In-Reply-To: References: Message-ID: On Tue, 15 Apr 2025 09:35:27 GMT, Abhishek Kumar wrote: > Several multi screen related Applet tests are converted to manual and open sourced. This pull request has now been integrated. Changeset: e9c8986a Author: Abhishek Kumar URL: https://git.openjdk.org/jdk/commit/e9c8986a65df534ee2a396cb3b49fe3dbcaf6a44 Stats: 480 lines in 3 files changed: 480 ins; 0 del; 0 mod 8354493: Opensource Several MultiScreen and Insets related tests Reviewed-by: psadhukhan, tr ------------- PR: https://git.openjdk.org/jdk/pull/24654 From abhiscxk at openjdk.org Thu Apr 17 12:35:41 2025 From: abhiscxk at openjdk.org (Abhishek Kumar) Date: Thu, 17 Apr 2025 12:35:41 GMT Subject: RFR: 8354418: Open source Swing tests Batch 4 [v2] In-Reply-To: References: Message-ID: On Thu, 17 Apr 2025 06:10:28 GMT, Jayathirth D V wrote: >> Open source some of the swing windows LAF tests > > Jayathirth D V has updated the pull request incrementally with one additional commit since the last revision: > > Update after review comment Marked as reviewed by abhiscxk (Reviewer). ------------- PR Review: https://git.openjdk.org/jdk/pull/24678#pullrequestreview-2775574717 From jdv at openjdk.org Thu Apr 17 13:07:53 2025 From: jdv at openjdk.org (Jayathirth D V) Date: Thu, 17 Apr 2025 13:07:53 GMT Subject: RFR: 8354365: Opensource few Modal and Full Screen related tests [v3] In-Reply-To: References: Message-ID: <_vwO_srkKGXrWXzrNi-HX4QCGJsNnCAQdDJE3-HkOeE=.48334358-2bfe-4159-8789-28984e2483d5@github.com> On Thu, 17 Apr 2025 12:31:48 GMT, Abhishek Kumar wrote: >> Few Modal and Full Screen related tests are converted from applet and open sourced. > > Abhishek Kumar has updated the pull request incrementally with one additional commit since the last revision: > > Typo fix Marked as reviewed by jdv (Reviewer). ------------- PR Review: https://git.openjdk.org/jdk/pull/24685#pullrequestreview-2775657266 From jdv at openjdk.org Thu Apr 17 13:10:01 2025 From: jdv at openjdk.org (Jayathirth D V) Date: Thu, 17 Apr 2025 13:10:01 GMT Subject: Integrated: 8354285: Open source Swing tests Batch 3 In-Reply-To: References: Message-ID: On Wed, 16 Apr 2025 08:42:20 GMT, Jayathirth D V wrote: > Open source some of the swing LAF tests This pull request has now been integrated. Changeset: 4c994894 Author: Jayathirth D V URL: https://git.openjdk.org/jdk/commit/4c99489420bd73159eca6bae22442f7b29156c1d Stats: 253 lines in 3 files changed: 253 ins; 0 del; 0 mod 8354285: Open source Swing tests Batch 3 Reviewed-by: abhiscxk ------------- PR: https://git.openjdk.org/jdk/pull/24677 From abhiscxk at openjdk.org Thu Apr 17 13:11:54 2025 From: abhiscxk at openjdk.org (Abhishek Kumar) Date: Thu, 17 Apr 2025 13:11:54 GMT Subject: Integrated: 8354365: Opensource few Modal and Full Screen related tests In-Reply-To: References: Message-ID: On Wed, 16 Apr 2025 11:27:22 GMT, Abhishek Kumar wrote: > Few Modal and Full Screen related tests are converted from applet and open sourced. This pull request has now been integrated. Changeset: e21387e0 Author: Abhishek Kumar URL: https://git.openjdk.org/jdk/commit/e21387e0454e821e5720e781138dcc4c24a14ec7 Stats: 488 lines in 5 files changed: 488 ins; 0 del; 0 mod 8354365: Opensource few Modal and Full Screen related tests Reviewed-by: jdv, tr ------------- PR: https://git.openjdk.org/jdk/pull/24685 From jdv at openjdk.org Thu Apr 17 13:38:54 2025 From: jdv at openjdk.org (Jayathirth D V) Date: Thu, 17 Apr 2025 13:38:54 GMT Subject: Integrated: 8354418: Open source Swing tests Batch 4 In-Reply-To: References: Message-ID: On Wed, 16 Apr 2025 08:54:29 GMT, Jayathirth D V wrote: > Open source some of the swing windows LAF tests This pull request has now been integrated. Changeset: dda4b5a4 Author: Jayathirth D V URL: https://git.openjdk.org/jdk/commit/dda4b5a4ade2e5d7225117e58fce4038bb0e0f1b Stats: 291 lines in 3 files changed: 291 ins; 0 del; 0 mod 8354418: Open source Swing tests Batch 4 Reviewed-by: abhiscxk ------------- PR: https://git.openjdk.org/jdk/pull/24678 From duke at openjdk.org Thu Apr 17 14:03:58 2025 From: duke at openjdk.org (ExE Boss) Date: Thu, 17 Apr 2025 14:03:58 GMT Subject: RFR: 8353950: Clipboard interaction on Windows is unstable In-Reply-To: References: <5TFAUj4XaWqfrY9eWepypDQlUoLp4UXrKf29neAYIc4=.03ccc530-b287-4496-af89-943d603e81b8@github.com> Message-ID: On Sun, 13 Apr 2025 16:13:43 GMT, Matthias Bl?sing wrote: >> - Introduce a lock into WClipboard that protects the code between >> openClipboard/closeClipboard invocations. >> The native side does not allow to open the clipboard multiple >> times or share the opened clipboard between multiple threads. >> >> - Remove of need to call openClipboard/closeClipboard from >> getClipboardFormats by using the win32 call >> GetUpdatedClipboardFormats >> >> - Prevent a race-condition by not registering the connection >> between java and native side of clipboard multiple time, but >> just at construction time. > > Some further comments: > > - More information than provided in the PR summary can be found in the two commits, which represent the steps I took to to fix this. > - From my testing this change also fixes JDK-8332271 > - Testing: > - fastdebug build does not hit asserts anymore for the reproducer code (See e893b368a0e32ff17c1182fb261e0561d48827d3 / issue report) > - reproducer code for JDK-8332271 does not crash anymore. Code was run for multiple minutes and no crash was observed > - tests from test/jdk/java/awt/Clipboard were run and tests succeeded in release and fastdebug configuration @matthiasblaesing You?need to?put the?following in?a?comment or?at?the?end of?the?PR?body to?mark **[JDK?8332271]** as?fixed by?this?PR[^1]: [JDK?8332271]: https://bugs.openjdk.org/browse/JDK-8332271 "[JDK?8332271] Reading?data from?the?clipboard from?multiple?threads crashes?the?JVM" [^1]: https://wiki.openjdk.org/display/SKARA/Pull+Request+Commands#PullRequestCommands-%2Fissue ------------- PR Comment: https://git.openjdk.org/jdk/pull/24614#issuecomment-2813032159 From dnguyen at openjdk.org Thu Apr 17 16:19:00 2025 From: dnguyen at openjdk.org (Damon Nguyen) Date: Thu, 17 Apr 2025 16:19:00 GMT Subject: RFR: JDK-8353319 : Open source Swing tests - Set 3 [v3] In-Reply-To: References: Message-ID: <9kQcfozTEXTf7-HaiH10dQu2avZ7saFVhc71nh0zLS8=.2e425702-c400-48fc-8cb9-bc23471f4fad@github.com> On Thu, 17 Apr 2025 00:19:19 GMT, Harshitha Onkar wrote: >> Following tests are updates as part of this PR: >> >> 1. javax/swing/JRootPane/bug4614623.java - manual >> 2. javax/swing/JTabbedPane/bug4613811.java - manual >> 3. javax/swing/JWindow/bug4251781.java - manual >> 4. javax/swing/JFrame/bug4419914.java - manual, updated existing test by adding JWindow, JDialog cases. > > Harshitha Onkar has updated the pull request incrementally with one additional commit since the last revision: > > test instruction updated for macOS Marked as reviewed by dnguyen (Committer). ------------- PR Review: https://git.openjdk.org/jdk/pull/24639#pullrequestreview-2776300379 From dnguyen at openjdk.org Thu Apr 17 16:21:54 2025 From: dnguyen at openjdk.org (Damon Nguyen) Date: Thu, 17 Apr 2025 16:21:54 GMT Subject: Integrated: 8353213: Open source several swing tests batch3 In-Reply-To: References: Message-ID: On Tue, 15 Apr 2025 22:28:01 GMT, Damon Nguyen wrote: > Open-sourcing and standardizing several tests (basic) This pull request has now been integrated. Changeset: e639cd6a Author: Damon Nguyen URL: https://git.openjdk.org/jdk/commit/e639cd6a775fabb057b684c70f85b94f84fa5d04 Stats: 296 lines in 4 files changed: 296 ins; 0 del; 0 mod 8353213: Open source several swing tests batch3 Reviewed-by: prr ------------- PR: https://git.openjdk.org/jdk/pull/24670 From kizune at openjdk.org Thu Apr 17 16:23:54 2025 From: kizune at openjdk.org (Alexander Zuev) Date: Thu, 17 Apr 2025 16:23:54 GMT Subject: Integrated: 8353070: Clean up and open source couple AWT Graphics related tests (Part 1) In-Reply-To: References: Message-ID: On Sun, 6 Apr 2025 06:08:36 GMT, Alexander Zuev wrote: > Clean up and open source four tests, two manual and two automatic tests now. This pull request has now been integrated. Changeset: 56609225 Author: Alexander Zuev URL: https://git.openjdk.org/jdk/commit/566092256861d6c7142fe22cc709ecb70f9db937 Stats: 407 lines in 4 files changed: 407 ins; 0 del; 0 mod 8353070: Clean up and open source couple AWT Graphics related tests (Part 1) Reviewed-by: serb ------------- PR: https://git.openjdk.org/jdk/pull/24472 From kizune at openjdk.org Thu Apr 17 16:27:16 2025 From: kizune at openjdk.org (Alexander Zuev) Date: Thu, 17 Apr 2025 16:27:16 GMT Subject: RFR: 8353655: Clean up and open source KeyEvent related tests (Part 1) [v3] In-Reply-To: References: Message-ID: > Clean up and open source three tests related to the KeyEvent mechanics. Alexander Zuev has updated the pull request incrementally with two additional commits since the last revision: - Update test/jdk/java/awt/event/KeyEvent/HomeEndKeyTest.java Co-authored-by: Andrey Turbanov - Add i18n key ------------- Changes: - all: https://git.openjdk.org/jdk/pull/24609/files - new: https://git.openjdk.org/jdk/pull/24609/files/b8761634..8e0c9e98 Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=24609&range=02 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=24609&range=01-02 Stats: 2 lines in 2 files changed: 1 ins; 0 del; 1 mod Patch: https://git.openjdk.org/jdk/pull/24609.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/24609/head:pull/24609 PR: https://git.openjdk.org/jdk/pull/24609 From kizune at openjdk.org Thu Apr 17 16:27:17 2025 From: kizune at openjdk.org (Alexander Zuev) Date: Thu, 17 Apr 2025 16:27:17 GMT Subject: RFR: 8353655: Clean up and open source KeyEvent related tests (Part 1) [v2] In-Reply-To: References: <876oRDLZI4QM5sR0Zjb7sKIpdTno-DGzaThDgBbrM6I=.551b5dc1-e498-4858-a62b-b1f507f679f0@github.com> Message-ID: <1RxGOjXHSLYRmoSaNJSl3Q6z8UCR675mqoxZnMe-6ew=.8c851382-890f-49d0-ba7b-93fb553afd1c@github.com> On Wed, 16 Apr 2025 19:45:25 GMT, Phil Race wrote: >> Alexander Zuev has updated the pull request incrementally with one additional commit since the last revision: >> >> Small fixes based on review comments > > test/jdk/java/awt/event/KeyEvent/FrenchKeyboard.java line 26: > >> 24: /* >> 25: * @test >> 26: * @bug 4308606 > > can you add > @key i18n > > I'd like us to start tracking tests that require some locale-specific set up. Sure. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/24609#discussion_r2049281388 From prr at openjdk.org Thu Apr 17 16:29:55 2025 From: prr at openjdk.org (Phil Race) Date: Thu, 17 Apr 2025 16:29:55 GMT Subject: RFR: 8352793: Open source several AWT TextComponent tests - Batch 1 [v3] In-Reply-To: <7sw9lmEN6f9hE7q0cIJkveWe1J6jQINnLUmZnFNpffo=.8be1bfc6-f3d6-42b9-86ee-49344eec1f01@github.com> References: <7sw9lmEN6f9hE7q0cIJkveWe1J6jQINnLUmZnFNpffo=.8be1bfc6-f3d6-42b9-86ee-49344eec1f01@github.com> Message-ID: On Thu, 17 Apr 2025 09:54:27 GMT, Tejesh R wrote: >> Open source these AWT TextComponent tests: >> >> java/awt/TextComponent/BackgroundTest/BackgroundTest.java >> java/awt/TextComponent/DisableTest/DisableTest.java >> java/awt/TextComponent/TextFieldMargin/TextFieldMargin.java >> java/awt/TextComponent/ModifiersTest/ModifiersTest.java > > Tejesh R has updated the pull request incrementally with one additional commit since the last revision: > > Updated review comments Marked as reviewed by prr (Reviewer). ------------- PR Review: https://git.openjdk.org/jdk/pull/24656#pullrequestreview-2776331626 From kizune at openjdk.org Thu Apr 17 16:30:00 2025 From: kizune at openjdk.org (Alexander Zuev) Date: Thu, 17 Apr 2025 16:30:00 GMT Subject: Integrated: 8354106: Clean up and open source KeyEvent related tests (Part 2) In-Reply-To: References: Message-ID: <96-m0SjckS6QwDN8pPO0P0AY9NEPKlNhtLP3URaphMA=.7cf8d973-853c-4863-97a0-fbe13fb153bf@github.com> On Sun, 13 Apr 2025 04:38:46 GMT, Alexander Zuev wrote: > Clean up and open source two more tests related to KeyEvent mechanics. This pull request has now been integrated. Changeset: e163a76f Author: Alexander Zuev URL: https://git.openjdk.org/jdk/commit/e163a76f2bacf06980026feb7e645e616ffe2ad4 Stats: 212 lines in 2 files changed: 212 ins; 0 del; 0 mod 8354106: Clean up and open source KeyEvent related tests (Part 2) Reviewed-by: abhiscxk, prr ------------- PR: https://git.openjdk.org/jdk/pull/24610 From prr at openjdk.org Thu Apr 17 16:30:48 2025 From: prr at openjdk.org (Phil Race) Date: Thu, 17 Apr 2025 16:30:48 GMT Subject: RFR: 8353445: Open source several AWT Menu tests - Batch 1 [v2] In-Reply-To: References: Message-ID: On Thu, 17 Apr 2025 10:37:44 GMT, Tejesh R wrote: >> Open source these AWT Menu tests: >> >> java/awt/Menu/MenuVisibilityTest/MenuVisibilityTest.java >> java/awt/Menu/MenuActionEventTest/MenuActionEventTest.java >> java/awt/Menu/RmInHideTest/RmInHideTest.java >> java/awt/Menu/SetShortCutTest/SetShortCutTest.java > > Tejesh R has updated the pull request incrementally with one additional commit since the last revision: > > Updated review comments Marked as reviewed by prr (Reviewer). ------------- PR Review: https://git.openjdk.org/jdk/pull/24649#pullrequestreview-2776333982 From prr at openjdk.org Thu Apr 17 16:33:54 2025 From: prr at openjdk.org (Phil Race) Date: Thu, 17 Apr 2025 16:33:54 GMT Subject: Integrated: 8354451: Open source some more Swing popup menu tests In-Reply-To: References: Message-ID: On Mon, 14 Apr 2025 21:52:02 GMT, Phil Race wrote: > Open source some more Swing menu tests This pull request has now been integrated. Changeset: 3e3dff67 Author: Phil Race URL: https://git.openjdk.org/jdk/commit/3e3dff6767f467b53c739c34b4350dd6840534a3 Stats: 466 lines in 3 files changed: 466 ins; 0 del; 0 mod 8354451: Open source some more Swing popup menu tests Reviewed-by: jdv, kizune ------------- PR: https://git.openjdk.org/jdk/pull/24636 From prr at openjdk.org Thu Apr 17 16:36:02 2025 From: prr at openjdk.org (Phil Race) Date: Thu, 17 Apr 2025 16:36:02 GMT Subject: Integrated: 8354552: Open source a few Swing tests In-Reply-To: <2FMzPdjd71su2fN0Bt1Msp6n1J6OEgk9daKDNpmv-HI=.a1596969-234a-482f-9c09-2505efaf74f1@github.com> References: <2FMzPdjd71su2fN0Bt1Msp6n1J6OEgk9daKDNpmv-HI=.a1596969-234a-482f-9c09-2505efaf74f1@github.com> Message-ID: On Tue, 15 Apr 2025 22:13:09 GMT, Phil Race wrote: > Open source a few Swing regression tests. This pull request has now been integrated. Changeset: 31e293b0 Author: Phil Race URL: https://git.openjdk.org/jdk/commit/31e293b0821b754f0fd0dd3a9d9143a0fd43a256 Stats: 323 lines in 4 files changed: 323 ins; 0 del; 0 mod 8354552: Open source a few Swing tests Reviewed-by: dnguyen, psadhukhan ------------- PR: https://git.openjdk.org/jdk/pull/24668 From dnguyen at openjdk.org Thu Apr 17 16:41:14 2025 From: dnguyen at openjdk.org (Damon Nguyen) Date: Thu, 17 Apr 2025 16:41:14 GMT Subject: RFR: 8353293: Open source several swing tests batch4 Message-ID: Open-sourcing and standardizing several tests (basic) ------------- Commit messages: - Initial opening - Merge branch 'master' of github.com:DamonGuy/jdk - Merge branch 'master' of github.com:DamonGuy/jdk - Merge branch 'master' of github.com:DamonGuy/jdk - Merge branch 'master' of github.com:DamonGuy/jdk - Merge branch 'master' of github.com:DamonGuy/jdk - Initial commit for backout Changes: https://git.openjdk.org/jdk/pull/24729/files Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=24729&range=00 Issue: https://bugs.openjdk.org/browse/JDK-8353293 Stats: 385 lines in 6 files changed: 385 ins; 0 del; 0 mod Patch: https://git.openjdk.org/jdk/pull/24729.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/24729/head:pull/24729 PR: https://git.openjdk.org/jdk/pull/24729 From dnguyen at openjdk.org Thu Apr 17 16:50:22 2025 From: dnguyen at openjdk.org (Damon Nguyen) Date: Thu, 17 Apr 2025 16:50:22 GMT Subject: RFR: 8353748: Open source several swing tests batch6 Message-ID: Open-sourcing and standardizing several swing tests (JTree) ------------- Commit messages: - Initial opening - Merge branch 'master' of github.com:DamonGuy/jdk - Merge branch 'master' of github.com:DamonGuy/jdk - Merge branch 'master' of github.com:DamonGuy/jdk - Merge branch 'master' of github.com:DamonGuy/jdk - Merge branch 'master' of github.com:DamonGuy/jdk - Initial commit for backout Changes: https://git.openjdk.org/jdk/pull/24730/files Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=24730&range=00 Issue: https://bugs.openjdk.org/browse/JDK-8353748 Stats: 501 lines in 6 files changed: 501 ins; 0 del; 0 mod Patch: https://git.openjdk.org/jdk/pull/24730.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/24730/head:pull/24730 PR: https://git.openjdk.org/jdk/pull/24730 From aivanov at openjdk.org Thu Apr 17 16:52:50 2025 From: aivanov at openjdk.org (Alexey Ivanov) Date: Thu, 17 Apr 2025 16:52:50 GMT Subject: RFR: 8351884: Refactor bug8033699.java test code In-Reply-To: References: Message-ID: On Thu, 17 Apr 2025 16:35:59 GMT, Alexey Ivanov wrote: >> Details: >> Refactored code as requested in the Bug description. >> >> Tested and verified the test passes. > > test/jdk/javax/swing/JRadioButton/8033699/bug8033699.java line 301: > >> 299: private static boolean actRB1 = false; >> 300: private static boolean actRB2 = false; >> 301: private static boolean actRB3 = false; > > These three boolean variables need to be declared volatile, the value is modified on the EDT but their value is read on the main thread. You can replace them with `CountDownLatch`es, but it looks like an overkill in this case, moreover `hitKey` automatically invokes `robot.waitForIdle`. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/24384#discussion_r2049326782 From aivanov at openjdk.org Thu Apr 17 16:52:49 2025 From: aivanov at openjdk.org (Alexey Ivanov) Date: Thu, 17 Apr 2025 16:52:49 GMT Subject: RFR: 8351884: Refactor bug8033699.java test code In-Reply-To: References: Message-ID: On Wed, 2 Apr 2025 17:34:34 GMT, Rajat Mahajan wrote: > Details: > Refactored code as requested in the Bug description. > > Tested and verified the test passes. Overall, it looks good to me. Except for the minor comments that I left, I can suggest: - removing `System.out.println` before throwing an error ? it adds no value, the error message from the exception is sufficient; - removing "as expected" from the error message which is implied because it's an error. test/jdk/javax/swing/JRadioButton/8033699/bug8033699.java line 36: > 34: import java.awt.event.ActionListener; > 35: import java.awt.event.KeyEvent; > 36: import javax.swing.BorderFactory; I'd rather preserve the blank line between `java.*` and `javax.*` packages. However, the list of imports isn't too long in either block. test/jdk/javax/swing/JRadioButton/8033699/bug8033699.java line 74: > 72: focusManager = KeyboardFocusManager.getCurrentKeyboardFocusManager(); > 73: }); > 74: Storing the `focusManager` once before calling `testLaF` for the first time is enough. test/jdk/javax/swing/JRadioButton/8033699/bug8033699.java line 181: > 179: mainFrame.getContentPane() > 180: .setLayout(new BoxLayout(mainFrame.getContentPane(), > 181: BoxLayout.Y_AXIS)); Alternatively, you can create another vertical box, put all the components into it instead of `mainFrame`, and add this vertical box into the frame. test/jdk/javax/swing/JRadioButton/8033699/bug8033699.java line 301: > 299: private static boolean actRB1 = false; > 300: private static boolean actRB2 = false; > 301: private static boolean actRB3 = false; These three boolean variables need to be declared volatile, the value is modified on the EDT but their value is read on the main thread. test/jdk/javax/swing/JRadioButton/8033699/bug8033699.java line 320: > 318: > 319: hitKey(KeyEvent.VK_DOWN); > 320: hitKey(KeyEvent.VK_DOWN); `addActionListener`, as well as `removeActionListener`, should rather be called on EDT. ------------- Changes requested by aivanov (Reviewer). PR Review: https://git.openjdk.org/jdk/pull/24384#pullrequestreview-2776316752 PR Review Comment: https://git.openjdk.org/jdk/pull/24384#discussion_r2049286794 PR Review Comment: https://git.openjdk.org/jdk/pull/24384#discussion_r2049291058 PR Review Comment: https://git.openjdk.org/jdk/pull/24384#discussion_r2049300044 PR Review Comment: https://git.openjdk.org/jdk/pull/24384#discussion_r2049307571 PR Review Comment: https://git.openjdk.org/jdk/pull/24384#discussion_r2049310017 From aivanov at openjdk.org Thu Apr 17 16:52:49 2025 From: aivanov at openjdk.org (Alexey Ivanov) Date: Thu, 17 Apr 2025 16:52:49 GMT Subject: RFR: 8351884: Refactor bug8033699.java test code In-Reply-To: <3Ezp0nCMjUqfV09qmnDDMHax4O-E-cZIxjS3XldEG1c=.a2f0629d-f200-4248-bcea-7144fb3ad2e5@github.com> References: <3Ezp0nCMjUqfV09qmnDDMHax4O-E-cZIxjS3XldEG1c=.a2f0629d-f200-4248-bcea-7144fb3ad2e5@github.com> Message-ID: On Tue, 15 Apr 2025 19:49:43 GMT, Harshitha Onkar wrote: >> Details: >> Refactored code as requested in the Bug description. >> >> Tested and verified the test passes. > > test/jdk/javax/swing/JRadioButton/8033699/bug8033699.java line 181: > >> 179: mainFrame.getContentPane() >> 180: .setLayout(new BoxLayout(mainFrame.getContentPane(), >> 181: BoxLayout.Y_AXIS)); > > Minor nit: > Can be simplified by removing .getContentPane() from ln#170-173) as well similar to the following. > > Suggestion: > > mainFrame.setLayout(new BoxLayout(mainFrame.getContentPane(), > BoxLayout.Y_AXIS)); This not necessary? it doesn't change the logic, and leaving adding components as they are (unless updated with a new vertical box) preserves attribution to the original author of the test. Minor nit, the suggestion is incorrect, or rather it looks incorrect. The first parameter to `BoxLayout` constructor should be the component to which you set the layout, and preserving `.getContentPane()` makes the code look correct. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/24384#discussion_r2049319828 From aivanov at openjdk.org Thu Apr 17 16:57:51 2025 From: aivanov at openjdk.org (Alexey Ivanov) Date: Thu, 17 Apr 2025 16:57:51 GMT Subject: RFR: 8351884: Refactor bug8033699.java test code In-Reply-To: References: Message-ID: On Wed, 2 Apr 2025 17:34:34 GMT, Rajat Mahajan wrote: > Details: > Refactored code as requested in the Bug description. > > Tested and verified the test passes. For the sake of completeness, the description could've mentioned that @kumarabhi006 requested these changes in https://github.com/openjdk/jdk/pull/23964#discussion_r1988489870. Abhishek, could you review the updated test code? ------------- PR Comment: https://git.openjdk.org/jdk/pull/24384#issuecomment-2813544741 From honkar at openjdk.org Thu Apr 17 17:27:38 2025 From: honkar at openjdk.org (Harshitha Onkar) Date: Thu, 17 Apr 2025 17:27:38 GMT Subject: RFR: JDK-8353486 : Open source Swing Tests - Set 4 [v4] In-Reply-To: References: Message-ID: > Open-sourced the following Swing tests: > > 1. javax/swing/JFileChooser/bug4464774.java > 2. javax/swing/JFileChooser/bug4522756.java > 3. javax/swing/JFileChooser/bug4759934.java > 4. javax/swing/JFileChooser/bug4943900.java > 5. javax/swing/JOptionPane/bug4194862.java Harshitha Onkar has updated the pull request incrementally with one additional commit since the last revision: instruction update ------------- Changes: - all: https://git.openjdk.org/jdk/pull/24456/files - new: https://git.openjdk.org/jdk/pull/24456/files/fa9529dd..d9e08d09 Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=24456&range=03 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=24456&range=02-03 Stats: 3 lines in 1 file changed: 0 ins; 1 del; 2 mod Patch: https://git.openjdk.org/jdk/pull/24456.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/24456/head:pull/24456 PR: https://git.openjdk.org/jdk/pull/24456 From aivanov at openjdk.org Thu Apr 17 17:27:40 2025 From: aivanov at openjdk.org (Alexey Ivanov) Date: Thu, 17 Apr 2025 17:27:40 GMT Subject: RFR: JDK-8353486 : Open source Swing Tests - Set 4 [v3] In-Reply-To: References: Message-ID: <1NJrbaaMRM6wnYRz8n_4OryID38oJ3mfcpNQosFA6r8=.b2390342-4f34-4dde-9567-48588179d067@github.com> On Tue, 8 Apr 2025 22:45:31 GMT, Harshitha Onkar wrote: >> Open-sourced the following Swing tests: >> >> 1. javax/swing/JFileChooser/bug4464774.java >> 2. javax/swing/JFileChooser/bug4522756.java >> 3. javax/swing/JFileChooser/bug4759934.java >> 4. javax/swing/JFileChooser/bug4943900.java >> 5. javax/swing/JOptionPane/bug4194862.java > > Harshitha Onkar has updated the pull request incrementally with one additional commit since the last revision: > > review update Only a partial review, I couldn't finish it today. test/jdk/javax/swing/JFileChooser/bug4464774.java line 63: > 61: public static JFrame createAndShowUI() { > 62: JFrame frame = new JFrame("JFileChooser bug4464774"); > 63: JFileChooser jfc = new JFileChooser(); You can add `jfc.setControlButtonsAreShown(false)` to hide the **Open** and **Cancel** buttons. This can be applied to all the `JFileChooser` tests. ------------- PR Review: https://git.openjdk.org/jdk/pull/24456#pullrequestreview-2776469916 PR Review Comment: https://git.openjdk.org/jdk/pull/24456#discussion_r2049379768 From honkar at openjdk.org Thu Apr 17 17:27:41 2025 From: honkar at openjdk.org (Harshitha Onkar) Date: Thu, 17 Apr 2025 17:27:41 GMT Subject: RFR: JDK-8353486 : Open source Swing Tests - Set 4 [v3] In-Reply-To: References: Message-ID: On Thu, 17 Apr 2025 01:47:45 GMT, Alexander Zvegintsev wrote: >> Harshitha Onkar has updated the pull request incrementally with one additional commit since the last revision: >> >> review update > > test/jdk/javax/swing/JFileChooser/bug4943900.java line 43: > >> 41: private static final String INSTRUCTIONS = """ >> 42: 1. Click "Show FileChooser" button below, FileChooser dialog must >> 43: appear. > > I do not see the "Show FileChooser" button, the file chooser showed automatically. > > However, it is shown in an unobvious way (code-wise), via the `frame.add(fc);` call (and later the `setVisible(true)` call on the JFrame shows it). > > Is this intentional? Updated instructions. I previously had "Show FileChooser" button on click of which jfc was shown but during the course of review got a suggestion to remove the extra button click and directly add it to the frame so that it doesn't cover the instruction UI. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/24456#discussion_r2049376985 From honkar at openjdk.org Thu Apr 17 17:30:52 2025 From: honkar at openjdk.org (Harshitha Onkar) Date: Thu, 17 Apr 2025 17:30:52 GMT Subject: RFR: JDK-8353486 : Open source Swing Tests - Set 4 [v3] In-Reply-To: <1NJrbaaMRM6wnYRz8n_4OryID38oJ3mfcpNQosFA6r8=.b2390342-4f34-4dde-9567-48588179d067@github.com> References: <1NJrbaaMRM6wnYRz8n_4OryID38oJ3mfcpNQosFA6r8=.b2390342-4f34-4dde-9567-48588179d067@github.com> Message-ID: <3Mr9ZeR-K1mEHmQ2htJkNJrJpyWF4en-79Vp5NMTGXc=.a8aa8990-fbe3-40db-a352-3794cf9e8be2@github.com> On Thu, 17 Apr 2025 17:23:36 GMT, Alexey Ivanov wrote: >> Harshitha Onkar has updated the pull request incrementally with one additional commit since the last revision: >> >> review update > > test/jdk/javax/swing/JFileChooser/bug4464774.java line 63: > >> 61: public static JFrame createAndShowUI() { >> 62: JFrame frame = new JFrame("JFileChooser bug4464774"); >> 63: JFileChooser jfc = new JFileChooser(); > > You can add `jfc.setControlButtonsAreShown(false)` to hide the **Open** and **Cancel** buttons. > > This can be applied to all the `JFileChooser` tests. Thanks. I'll update it for all JFileChooser tests . ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/24456#discussion_r2049387823 From swpalmer at gmail.com Thu Apr 17 16:57:17 2025 From: swpalmer at gmail.com (Scott Palmer) Date: Thu, 17 Apr 2025 12:57:17 -0400 Subject: Proposal: A new common Image API In-Reply-To: <484ae025-47dc-462e-b6bd-e4fce3252005@oracle.com> References: <484ae025-47dc-462e-b6bd-e4fce3252005@oracle.com> Message-ID: I think a common image I/O library that is not tied to a UI framework makes sense and is long overdue. Raster images do have a common format that encapsulates everything. We essentially have this abstracted in the two UI frameworks already. At some level it comes down to PixelFormats and data buffers. There are not so many of them that it is impossible to make a common abstraction for the purposes of I/O that can be mapped to what is needed by the UI framework. Just as JavaFX already has the SwingFxUtils for converting between AWT and JavaFX formats, there can be a utility to convert between the I/O library format and each UI framework's format. I would expect in most cases that the raw pixel data could be shared without extra copying. ImageIO is a good starting point. Remove the actual UI classes from it like BufferedImage and keep plain raster representations of the data that can be wrapped by the UI classes. Under the hood the arrays or buffers of raster data don't have to change,they are the important parts that the I/O library needs to deal with. Mapping the metadata (width, height, colour space, pixel format, etc.) will usually be very cheap. Some cases may need to run a conversion, like the example of 1-bpp black/white needing to be remapped to RGB, but that that can happen in the utility layer that moves the image from the Image I/O domain to the UI framework domain on a case-by-case basis. Worst case is that the UI framework throws an UnsupportImageFormat exception when it doesn't have code to deal with raster data in a particular format. I'm sure it is all much harder than I suspect, but I don't think it should be. :-) Scott On Thu, Apr 17, 2025 at 12:10?AM Philip Race wrote: > First, note than John Neffenger replied to this but only on openjfx-dev > and the first thing I saw was the reply and couldn't see the original. > After some consternation I tracked down this cross-post. > > Here's a link to the reply > https://mail.openjdk.org/pipermail/openjfx-dev/2025-April/053616.html > > A fundamental problem is that all the users need to be able to produce > and consume the data. > So there either needs to be a module dependency (not viable) or an > agreed format (are we > really going to define an image format which encapsulates everything, > including the multi-frame > GIF support) and then everyone needs a reader and don't forget writers > and they need to be able to do .. so much .. > > I just don't see a viable path here. > And several (8 ?) years ago, I pondered some way to separate image > handling from the > desktop module to see if a server app could use it without pulling in > AWT but the intra-package > dependencies made it impossible without changes I didn't even figure out > if they were possible. > > -phil. > > On 4/16/25 3:04 AM, Glavo wrote: > > Currently, there are multiple different image APIs in the Java > > ecosystem: AWT, JavaFX, Android, etc. > > What's worse, the Android platform does not provide support for AWT, > > making the Java ecosystem even more fragmented. > > > > There are some obvious problems with the current situation: > > > > * Third-party libraries that need an image API are difficult to be > > universal. > > A practical example: Apache Commons Imaging has been in the alpha > > stage and cannot release version 1.0. > > The main reason is that it depends on `java.awt.image`, so it > > doesn't work on Android. > > We hope to solve this problem before the official release. > > * Different image APIs have to repeatedly implement support for > > reading the same image format (such as JPEG). > > In fact, AWT, JavaFX, and Android now each implement reading JPEG > > images. > > This is a waste. > > > > I thought we might be able to create a new module independent of > > java.desktop that provides a common abstraction for images. > > It should: > > > > * Provides common Image and ImageProvider interfaces that can be > > implemented by different providers. > > * Provides a unified abstraction for colors, color spaces, pixel > > formats, etc. > > * Provides general and extensible image I/O support. > > Read/write support should only need to be implemented once per image > > format. > > It should be bidirectionally compatible with `javax.imageio`: > > The implementation of either API can be accessed through the other API. > > > > I want to know if this is an idea worth putting into practice? > > I'm not an expert in this field, so I'm worried about creating designs > > with many flaws. > > Therefore, I haven't attempted to implement it yet. > > If anyone is willing to implement it, I'd like to help. > > > > I had sent an email a few days ago but no one responded, so I > > re-edited it and sent this one. > > > > Glavo > > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From dnguyen at openjdk.org Thu Apr 17 17:43:03 2025 From: dnguyen at openjdk.org (Damon Nguyen) Date: Thu, 17 Apr 2025 17:43:03 GMT Subject: RFR: 8353748: Open source several swing tests batch6 [v2] In-Reply-To: References: Message-ID: > Open-sourcing and standardizing several swing tests (JTree) Damon Nguyen has updated the pull request incrementally with one additional commit since the last revision: Add headful tags ------------- Changes: - all: https://git.openjdk.org/jdk/pull/24730/files - new: https://git.openjdk.org/jdk/pull/24730/files/5bb73d48..c7870e3e Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=24730&range=01 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=24730&range=00-01 Stats: 2 lines in 2 files changed: 2 ins; 0 del; 0 mod Patch: https://git.openjdk.org/jdk/pull/24730.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/24730/head:pull/24730 PR: https://git.openjdk.org/jdk/pull/24730 From serb at openjdk.org Thu Apr 17 17:55:57 2025 From: serb at openjdk.org (Sergey Bylokhov) Date: Thu, 17 Apr 2025 17:55:57 GMT Subject: RFR: 8354191: GTK LaF should use pre-multiplied alpha same as cairo In-Reply-To: References: <-sAv6upz5pv3EA1zjjUvRUxNP1Tl75NJAwOX-df8Vbk=.442e3494-836b-4664-baf1-669fbd7532a0@github.com> Message-ID: On Fri, 11 Apr 2025 06:01:32 GMT, Maxim Kartashev wrote: >> src/java.desktop/share/classes/com/sun/java/swing/plaf/gtk/GTKEngine.java line 618: >> >>> 616: int index = transparency - 1; >>> 617: if (COLOR_MODELS[index] == null) { >>> 618: COLOR_MODELS[index] = GraphicsEnvironment.getLocalGraphicsEnvironment() >> >> How will it work if the configuration changes at runtime? > > There will be an additional pixel conversion effort from the outdated configuration's format to the new actual format when this image is used. In other words, status quo. @mkartashev Did you check that the scenario described above cannot happen? ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/24551#discussion_r2049418916 From achung at openjdk.org Thu Apr 17 18:02:45 2025 From: achung at openjdk.org (Alisen Chung) Date: Thu, 17 Apr 2025 18:02:45 GMT Subject: RFR: 8353685: Open some JComboBox bugs 4 Message-ID: Updating and opening some JComboBox bugs ------------- Commit messages: - update path - opening tests Changes: https://git.openjdk.org/jdk/pull/24733/files Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=24733&range=00 Issue: https://bugs.openjdk.org/browse/JDK-8353685 Stats: 255 lines in 3 files changed: 255 ins; 0 del; 0 mod Patch: https://git.openjdk.org/jdk/pull/24733.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/24733/head:pull/24733 PR: https://git.openjdk.org/jdk/pull/24733 From honkar at openjdk.org Thu Apr 17 18:03:20 2025 From: honkar at openjdk.org (Harshitha Onkar) Date: Thu, 17 Apr 2025 18:03:20 GMT Subject: RFR: JDK-8353486 : Open source Swing Tests - Set 4 [v5] In-Reply-To: References: Message-ID: > Open-sourced the following Swing tests: > > 1. javax/swing/JFileChooser/bug4464774.java > 2. javax/swing/JFileChooser/bug4522756.java > 3. javax/swing/JFileChooser/bug4759934.java > 4. javax/swing/JFileChooser/bug4943900.java > 5. javax/swing/JOptionPane/bug4194862.java Harshitha Onkar has updated the pull request incrementally with one additional commit since the last revision: jfc.setControlButtonsAreShown() added ------------- Changes: - all: https://git.openjdk.org/jdk/pull/24456/files - new: https://git.openjdk.org/jdk/pull/24456/files/d9e08d09..1cd5ec66 Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=24456&range=04 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=24456&range=03-04 Stats: 12 lines in 3 files changed: 9 ins; 3 del; 0 mod Patch: https://git.openjdk.org/jdk/pull/24456.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/24456/head:pull/24456 PR: https://git.openjdk.org/jdk/pull/24456 From achung at openjdk.org Thu Apr 17 18:08:23 2025 From: achung at openjdk.org (Alisen Chung) Date: Thu, 17 Apr 2025 18:08:23 GMT Subject: RFR: 8354095: Open some JTable bugs 5 Message-ID: <4t0GC0P2HhS-hgc6dNndlsbTxaliBcWUqSypiPPb7cw=.ea094f23-779a-45f5-a4ab-85c6e76841a6@github.com> Updating and opening some JTable bugs ------------- Commit messages: - opening tests Changes: https://git.openjdk.org/jdk/pull/24734/files Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=24734&range=00 Issue: https://bugs.openjdk.org/browse/JDK-8354095 Stats: 470 lines in 4 files changed: 470 ins; 0 del; 0 mod Patch: https://git.openjdk.org/jdk/pull/24734.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/24734/head:pull/24734 PR: https://git.openjdk.org/jdk/pull/24734 From achung at openjdk.org Thu Apr 17 18:40:09 2025 From: achung at openjdk.org (Alisen Chung) Date: Thu, 17 Apr 2025 18:40:09 GMT Subject: RFR: 8354095: Open some JTable bugs 5 [v2] In-Reply-To: <4t0GC0P2HhS-hgc6dNndlsbTxaliBcWUqSypiPPb7cw=.ea094f23-779a-45f5-a4ab-85c6e76841a6@github.com> References: <4t0GC0P2HhS-hgc6dNndlsbTxaliBcWUqSypiPPb7cw=.ea094f23-779a-45f5-a4ab-85c6e76841a6@github.com> Message-ID: <8re482YFiViosBuOmOFZohelCbe8lKoThY1Fyhv4-q4=.6a9d06ad-237e-4611-9ccf-95d88e57b2d4@github.com> > Updating and opening some JTable bugs Alisen Chung has updated the pull request incrementally with one additional commit since the last revision: update jtreg paths ------------- Changes: - all: https://git.openjdk.org/jdk/pull/24734/files - new: https://git.openjdk.org/jdk/pull/24734/files/45655956..9bfe1493 Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=24734&range=01 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=24734&range=00-01 Stats: 2 lines in 2 files changed: 0 ins; 0 del; 2 mod Patch: https://git.openjdk.org/jdk/pull/24734.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/24734/head:pull/24734 PR: https://git.openjdk.org/jdk/pull/24734 From johan.vos at gluonhq.com Thu Apr 17 18:34:41 2025 From: johan.vos at gluonhq.com (Johan Vos) Date: Thu, 17 Apr 2025 20:34:41 +0200 Subject: Proposal: A new common Image API In-Reply-To: References: <484ae025-47dc-462e-b6bd-e4fce3252005@oracle.com> Message-ID: I started replying to this a couple of times, but I never finished it, because 1) there are many different angles to look at the question 2) I believe it is indeed pretty hard. However, I absolutely understand the original question, and I support the idea. The fragmentation of "image" handling is a pain for many developers, and it doesn't help the adoption of JavaFX (or AWT). Realistically, I believe that in order to fix this issue, a considerable investment (resources) is needed, and even then it will take a long time. I think we can only talk about those AWT/JavaFX, and not about Android. While the OpenJDK and OpenJFX process is relatively open (with a high technical barrier, for good reasons) and allows for participation from different companies, organisations and individuals, the Android process is a different beast and I believe the chances that anyone on that side is interested in my opinion are close to 0. That is one of the reasons why I'm working on OpenJDK/Mobile, as that allows to run the real Java on Android devices (basically, this is close to running Android on embedded linux systems). We have JavaFX working on Android, so the JavaFX image API's work on Android-devices. For those not familiar with OpenJDK/Mobile and the way we do things at Gluon: we bundle Java application code and dependencies with a hotspot-based JVM which is contained in a native library for Android, and which can then be invoked from a plain Android Activity. We have cross-compiled versions of the JavaFX libraries (including the imageio libs) for Android, so those can be used. While this is technically feasible (and I can address the typical critics about footprint size and performance), this is not mainstream. Given the enormous marketing power of Android versus the very limited resources we have, this is not surprising, and I don't think we should discuss this in this thread. A common image API needs an API and implementations. John made excellent points about the required flexibility of the API [1] (e.g. allow for a trade-off between memory and performance). A good API allows developers to deal with this, and we are far from there. Today, you actually need to look at the implementation if you want to understand what is happening, and what the impact is on CPU/memory. Handling this requires excellent API design, lots of discussions with different actors and different usecases. This is absolutely doable, but it is a major effort. The other thing is the native, platform-specific implementation. This is where the AWT parts and the JavaFX parts are conflicting. I don't recall the exact place, but when creating static builds of the AWT libraries and the JavaFX libraries on Linux, there were duplicate symbols, delivered by 2 different sources. It is not simply supporting different platforms, as there are a number of partially overlapping and partially conflicting low-level libraries for different formats/operations. JavaFX and java.desktop don't have the exact same set of requirements for this. This is something I ran into as well while working on building OpenJFX using the OpenJDK build system [2] (although it is not really problematic in this case, as we have 2 separate shared libs (1 for AWT and 1 for JavaFX) that do not need to be combined into a single executable). Both OpenJDK and OpenJFX contain a local version of libjpeg, but with a different version. In OpenJDK, you can build using a system-provided version of libjpeg. In order to have a single image API, those issues need to be fixed and the approach needs to be streamlined. One of the hard things in that case is, as Phil mentioned [3] that the java.desktop module is not internally modular. It would require precision surgery to separate the native dependencies required for image handling only from the rest of the module. With an open and honest blog post from Amy Fowler about Swing/AWT versus JavaFX in mind [4] (15 years ago!), I assumed that, contrary to all other modules in openjdk, an internal cleanup of java.desktop was not high priority, given the suggested path for UI development in Java. My personal opinion here is that I'm not really sure a new image API needs to be backward compatible with java.desktop, and it would make it easier if it was targeting JavaFX only. In summary, I absolutely support the idea of a new (common) image API. I see a number of challenges in different sub-parts (API design, native code integration between OpenJDK and OpenJFX), but I don't think I see technical showstoppers. The amount of work to do this properly, in a maintainable way, with the quality one expects from OpenJDK projects, should not be underestimated though. - Johan [1] https://mail.openjdk.org/pipermail/openjfx-dev/2025-April/053661.html [2] https://mail.openjdk.org/pipermail/openjfx-dev/2025-March/053076.html [3] https://mail.openjdk.org/pipermail/openjfx-dev/2025-April/053686.html [4] https://amyfowlersblog.wordpress.com/2010/09/21/a-heartfelt-ramble-on-swing-javafx/ On Thu, Apr 17, 2025 at 6:58?PM Scott Palmer wrote: > I think a common image I/O library that is not tied to a UI > framework makes sense and is long overdue. > Raster images do have a common format that encapsulates everything. We > essentially have this abstracted in the two UI frameworks already. At some > level it comes down to PixelFormats and data buffers. There are not so > many of them that it is impossible to make a common abstraction for the > purposes of I/O that can be mapped to what is needed by the UI framework. > Just as JavaFX already has the SwingFxUtils for converting between AWT and > JavaFX formats, there can be a utility to convert between the I/O library > format and each UI framework's format. I would expect in most cases that > the raw pixel data could be shared without extra copying. > ImageIO is a good starting point. Remove the actual UI classes from it > like BufferedImage and keep plain raster representations of the data that > can be wrapped by the UI classes. Under the hood the arrays or buffers of > raster data don't have to change,they are the important parts that the I/O > library needs to deal with. Mapping the metadata (width, height, colour > space, pixel format, etc.) will usually be very cheap. Some cases may need > to run a conversion, like the example of 1-bpp black/white needing to be > remapped to RGB, but that that can happen in the utility layer that moves > the image from the Image I/O domain to the UI framework domain on a > case-by-case basis. Worst case is that the UI framework throws an > UnsupportImageFormat exception when it doesn't have code to deal with > raster data in a particular format. > > I'm sure it is all much harder than I suspect, but I don't think it should > be. :-) > > Scott > > > On Thu, Apr 17, 2025 at 12:10?AM Philip Race > wrote: > >> First, note than John Neffenger replied to this but only on openjfx-dev >> and the first thing I saw was the reply and couldn't see the original. >> After some consternation I tracked down this cross-post. >> >> Here's a link to the reply >> https://mail.openjdk.org/pipermail/openjfx-dev/2025-April/053616.html >> >> A fundamental problem is that all the users need to be able to produce >> and consume the data. >> So there either needs to be a module dependency (not viable) or an >> agreed format (are we >> really going to define an image format which encapsulates everything, >> including the multi-frame >> GIF support) and then everyone needs a reader and don't forget writers >> and they need to be able to do .. so much .. >> >> I just don't see a viable path here. >> And several (8 ?) years ago, I pondered some way to separate image >> handling from the >> desktop module to see if a server app could use it without pulling in >> AWT but the intra-package >> dependencies made it impossible without changes I didn't even figure out >> if they were possible. >> >> -phil. >> >> On 4/16/25 3:04 AM, Glavo wrote: >> > Currently, there are multiple different image APIs in the Java >> > ecosystem: AWT, JavaFX, Android, etc. >> > What's worse, the Android platform does not provide support for AWT, >> > making the Java ecosystem even more fragmented. >> > >> > There are some obvious problems with the current situation: >> > >> > * Third-party libraries that need an image API are difficult to be >> > universal. >> > A practical example: Apache Commons Imaging has been in the alpha >> > stage and cannot release version 1.0. >> > The main reason is that it depends on `java.awt.image`, so it >> > doesn't work on Android. >> > We hope to solve this problem before the official release. >> > * Different image APIs have to repeatedly implement support for >> > reading the same image format (such as JPEG). >> > In fact, AWT, JavaFX, and Android now each implement reading JPEG >> > images. >> > This is a waste. >> > >> > I thought we might be able to create a new module independent of >> > java.desktop that provides a common abstraction for images. >> > It should: >> > >> > * Provides common Image and ImageProvider interfaces that can be >> > implemented by different providers. >> > * Provides a unified abstraction for colors, color spaces, pixel >> > formats, etc. >> > * Provides general and extensible image I/O support. >> > Read/write support should only need to be implemented once per image >> > format. >> > It should be bidirectionally compatible with `javax.imageio`: >> > The implementation of either API can be accessed through the other >> API. >> > >> > I want to know if this is an idea worth putting into practice? >> > I'm not an expert in this field, so I'm worried about creating designs >> > with many flaws. >> > Therefore, I haven't attempted to implement it yet. >> > If anyone is willing to implement it, I'd like to help. >> > >> > I had sent an email a few days ago but no one responded, so I >> > re-edited it and sent this one. >> > >> > Glavo >> > >> >> -------------- next part -------------- An HTML attachment was scrubbed... URL: From achung at openjdk.org Thu Apr 17 18:49:17 2025 From: achung at openjdk.org (Alisen Chung) Date: Thu, 17 Apr 2025 18:49:17 GMT Subject: RFR: 8354233: Open some JTable bugs 6 Message-ID: Updating and opening some JTable bugs ------------- Commit messages: - runtime exception instead of error - open tests Changes: https://git.openjdk.org/jdk/pull/24735/files Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=24735&range=00 Issue: https://bugs.openjdk.org/browse/JDK-8354233 Stats: 479 lines in 4 files changed: 479 ins; 0 del; 0 mod Patch: https://git.openjdk.org/jdk/pull/24735.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/24735/head:pull/24735 PR: https://git.openjdk.org/jdk/pull/24735 From abhiscxk at openjdk.org Thu Apr 17 18:57:16 2025 From: abhiscxk at openjdk.org (Abhishek Kumar) Date: Thu, 17 Apr 2025 18:57:16 GMT Subject: RFR: 8353552: Opensource Several Font related tests - Batch 3 Message-ID: Few more font related tests are converted from applet and open-sourced. TestGlyphVectorLayout.java doesn't behave as per the instruction and hence problem-listed under [JDK-8354987](https://bugs.openjdk.org/browse/JDK-8354987). ------------- Commit messages: - Applet test conversion and problem list TestGlyphVectorLayout.java test Changes: https://git.openjdk.org/jdk/pull/24736/files Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=24736&range=00 Issue: https://bugs.openjdk.org/browse/JDK-8353552 Stats: 587 lines in 6 files changed: 587 ins; 0 del; 0 mod Patch: https://git.openjdk.org/jdk/pull/24736.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/24736/head:pull/24736 PR: https://git.openjdk.org/jdk/pull/24736 From abhiscxk at openjdk.org Thu Apr 17 19:14:46 2025 From: abhiscxk at openjdk.org (Abhishek Kumar) Date: Thu, 17 Apr 2025 19:14:46 GMT Subject: RFR: JDK-8353319 : Open source Swing tests - Set 3 [v3] In-Reply-To: References: Message-ID: On Thu, 17 Apr 2025 00:19:19 GMT, Harshitha Onkar wrote: >> Following tests are updates as part of this PR: >> >> 1. javax/swing/JRootPane/bug4614623.java - manual >> 2. javax/swing/JTabbedPane/bug4613811.java - manual >> 3. javax/swing/JWindow/bug4251781.java - manual >> 4. javax/swing/JFrame/bug4419914.java - manual, updated existing test by adding JWindow, JDialog cases. > > Harshitha Onkar has updated the pull request incrementally with one additional commit since the last revision: > > test instruction updated for macOS LGTM other than some minor observation. test/jdk/javax/swing/JFrame/bug4419914.java line 89: > 87: public static void main(String[] args) throws Exception { > 88: PassFailJFrame.builder() > 89: .title("Tab movement Instructions") You may remove the title from all tests as it is redundant. test/jdk/javax/swing/JWindow/bug4251781.java line 2: > 1: /* > 2: * Copyright (c) 2000, 2024, Oracle and/or its affiliates. All rights reserved. Suggestion: * Copyright (c) 2000, 2025, Oracle and/or its affiliates. All rights reserved. ------------- Marked as reviewed by abhiscxk (Reviewer). PR Review: https://git.openjdk.org/jdk/pull/24639#pullrequestreview-2776683935 PR Review Comment: https://git.openjdk.org/jdk/pull/24639#discussion_r2049508545 PR Review Comment: https://git.openjdk.org/jdk/pull/24639#discussion_r2049507849 From achung at openjdk.org Thu Apr 17 19:16:43 2025 From: achung at openjdk.org (Alisen Chung) Date: Thu, 17 Apr 2025 19:16:43 GMT Subject: RFR: 8354341: Open some JTable bugs 7 Message-ID: <-A3k5m01IIlys1qXXQIqzcxRaGuGnVK2KMZ33Et4vmM=.c53f6d63-6829-41d9-852c-e436344348eb@github.com> Updating and opening some JTable bugs ------------- Commit messages: - update jtreg path - open tests Changes: https://git.openjdk.org/jdk/pull/24739/files Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=24739&range=00 Issue: https://bugs.openjdk.org/browse/JDK-8354341 Stats: 449 lines in 4 files changed: 449 ins; 0 del; 0 mod Patch: https://git.openjdk.org/jdk/pull/24739.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/24739/head:pull/24739 PR: https://git.openjdk.org/jdk/pull/24739 From abhiscxk at openjdk.org Thu Apr 17 19:18:18 2025 From: abhiscxk at openjdk.org (Abhishek Kumar) Date: Thu, 17 Apr 2025 19:18:18 GMT Subject: RFR: 8353552: Opensource Several Font related tests - Batch 3 [v2] In-Reply-To: References: Message-ID: > Few more font related tests are converted from applet and open-sourced. > > TestGlyphVectorLayout.java doesn't behave as per the instruction and hence problem-listed under [JDK-8354987](https://bugs.openjdk.org/browse/JDK-8354987). Abhishek Kumar has updated the pull request incrementally with one additional commit since the last revision: Problem list test moved to manual test category ------------- Changes: - all: https://git.openjdk.org/jdk/pull/24736/files - new: https://git.openjdk.org/jdk/pull/24736/files/2ee8f946..b8094402 Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=24736&range=01 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=24736&range=00-01 Stats: 2 lines in 1 file changed: 1 ins; 1 del; 0 mod Patch: https://git.openjdk.org/jdk/pull/24736.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/24736/head:pull/24736 PR: https://git.openjdk.org/jdk/pull/24736 From aturbanov at openjdk.org Thu Apr 17 19:22:49 2025 From: aturbanov at openjdk.org (Andrey Turbanov) Date: Thu, 17 Apr 2025 19:22:49 GMT Subject: Integrated: 8354789: Unnecessary null check in sun.awt.windows.WToolkit.getFontPeer In-Reply-To: References: Message-ID: <1n9vl3uB-ymV5xF_k-borxq9I7Ghidyc4uJWiRuwpOw=.4da2f77d-9edb-4dff-9720-c8977ec24d00@github.com> On Thu, 16 Jan 2025 12:03:50 GMT, Andrey Turbanov wrote: > There is redundant `null` comparison in `sun.awt.windows.WToolkit.getFontPeer` > Local variable `retval` can't be null after new object assignment. > https://github.com/openjdk/jdk/blob/24de9dee80738fe6ab1fc726b071546c85bbf79a/src/java.desktop/windows/classes/sun/awt/windows/WToolkit.java#L604-L605 This pull request has now been integrated. Changeset: 1b4b317a Author: Andrey Turbanov URL: https://git.openjdk.org/jdk/commit/1b4b317aacbdfc499c28b00aeaf7120790a6c11a Stats: 13 lines in 1 file changed: 0 ins; 2 del; 11 mod 8354789: Unnecessary null check in sun.awt.windows.WToolkit.getFontPeer Reviewed-by: aivanov, tr ------------- PR: https://git.openjdk.org/jdk/pull/23150 From honkar at openjdk.org Thu Apr 17 19:29:28 2025 From: honkar at openjdk.org (Harshitha Onkar) Date: Thu, 17 Apr 2025 19:29:28 GMT Subject: RFR: JDK-8353486 : Open source Swing Tests - Set 4 [v6] In-Reply-To: References: Message-ID: <-jaKTmgwNA9JNGIaVqutoIFJKc43PKmNxbni9iAk7Dg=.679497d9-dffe-4af0-8e7f-e517284d2012@github.com> > Open-sourced the following Swing tests: > > 1. javax/swing/JFileChooser/bug4464774.java > 2. javax/swing/JFileChooser/bug4522756.java > 3. javax/swing/JFileChooser/bug4759934.java > 4. javax/swing/JFileChooser/bug4943900.java > 5. javax/swing/JOptionPane/bug4194862.java Harshitha Onkar has updated the pull request incrementally with one additional commit since the last revision: remove redudant frame ------------- Changes: - all: https://git.openjdk.org/jdk/pull/24456/files - new: https://git.openjdk.org/jdk/pull/24456/files/1cd5ec66..5e5cbb4a Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=24456&range=05 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=24456&range=04-05 Stats: 50 lines in 3 files changed: 12 ins; 33 del; 5 mod Patch: https://git.openjdk.org/jdk/pull/24456.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/24456/head:pull/24456 PR: https://git.openjdk.org/jdk/pull/24456 From honkar at openjdk.org Thu Apr 17 19:29:28 2025 From: honkar at openjdk.org (Harshitha Onkar) Date: Thu, 17 Apr 2025 19:29:28 GMT Subject: RFR: JDK-8353486 : Open source Swing Tests - Set 4 [v3] In-Reply-To: References: Message-ID: On Thu, 17 Apr 2025 17:21:14 GMT, Harshitha Onkar wrote: >> test/jdk/javax/swing/JFileChooser/bug4943900.java line 43: >> >>> 41: private static final String INSTRUCTIONS = """ >>> 42: 1. Click "Show FileChooser" button below, FileChooser dialog must >>> 43: appear. >> >> I do not see the "Show FileChooser" button, the file chooser showed automatically. >> >> However, it is shown in an unobvious way (code-wise), via the `frame.add(fc);` call (and later the `setVisible(true)` call on the JFrame shows it). >> >> Is this intentional? > > Updated instructions. > I previously had "Show FileChooser" button on click of which jfc was shown but during the course of review got a suggestion to remove the extra button click and directly add it to the frame so that it doesn't cover the instruction UI. Updated to remove redundant frame and simply return jfc. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/24456#discussion_r2049524991 From achung at openjdk.org Thu Apr 17 19:31:23 2025 From: achung at openjdk.org (Alisen Chung) Date: Thu, 17 Apr 2025 19:31:23 GMT Subject: RFR: 8354465: Open some JTable bugs 8 Message-ID: Updating and opening some JTable bugs ------------- Commit messages: - update jtreg paths - open tests Changes: https://git.openjdk.org/jdk/pull/24741/files Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=24741&range=00 Issue: https://bugs.openjdk.org/browse/JDK-8354465 Stats: 610 lines in 5 files changed: 610 ins; 0 del; 0 mod Patch: https://git.openjdk.org/jdk/pull/24741.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/24741/head:pull/24741 PR: https://git.openjdk.org/jdk/pull/24741 From honkar at openjdk.org Thu Apr 17 19:37:25 2025 From: honkar at openjdk.org (Harshitha Onkar) Date: Thu, 17 Apr 2025 19:37:25 GMT Subject: RFR: JDK-8353319 : Open source Swing tests - Set 3 [v4] In-Reply-To: References: Message-ID: > Following tests are updates as part of this PR: > > 1. javax/swing/JRootPane/bug4614623.java - manual > 2. javax/swing/JTabbedPane/bug4613811.java - manual > 3. javax/swing/JWindow/bug4251781.java - manual > 4. javax/swing/JFrame/bug4419914.java - manual, updated existing test by adding JWindow, JDialog cases. Harshitha Onkar has updated the pull request incrementally with one additional commit since the last revision: review changes ------------- Changes: - all: https://git.openjdk.org/jdk/pull/24639/files - new: https://git.openjdk.org/jdk/pull/24639/files/79a7ca60..3d4d5e49 Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=24639&range=03 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=24639&range=02-03 Stats: 4 lines in 3 files changed: 0 ins; 3 del; 1 mod Patch: https://git.openjdk.org/jdk/pull/24639.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/24639/head:pull/24639 PR: https://git.openjdk.org/jdk/pull/24639 From honkar at openjdk.org Thu Apr 17 19:37:26 2025 From: honkar at openjdk.org (Harshitha Onkar) Date: Thu, 17 Apr 2025 19:37:26 GMT Subject: RFR: JDK-8353319 : Open source Swing tests - Set 3 [v3] In-Reply-To: References: Message-ID: <-mXUGSbk0ZKNO3g4QOHfv5_j-q9d8M3kDUdljkgbjNE=.6d329143-ab53-474b-a1e8-5db67d9d50be@github.com> On Thu, 17 Apr 2025 19:11:26 GMT, Abhishek Kumar wrote: >> Harshitha Onkar has updated the pull request incrementally with one additional commit since the last revision: >> >> test instruction updated for macOS > > test/jdk/javax/swing/JFrame/bug4419914.java line 89: > >> 87: public static void main(String[] args) throws Exception { >> 88: PassFailJFrame.builder() >> 89: .title("Tab movement Instructions") > > You may remove the title from all tests as it is redundant. Updated > test/jdk/javax/swing/JWindow/bug4251781.java line 2: > >> 1: /* >> 2: * Copyright (c) 2000, 2024, Oracle and/or its affiliates. All rights reserved. > > Suggestion: > > * Copyright (c) 2000, 2025, Oracle and/or its affiliates. All rights reserved. Updated. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/24639#discussion_r2049533039 PR Review Comment: https://git.openjdk.org/jdk/pull/24639#discussion_r2049534787 From abhiscxk at openjdk.org Thu Apr 17 19:39:46 2025 From: abhiscxk at openjdk.org (Abhishek Kumar) Date: Thu, 17 Apr 2025 19:39:46 GMT Subject: RFR: 8353655: Clean up and open source KeyEvent related tests (Part 1) [v3] In-Reply-To: References: Message-ID: On Thu, 17 Apr 2025 16:27:16 GMT, Alexander Zuev wrote: >> Clean up and open source three tests related to the KeyEvent mechanics. > > Alexander Zuev has updated the pull request incrementally with two additional commits since the last revision: > > - Update test/jdk/java/awt/event/KeyEvent/HomeEndKeyTest.java > > Co-authored-by: Andrey Turbanov > - Add i18n key Marked as reviewed by abhiscxk (Reviewer). @azuev-java This PR is not integrated but the JBS issue is closed now. ------------- PR Review: https://git.openjdk.org/jdk/pull/24609#pullrequestreview-2776733575 PR Comment: https://git.openjdk.org/jdk/pull/24609#issuecomment-2813855811 From abhiscxk at openjdk.org Thu Apr 17 19:44:00 2025 From: abhiscxk at openjdk.org (Abhishek Kumar) Date: Thu, 17 Apr 2025 19:44:00 GMT Subject: RFR: JDK-8353319 : Open source Swing tests - Set 3 [v4] In-Reply-To: References: Message-ID: <8Jh3KLANtKBiH2KocLIN0-xctvYeOLfwD539uQyDz1Q=.69759860-37cf-4c79-9317-1b1094217755@github.com> On Thu, 17 Apr 2025 19:37:25 GMT, Harshitha Onkar wrote: >> Following tests are updates as part of this PR: >> >> 1. javax/swing/JRootPane/bug4614623.java - manual >> 2. javax/swing/JTabbedPane/bug4613811.java - manual >> 3. javax/swing/JWindow/bug4251781.java - manual >> 4. javax/swing/JFrame/bug4419914.java - manual, updated existing test by adding JWindow, JDialog cases. > > Harshitha Onkar has updated the pull request incrementally with one additional commit since the last revision: > > review changes Marked as reviewed by abhiscxk (Reviewer). ------------- PR Review: https://git.openjdk.org/jdk/pull/24639#pullrequestreview-2776739170 From abhiscxk at openjdk.org Thu Apr 17 19:52:47 2025 From: abhiscxk at openjdk.org (Abhishek Kumar) Date: Thu, 17 Apr 2025 19:52:47 GMT Subject: RFR: 8351884: Refactor bug8033699.java test code In-Reply-To: References: Message-ID: On Wed, 2 Apr 2025 17:34:34 GMT, Rajat Mahajan wrote: > Details: > Refactored code as requested in the Bug description. > > Tested and verified the test passes. > #23964 (comment) Will take a look soon. ------------- PR Comment: https://git.openjdk.org/jdk/pull/24384#issuecomment-2813876135 From kizune at openjdk.org Thu Apr 17 19:57:01 2025 From: kizune at openjdk.org (Alexander Zuev) Date: Thu, 17 Apr 2025 19:57:01 GMT Subject: Integrated: 8353655: Clean up and open source KeyEvent related tests (Part 1) In-Reply-To: References: Message-ID: On Sun, 13 Apr 2025 03:29:37 GMT, Alexander Zuev wrote: > Clean up and open source three tests related to the KeyEvent mechanics. This pull request has now been integrated. Changeset: ad7c475f Author: Alexander Zuev URL: https://git.openjdk.org/jdk/commit/ad7c475fb1e23f583a33d58f0bd73ea0fb56740c Stats: 316 lines in 3 files changed: 316 ins; 0 del; 0 mod 8353655: Clean up and open source KeyEvent related tests (Part 1) Reviewed-by: abhiscxk ------------- PR: https://git.openjdk.org/jdk/pull/24609 From mickleness at gmail.com Thu Apr 17 20:37:44 2025 From: mickleness at gmail.com (Jeremy Wood) Date: Thu, 17 Apr 2025 20:37:44 +0000 Subject: Proposal: A new common Image API In-Reply-To: References: <484ae025-47dc-462e-b6bd-e4fce3252005@oracle.com> Message-ID: What is the scope / ideal feature set of this project? (Can you start outlining some of the main interfaces you?re envisioning? maybe in a google doc?) What exactly are you looking for in this email thread? Are you looking for resources (mostly people?) who can work on this project? Or are you looking to see if OpenJDK is willing/able to maintain this API? (or something else?) What is the difference between what you?re describing and the Apache Commons Imaging project itself? I assume this project is strictly related to reading & writing images. So it will NOT support anything analogous to: 1. Graphics2D 2. AffineTransform 3. PerspectiveTransform 4. Fonts 5. MultiResolutionImage - Jeremy obligatory xkcd reference: https://www.explainxkcd.com/wiki/index.php/927:_Standards ------ Original Message ------ >From "Scott Palmer" To "Philip Race" Cc "Glavo" ; "openjfx-dev" ; client-libs-dev at openjdk.org Date 4/17/2025 12:57:17?PM Subject Re: Proposal: A new common Image API >I think a common image I/O library that is not tied to a UI framework >makes sense and is long overdue. >Raster images do have a common format that encapsulates everything. We >essentially have this abstracted in the two UI frameworks already. At >some level it comes down to PixelFormats and data buffers. There are >not so many of them that it is impossible to make a common abstraction >for the purposes of I/O that can be mapped to what is needed by the UI >framework. >Just as JavaFX already has the SwingFxUtils for converting between AWT >and JavaFX formats, there can be a utility to convert between the I/O >library format and each UI framework's format. I would expect in most >cases that the raw pixel data could be shared without extra copying. >ImageIO is a good starting point. Remove the actual UI classes from it >like BufferedImage and keep plain raster representations of the data >that can be wrapped by the UI classes. Under the hood the arrays or >buffers of raster data don't have to change,they are the important >parts that the I/O library needs to deal with. Mapping the metadata >(width, height, colour space, pixel format, etc.) will usually be very >cheap. Some cases may need to run a conversion, like the example of >1-bpp black/white needing to be remapped to RGB, but that that can >happen in the utility layer that moves the image from the Image I/O >domain to the UI framework domain on a case-by-case basis. Worst case >is that the UI framework throws an UnsupportImageFormat exception when >it doesn't have code to deal with raster data in a particular format. > >I'm sure it is all much harder than I suspect, but I don't think it >should be. :-) > >Scott > > >On Thu, Apr 17, 2025 at 12:10?AM Philip Race >wrote: >>First, note than John Neffenger replied to this but only on >>openjfx-dev >>and the first thing I saw was the reply and couldn't see the original. >>After some consternation I tracked down this cross-post. >> >>Here's a link to the reply >>https://mail.openjdk.org/pipermail/openjfx-dev/2025-April/053616.html >> >>A fundamental problem is that all the users need to be able to produce >>and consume the data. >>So there either needs to be a module dependency (not viable) or an >>agreed format (are we >>really going to define an image format which encapsulates everything, >>including the multi-frame >>GIF support) and then everyone needs a reader and don't forget writers >>and they need to be able to do .. so much .. >> >>I just don't see a viable path here. >>And several (8 ?) years ago, I pondered some way to separate image >>handling from the >>desktop module to see if a server app could use it without pulling in >>AWT but the intra-package >>dependencies made it impossible without changes I didn't even figure >>out >>if they were possible. >> >>-phil. >> >>On 4/16/25 3:04 AM, Glavo wrote: >> > Currently, there are multiple different image APIs in the Java >> > ecosystem: AWT, JavaFX, Android, etc. >> > What's worse, the Android platform does not provide support for AWT, >> > making the Java ecosystem even more fragmented. >> > >> > There are some obvious problems with the current situation: >> > >> > * Third-party libraries that need an image API are difficult to be >> > universal. >> > A practical example: Apache Commons Imaging has been in the alpha >> > stage and cannot release version 1.0. >> > The main reason is that it depends on `java.awt.image`, so it >> > doesn't work on Android. >> > We hope to solve this problem before the official release. >> > * Different image APIs have to repeatedly implement support for >> > reading the same image format (such as JPEG). >> > In fact, AWT, JavaFX, and Android now each implement reading JPEG >> > images. >> > This is a waste. >> > >> > I thought we might be able to create a new module independent of >> > java.desktop that provides a common abstraction for images. >> > It should: >> > >> > * Provides common Image and ImageProvider interfaces that can be >> > implemented by different providers. >> > * Provides a unified abstraction for colors, color spaces, pixel >> > formats, etc. >> > * Provides general and extensible image I/O support. >> > Read/write support should only need to be implemented once per >>image >> > format. >> > It should be bidirectionally compatible with `javax.imageio`: >> > The implementation of either API can be accessed through the other >>API. >> > >> > I want to know if this is an idea worth putting into practice? >> > I'm not an expert in this field, so I'm worried about creating >>designs >> > with many flaws. >> > Therefore, I haven't attempted to implement it yet. >> > If anyone is willing to implement it, I'd like to help. >> > >> > I had sent an email a few days ago but no one responded, so I >> > re-edited it and sent this one. >> > >> > Glavo >> > >> -------------- next part -------------- An HTML attachment was scrubbed... URL: From honkar at openjdk.org Thu Apr 17 21:20:41 2025 From: honkar at openjdk.org (Harshitha Onkar) Date: Thu, 17 Apr 2025 21:20:41 GMT Subject: RFR: JDK-8354532 : Open source JFileChooser Tests - Set 7 Message-ID: <8XQHXRzAJo-kjHCtN6FVqhKz-jgnlFA2T77NcozLqLg=.48d592ec-df58-47d6-a79e-347f4cce131f@github.com> Following tests are open sourced - 1. javax/swing/JFileChooser/bug4357012.java 2. javax/swing/JFileChooser/bug4926884.java 3. javax/swing/JFileChooser/bug5045464.java 4. javax/swing/JFileChooser/bug6515169.java ------------- Commit messages: - test update - JFileChooser Tests Changes: https://git.openjdk.org/jdk/pull/24743/files Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=24743&range=00 Issue: https://bugs.openjdk.org/browse/JDK-8354532 Stats: 387 lines in 4 files changed: 387 ins; 0 del; 0 mod Patch: https://git.openjdk.org/jdk/pull/24743.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/24743/head:pull/24743 PR: https://git.openjdk.org/jdk/pull/24743 From prr at openjdk.org Thu Apr 17 21:47:56 2025 From: prr at openjdk.org (Phil Race) Date: Thu, 17 Apr 2025 21:47:56 GMT Subject: RFR: 8355002: Clean up some mentions of "applet" in tests Message-ID: This PR cleans up obsolete references to "applet" meaning - the word applet in a comment where its not relevant (any more) - extraneous imports of the applet package or an applet class - obsolete methods which check for applet - an exception handling case that isn't needed. After this applet/Applet still appears in tests that test the Applet API but that's expected. There's also a few tests that mention applets but aren't applet-specific and require more time than this quick clean up of most mentions. ------------- Commit messages: - 8355002 - 8355002 Changes: https://git.openjdk.org/jdk/pull/24744/files Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=24744&range=00 Issue: https://bugs.openjdk.org/browse/JDK-8355002 Stats: 346 lines in 42 files changed: 0 ins; 318 del; 28 mod Patch: https://git.openjdk.org/jdk/pull/24744.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/24744/head:pull/24744 PR: https://git.openjdk.org/jdk/pull/24744 From prr at openjdk.org Thu Apr 17 21:47:57 2025 From: prr at openjdk.org (Phil Race) Date: Thu, 17 Apr 2025 21:47:57 GMT Subject: RFR: 8355002: Clean up some mentions of "applet" in tests In-Reply-To: References: Message-ID: On Thu, 17 Apr 2025 21:40:34 GMT, Phil Race wrote: > This PR cleans up obsolete references to "applet" meaning > - the word applet in a comment where its not relevant (any more) > - extraneous imports of the applet package or an applet class > - obsolete methods which check for applet > - an exception handling case that isn't needed. > > After this applet/Applet still appears in tests that test the Applet API but that's expected. > > There's also a few tests that mention applets but aren't applet-specific and require more time than this quick clean up of most mentions. test/jdk/javax/swing/JTextArea/4697612/bug4697612.java line 227: > 225: try { > 226: InputStream is = > 227: bug4697612.class.getResourceAsStream("bug4697612.java"); the .txt file as well as mentioning applets really wasn't appropriate to be in the Open JDK. I've replaced it with the src of the test - all it needs is a file to scroll and this is very similar in size. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/24744#discussion_r2049689348 From prr at openjdk.org Thu Apr 17 22:19:42 2025 From: prr at openjdk.org (Phil Race) Date: Thu, 17 Apr 2025 22:19:42 GMT Subject: RFR: 8352638: Enhance code consistency: java.desktop/windows In-Reply-To: <5qm_Hyp98_iQNlGpxru_EapE3rVlCfTTqVTWyF4zlzI=.450e15f8-7a75-44c2-8916-abd44426566d@github.com> References: <5qm_Hyp98_iQNlGpxru_EapE3rVlCfTTqVTWyF4zlzI=.450e15f8-7a75-44c2-8916-abd44426566d@github.com> Message-ID: On Sat, 22 Mar 2025 00:49:25 GMT, Sergey Bylokhov wrote: > The `java.desktop` module currently lacks proper use of the `@Override` annotation for methods and the `final` modifier for classes. While similar changes were previously made in the [JavaSound](https://github.com/openjdk/jdk/commit/e0c7d59246cf36644d494eced76e4b9d96ff1ded#diff-ae3e5f9c40fe25ef03e7a89844de174ef5c15e6179d769e2a4bcb7e73688c9b5) (and some of the classes on demand), these changes are not as critical now due to the new jdk "encapsulation", but they are still useful for improving code consistency. > > To make the code review process easier I have made the following changes: > > 1. I chose `java.desktop/windows` as the starting package because it contains a relatively small number of classes > 2. The public API was not affected so there is no need to worry about a CSR > 3. In a few places I removed the `final` modifier from methods since they were already defined in final classes > > Note: I will submit additional patches in this area later because: > > 1. Only lines with `@Override` and `final` were modified to keep the diff clear - header dates were not updated (that could be covered by one patch similar to [this](https://bugs.openjdk.org/browse/JDK-8345797)) > 2. I skipped adding `@Override` for anonymous classes > > Any feedback or suggestions are welcome! > > Here is a [link](https://patch-diff.githubusercontent.com/raw/openjdk/jdk/pull/24170.diff) to a simple diff file, it might be more convenient for reviewing the changes. > > To download the diff file and filter only the modified lines you can use the following script: > > > curl -s https://patch-diff.githubusercontent.com/raw/openjdk/jdk/pull/24170.diff -o d.txt && grep -E '^+|^-' d.txt > > > The build was successful, and I ran all the open jtreg tests without issues. But it's possible that some closed tests may be affected by these changes. It would be good to verify this by mach5 to ensure everything works as expected. I don't remember if I ever kicked off that test job :-( Doing it now. ------------- PR Comment: https://git.openjdk.org/jdk/pull/24170#issuecomment-2814121554 From achung at openjdk.org Fri Apr 18 01:42:55 2025 From: achung at openjdk.org (Alisen Chung) Date: Fri, 18 Apr 2025 01:42:55 GMT Subject: RFR: JDK-8354340 : Open source Swing Tests - Set 6 [v2] In-Reply-To: <1Syw2cSgOGu6f7c16RtqseXcMtyEIbe4WDH3-Z8Yxbg=.29867e2a-728d-42e6-b040-f526be6af5fc@github.com> References: <1Syw2cSgOGu6f7c16RtqseXcMtyEIbe4WDH3-Z8Yxbg=.29867e2a-728d-42e6-b040-f526be6af5fc@github.com> Message-ID: On Wed, 16 Apr 2025 20:20:24 GMT, Harshitha Onkar wrote: >> Following tests are open-sourced in this PR: >> >> - javax/swing/JViewport/ScrollRectToVisibleTest3.java - automated >> - javax/swing/JViewport/SetViewRepaint.java - manual > > Harshitha Onkar has updated the pull request incrementally with one additional commit since the last revision: > > extra newline Marked as reviewed by achung (Committer). ------------- PR Review: https://git.openjdk.org/jdk/pull/24697#pullrequestreview-2777258081 From serb at openjdk.org Fri Apr 18 02:25:42 2025 From: serb at openjdk.org (Sergey Bylokhov) Date: Fri, 18 Apr 2025 02:25:42 GMT Subject: RFR: 8355002: Clean up some mentions of "applet" in tests In-Reply-To: References: Message-ID: On Thu, 17 Apr 2025 21:40:34 GMT, Phil Race wrote: > This PR cleans up obsolete references to "applet" meaning > - the word applet in a comment where its not relevant (any more) > - extraneous imports of the applet package or an applet class > - obsolete methods which check for applet > - an exception handling case that isn't needed. > > After this applet/Applet still appears in tests that test the Applet API but that's expected. > > There's also a few tests that mention applets but aren't applet-specific and require more time than this quick clean up of most mentions. Marked as reviewed by serb (Reviewer). ------------- PR Review: https://git.openjdk.org/jdk/pull/24744#pullrequestreview-2777369247 From serb at openjdk.org Fri Apr 18 02:27:40 2025 From: serb at openjdk.org (Sergey Bylokhov) Date: Fri, 18 Apr 2025 02:27:40 GMT Subject: RFR: 8354465: Open some JTable bugs 8 In-Reply-To: References: Message-ID: On Thu, 17 Apr 2025 19:18:00 GMT, Alisen Chung wrote: > Updating and opening some JTable bugs Marked as reviewed by serb (Reviewer). ------------- PR Review: https://git.openjdk.org/jdk/pull/24741#pullrequestreview-2777370446 From serb at openjdk.org Fri Apr 18 02:27:45 2025 From: serb at openjdk.org (Sergey Bylokhov) Date: Fri, 18 Apr 2025 02:27:45 GMT Subject: RFR: 8354341: Open some JTable bugs 7 In-Reply-To: <-A3k5m01IIlys1qXXQIqzcxRaGuGnVK2KMZ33Et4vmM=.c53f6d63-6829-41d9-852c-e436344348eb@github.com> References: <-A3k5m01IIlys1qXXQIqzcxRaGuGnVK2KMZ33Et4vmM=.c53f6d63-6829-41d9-852c-e436344348eb@github.com> Message-ID: On Thu, 17 Apr 2025 19:11:06 GMT, Alisen Chung wrote: > Updating and opening some JTable bugs Marked as reviewed by serb (Reviewer). ------------- PR Review: https://git.openjdk.org/jdk/pull/24739#pullrequestreview-2777370703 From serb at openjdk.org Fri Apr 18 02:29:43 2025 From: serb at openjdk.org (Sergey Bylokhov) Date: Fri, 18 Apr 2025 02:29:43 GMT Subject: RFR: 8353552: Opensource Several Font related tests - Batch 3 [v2] In-Reply-To: References: Message-ID: On Thu, 17 Apr 2025 19:18:18 GMT, Abhishek Kumar wrote: >> Few more font related tests are converted from applet and open-sourced. >> >> TestGlyphVectorLayout.java doesn't behave as per the instruction and hence problem-listed under [JDK-8354987](https://bugs.openjdk.org/browse/JDK-8354987). > > Abhishek Kumar has updated the pull request incrementally with one additional commit since the last revision: > > Problem list test moved to manual test category Marked as reviewed by serb (Reviewer). ------------- PR Review: https://git.openjdk.org/jdk/pull/24736#pullrequestreview-2777371722 From serb at openjdk.org Fri Apr 18 02:30:43 2025 From: serb at openjdk.org (Sergey Bylokhov) Date: Fri, 18 Apr 2025 02:30:43 GMT Subject: RFR: 8354233: Open some JTable bugs 6 In-Reply-To: References: Message-ID: On Thu, 17 Apr 2025 18:44:23 GMT, Alisen Chung wrote: > Updating and opening some JTable bugs test/jdk/javax/swing/JTable/bug4129401.java line 42: > 40: public class bug4129401 { > 41: private static final String INSTRUCTIONS = """ > 42: 1. Move the mouse cursor to the cell "CELL 2 1", which contains JComboBox please split long lines here and there to 80 chars per line ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/24735#discussion_r2049919338 From serb at openjdk.org Fri Apr 18 02:31:41 2025 From: serb at openjdk.org (Sergey Bylokhov) Date: Fri, 18 Apr 2025 02:31:41 GMT Subject: RFR: 8354095: Open some JTable bugs 5 [v2] In-Reply-To: <8re482YFiViosBuOmOFZohelCbe8lKoThY1Fyhv4-q4=.6a9d06ad-237e-4611-9ccf-95d88e57b2d4@github.com> References: <4t0GC0P2HhS-hgc6dNndlsbTxaliBcWUqSypiPPb7cw=.ea094f23-779a-45f5-a4ab-85c6e76841a6@github.com> <8re482YFiViosBuOmOFZohelCbe8lKoThY1Fyhv4-q4=.6a9d06ad-237e-4611-9ccf-95d88e57b2d4@github.com> Message-ID: On Thu, 17 Apr 2025 18:40:09 GMT, Alisen Chung wrote: >> Updating and opening some JTable bugs > > Alisen Chung has updated the pull request incrementally with one additional commit since the last revision: > > update jtreg paths test/jdk/javax/swing/JTable/InternationalCharacters.java line 48: > 46: * @library /java/awt/regtesthelpers > 47: * @build PassFailJFrame > 48: * @run main InternationalCharacters Should we mark it as manual? test/jdk/javax/swing/JTable/NullTableHeader.java line 37: > 35: > 36: public class NullTableHeader { > 37: static JTable tableView; The field is not needed ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/24734#discussion_r2049919807 PR Review Comment: https://git.openjdk.org/jdk/pull/24734#discussion_r2049920024 From serb at openjdk.org Fri Apr 18 02:33:48 2025 From: serb at openjdk.org (Sergey Bylokhov) Date: Fri, 18 Apr 2025 02:33:48 GMT Subject: RFR: 8353685: Open some JComboBox bugs 4 In-Reply-To: References: Message-ID: On Thu, 17 Apr 2025 17:56:45 GMT, Alisen Chung wrote: > Updating and opening some JComboBox bugs test/jdk/javax/swing/JComboBox/bug4459267.java line 47: > 45: Robot robot = new Robot(); > 46: robot.waitForIdle(); > 47: robot.delay(250); why it is necessary to wait at the start of the test? test/jdk/javax/swing/JComboBox/bug4459267.java line 58: > 56: robot.delay(250); > 57: } finally { > 58: if (frame != null) { the frame is initialized in another thread. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/24733#discussion_r2049920490 PR Review Comment: https://git.openjdk.org/jdk/pull/24733#discussion_r2049920753 From serb at openjdk.org Fri Apr 18 02:33:48 2025 From: serb at openjdk.org (Sergey Bylokhov) Date: Fri, 18 Apr 2025 02:33:48 GMT Subject: RFR: 8353685: Open some JComboBox bugs 4 In-Reply-To: References: Message-ID: On Fri, 18 Apr 2025 02:30:34 GMT, Sergey Bylokhov wrote: >> Updating and opening some JComboBox bugs > > test/jdk/javax/swing/JComboBox/bug4459267.java line 58: > >> 56: robot.delay(250); >> 57: } finally { >> 58: if (frame != null) { > > the frame is initialized in another thread. similar issue exists in other tests ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/24733#discussion_r2049921232 From serb at openjdk.org Fri Apr 18 02:50:50 2025 From: serb at openjdk.org (Sergey Bylokhov) Date: Fri, 18 Apr 2025 02:50:50 GMT Subject: RFR: 8353293: Open source several swing tests batch4 In-Reply-To: References: Message-ID: On Thu, 17 Apr 2025 16:35:37 GMT, Damon Nguyen wrote: > Open-sourcing and standardizing several tests (basic) Marked as reviewed by serb (Reviewer). ------------- PR Review: https://git.openjdk.org/jdk/pull/24729#pullrequestreview-2777391751 From prr at openjdk.org Fri Apr 18 04:46:45 2025 From: prr at openjdk.org (Phil Race) Date: Fri, 18 Apr 2025 04:46:45 GMT Subject: RFR: 8352638: Enhance code consistency: java.desktop/windows In-Reply-To: <5qm_Hyp98_iQNlGpxru_EapE3rVlCfTTqVTWyF4zlzI=.450e15f8-7a75-44c2-8916-abd44426566d@github.com> References: <5qm_Hyp98_iQNlGpxru_EapE3rVlCfTTqVTWyF4zlzI=.450e15f8-7a75-44c2-8916-abd44426566d@github.com> Message-ID: On Sat, 22 Mar 2025 00:49:25 GMT, Sergey Bylokhov wrote: > The `java.desktop` module currently lacks proper use of the `@Override` annotation for methods and the `final` modifier for classes. While similar changes were previously made in the [JavaSound](https://github.com/openjdk/jdk/commit/e0c7d59246cf36644d494eced76e4b9d96ff1ded#diff-ae3e5f9c40fe25ef03e7a89844de174ef5c15e6179d769e2a4bcb7e73688c9b5) (and some of the classes on demand), these changes are not as critical now due to the new jdk "encapsulation", but they are still useful for improving code consistency. > > To make the code review process easier I have made the following changes: > > 1. I chose `java.desktop/windows` as the starting package because it contains a relatively small number of classes > 2. The public API was not affected so there is no need to worry about a CSR > 3. In a few places I removed the `final` modifier from methods since they were already defined in final classes > > Note: I will submit additional patches in this area later because: > > 1. Only lines with `@Override` and `final` were modified to keep the diff clear - header dates were not updated (that could be covered by one patch similar to [this](https://bugs.openjdk.org/browse/JDK-8345797)) > 2. I skipped adding `@Override` for anonymous classes > > Any feedback or suggestions are welcome! > > Here is a [link](https://patch-diff.githubusercontent.com/raw/openjdk/jdk/pull/24170.diff) to a simple diff file, it might be more convenient for reviewing the changes. > > To download the diff file and filter only the modified lines you can use the following script: > > > curl -s https://patch-diff.githubusercontent.com/raw/openjdk/jdk/pull/24170.diff -o d.txt && grep -E '^+|^-' d.txt > > > The build was successful, and I ran all the open jtreg tests without issues. But it's possible that some closed tests may be affected by these changes. It would be good to verify this by mach5 to ensure everything works as expected. Marked as reviewed by prr (Reviewer). ------------- PR Review: https://git.openjdk.org/jdk/pull/24170#pullrequestreview-2777537614 From psadhukhan at openjdk.org Fri Apr 18 05:07:54 2025 From: psadhukhan at openjdk.org (Prasanta Sadhukhan) Date: Fri, 18 Apr 2025 05:07:54 GMT Subject: RFR: 8353748: Open source several swing tests batch6 [v2] In-Reply-To: References: Message-ID: On Thu, 17 Apr 2025 17:43:03 GMT, Damon Nguyen wrote: >> Open-sourcing and standardizing several swing tests (JTree) > > Damon Nguyen has updated the pull request incrementally with one additional commit since the last revision: > > Add headful tags test/jdk/javax/swing/JTree/NodeChangedTest.java line 29: > 27: * @summary Tests that node changed for the root of the tree update the > 28: * structure. > 29: * @key headful Does it need to be headful? I see nothing is displayed so I asked you to check in CI if it fails without headful tag..is it failing if we dont have headful? test/jdk/javax/swing/JTree/bug4118860.java line 87: > 85: tr.setToggleClickCount(2); > 86: if (tr.getToggleClickCount() != 2) { > 87: throw new Error("ToggleClickCount doesn't set..."); change all Error to RE test/jdk/javax/swing/JTree/bug4169215.java line 28: > 26: * @bug 4169215 > 27: * @summary Accessibility hierarchy JTree node test. > 28: * @key headful same here..nothing is displayed..so do we need headful tag? ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/24730#discussion_r2050034862 PR Review Comment: https://git.openjdk.org/jdk/pull/24730#discussion_r2050035867 PR Review Comment: https://git.openjdk.org/jdk/pull/24730#discussion_r2050037484 From abhiscxk at openjdk.org Fri Apr 18 05:55:45 2025 From: abhiscxk at openjdk.org (Abhishek Kumar) Date: Fri, 18 Apr 2025 05:55:45 GMT Subject: RFR: 8354900: javax/swing/AbstractButton/bug4133768.java failing on macosx-aarch64 In-Reply-To: References: Message-ID: On Thu, 17 Apr 2025 05:59:03 GMT, Jayathirth D V wrote: > javax/swing/AbstractButton/bug4133768.java was automated and open-sourced recently and it fails intermittently in CI. > > Looks like when we have mouse pointer at same location from where we are picking UI color from robot, it picks wrong color. > > Updated test to have mouse pointer to be at different place from where we are picking roll-over color of buttons. > Also made other changes to make test more robust. With all these changes test now passes all the time in CI. test/jdk/javax/swing/AbstractButton/bug4133768.java line 1: > 1: /* Test is failing consistently on my mac machine with this exception "Button roll over color is : java.awt.Color[r=3,g=255,b=0] but it should be : java.awt.Color[r=0,g=255,b=0]" ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/24712#discussion_r2050091492 From jdv at openjdk.org Fri Apr 18 06:38:45 2025 From: jdv at openjdk.org (Jayathirth D V) Date: Fri, 18 Apr 2025 06:38:45 GMT Subject: RFR: 8354900: javax/swing/AbstractButton/bug4133768.java failing on macosx-aarch64 In-Reply-To: References: Message-ID: <8xIPgnx-saRTehMwHYCrorgaXM8fyiDGijKb9mfI8Wg=.8fa64957-bed5-46f7-97aa-ab06abc4fce2@github.com> On Fri, 18 Apr 2025 05:53:01 GMT, Abhishek Kumar wrote: >> javax/swing/AbstractButton/bug4133768.java was automated and open-sourced recently and it fails intermittently in CI. >> >> Looks like when we have mouse pointer at same location from where we are picking UI color from robot, it picks wrong color. >> >> Updated test to have mouse pointer to be at different place from where we are picking roll-over color of buttons. >> Also made other changes to make test more robust. With all these changes test now passes all the time in CI. > > test/jdk/javax/swing/AbstractButton/bug4133768.java line 1: > >> 1: /* > > Test is failing consistently on my mac machine with this exception "Button roll over color is : java.awt.Color[r=3,g=255,b=0] but it should be : java.awt.Color[r=0,g=255,b=0]" You had any background window while running this test? Also make sure if you have proper color profile for display. It runs properly in my machine and our CI with 50 test runs on all platforms. I can add tolerance, but since it is running without issues on CI i have not done the same. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/24712#discussion_r2050136121 From eirbjo at openjdk.org Fri Apr 18 06:38:47 2025 From: eirbjo at openjdk.org (Eirik =?UTF-8?B?QmrDuHJzbsO4cw==?=) Date: Fri, 18 Apr 2025 06:38:47 GMT Subject: RFR: 8354273: Restore even more pointless unicode characters to ASCII [v2] In-Reply-To: References: Message-ID: On Thu, 10 Apr 2025 10:36:31 GMT, Magnus Ihse Bursie wrote: >> As a follow-up to [JDK-8354213](https://bugs.openjdk.org/browse/JDK-8354213), I found some additional places where unicode characters are unnecessarily used instead of pure ASCII. > > Magnus Ihse Bursie has updated the pull request incrementally with one additional commit since the last revision: > > Remove incorrectly copied "?anchor" While the changes here look okay, I think the issue/PR title could be improved. The replacement of Unicode "En Dash" with ASCII hypen-minus and the similar relacement of the Unicode "Horizontal Ellipsis" with three ASCII periods are not really "restoring" much, and these unicode characters are hardly "pointless" as they may carry different semantic meaning, behavior and rendering. It's a valid chioce to normalize them into ASCII though, but perhaps a title like "Normalize even more Unicode characters as ASCII" would be more "fair" to these poor Unicode characters :-) ------------- PR Comment: https://git.openjdk.org/jdk/pull/24567#issuecomment-2814667275 From jdv at openjdk.org Fri Apr 18 07:12:50 2025 From: jdv at openjdk.org (Jayathirth D V) Date: Fri, 18 Apr 2025 07:12:50 GMT Subject: RFR: 8353661: Open source several swing tests batch5 In-Reply-To: References: Message-ID: On Tue, 15 Apr 2025 22:37:05 GMT, Damon Nguyen wrote: > Open-sourcing and standardizing several tests (windows & JSlider) Marked as reviewed by jdv (Reviewer). ------------- PR Review: https://git.openjdk.org/jdk/pull/24671#pullrequestreview-2777857023 From abhiscxk at openjdk.org Fri Apr 18 07:30:53 2025 From: abhiscxk at openjdk.org (Abhishek Kumar) Date: Fri, 18 Apr 2025 07:30:53 GMT Subject: RFR: 8354900: javax/swing/AbstractButton/bug4133768.java failing on macosx-aarch64 In-Reply-To: <8xIPgnx-saRTehMwHYCrorgaXM8fyiDGijKb9mfI8Wg=.8fa64957-bed5-46f7-97aa-ab06abc4fce2@github.com> References: <8xIPgnx-saRTehMwHYCrorgaXM8fyiDGijKb9mfI8Wg=.8fa64957-bed5-46f7-97aa-ab06abc4fce2@github.com> Message-ID: On Fri, 18 Apr 2025 06:33:49 GMT, Jayathirth D V wrote: >> test/jdk/javax/swing/AbstractButton/bug4133768.java line 1: >> >>> 1: /* >> >> Test is failing consistently on my mac machine with this exception "Button roll over color is : java.awt.Color[r=3,g=255,b=0] but it should be : java.awt.Color[r=0,g=255,b=0]" > > You had any background window while running this test? > Also make sure if you have proper color profile for display. > It runs properly in my machine and our CI with 50 test runs on all platforms. > > I can add tolerance, but since it is running without issues on CI i have not done the same. There is a macOS update window in background. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/24712#discussion_r2050248096 From tr at openjdk.org Fri Apr 18 07:37:38 2025 From: tr at openjdk.org (Tejesh R) Date: Fri, 18 Apr 2025 07:37:38 GMT Subject: RFR: 8343977: Convert java/awt/TextArea/TextAreaCursorTest/HoveringAndDraggingTest to main [v6] In-Reply-To: References: Message-ID: > 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 automatically resolve the issue. Tejesh R has updated the pull request incrementally with one additional commit since the last revision: Removed PassFailJFrame and created custom instruction frame ------------- Changes: - all: https://git.openjdk.org/jdk/pull/22026/files - new: https://git.openjdk.org/jdk/pull/22026/files/d2d8c649..113c4a4a Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=22026&range=05 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=22026&range=04-05 Stats: 99 lines in 1 file changed: 64 ins; 13 del; 22 mod Patch: https://git.openjdk.org/jdk/pull/22026.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/22026/head:pull/22026 PR: https://git.openjdk.org/jdk/pull/22026 From tr at openjdk.org Fri Apr 18 07:50:06 2025 From: tr at openjdk.org (Tejesh R) Date: Fri, 18 Apr 2025 07:50:06 GMT Subject: RFR: 8354248: Open source several AWT GridBagLayout and List tests Message-ID: Open source these AWT GridBagLayout and List tests: java/awt/GridBagLayout/ComponentShortage/ComponentShortage.java java/awt/List/ListScrollbarCursorTest/ListScrollbarCursorTest.java java/awt/List/ListScrollbarTest/ListScrollbarTest.java ------------- Commit messages: - Open source Changes: https://git.openjdk.org/jdk/pull/24749/files Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=24749&range=00 Issue: https://bugs.openjdk.org/browse/JDK-8354248 Stats: 363 lines in 4 files changed: 363 ins; 0 del; 0 mod Patch: https://git.openjdk.org/jdk/pull/24749.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/24749/head:pull/24749 PR: https://git.openjdk.org/jdk/pull/24749 From dgredler at openjdk.org Fri Apr 18 07:51:44 2025 From: dgredler at openjdk.org (Daniel Gredler) Date: Fri, 18 Apr 2025 07:51:44 GMT Subject: RFR: 8353552: Opensource Several Font related tests - Batch 3 [v2] In-Reply-To: References: Message-ID: On Thu, 17 Apr 2025 19:18:18 GMT, Abhishek Kumar wrote: >> Few more font related tests are converted from applet and open-sourced. >> >> TestGlyphVectorLayout.java doesn't behave as per the instruction and hence problem-listed under [JDK-8354987](https://bugs.openjdk.org/browse/JDK-8354987). > > Abhishek Kumar has updated the pull request incrementally with one additional commit since the last revision: > > Problem list test moved to manual test category Is it possible to automate `TestGlyphVectorLayout` using something like [findTextBoundingBox](https://github.com/gredler/jdk/blob/c10a60bd86e383782e4809602a2a7c44d58b5d53/test/jdk/java/awt/font/FontScaling/RotatedScaledFontTest.java#L100)? Many of the issues that I have fixed recently were covered by manual tests which weren't being checked... ------------- PR Comment: https://git.openjdk.org/jdk/pull/24736#issuecomment-2814850093 From jdv at openjdk.org Fri Apr 18 07:57:39 2025 From: jdv at openjdk.org (Jayathirth D V) Date: Fri, 18 Apr 2025 07:57:39 GMT Subject: RFR: 8354900: javax/swing/AbstractButton/bug4133768.java failing on macosx-aarch64 In-Reply-To: References: <8xIPgnx-saRTehMwHYCrorgaXM8fyiDGijKb9mfI8Wg=.8fa64957-bed5-46f7-97aa-ab06abc4fce2@github.com> Message-ID: On Fri, 18 Apr 2025 07:27:57 GMT, Abhishek Kumar wrote: >> You had any background window while running this test? >> Also make sure if you have proper color profile for display. >> It runs properly in my machine and our CI with 50 test runs on all platforms. >> >> I can add tolerance, but since it is running without issues on CI i have not done the same. > > There is a macOS update window in background. I don't understand. If there are no other UI components while running this test, does it pass? I think if it is passing consistently in CI we should not worry about what happens in local system. Because some of system settings might not be ideal to run UI tests properly. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/24712#discussion_r2050298480 From abhiscxk at openjdk.org Fri Apr 18 08:08:46 2025 From: abhiscxk at openjdk.org (Abhishek Kumar) Date: Fri, 18 Apr 2025 08:08:46 GMT Subject: RFR: 8353446: Open source several AWT Menu tests - Batch 2 In-Reply-To: References: Message-ID: On Wed, 16 Apr 2025 10:28:26 GMT, Tejesh R wrote: > Open source these AWT Menu tests: > > java/awt/Menu/OnFlyRepaintMenuTest/OnFlyRepaintMenuTest.java > java/awt/Menu/DestroyMenuTest/DestroyMenuTest.java > java/awt/Menu/MenuAddRemoveCrash/MenuAddRemoveCrash.java > java/awt/Menu/MenuZOrderTest/MenuZOrderTest.java test/jdk/java/awt/Menu/DestroyMenuTest/DestroyMenuTest.java line 47: > 45: public static void main(String[] args) throws Exception { > 46: String INSTRUCTIONS = """ > 47: 1. Create many windows by randomly clicking 'Show Menu Test 1, Suggestion: 1. Create many windows by randomly clicking 'Show Menu Test 1', test/jdk/java/awt/Menu/DestroyMenuTest/DestroyMenuTest.java line 57: > 55: """; > 56: PassFailJFrame.builder() > 57: .title("Test Instructions") Setting title is redundant. You can remove in all the tests test/jdk/java/awt/Menu/DestroyMenuTest/DestroyMenuTest.java line 133: > 131: > 132: static class mySimpleCanvas extends Canvas { > 133: public void paint(Graphics g) { Please add @Override for overridden methods test/jdk/java/awt/Menu/DestroyMenuTest/MenuTest.java line 153: > 151: > 152: class MyRectCanvas extends Canvas { > 153: public void paint(Graphics g) { Add @Override test/jdk/java/awt/Menu/DestroyMenuTest/MenuTest.java line 165: > 163: > 164: class MycircleCanvas extends Canvas { > 165: public void paint(Graphics g) { same here test/jdk/java/awt/Menu/MenuAddRemoveCrash.java line 63: > 61: } > 62: } > 63: }; Can it be move to EventQueue.invokeAndWait ? test/jdk/java/awt/Menu/MenuZOrderTest.java line 27: > 25: * @test > 26: * @bug 6267182 > 27: * @summary Menu is not visible after showing and disposing a file dialog, XToolkit XToolkit ? test/jdk/java/awt/Menu/MenuZOrderTest.java line 43: > 41: public class MenuZOrderTest { > 42: static class Listener implements ActionListener { > 43: public void actionPerformed(ActionEvent e) { Add Override test/jdk/java/awt/Menu/MenuZOrderTest.java line 54: > 52: 1. Choose Menu 1 --> Menu Item 1 several times. > 53: 2. If menu window is shown correctly and each click > 54: creates new frame - press PASS.", Suggestion: creates new frame - press PASS. test/jdk/java/awt/Menu/OnFlyRepaintMenuTest.java line 69: > 67: MenuItem menuItem; > 68: MenuItem submenuItem; > 69: CheckboxMenuItem checkMenuItem; Can be removed and declared where it is initializing ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/24681#discussion_r2050295047 PR Review Comment: https://git.openjdk.org/jdk/pull/24681#discussion_r2050295834 PR Review Comment: https://git.openjdk.org/jdk/pull/24681#discussion_r2050298386 PR Review Comment: https://git.openjdk.org/jdk/pull/24681#discussion_r2050300187 PR Review Comment: https://git.openjdk.org/jdk/pull/24681#discussion_r2050300430 PR Review Comment: https://git.openjdk.org/jdk/pull/24681#discussion_r2050303202 PR Review Comment: https://git.openjdk.org/jdk/pull/24681#discussion_r2050307568 PR Review Comment: https://git.openjdk.org/jdk/pull/24681#discussion_r2050307835 PR Review Comment: https://git.openjdk.org/jdk/pull/24681#discussion_r2050308706 PR Review Comment: https://git.openjdk.org/jdk/pull/24681#discussion_r2050310915 From abhiscxk at openjdk.org Fri Apr 18 08:14:40 2025 From: abhiscxk at openjdk.org (Abhishek Kumar) Date: Fri, 18 Apr 2025 08:14:40 GMT Subject: RFR: 8354900: javax/swing/AbstractButton/bug4133768.java failing on macosx-aarch64 In-Reply-To: References: <8xIPgnx-saRTehMwHYCrorgaXM8fyiDGijKb9mfI8Wg=.8fa64957-bed5-46f7-97aa-ab06abc4fce2@github.com> Message-ID: On Fri, 18 Apr 2025 07:54:50 GMT, Jayathirth D V wrote: >> There is a macOS update window in background. > > I don't understand. > If there are no other UI components while running this test, does it pass? > > I think if it is passing consistently in CI we should not worry about what happens in local system. Because some of system settings might not be ideal to run UI tests properly. Actually there is a macOS update window (to upgrade mac version) is there in background. I am unable to close this window. Yeah, if it is passing consistently in CI then it should be fine. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/24712#discussion_r2050317112 From abhiscxk at openjdk.org Fri Apr 18 08:19:44 2025 From: abhiscxk at openjdk.org (Abhishek Kumar) Date: Fri, 18 Apr 2025 08:19:44 GMT Subject: RFR: 8354900: javax/swing/AbstractButton/bug4133768.java failing on macosx-aarch64 In-Reply-To: References: Message-ID: On Thu, 17 Apr 2025 05:59:03 GMT, Jayathirth D V wrote: > javax/swing/AbstractButton/bug4133768.java was automated and open-sourced recently and it fails intermittently in CI. > > Looks like when we have mouse pointer at same location from where we are picking UI color from robot, it picks wrong color. > > Updated test to have mouse pointer to be at different place from where we are picking roll-over color of buttons. > Also made other changes to make test more robust. With all these changes test now passes all the time in CI. test/jdk/javax/swing/AbstractButton/bug4133768.java line 1: > 1: /* private static Icon RED, GREEN; Separate declaration ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/24712#discussion_r2050322753 From jdv at openjdk.org Fri Apr 18 09:14:58 2025 From: jdv at openjdk.org (Jayathirth D V) Date: Fri, 18 Apr 2025 09:14:58 GMT Subject: RFR: 8354900: javax/swing/AbstractButton/bug4133768.java failing on macosx-aarch64 [v2] In-Reply-To: References: Message-ID: <8jvYAy5z5aCg_39--J9y_RMRPM-QIz0sZUcJJEVaRbc=.af5f0119-b7a4-4f44-9c8e-2195f8c072c3@github.com> On Fri, 18 Apr 2025 08:17:10 GMT, Abhishek Kumar wrote: >> Jayathirth D V has updated the pull request incrementally with one additional commit since the last revision: >> >> Update > > test/jdk/javax/swing/AbstractButton/bug4133768.java line 1: > >> 1: /* > > private static Icon RED, GREEN; > > Separate declaration Updated. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/24712#discussion_r2050393928 From jdv at openjdk.org Fri Apr 18 09:14:58 2025 From: jdv at openjdk.org (Jayathirth D V) Date: Fri, 18 Apr 2025 09:14:58 GMT Subject: RFR: 8354900: javax/swing/AbstractButton/bug4133768.java failing on macosx-aarch64 [v2] In-Reply-To: References: Message-ID: > javax/swing/AbstractButton/bug4133768.java was automated and open-sourced recently and it fails intermittently in CI. > > Looks like when we have mouse pointer at same location from where we are picking UI color from robot, it picks wrong color. > > Updated test to have mouse pointer to be at different place from where we are picking roll-over color of buttons. > Also made other changes to make test more robust. With all these changes test now passes all the time in CI. Jayathirth D V has updated the pull request incrementally with one additional commit since the last revision: Update ------------- Changes: - all: https://git.openjdk.org/jdk/pull/24712/files - new: https://git.openjdk.org/jdk/pull/24712/files/e684d38e..d0e39ef8 Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=24712&range=01 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=24712&range=00-01 Stats: 4 lines in 1 file changed: 2 ins; 0 del; 2 mod Patch: https://git.openjdk.org/jdk/pull/24712.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/24712/head:pull/24712 PR: https://git.openjdk.org/jdk/pull/24712 From psadhukhan at openjdk.org Fri Apr 18 09:56:40 2025 From: psadhukhan at openjdk.org (Prasanta Sadhukhan) Date: Fri, 18 Apr 2025 09:56:40 GMT Subject: RFR: 8353957: Open source several AWT ScrollPane tests - Batch 1 In-Reply-To: References: Message-ID: On Thu, 17 Apr 2025 10:53:43 GMT, Tejesh R wrote: >> test/jdk/java/awt/ScrollPane/ScrollPanePaint.java line 32: >> >>> 30: * >>> 31: * US Government Users Restricted Rights - Use, duplication or disclosure >>> 32: * restricted by GSA ADP Schedule Contract with IBM Corp. >> >> is this license could be accepted by the OpenJDK? > > I hope so, I've seen some instances in other tests too. at the least, ScrollPantPaint.html needs to be changed to ScrollPanePaint.java after applet conversion ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/24684#discussion_r2050435680 From psadhukhan at openjdk.org Fri Apr 18 10:10:04 2025 From: psadhukhan at openjdk.org (Prasanta Sadhukhan) Date: Fri, 18 Apr 2025 10:10:04 GMT Subject: RFR: 8353957: Open source several AWT ScrollPane tests - Batch 1 In-Reply-To: References: Message-ID: On Wed, 16 Apr 2025 11:24:47 GMT, Tejesh R wrote: > Open source these AWT ScrollPane tests: > > java/awt/ScrollPane/ScrollPaneFlicker/ScrollPaneFlicker.java > java/awt/ScrollPane/ScrollbarsAsNeeded/ScrollbarsAsNeededTest.java > java/awt/ScrollPane/ScrollPanePaint/ScrollPanePaint.java > java/awt/ScrollPane/ScrollPositionTest/ScrollPositionTest.java test/jdk/java/awt/ScrollPane/ScrollPanePaint.java line 63: > 61: 2. The contents of the frame should alternate between > 62: a red panel and a scroll pane containing a green panel > 63: If this does not happen (specifically, if the scroll this line is missing from closed test `pane does not consistantly contain a green panel` ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/24684#discussion_r2050445436 From psadhukhan at openjdk.org Fri Apr 18 10:10:04 2025 From: psadhukhan at openjdk.org (Prasanta Sadhukhan) Date: Fri, 18 Apr 2025 10:10:04 GMT Subject: RFR: 8353957: Open source several AWT ScrollPane tests - Batch 1 In-Reply-To: References: Message-ID: On Fri, 18 Apr 2025 10:06:15 GMT, Prasanta Sadhukhan wrote: >> Open source these AWT ScrollPane tests: >> >> java/awt/ScrollPane/ScrollPaneFlicker/ScrollPaneFlicker.java >> java/awt/ScrollPane/ScrollbarsAsNeeded/ScrollbarsAsNeededTest.java >> java/awt/ScrollPane/ScrollPanePaint/ScrollPanePaint.java >> java/awt/ScrollPane/ScrollPositionTest/ScrollPositionTest.java > > test/jdk/java/awt/ScrollPane/ScrollPanePaint.java line 63: > >> 61: 2. The contents of the frame should alternate between >> 62: a red panel and a scroll pane containing a green panel >> 63: If this does not happen (specifically, if the scroll > > this line is missing from closed test > > `pane does not consistantly contain a green panel` rectify the spelling though.. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/24684#discussion_r2050446290 From psadhukhan at openjdk.org Fri Apr 18 10:19:43 2025 From: psadhukhan at openjdk.org (Prasanta Sadhukhan) Date: Fri, 18 Apr 2025 10:19:43 GMT Subject: RFR: 8353957: Open source several AWT ScrollPane tests - Batch 1 In-Reply-To: References: Message-ID: On Wed, 16 Apr 2025 11:24:47 GMT, Tejesh R wrote: > Open source these AWT ScrollPane tests: > > java/awt/ScrollPane/ScrollPaneFlicker/ScrollPaneFlicker.java > java/awt/ScrollPane/ScrollbarsAsNeeded/ScrollbarsAsNeededTest.java > java/awt/ScrollPane/ScrollPanePaint/ScrollPanePaint.java > java/awt/ScrollPane/ScrollPositionTest/ScrollPositionTest.java test/jdk/java/awt/ScrollPane/ScrollPositionTest.java line 101: > 99: synchronized (ScrollPositionTest.lock) { > 100: ScrollPositionTest.lock.notify(); > 101: } Better to use CountDownLatch than wait-notify but there is no lock.wait(timeout) so not sure whom it is notifying so it seems to be a no-op test/jdk/java/awt/ScrollPane/ScrollbarsAsNeededTest.java line 58: > 56: static Frame initialize() { > 57: Frame frame = new Frame("Scrollbar as needed test"); > 58: ScrollPane scrollPane = new java.awt.ScrollPane() { expansion not needed ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/24684#discussion_r2050452536 PR Review Comment: https://git.openjdk.org/jdk/pull/24684#discussion_r2050454423 From abhiscxk at openjdk.org Fri Apr 18 10:49:42 2025 From: abhiscxk at openjdk.org (Abhishek Kumar) Date: Fri, 18 Apr 2025 10:49:42 GMT Subject: RFR: 8354900: javax/swing/AbstractButton/bug4133768.java failing on macosx-aarch64 [v2] In-Reply-To: References: Message-ID: On Fri, 18 Apr 2025 09:14:58 GMT, Jayathirth D V wrote: >> javax/swing/AbstractButton/bug4133768.java was automated and open-sourced recently and it fails intermittently in CI. >> >> Looks like when we have mouse pointer at same location from where we are picking UI color from robot, it picks wrong color. >> >> Updated test to have mouse pointer to be at different place from where we are picking roll-over color of buttons. >> Also made other changes to make test more robust. With all these changes test now passes all the time in CI. > > Jayathirth D V has updated the pull request incrementally with one additional commit since the last revision: > > Update Marked as reviewed by abhiscxk (Reviewer). ------------- PR Review: https://git.openjdk.org/jdk/pull/24712#pullrequestreview-2778314973 From abhiscxk at openjdk.org Fri Apr 18 10:51:51 2025 From: abhiscxk at openjdk.org (Abhishek Kumar) Date: Fri, 18 Apr 2025 10:51:51 GMT Subject: RFR: 8353552: Opensource Several Font related tests - Batch 3 [v2] In-Reply-To: References: Message-ID: On Fri, 18 Apr 2025 07:49:09 GMT, Daniel Gredler wrote: > Is it possible to automate `TestGlyphVectorLayout` using something like [findTextBoundingBox](https://github.com/gredler/jdk/blob/c10a60bd86e383782e4809602a2a7c44d58b5d53/test/jdk/java/awt/font/FontScaling/RotatedScaledFontTest.java#L100)? > > Many of the issues that I have fixed recently were covered by manual tests which weren't being checked... Need to think about automating the test while addressing the root cause for failure. ------------- PR Comment: https://git.openjdk.org/jdk/pull/24736#issuecomment-2815238129 From abhiscxk at openjdk.org Fri Apr 18 11:15:47 2025 From: abhiscxk at openjdk.org (Abhishek Kumar) Date: Fri, 18 Apr 2025 11:15:47 GMT Subject: RFR: 8354248: Open source several AWT GridBagLayout and List tests In-Reply-To: References: Message-ID: On Fri, 18 Apr 2025 07:45:11 GMT, Tejesh R wrote: > Open source these AWT GridBagLayout and List tests: > > java/awt/GridBagLayout/ComponentShortage/ComponentShortage.java > java/awt/List/ListScrollbarCursorTest/ListScrollbarCursorTest.java > java/awt/List/ListScrollbarTest/ListScrollbarTest.java test/jdk/java/awt/GridBagLayout/ComponentShortage.java line 45: > 43: static JTextField jtf; > 44: static Dimension size; > 45: static Dimension fSize; Should be Volatile ? Accessed on EDT and main thread test/jdk/java/awt/List/ListScrollbarCursorTest.java line 49: > 47: """; > 48: PassFailJFrame.builder() > 49: .title("Test Instructions") Title is not required. test/jdk/java/awt/List/ListScrollbarTest.java line 69: > 67: """; > 68: PassFailJFrame.builder() > 69: .title("Test Instructions") Can be removed test/jdk/java/awt/List/ListScrollbarTest.java line 142: > 140: l2.addItem(l1.getItem(i)); > 141: } > 142: l1.delItems(0, l1.countItems() - 1); // or l1.clear(); Is this comment required? test/jdk/java/awt/List/ListScrollbarTest.java line 143: > 141: } > 142: l1.delItems(0, l1.countItems() - 1); // or l1.clear(); > 143: } else { //else move the selected items For consistency in comments Suggestion: } else { // else move the selected items test/jdk/java/awt/List/ListScrollbarTest.java line 150: > 148: for (int i = 0; i < items.length; i++) { > 149: l2.addItem(items[i]); // add it > 150: l2.select(l2.countItems() - 1);// and select it Comments are redundant. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/24749#discussion_r2050487877 PR Review Comment: https://git.openjdk.org/jdk/pull/24749#discussion_r2050489191 PR Review Comment: https://git.openjdk.org/jdk/pull/24749#discussion_r2050497456 PR Review Comment: https://git.openjdk.org/jdk/pull/24749#discussion_r2050498285 PR Review Comment: https://git.openjdk.org/jdk/pull/24749#discussion_r2050498159 PR Review Comment: https://git.openjdk.org/jdk/pull/24749#discussion_r2050498497 From mvs at openjdk.org Fri Apr 18 12:05:49 2025 From: mvs at openjdk.org (Manukumar V S) Date: Fri, 18 Apr 2025 12:05:49 GMT Subject: RFR: 8288471: java/awt/ScrollPane/bug8077409Test.java is unstable and fails intermittently in CI [v3] In-Reply-To: References: Message-ID: On Fri, 11 Apr 2025 05:34:15 GMT, Manukumar V S wrote: >> java/awt/ScrollPane/bug8077409Test.java is unstable and fails intermittently in CI, especially in MacOS machines. >> Also the frame created in this test is not disposed which may interfere with other tests. >> >> Fix: >> Some stabilisations added and the frame is disposed properly. >> >> Testing: >> Tested 100 times per platform(macosx-x64,macosx-aarch64,windows-x64,linux-x64) and got all PASS. > > Manukumar V S has updated the pull request incrementally with one additional commit since the last revision: > > Review comments fixed : Code reformatting, changed the indentation to the standard four-space indentation Any volunteers? ------------- PR Comment: https://git.openjdk.org/jdk/pull/24292#issuecomment-2815320730 From jdv at openjdk.org Fri Apr 18 12:07:58 2025 From: jdv at openjdk.org (Jayathirth D V) Date: Fri, 18 Apr 2025 12:07:58 GMT Subject: Integrated: 8354900: javax/swing/AbstractButton/bug4133768.java failing on macosx-aarch64 In-Reply-To: References: Message-ID: <6TudkPKi_21fWBcETliZYXTHWRYNPqJ20pOZZ2Tm_fk=.7ad6d925-0068-45c5-8104-abd197ab594c@github.com> On Thu, 17 Apr 2025 05:59:03 GMT, Jayathirth D V wrote: > javax/swing/AbstractButton/bug4133768.java was automated and open-sourced recently and it fails intermittently in CI. > > Looks like when we have mouse pointer at same location from where we are picking UI color from robot, it picks wrong color. > > Updated test to have mouse pointer to be at different place from where we are picking roll-over color of buttons. > Also made other changes to make test more robust. With all these changes test now passes all the time in CI. This pull request has now been integrated. Changeset: eda73945 Author: Jayathirth D V URL: https://git.openjdk.org/jdk/commit/eda7394551b470e9dc547be93711bcceac45f303 Stats: 32 lines in 1 file changed: 20 ins; 3 del; 9 mod 8354900: javax/swing/AbstractButton/bug4133768.java failing on macosx-aarch64 Reviewed-by: abhiscxk ------------- PR: https://git.openjdk.org/jdk/pull/24712 From zjx001202 at gmail.com Fri Apr 18 12:29:07 2025 From: zjx001202 at gmail.com (Glavo) Date: Fri, 18 Apr 2025 20:29:07 +0800 Subject: Proposal: A new common Image API In-Reply-To: <0caed3d7-3b9a-408c-8752-54a69fd84129@status6.com> References: <0caed3d7-3b9a-408c-8752-54a69fd84129@status6.com> Message-ID: Hi John, Thank you very much for your reply. I think you are actually talking about two problems: For compact storage, I think the first choice would be something like PixelBuffer. Pixels can be stored in MemorySegment. When the pixel format needs to be converted, it is easier to accelerate using SIMD instructions, which should have better performance. For general image I/O, I don't think an intermediate format is necessary, at least not to store the entire image. I think we can provide an ImageBuilder interface, and the actual implementation stores pixels in the same way as the Image implementation. When reading an image, the pixels can be written directly into the ImageBuilder. Writing pixels one by one may result in a performance loss, but only one row or one block of pixels need to be cached for batch writing, and there is no need to read the entire image in advance. Finally, the internal structure of ImageBuilder can be reused directly to create an Image without copying or converting it again. However, this is just a rough idea, and there are still many problems to be solved, such as color space, background loading, progressive loading, animated images, motion photos, etc. Glavo On Thu, Apr 17, 2025 at 3:35?AM John Neffenger wrote: > On 4/16/25 3:04 AM, Glavo wrote: > > * Different image APIs have to repeatedly implement support for reading > the same image format (such as JPEG). > In fact, AWT, JavaFX, and Android now each implement reading JPEG images. > This is a waste. > > I was initially frustrated by the split between Java (AWT) and JavaFX in > their image support and would have welcomed a common library, but I came to > appreciate the flexibility of having both available in a JavaFX > application. Below are some thoughts. > > The challenge is not just in reading various external image formats. There > are three parts: > > 1. Efficiently loading and converting an image from an external format > (GIF, PNG, JPG). > 2. Efficiently storing images internally with a minimal number of bits > per pixel. > 3. Efficiently converting the internal format to that required by the > client library (AWT, JavaFX, Android). > > The first item is determined by the external image format standards, but > the second and third items involve a trade-off. Optimizing for memory usage > might results in a huge waste of CPU time doing conversions, while > optimizing for zero conversion time might results in a huge waste of RAM. A > JavaFX application can pick and choose between this trade-off by using both > the AWT and JavaFX image libraries. > > For example, I had to load and display hundreds of binary images (pure > black and white) on a constrained device. The AWT can store images in > memory as one bit per pixel, but JavaFX supports only 32-bit images. So I > needed to use the AWT image format in memory, but the JavaFX image format > for display, converting them on-the-fly one-by-one to 32 bits per pixel. > > JavaFX provides an AWT-to-JavaFX image conversion utility, called > SwingFXUtils::toFxImage > , > but I couldn't use it because it was far too slow. It's slow because it's > generic and has to work for all image types. I came up with 14 different > ways to convert an AWT image to a > JavaFX image: 9 that work for images with transparency and another 5 that > work only for images with no alpha. In my case, one such conversion was much > faster than the others . > > A common library might end up too generic, too slow, or require too much > memory to be useful. > > John > -------------- next part -------------- An HTML attachment was scrubbed... URL: From tr at openjdk.org Fri Apr 18 13:03:56 2025 From: tr at openjdk.org (Tejesh R) Date: Fri, 18 Apr 2025 13:03:56 GMT Subject: RFR: 8353445: Open source several AWT Menu tests - Batch 1 [v3] In-Reply-To: References: Message-ID: > Open source these AWT Menu tests: > > java/awt/Menu/MenuVisibilityTest/MenuVisibilityTest.java > java/awt/Menu/MenuActionEventTest/MenuActionEventTest.java > java/awt/Menu/RmInHideTest/RmInHideTest.java > java/awt/Menu/SetShortCutTest/SetShortCutTest.java Tejesh R has updated the pull request incrementally with one additional commit since the last revision: Update PL ------------- Changes: - all: https://git.openjdk.org/jdk/pull/24649/files - new: https://git.openjdk.org/jdk/pull/24649/files/6702f514..92b224ac Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=24649&range=02 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=24649&range=01-02 Stats: 1 line in 1 file changed: 0 ins; 0 del; 1 mod Patch: https://git.openjdk.org/jdk/pull/24649.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/24649/head:pull/24649 PR: https://git.openjdk.org/jdk/pull/24649 From kizune at openjdk.org Fri Apr 18 16:53:37 2025 From: kizune at openjdk.org (Alexander Zuev) Date: Fri, 18 Apr 2025 16:53:37 GMT Subject: RFR: 8354928: Clean up and open source some miscellaneous AWT tests Message-ID: Clean up and open source some tests related to event processing in AWT library. ------------- Commit messages: - 8354928: Clean up and open source some miscellaneous AWT tests Changes: https://git.openjdk.org/jdk/pull/24755/files Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=24755&range=00 Issue: https://bugs.openjdk.org/browse/JDK-8354928 Stats: 499 lines in 4 files changed: 499 ins; 0 del; 0 mod Patch: https://git.openjdk.org/jdk/pull/24755.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/24755/head:pull/24755 PR: https://git.openjdk.org/jdk/pull/24755 From prr at openjdk.org Fri Apr 18 17:02:01 2025 From: prr at openjdk.org (Phil Race) Date: Fri, 18 Apr 2025 17:02:01 GMT Subject: RFR: 8353445: Open source several AWT Menu tests - Batch 1 [v3] In-Reply-To: References: Message-ID: On Fri, 18 Apr 2025 13:03:56 GMT, Tejesh R wrote: >> Open source these AWT Menu tests: >> >> java/awt/Menu/MenuVisibilityTest/MenuVisibilityTest.java >> java/awt/Menu/MenuActionEventTest/MenuActionEventTest.java >> java/awt/Menu/RmInHideTest/RmInHideTest.java >> java/awt/Menu/SetShortCutTest/SetShortCutTest.java > > Tejesh R has updated the pull request incrementally with one additional commit since the last revision: > > Update PL Marked as reviewed by prr (Reviewer). ------------- PR Review: https://git.openjdk.org/jdk/pull/24649#pullrequestreview-2779020789 From prr at openjdk.org Fri Apr 18 17:04:57 2025 From: prr at openjdk.org (Phil Race) Date: Fri, 18 Apr 2025 17:04:57 GMT Subject: Integrated: 8355002: Clean up some mentions of "applet" in tests In-Reply-To: References: Message-ID: On Thu, 17 Apr 2025 21:40:34 GMT, Phil Race wrote: > This PR cleans up obsolete references to "applet" meaning > - the word applet in a comment where its not relevant (any more) > - extraneous imports of the applet package or an applet class > - obsolete methods which check for applet > - an exception handling case that isn't needed. > > After this applet/Applet still appears in tests that test the Applet API but that's expected. > > There's also a few tests that mention applets but aren't applet-specific and require more time than this quick clean up of most mentions. This pull request has now been integrated. Changeset: bb08a70b Author: Phil Race URL: https://git.openjdk.org/jdk/commit/bb08a70bd8deadc9c7522d1ce2ec779d5a6bd986 Stats: 346 lines in 42 files changed: 0 ins; 318 del; 28 mod 8355002: Clean up some mentions of "applet" in tests Reviewed-by: serb ------------- PR: https://git.openjdk.org/jdk/pull/24744 From dnguyen at openjdk.org Fri Apr 18 17:11:04 2025 From: dnguyen at openjdk.org (Damon Nguyen) Date: Fri, 18 Apr 2025 17:11:04 GMT Subject: Integrated: 8353293: Open source several swing tests batch4 In-Reply-To: References: Message-ID: <_WYqCPRetvsTj1PNN3-60E9zLrKHAfo0FIWP8u8iMe8=.4ac5b506-266b-41f0-9ec7-61f3ac34eb91@github.com> On Thu, 17 Apr 2025 16:35:37 GMT, Damon Nguyen wrote: > Open-sourcing and standardizing several tests (basic) This pull request has now been integrated. Changeset: a551cc92 Author: Damon Nguyen URL: https://git.openjdk.org/jdk/commit/a551cc929426590bfbbcaa4bd8bee5e4e8cfe16d Stats: 385 lines in 6 files changed: 385 ins; 0 del; 0 mod 8353293: Open source several swing tests batch4 Reviewed-by: serb ------------- PR: https://git.openjdk.org/jdk/pull/24729 From dnguyen at openjdk.org Fri Apr 18 17:11:53 2025 From: dnguyen at openjdk.org (Damon Nguyen) Date: Fri, 18 Apr 2025 17:11:53 GMT Subject: Integrated: 8353661: Open source several swing tests batch5 In-Reply-To: References: Message-ID: <0dLccjSdqq-8WlHaWBPLzlPvKWRhcJVVslIwODCCVkY=.0e7a2c9f-2261-497d-b057-87d3c1a58a3f@github.com> On Tue, 15 Apr 2025 22:37:05 GMT, Damon Nguyen wrote: > Open-sourcing and standardizing several tests (windows & JSlider) This pull request has now been integrated. Changeset: 924638c4 Author: Damon Nguyen URL: https://git.openjdk.org/jdk/commit/924638c471b0bf4a00a890ce6a3fd7e118cdd578 Stats: 436 lines in 4 files changed: 436 ins; 0 del; 0 mod 8353661: Open source several swing tests batch5 Reviewed-by: jdv ------------- PR: https://git.openjdk.org/jdk/pull/24671 From dnguyen at openjdk.org Fri Apr 18 17:14:28 2025 From: dnguyen at openjdk.org (Damon Nguyen) Date: Fri, 18 Apr 2025 17:14:28 GMT Subject: RFR: 8353748: Open source several swing tests batch6 [v3] In-Reply-To: References: Message-ID: > Open-sourcing and standardizing several swing tests (JTree) Damon Nguyen has updated the pull request incrementally with one additional commit since the last revision: Remove headful tags. Change errors to RE. ------------- Changes: - all: https://git.openjdk.org/jdk/pull/24730/files - new: https://git.openjdk.org/jdk/pull/24730/files/c7870e3e..52d78abb Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=24730&range=02 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=24730&range=01-02 Stats: 4 lines in 3 files changed: 0 ins; 2 del; 2 mod Patch: https://git.openjdk.org/jdk/pull/24730.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/24730/head:pull/24730 PR: https://git.openjdk.org/jdk/pull/24730 From dnguyen at openjdk.org Fri Apr 18 17:14:29 2025 From: dnguyen at openjdk.org (Damon Nguyen) Date: Fri, 18 Apr 2025 17:14:29 GMT Subject: RFR: 8353748: Open source several swing tests batch6 [v2] In-Reply-To: References: Message-ID: On Fri, 18 Apr 2025 05:00:50 GMT, Prasanta Sadhukhan wrote: >> Damon Nguyen has updated the pull request incrementally with one additional commit since the last revision: >> >> Add headful tags > > test/jdk/javax/swing/JTree/NodeChangedTest.java line 29: > >> 27: * @summary Tests that node changed for the root of the tree update the >> 28: * structure. >> 29: * @key headful > > Does it need to be headful? I see nothing is displayed so I asked you to check in CI if it fails without headful tag..is it failing if we dont have headful? Removed. Re-tested without headful tags on CI. Posted results on issue. Passed with repeats. Same for other similar test. > test/jdk/javax/swing/JTree/bug4118860.java line 87: > >> 85: tr.setToggleClickCount(2); >> 86: if (tr.getToggleClickCount() != 2) { >> 87: throw new Error("ToggleClickCount doesn't set..."); > > change all Error to RE Updated! > test/jdk/javax/swing/JTree/bug4169215.java line 28: > >> 26: * @bug 4169215 >> 27: * @summary Accessibility hierarchy JTree node test. >> 28: * @key headful > > same here..nothing is displayed..so do we need headful tag? Removed. Thanks! ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/24730#discussion_r2050884519 PR Review Comment: https://git.openjdk.org/jdk/pull/24730#discussion_r2050884730 PR Review Comment: https://git.openjdk.org/jdk/pull/24730#discussion_r2050884632 From dnguyen at openjdk.org Fri Apr 18 17:38:56 2025 From: dnguyen at openjdk.org (Damon Nguyen) Date: Fri, 18 Apr 2025 17:38:56 GMT Subject: RFR: 8354928: Clean up and open source some miscellaneous AWT tests In-Reply-To: References: Message-ID: On Fri, 18 Apr 2025 16:47:49 GMT, Alexander Zuev wrote: > Clean up and open source some tests related to event processing in AWT library. Changes requested by dnguyen (Committer). The rest of the tests (automated and manual) run as expected and pass on my end. test/jdk/java/awt/event/MouseWheelEvent/HWWheelScroll.java line 30: > 28: * @library /java/awt/regtesthelpers > 29: * @build PassFailJFrame > 30: * @run main/manual HWWheelScroll.html Suggestion: * @run main/manual HWWheelScroll Test doesn't run as is. Remove the `.html` here. test/jdk/java/awt/event/MouseWheelEvent/HWWheelScroll.java line 75: > 73: retValue.add(makeListFrame(TEXT_TALL)); > 74: retValue.add(makeListFrame(TEXT_WIDE)); > 75: retValue.add(makeListFrame(TEXT_SMALL)); I see these frames being generated and displayed, but I have a single empty & untitled frame. Which one is this supposed to be? Screenshot 2025-04-18 at 10 32 55?AM ------------- PR Review: https://git.openjdk.org/jdk/pull/24755#pullrequestreview-2779076754 PR Comment: https://git.openjdk.org/jdk/pull/24755#issuecomment-2815905071 PR Review Comment: https://git.openjdk.org/jdk/pull/24755#discussion_r2050908293 PR Review Comment: https://git.openjdk.org/jdk/pull/24755#discussion_r2050915775 From abhiscxk at openjdk.org Fri Apr 18 18:17:48 2025 From: abhiscxk at openjdk.org (Abhishek Kumar) Date: Fri, 18 Apr 2025 18:17:48 GMT Subject: RFR: 8351884: Refactor bug8033699.java test code In-Reply-To: References: Message-ID: <0Ss6SogcaU8-fKCg6nOvjEnNpJBrLAtszvMhHBc-CtM=.8a5612e9-c2b9-45fb-a965-dbda85bc9af4@github.com> On Thu, 17 Apr 2025 19:49:48 GMT, Abhishek Kumar wrote: > > #23964 (comment) > > Will take a look soon. Changes looks good to me apart from your suggestions. ------------- PR Comment: https://git.openjdk.org/jdk/pull/24384#issuecomment-2815963933 From kizune at openjdk.org Fri Apr 18 18:20:48 2025 From: kizune at openjdk.org (Alexander Zuev) Date: Fri, 18 Apr 2025 18:20:48 GMT Subject: RFR: 8354928: Clean up and open source some miscellaneous AWT tests In-Reply-To: References: Message-ID: On Fri, 18 Apr 2025 17:36:11 GMT, Damon Nguyen wrote: >> Clean up and open source some tests related to event processing in AWT library. > > test/jdk/java/awt/event/MouseWheelEvent/HWWheelScroll.java line 75: > >> 73: retValue.add(makeListFrame(TEXT_TALL)); >> 74: retValue.add(makeListFrame(TEXT_WIDE)); >> 75: retValue.add(makeListFrame(TEXT_SMALL)); > > I see these frames being generated and displayed, but I have a single empty & untitled frame. Which one is this supposed to be? > Screenshot 2025-04-18 at 10 32 55?AM It's the parent frame for the FileDialog - you can try the scrolling inside or ignore it - it does not matter. Just do not close it until the test scenario is complete. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/24755#discussion_r2050961691 From aivanov at openjdk.org Fri Apr 18 18:21:52 2025 From: aivanov at openjdk.org (Alexey Ivanov) Date: Fri, 18 Apr 2025 18:21:52 GMT Subject: RFR: JDK-8353486 : Open source Swing Tests - Set 4 [v6] In-Reply-To: <-jaKTmgwNA9JNGIaVqutoIFJKc43PKmNxbni9iAk7Dg=.679497d9-dffe-4af0-8e7f-e517284d2012@github.com> References: <-jaKTmgwNA9JNGIaVqutoIFJKc43PKmNxbni9iAk7Dg=.679497d9-dffe-4af0-8e7f-e517284d2012@github.com> Message-ID: On Thu, 17 Apr 2025 19:29:28 GMT, Harshitha Onkar wrote: >> Open-sourced the following Swing tests: >> >> 1. javax/swing/JFileChooser/bug4464774.java >> 2. javax/swing/JFileChooser/bug4522756.java >> 3. javax/swing/JFileChooser/bug4759934.java >> 4. javax/swing/JFileChooser/bug4943900.java >> 5. javax/swing/JOptionPane/bug4194862.java > > Harshitha Onkar has updated the pull request incrementally with one additional commit since the last revision: > > remove redudant frame test/jdk/javax/swing/JFileChooser/bug4522756.java line 29: > 27: * @requires (os.family == "windows") > 28: * @summary To verify that if for the first time JFileChooser is opened, > 29: the icon for Desktop is not missing. Suggestion: * @summary Verifies that the Desktop icon is not missing when JFileChooser is opened for the first time. I presume it refers to the location bar on the left, does it? test/jdk/javax/swing/JFileChooser/bug4759934.java line 58: > 56: robot.setAutoWaitForIdle(true); > 57: robot.setAutoDelay(50); > 58: SwingUtilities.invokeAndWait(bug4759934::createTestUI); Suggestion: robot.setAutoDelay(50); SwingUtilities.invokeAndWait(bug4759934::createTestUI); I think a blank line here will separate the initial `Robot` configuration from creating UI for the test. test/jdk/javax/swing/JFileChooser/bug4943900.java line 57: > 55: is updated properly. > 56: > 57: If the FileFilter works correctly, press PASS else press FAIL. I wonder why so many people use capitals for *Pass* and *Fail*? test/jdk/javax/swing/JFileChooser/bug4943900.java line 65: > 63: } catch (Exception e) { > 64: throw new SkippedException("LaF not supported", e); > 65: } Is the intention to run in system L&F only rather than in all L&Fs? test/jdk/javax/swing/JFileChooser/bug4943900.java line 85: > 83: > 84: private static final class TextFileFilter extends FileFilter { > 85: public boolean accept(File f) { I'd rather add `@Override` annotation to both `accept` and `getDescription`. test/jdk/javax/swing/JFileChooser/bug4943900.java line 100: > 98: } > 99: > 100: public String getExtension(File f) { Suggestion: private static String getExtension(File f) { This is an internal helper method for the class. test/jdk/javax/swing/JOptionPane/bug4194862.java line 43: > 41: private static final String INSTRUCTIONS = """ > 42: In the internal frame titled "Main", > 43: click the "Show JOption dialog" button. Suggestion: click the "Show JOptionPane dialog" button. And update the button text accordingly? test/jdk/javax/swing/JOptionPane/bug4194862.java line 44: > 42: In the internal frame titled "Main", > 43: click the "Show JOption dialog" button. > 44: A dialog will appear. It should be centered w.r.t I guess ?w.r.t.? is a common abbreviation, however, it always helps to spell out words? in instructions. test/jdk/javax/swing/JOptionPane/bug4194862.java line 57: > 55: .columns(40) > 56: .testUI(bug4194862::createAndShowUI) > 57: .build() Enable screenshot? I've been thinking about a feature which could the screenshot automatically? as a failure handler. There's a tracking bug for it, [JDK-8317114](https://bugs.openjdk.org/browse/JDK-8317114): *Provide failure handlers for PassFailJFrame*. Many UI manual tests could benefit from it, ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/24456#discussion_r2050947524 PR Review Comment: https://git.openjdk.org/jdk/pull/24456#discussion_r2050961582 PR Review Comment: https://git.openjdk.org/jdk/pull/24456#discussion_r2050953427 PR Review Comment: https://git.openjdk.org/jdk/pull/24456#discussion_r2050950163 PR Review Comment: https://git.openjdk.org/jdk/pull/24456#discussion_r2050952347 PR Review Comment: https://git.openjdk.org/jdk/pull/24456#discussion_r2050951867 PR Review Comment: https://git.openjdk.org/jdk/pull/24456#discussion_r2050954047 PR Review Comment: https://git.openjdk.org/jdk/pull/24456#discussion_r2050958581 PR Review Comment: https://git.openjdk.org/jdk/pull/24456#discussion_r2050957186 From aivanov at openjdk.org Fri Apr 18 18:30:57 2025 From: aivanov at openjdk.org (Alexey Ivanov) Date: Fri, 18 Apr 2025 18:30:57 GMT Subject: RFR: 8353552: Opensource Several Font related tests - Batch 3 [v2] In-Reply-To: References: Message-ID: <0tmKF7YB0JlMYG7o-aC35hoJegkImlxYEBLMPTnIUs8=.ff5546a2-8940-41c6-b69d-62f20163dbfa@github.com> On Thu, 17 Apr 2025 19:18:18 GMT, Abhishek Kumar wrote: >> Few more font related tests are converted from applet and open-sourced. >> >> TestGlyphVectorLayout.java doesn't behave as per the instruction and hence problem-listed under [JDK-8354987](https://bugs.openjdk.org/browse/JDK-8354987). > > Abhishek Kumar has updated the pull request incrementally with one additional commit since the last revision: > > Problem list test moved to manual test category Changes requested by aivanov (Reviewer). test/jdk/ProblemList.txt line 796: > 794: java/awt/print/PrinterJob/ScaledText/ScaledText.java 8231226 macosx-all > 795: java/awt/print/PrinterJob/PrintTextTest.java 8148334 macosx-all > 796: java/awt/font/GlyphVector/TestGlyphVectorLayout.java 8354987 generic-all Probably, you want to add [JDK-8355048](https://bugs.openjdk.org/browse/JDK-8355048) to the list of resolved issues, since you include problem-listing in this changeset, which makes perfect sense. test/jdk/java/awt/font/TestGraphicPlacement.java line 166: > 164: attribute, > 165: i + name.length(), > 166: i + name.length() + 1); Suggestion: as.addAttribute(TextAttribute.CHAR_REPLACEMENT, attribute, i + name.length(), i + name.length() + 1); Align the wrapped parameters to match the style in lines 158?160 above? ------------- PR Review: https://git.openjdk.org/jdk/pull/24736#pullrequestreview-2779172845 PR Review Comment: https://git.openjdk.org/jdk/pull/24736#discussion_r2050966012 PR Review Comment: https://git.openjdk.org/jdk/pull/24736#discussion_r2050970157 From serb at openjdk.org Fri Apr 18 18:31:13 2025 From: serb at openjdk.org (Sergey Bylokhov) Date: Fri, 18 Apr 2025 18:31:13 GMT Subject: RFR: 8354077: Get rid of offscreenSharingEnabled windows flag [v2] In-Reply-To: References: Message-ID: > Another unused obsoleted flag removed (offscreenSharingEnabled) from WindowsFlags. Its last usage was eliminated by [JDK-6725214](https://bugs.openjdk.org/browse/JDk-6725214) ("D3D: forward-port the new pipeline from 6u10"), see [commit](https://github.com/openjdk/jdk/commit/e4c9db984fe1a3a9d06fb60e333e92df3b165454#diff-c27da1eb4bdc7e69158f38ab3e7a1aa02b074c131c18ad15d04d0f88f169febeL319). > > Interestingly, the original JDK 6u10 changes marked many options as "Obsoleted" (see [System Properties for Java 2D Technology](https://docs.oracle.com/javase/8/docs/technotes/guides/2d/flags.html)). Some of them later were removed in JDK 9 via [JDK-8155682](https://bugs.openjdk.org/browse/JDK-8155682) ("Get rid of legacy Windows Flags for DX"). > > However, two obsoleted flags remain: > - **sun.java2d.noddraw**: Obsoleted in: Java SE 6 Update 10, which contains a new implementation of D3D support. Setting sun.java2d.noddraw=true is now interpreted exactly the same as disabling that via sun.java2d.d3d=false. > Intended use: To turn off the Java 2D system's use of DirectDraw and Direct3D completely. > Introduced: 1.2 > Default value: false > How to use: Setting this flag to true turns off DirectDraw usage, which sometimes helps to get rid of rendering problems on Win32. > - **sun.java2d.ddoffscreen**: Obsoleted in: Java SE 6 Update 10 > Intended use: To turn on hardware-accelerated scaling when the DirectDraw/Direct3D pipeline is in use. > Introduced: 1.2 > Default value: false > How to use: Setting this flag to true enables hardware-accelerated scaling if the DirectDraw/Direct3D pipeline is in use. DirectDraw/Direct3D hardware scaling is disabled by default to avoid rendering artifacts in existing applications. These rendering artifacts are caused by possible inconsistencies between the scale method that the software scaling operation uses (nearest neighbor) and the different scale methods that video cards use. Certain events that occur while an application is running might cause a scaled image to be rendered partially with hardware scaling operations and partially with software scaling operations, resulting in an inconsistent appearance. For now, you can enable acceleration by setting the ddscale flag to true. > > Should we: > - Continue supporting these indefinitely, or > - Mark them as deprecated for removal in some upcoming release? Sergey Bylokhov 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 branch 'openjdk:master' into JDK-8354077 - 8354077: Get rid of offscreenSharingEnabled windows flag ------------- Changes: - all: https://git.openjdk.org/jdk/pull/24534/files - new: https://git.openjdk.org/jdk/pull/24534/files/ad3ac5ca..e14e1d50 Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=24534&range=01 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=24534&range=00-01 Stats: 225010 lines in 1031 files changed: 35320 ins; 185545 del; 4145 mod Patch: https://git.openjdk.org/jdk/pull/24534.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/24534/head:pull/24534 PR: https://git.openjdk.org/jdk/pull/24534 From aivanov at openjdk.org Fri Apr 18 18:43:46 2025 From: aivanov at openjdk.org (Alexey Ivanov) Date: Fri, 18 Apr 2025 18:43:46 GMT Subject: RFR: 8353552: Opensource Several Font related tests - Batch 3 [v2] In-Reply-To: References: Message-ID: On Thu, 17 Apr 2025 19:18:18 GMT, Abhishek Kumar wrote: >> Few more font related tests are converted from applet and open-sourced. >> >> TestGlyphVectorLayout.java doesn't behave as per the instruction and hence problem-listed under [JDK-8354987](https://bugs.openjdk.org/browse/JDK-8354987). > > Abhishek Kumar has updated the pull request incrementally with one additional commit since the last revision: > > Problem list test moved to manual test category Now, it looks good to me. ------------- Marked as reviewed by aivanov (Reviewer). PR Review: https://git.openjdk.org/jdk/pull/24736#pullrequestreview-2779208573 From dnguyen at openjdk.org Fri Apr 18 18:44:10 2025 From: dnguyen at openjdk.org (Damon Nguyen) Date: Fri, 18 Apr 2025 18:44:10 GMT Subject: RFR: 8354695: Open source several swing tests batch7 Message-ID: <_UYipF8V8voPBRGVdOg7APlb0vu9VEfObY1qaHDTFBI=.0337e295-3b52-4d63-81c3-3cd21f708496@github.com> Open-sourcing and standardizing several swing tests (JScrollPane & JRootPane) ------------- Commit messages: - Remove resolution comment - Initial opening - Merge branch 'master' of github.com:DamonGuy/jdk - Merge branch 'master' of github.com:DamonGuy/jdk - Merge branch 'master' of github.com:DamonGuy/jdk - Merge branch 'master' of github.com:DamonGuy/jdk - Merge branch 'master' of github.com:DamonGuy/jdk - Initial commit for backout Changes: https://git.openjdk.org/jdk/pull/24758/files Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=24758&range=00 Issue: https://bugs.openjdk.org/browse/JDK-8354695 Stats: 1441 lines in 7 files changed: 1441 ins; 0 del; 0 mod Patch: https://git.openjdk.org/jdk/pull/24758.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/24758/head:pull/24758 PR: https://git.openjdk.org/jdk/pull/24758 From abhiscxk at openjdk.org Fri Apr 18 18:52:49 2025 From: abhiscxk at openjdk.org (Abhishek Kumar) Date: Fri, 18 Apr 2025 18:52:49 GMT Subject: Integrated: 8353552: Opensource Several Font related tests - Batch 3 In-Reply-To: References: Message-ID: On Thu, 17 Apr 2025 18:52:39 GMT, Abhishek Kumar wrote: > Few more font related tests are converted from applet and open-sourced. > > TestGlyphVectorLayout.java doesn't behave as per the instruction and hence problem-listed under [JDK-8354987](https://bugs.openjdk.org/browse/JDK-8354987). This pull request has now been integrated. Changeset: f8f1be3d Author: Abhishek Kumar URL: https://git.openjdk.org/jdk/commit/f8f1be3de56986c06f368334b7c64ef50f0117cf Stats: 587 lines in 6 files changed: 587 ins; 0 del; 0 mod 8353552: Opensource Several Font related tests - Batch 3 8355048: ProblemList TestGlyphVectorLayout.java on all platforms Reviewed-by: serb, aivanov ------------- PR: https://git.openjdk.org/jdk/pull/24736 From honkar at openjdk.org Fri Apr 18 19:11:54 2025 From: honkar at openjdk.org (Harshitha Onkar) Date: Fri, 18 Apr 2025 19:11:54 GMT Subject: RFR: 8355051: Problemlist java/awt/Graphics2D/CopyAreaOOB.java on macosx-aarch64 Message-ID: CopyAreaOOB.java problemlisted on macosx-aarch64 ------------- Commit messages: - problemlist CopyAreaOOB.java Changes: https://git.openjdk.org/jdk/pull/24759/files Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=24759&range=00 Issue: https://bugs.openjdk.org/browse/JDK-8355051 Stats: 1 line in 1 file changed: 1 ins; 0 del; 0 mod Patch: https://git.openjdk.org/jdk/pull/24759.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/24759/head:pull/24759 PR: https://git.openjdk.org/jdk/pull/24759 From prr at openjdk.org Fri Apr 18 19:40:52 2025 From: prr at openjdk.org (Phil Race) Date: Fri, 18 Apr 2025 19:40:52 GMT Subject: RFR: 8355051: Problemlist java/awt/Graphics2D/CopyAreaOOB.java on macosx-aarch64 In-Reply-To: References: Message-ID: <5f4ksNuJV7C-HMzW4_75VSN2BUZ-5OYhaJ78kEnp84Q=.4d1a33ce-a929-41f4-b0b5-529a5d7dd4ef@github.com> On Fri, 18 Apr 2025 19:06:03 GMT, Harshitha Onkar wrote: > CopyAreaOOB.java problemlisted on macosx-aarch64 So we are seeing a bump in CI failures on macOS aarch64 is the reason ? Perhaps the bug should be bumped to P3, as we may have a product bug here ... what else could it be ? ------------- Marked as reviewed by prr (Reviewer). PR Review: https://git.openjdk.org/jdk/pull/24759#pullrequestreview-2779285232 From aivanov at openjdk.org Fri Apr 18 19:40:52 2025 From: aivanov at openjdk.org (Alexey Ivanov) Date: Fri, 18 Apr 2025 19:40:52 GMT Subject: RFR: 8355051: Problemlist java/awt/Graphics2D/CopyAreaOOB.java on macosx-aarch64 In-Reply-To: References: Message-ID: On Fri, 18 Apr 2025 19:06:03 GMT, Harshitha Onkar wrote: > CopyAreaOOB.java problemlisted on macosx-aarch64 Looks good to me. I presume the test is problem-listed for macOS aarch64 because it fails frequently on this platform whereas other failures (on Linux) aren't as frequent, and therefore they don't create so much noise. Is it correct? ------------- Marked as reviewed by aivanov (Reviewer). PR Review: https://git.openjdk.org/jdk/pull/24759#pullrequestreview-2779289931 From honkar at openjdk.org Fri Apr 18 19:40:53 2025 From: honkar at openjdk.org (Harshitha Onkar) Date: Fri, 18 Apr 2025 19:40:53 GMT Subject: RFR: 8355051: Problemlist java/awt/Graphics2D/CopyAreaOOB.java on macosx-aarch64 In-Reply-To: References: Message-ID: On Fri, 18 Apr 2025 19:32:24 GMT, Alexey Ivanov wrote: > I presume the test is problem-listed for macOS aarch64 because it fails frequently on this platform whereas other failures (on Linux) aren't as frequent, and therefore they don't create so much noise. Is it correct? That is correct ------------- PR Comment: https://git.openjdk.org/jdk/pull/24759#issuecomment-2816081879 From aivanov at openjdk.org Fri Apr 18 19:40:53 2025 From: aivanov at openjdk.org (Alexey Ivanov) Date: Fri, 18 Apr 2025 19:40:53 GMT Subject: RFR: 8355051: Problemlist java/awt/Graphics2D/CopyAreaOOB.java on macosx-aarch64 In-Reply-To: References: Message-ID: On Fri, 18 Apr 2025 19:33:53 GMT, Harshitha Onkar wrote: > > I presume the test is problem-listed for macOS aarch64 because it fails frequently on this platform whereas other failures (on Linux) aren't as frequent, and therefore they don't create so much noise. Is it correct? > > That is correct Sounds reasonable. Thanks. ------------- PR Comment: https://git.openjdk.org/jdk/pull/24759#issuecomment-2816084371 From honkar at openjdk.org Fri Apr 18 19:40:53 2025 From: honkar at openjdk.org (Harshitha Onkar) Date: Fri, 18 Apr 2025 19:40:53 GMT Subject: Integrated: 8355051: Problemlist java/awt/Graphics2D/CopyAreaOOB.java on macosx-aarch64 In-Reply-To: References: Message-ID: <1MrVbBLE3c0UkK4Ttr_hSdSMxnBJrcNvjFIL-x1Gf3k=.a44e3625-a39c-4a73-a442-39ffc4b48b48@github.com> On Fri, 18 Apr 2025 19:06:03 GMT, Harshitha Onkar wrote: > CopyAreaOOB.java problemlisted on macosx-aarch64 This pull request has now been integrated. Changeset: abbf1a02 Author: Harshitha Onkar URL: https://git.openjdk.org/jdk/commit/abbf1a02cb00ae98ed7fdb7105aa4806756f898f Stats: 1 line in 1 file changed: 1 ins; 0 del; 0 mod 8355051: Problemlist java/awt/Graphics2D/CopyAreaOOB.java on macosx-aarch64 Reviewed-by: prr, aivanov ------------- PR: https://git.openjdk.org/jdk/pull/24759 From prr at openjdk.org Fri Apr 18 19:50:53 2025 From: prr at openjdk.org (Phil Race) Date: Fri, 18 Apr 2025 19:50:53 GMT Subject: RFR: 8355051: Problemlist java/awt/Graphics2D/CopyAreaOOB.java on macosx-aarch64 In-Reply-To: References: Message-ID: On Fri, 18 Apr 2025 19:36:00 GMT, Alexey Ivanov wrote: > > > I presume the test is problem-listed for macOS aarch64 because it fails frequently on this platform whereas other failures (on Linux) aren't as frequent, and therefore they don't create so much noise. Is it correct? > > > > > > That is correct > > Sounds reasonable. Thanks. This test does have a long history of failures. But it just failed 10 times in < 24 hours, all on macOS aarch64 on multiple machines (meaning of the 4 I explicitly looked at all 4 were different) and at least 3 different major OS versions .. and I don't know why. I don't think we pushed a related change .. which leaves me wondering about something in the CI machinery except it affects no other tests .. so we should pursue this not just problem list and forget. ------------- PR Comment: https://git.openjdk.org/jdk/pull/24759#issuecomment-2816097404 From prr at openjdk.org Fri Apr 18 20:00:50 2025 From: prr at openjdk.org (Phil Race) Date: Fri, 18 Apr 2025 20:00:50 GMT Subject: RFR: 8354561: Open source several swing tests batch0 [v2] In-Reply-To: <1TVLT8SYNn1C5ddWj3GkaxDyL3td5-nUBE2Va3yautA=.29242f16-d5b3-4388-a8df-31d45045fa0c@github.com> References: <1TVLT8SYNn1C5ddWj3GkaxDyL3td5-nUBE2Va3yautA=.29242f16-d5b3-4388-a8df-31d45045fa0c@github.com> Message-ID: On Thu, 17 Apr 2025 02:01:42 GMT, Alexander Zvegintsev wrote: >> Few more tests open sourced: >> >> javax/swing/JTextArea/4474400/bug4474400.java >> javax/swing/border/TitledBorder/TransparentTitleTest.java >> javax/swing/JComboBox/4139900/bug4139900.java >> javax/swing/JComboBox/4174876/bug4174876.java > > Alexander Zvegintsev has updated the pull request incrementally with one additional commit since the last revision: > > review comments Marked as reviewed by prr (Reviewer). ------------- PR Review: https://git.openjdk.org/jdk/pull/24680#pullrequestreview-2779322396 From kizune at openjdk.org Fri Apr 18 20:08:54 2025 From: kizune at openjdk.org (Alexander Zuev) Date: Fri, 18 Apr 2025 20:08:54 GMT Subject: RFR: 8353748: Open source several swing tests batch6 [v3] In-Reply-To: References: Message-ID: On Fri, 18 Apr 2025 17:14:28 GMT, Damon Nguyen wrote: >> Open-sourcing and standardizing several swing tests (JTree) > > Damon Nguyen has updated the pull request incrementally with one additional commit since the last revision: > > Remove headful tags. Change errors to RE. Looks good ------------- Marked as reviewed by kizune (Reviewer). PR Review: https://git.openjdk.org/jdk/pull/24730#pullrequestreview-2779334083 From kizune at openjdk.org Fri Apr 18 20:10:41 2025 From: kizune at openjdk.org (Alexander Zuev) Date: Fri, 18 Apr 2025 20:10:41 GMT Subject: RFR: 8354928: Clean up and open source some miscellaneous AWT tests [v2] In-Reply-To: References: Message-ID: > Clean up and open source some tests related to event processing in AWT library. Alexander Zuev has updated the pull request incrementally with one additional commit since the last revision: Update test/jdk/java/awt/event/MouseWheelEvent/HWWheelScroll.java Co-authored-by: DamonGuy ------------- Changes: - all: https://git.openjdk.org/jdk/pull/24755/files - new: https://git.openjdk.org/jdk/pull/24755/files/3fc9e0db..1ae50494 Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=24755&range=01 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=24755&range=00-01 Stats: 1 line in 1 file changed: 0 ins; 0 del; 1 mod Patch: https://git.openjdk.org/jdk/pull/24755.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/24755/head:pull/24755 PR: https://git.openjdk.org/jdk/pull/24755 From prr at openjdk.org Fri Apr 18 20:14:55 2025 From: prr at openjdk.org (Phil Race) Date: Fri, 18 Apr 2025 20:14:55 GMT Subject: RFR: 8343977: Convert java/awt/TextArea/TextAreaCursorTest/HoveringAndDraggingTest to main [v6] In-Reply-To: References: Message-ID: <1-_jByjqN_aYGzQOMP2uHKC6oS3D87BO8rFHUl0mXvY=.c3b17bc5-d486-410e-b88b-c0ab5b90dca2@github.com> On Fri, 18 Apr 2025 07:37:38 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 automatically resolve the issue. > > Tejesh R has updated the pull request incrementally with one additional commit since the last revision: > > Removed PassFailJFrame and created custom instruction frame I guess it works, although it would be nice if you could make the instruction window bigger so scrolling isn't needed. ------------- Marked as reviewed by prr (Reviewer). PR Review: https://git.openjdk.org/jdk/pull/22026#pullrequestreview-2779341393 From prr at openjdk.org Fri Apr 18 20:26:42 2025 From: prr at openjdk.org (Phil Race) Date: Fri, 18 Apr 2025 20:26:42 GMT Subject: RFR: 8332947: [macos] java.awt.desktop.OpenURIHandler is not receiving events In-Reply-To: References: Message-ID: <8_5DuAdY2okQ_NBdL64KKU_CxkAjtfRlXK78SExhuk0=.b3586b94-fb27-475d-a653-0e39d3424e73@github.com> On Wed, 2 Apr 2025 14:15:28 GMT, Pabulaner IV wrote: > When trying to register an open URI handler when using JavaFX with a native menu, this task fails on Mac. > Either the native menu is not shown or the URIs are not received. > > This pull request fixes this issue if AWT is registered after JavaFX, so that AWT runs embedded inside JavaFX. > It fixes this by introducing a native event to AWT, which can be used by JavaFX to forward events such as an openURL event. > > JavaFX Pull Request: https://github.com/openjdk/jfx/pull/1755 > Co-Author: @FlorianKirmaier src/java.desktop/macosx/native/libawt_lwawt/awt/ApplicationDelegate.m line 200: > 198: if (!self) return self; > 199: > 200: // register for the finish launching and system power off notifications by default I assume there is a good reason that AWT only registered for these notifications if IT is the main toolkit. The implications of changing this might be that it will try to handle events that should be left to FX in the case that FX is the main toolkit. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/24379#discussion_r2051082497 From honkar at openjdk.org Fri Apr 18 20:28:55 2025 From: honkar at openjdk.org (Harshitha Onkar) Date: Fri, 18 Apr 2025 20:28:55 GMT Subject: RFR: 8355051: Problemlist java/awt/Graphics2D/CopyAreaOOB.java on macosx-aarch64 In-Reply-To: References: Message-ID: On Fri, 18 Apr 2025 19:48:00 GMT, Phil Race wrote: > I don't think we pushed a related change .. which leaves me wondering about something in the CI machinery except it affects no other tests .. so we should pursue this not just problem list and forget. Noted Phil. Thank you. JBS issue has been updated to reflect the priority. ------------- PR Comment: https://git.openjdk.org/jdk/pull/24759#issuecomment-2816145302 From prr at openjdk.org Fri Apr 18 20:49:50 2025 From: prr at openjdk.org (Phil Race) Date: Fri, 18 Apr 2025 20:49:50 GMT Subject: RFR: JDK-8354532 : Open source JFileChooser Tests - Set 7 In-Reply-To: <8XQHXRzAJo-kjHCtN6FVqhKz-jgnlFA2T77NcozLqLg=.48d592ec-df58-47d6-a79e-347f4cce131f@github.com> References: <8XQHXRzAJo-kjHCtN6FVqhKz-jgnlFA2T77NcozLqLg=.48d592ec-df58-47d6-a79e-347f4cce131f@github.com> Message-ID: <6VNMJ35jJK-GAeQVuC3oBG4TlwHs6geUGu4lBHiVlGs=.0eb1e633-5b7b-4511-94f5-dbc53ffaf860@github.com> On Thu, 17 Apr 2025 21:14:59 GMT, Harshitha Onkar wrote: > Following tests are open sourced - > > 1. javax/swing/JFileChooser/bug4357012.java > 2. javax/swing/JFileChooser/bug4926884.java > 3. javax/swing/JFileChooser/bug5045464.java > 4. javax/swing/JFileChooser/bug6515169.java Marked as reviewed by prr (Reviewer). ------------- PR Review: https://git.openjdk.org/jdk/pull/24743#pullrequestreview-2779389776 From prr at openjdk.org Fri Apr 18 21:00:47 2025 From: prr at openjdk.org (Phil Race) Date: Fri, 18 Apr 2025 21:00:47 GMT Subject: RFR: 8354928: Clean up and open source some miscellaneous AWT tests [v2] In-Reply-To: References: Message-ID: <0Apxu2ddyL69EcvR4gIfurmx_5JHCaMBuGa4LjVjYNU=.e6514358-06ba-4f8c-a65a-9b71b9801df6@github.com> On Fri, 18 Apr 2025 18:18:34 GMT, Alexander Zuev wrote: >> test/jdk/java/awt/event/MouseWheelEvent/HWWheelScroll.java line 75: >> >>> 73: retValue.add(makeListFrame(TEXT_TALL)); >>> 74: retValue.add(makeListFrame(TEXT_WIDE)); >>> 75: retValue.add(makeListFrame(TEXT_SMALL)); >> >> I see these frames being generated and displayed, but I have a single empty & untitled frame. Which one is this supposed to be? >> Screenshot 2025-04-18 at 10 32 55?AM > > It's the parent frame for the FileDialog - you can try the scrolling inside or ignore it - it does not matter. Just do not close it until the test scenario is complete. Perhaps you should give it a title - see line 76. eg Frame f = new Frame("File Dialog Owner"); ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/24755#discussion_r2051115083 From honkar at openjdk.org Fri Apr 18 21:02:54 2025 From: honkar at openjdk.org (Harshitha Onkar) Date: Fri, 18 Apr 2025 21:02:54 GMT Subject: Integrated: JDK-8353319 : Open source Swing tests - Set 3 In-Reply-To: References: Message-ID: On Mon, 14 Apr 2025 23:58:40 GMT, Harshitha Onkar wrote: > Following tests are updates as part of this PR: > > 1. javax/swing/JRootPane/bug4614623.java - manual > 2. javax/swing/JTabbedPane/bug4613811.java - manual > 3. javax/swing/JWindow/bug4251781.java - manual > 4. javax/swing/JFrame/bug4419914.java - manual, updated existing test by adding JWindow, JDialog cases. This pull request has now been integrated. Changeset: bf63f9ff Author: Harshitha Onkar URL: https://git.openjdk.org/jdk/commit/bf63f9ffa5e107ecb01e67dbef785a7bf4c89f16 Stats: 350 lines in 4 files changed: 329 ins; 1 del; 20 mod 8353319: Open source Swing tests - Set 3 Reviewed-by: abhiscxk, dnguyen ------------- PR: https://git.openjdk.org/jdk/pull/24639 From kizune at openjdk.org Fri Apr 18 21:09:51 2025 From: kizune at openjdk.org (Alexander Zuev) Date: Fri, 18 Apr 2025 21:09:51 GMT Subject: RFR: 8353470: Clean up and open source couple AWT Graphics related tests (Part 2) Message-ID: Clean up and open source four more tests problem listing one for known issues on linux and macos. ------------- Commit messages: - 8353470: Clean up and open source couple AWT Graphics related tests (Part 2) Changes: https://git.openjdk.org/jdk/pull/24761/files Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=24761&range=00 Issue: https://bugs.openjdk.org/browse/JDK-8353470 Stats: 606 lines in 5 files changed: 606 ins; 0 del; 0 mod Patch: https://git.openjdk.org/jdk/pull/24761.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/24761/head:pull/24761 PR: https://git.openjdk.org/jdk/pull/24761 From dnguyen at openjdk.org Fri Apr 18 21:15:09 2025 From: dnguyen at openjdk.org (Damon Nguyen) Date: Fri, 18 Apr 2025 21:15:09 GMT Subject: Integrated: 8353748: Open source several swing tests batch6 In-Reply-To: References: Message-ID: On Thu, 17 Apr 2025 16:46:02 GMT, Damon Nguyen wrote: > Open-sourcing and standardizing several swing tests (JTree) This pull request has now been integrated. Changeset: 38f9b3a9 Author: Damon Nguyen URL: https://git.openjdk.org/jdk/commit/38f9b3a9738de7896d840fc114a76ced3b77c269 Stats: 501 lines in 6 files changed: 501 ins; 0 del; 0 mod 8353748: Open source several swing tests batch6 Reviewed-by: kizune ------------- PR: https://git.openjdk.org/jdk/pull/24730 From kizune at openjdk.org Fri Apr 18 21:23:57 2025 From: kizune at openjdk.org (Alexander Zuev) Date: Fri, 18 Apr 2025 21:23:57 GMT Subject: RFR: 8354653: Clean up and open source KeyEvent related tests (Part 4) Message-ID: Clean up four more KeyEvent related tests. ------------- Commit messages: - 8354653: Clean up and open source KeyEvent related tests (Part 4) Changes: https://git.openjdk.org/jdk/pull/24763/files Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=24763&range=00 Issue: https://bugs.openjdk.org/browse/JDK-8354653 Stats: 409 lines in 4 files changed: 409 ins; 0 del; 0 mod Patch: https://git.openjdk.org/jdk/pull/24763.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/24763/head:pull/24763 PR: https://git.openjdk.org/jdk/pull/24763 From kizune at openjdk.org Fri Apr 18 21:26:10 2025 From: kizune at openjdk.org (Alexander Zuev) Date: Fri, 18 Apr 2025 21:26:10 GMT Subject: RFR: 8354928: Clean up and open source some miscellaneous AWT tests [v3] In-Reply-To: References: Message-ID: > Clean up and open source some tests related to event processing in AWT library. Alexander Zuev has updated the pull request incrementally with one additional commit since the last revision: Update HWWheelScroll.java Set title on file dialog owner frame. ------------- Changes: - all: https://git.openjdk.org/jdk/pull/24755/files - new: https://git.openjdk.org/jdk/pull/24755/files/1ae50494..fe71e17e Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=24755&range=02 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=24755&range=01-02 Stats: 1 line in 1 file changed: 0 ins; 0 del; 1 mod Patch: https://git.openjdk.org/jdk/pull/24755.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/24755/head:pull/24755 PR: https://git.openjdk.org/jdk/pull/24755 From dnguyen at openjdk.org Fri Apr 18 21:26:10 2025 From: dnguyen at openjdk.org (Damon Nguyen) Date: Fri, 18 Apr 2025 21:26:10 GMT Subject: RFR: 8354928: Clean up and open source some miscellaneous AWT tests [v3] In-Reply-To: References: Message-ID: On Fri, 18 Apr 2025 21:23:40 GMT, Alexander Zuev wrote: >> Clean up and open source some tests related to event processing in AWT library. > > Alexander Zuev has updated the pull request incrementally with one additional commit since the last revision: > > Update HWWheelScroll.java > > Set title on file dialog owner frame. Marked as reviewed by dnguyen (Committer). ------------- PR Review: https://git.openjdk.org/jdk/pull/24755#pullrequestreview-2779454202 From kizune at openjdk.org Fri Apr 18 21:26:10 2025 From: kizune at openjdk.org (Alexander Zuev) Date: Fri, 18 Apr 2025 21:26:10 GMT Subject: RFR: 8354928: Clean up and open source some miscellaneous AWT tests [v3] In-Reply-To: <0Apxu2ddyL69EcvR4gIfurmx_5JHCaMBuGa4LjVjYNU=.e6514358-06ba-4f8c-a65a-9b71b9801df6@github.com> References: <0Apxu2ddyL69EcvR4gIfurmx_5JHCaMBuGa4LjVjYNU=.e6514358-06ba-4f8c-a65a-9b71b9801df6@github.com> Message-ID: On Fri, 18 Apr 2025 20:58:26 GMT, Phil Race wrote: >> It's the parent frame for the FileDialog - you can try the scrolling inside or ignore it - it does not matter. Just do not close it until the test scenario is complete. > > Perhaps you should give it a title - see line 76. eg > Frame f = new Frame("File Dialog Owner"); Sure. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/24755#discussion_r2051136378 From honkar at openjdk.org Fri Apr 18 21:37:54 2025 From: honkar at openjdk.org (Harshitha Onkar) Date: Fri, 18 Apr 2025 21:37:54 GMT Subject: Integrated: JDK-8354340 : Open source Swing Tests - Set 6 In-Reply-To: References: Message-ID: On Wed, 16 Apr 2025 20:05:47 GMT, Harshitha Onkar wrote: > Following tests are open-sourced in this PR: > > - javax/swing/JViewport/ScrollRectToVisibleTest3.java - automated > - javax/swing/JViewport/SetViewRepaint.java - manual This pull request has now been integrated. Changeset: 76dec47f Author: Harshitha Onkar URL: https://git.openjdk.org/jdk/commit/76dec47f00230214e9ba58714be5a3ad26f8308d Stats: 279 lines in 2 files changed: 279 ins; 0 del; 0 mod 8354340: Open source Swing Tests - Set 6 Reviewed-by: azvegint, achung ------------- PR: https://git.openjdk.org/jdk/pull/24697 From kizune at openjdk.org Fri Apr 18 22:28:48 2025 From: kizune at openjdk.org (Alexander Zuev) Date: Fri, 18 Apr 2025 22:28:48 GMT Subject: RFR: 8354472: Clean up and open source KeyEvent related tests (Part 3) Message-ID: Clean up and publish five more KeyEvent related tests. ------------- Commit messages: - 8354472: Clean up and open source KeyEvent related tests (Part 3) Changes: https://git.openjdk.org/jdk/pull/24764/files Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=24764&range=00 Issue: https://bugs.openjdk.org/browse/JDK-8354472 Stats: 530 lines in 5 files changed: 530 ins; 0 del; 0 mod Patch: https://git.openjdk.org/jdk/pull/24764.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/24764/head:pull/24764 PR: https://git.openjdk.org/jdk/pull/24764 From achung at openjdk.org Fri Apr 18 22:28:56 2025 From: achung at openjdk.org (Alisen Chung) Date: Fri, 18 Apr 2025 22:28:56 GMT Subject: RFR: 8352905: Open some JComboBox bugs 1 [v3] In-Reply-To: References: Message-ID: > Updating and opening some tests Alisen Chung has updated the pull request incrementally with one additional commit since the last revision: fix test ------------- Changes: - all: https://git.openjdk.org/jdk/pull/24495/files - new: https://git.openjdk.org/jdk/pull/24495/files/57bb0878..9b36a10f Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=24495&range=02 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=24495&range=01-02 Stats: 36 lines in 1 file changed: 10 ins; 4 del; 22 mod Patch: https://git.openjdk.org/jdk/pull/24495.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/24495/head:pull/24495 PR: https://git.openjdk.org/jdk/pull/24495 From achung at openjdk.org Fri Apr 18 22:30:03 2025 From: achung at openjdk.org (Alisen Chung) Date: Fri, 18 Apr 2025 22:30:03 GMT Subject: RFR: 8353007: Open some JComboBox bugs 2 [v4] In-Reply-To: References: Message-ID: > Updating and opening some tests Alisen Chung has updated the pull request incrementally with two additional commits since the last revision: - update to PassFailJFrame.forceFail - update to PassFailJFrame.forceFail ------------- Changes: - all: https://git.openjdk.org/jdk/pull/24496/files - new: https://git.openjdk.org/jdk/pull/24496/files/24f40ddf..d7bba188 Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=24496&range=03 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=24496&range=02-03 Stats: 5 lines in 1 file changed: 0 ins; 2 del; 3 mod Patch: https://git.openjdk.org/jdk/pull/24496.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/24496/head:pull/24496 PR: https://git.openjdk.org/jdk/pull/24496 From achung at openjdk.org Fri Apr 18 22:40:14 2025 From: achung at openjdk.org (Alisen Chung) Date: Fri, 18 Apr 2025 22:40:14 GMT Subject: RFR: 8353685: Open some JComboBox bugs 4 [v2] In-Reply-To: References: Message-ID: > Updating and opening some JComboBox bugs Alisen Chung has updated the pull request incrementally with one additional commit since the last revision: move disposal onto edt ------------- Changes: - all: https://git.openjdk.org/jdk/pull/24733/files - new: https://git.openjdk.org/jdk/pull/24733/files/94f10115..0799d454 Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=24733&range=01 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=24733&range=00-01 Stats: 26 lines in 3 files changed: 7 ins; 10 del; 9 mod Patch: https://git.openjdk.org/jdk/pull/24733.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/24733/head:pull/24733 PR: https://git.openjdk.org/jdk/pull/24733 From achung at openjdk.org Fri Apr 18 22:45:39 2025 From: achung at openjdk.org (Alisen Chung) Date: Fri, 18 Apr 2025 22:45:39 GMT Subject: RFR: 8354095: Open some JTable bugs 5 [v3] In-Reply-To: <4t0GC0P2HhS-hgc6dNndlsbTxaliBcWUqSypiPPb7cw=.ea094f23-779a-45f5-a4ab-85c6e76841a6@github.com> References: <4t0GC0P2HhS-hgc6dNndlsbTxaliBcWUqSypiPPb7cw=.ea094f23-779a-45f5-a4ab-85c6e76841a6@github.com> Message-ID: > Updating and opening some JTable bugs Alisen Chung has updated the pull request incrementally with one additional commit since the last revision: manual jtreg tag, make jtable field local ------------- Changes: - all: https://git.openjdk.org/jdk/pull/24734/files - new: https://git.openjdk.org/jdk/pull/24734/files/9bfe1493..b514a695 Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=24734&range=02 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=24734&range=01-02 Stats: 4 lines in 2 files changed: 0 ins; 2 del; 2 mod Patch: https://git.openjdk.org/jdk/pull/24734.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/24734/head:pull/24734 PR: https://git.openjdk.org/jdk/pull/24734 From achung at openjdk.org Fri Apr 18 22:53:10 2025 From: achung at openjdk.org (Alisen Chung) Date: Fri, 18 Apr 2025 22:53:10 GMT Subject: RFR: 8354233: Open some JTable bugs 6 [v2] In-Reply-To: References: Message-ID: > Updating and opening some JTable bugs Alisen Chung has updated the pull request incrementally with one additional commit since the last revision: update jtreg paths, volatile, manual jtreg tag ------------- Changes: - all: https://git.openjdk.org/jdk/pull/24735/files - new: https://git.openjdk.org/jdk/pull/24735/files/0284068a..f0762516 Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=24735&range=01 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=24735&range=00-01 Stats: 35 lines in 4 files changed: 14 ins; 3 del; 18 mod Patch: https://git.openjdk.org/jdk/pull/24735.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/24735/head:pull/24735 PR: https://git.openjdk.org/jdk/pull/24735 From achung at openjdk.org Fri Apr 18 22:56:38 2025 From: achung at openjdk.org (Alisen Chung) Date: Fri, 18 Apr 2025 22:56:38 GMT Subject: RFR: 8354466: Open some misc Swing bugs 9 [v2] In-Reply-To: References: Message-ID: > Updating and opening some misc swing bugs Alisen Chung has updated the pull request incrementally with one additional commit since the last revision: update jtreg path ------------- Changes: - all: https://git.openjdk.org/jdk/pull/24703/files - new: https://git.openjdk.org/jdk/pull/24703/files/e89bc352..24fd9e94 Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=24703&range=01 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=24703&range=00-01 Stats: 1 line in 1 file changed: 0 ins; 0 del; 1 mod Patch: https://git.openjdk.org/jdk/pull/24703.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/24703/head:pull/24703 PR: https://git.openjdk.org/jdk/pull/24703 From serb at openjdk.org Fri Apr 18 23:09:48 2025 From: serb at openjdk.org (Sergey Bylokhov) Date: Fri, 18 Apr 2025 23:09:48 GMT Subject: RFR: JDK-8354340 : Open source Swing Tests - Set 6 [v2] In-Reply-To: References: <1Syw2cSgOGu6f7c16RtqseXcMtyEIbe4WDH3-Z8Yxbg=.29867e2a-728d-42e6-b040-f526be6af5fc@github.com> Message-ID: On Wed, 16 Apr 2025 23:51:12 GMT, Harshitha Onkar wrote: >> test/jdk/javax/swing/JViewport/ScrollRectToVisibleTest3.java line 67: >> >>> 65: Rectangle frameBounds = Util.invokeOnEDT(() -> getComponentBounds(frame)); >>> 66: robot.delay(100); >>> 67: Point scrollBtnLoc = Util.getCenterPoint(scrollButton); >> >> scrollButton initialized on EDT > > [Util.getCenterPoint()](https://github.com/openjdk/jdk/blob/db2dffb6e5fed3773080581350f7f5c0bcff8f35/test/jdk/javax/swing/regtesthelpers/Util.java#L197) is already being invoked on EDT. However, scrollButton is a parameter of getCenterPoint() and is passed to the method on the main thread. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/24697#discussion_r2051232482 From serb at openjdk.org Fri Apr 18 23:11:43 2025 From: serb at openjdk.org (Sergey Bylokhov) Date: Fri, 18 Apr 2025 23:11:43 GMT Subject: RFR: 8353957: Open source several AWT ScrollPane tests - Batch 1 In-Reply-To: References: Message-ID: On Fri, 18 Apr 2025 09:54:26 GMT, Prasanta Sadhukhan wrote: >> I hope so, I've seen some instances in other tests too. > > at the least, ScrollPantPaint.html needs to be changed to ScrollPanePaint.java after applet conversion @prrace Is this license compatible with OpenJDK?" ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/24684#discussion_r2051233748 From achung at openjdk.org Fri Apr 18 23:12:32 2025 From: achung at openjdk.org (Alisen Chung) Date: Fri, 18 Apr 2025 23:12:32 GMT Subject: RFR: 8354465: Open some JTable bugs 8 [v2] In-Reply-To: References: Message-ID: > Updating and opening some JTable bugs Alisen Chung has updated the pull request incrementally with one additional commit since the last revision: update some test instructions, add jtreg summary ------------- Changes: - all: https://git.openjdk.org/jdk/pull/24741/files - new: https://git.openjdk.org/jdk/pull/24741/files/03c740d9..ee549925 Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=24741&range=01 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=24741&range=00-01 Stats: 14 lines in 4 files changed: 2 ins; 0 del; 12 mod Patch: https://git.openjdk.org/jdk/pull/24741.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/24741/head:pull/24741 PR: https://git.openjdk.org/jdk/pull/24741 From achung at openjdk.org Fri Apr 18 23:12:33 2025 From: achung at openjdk.org (Alisen Chung) Date: Fri, 18 Apr 2025 23:12:33 GMT Subject: RFR: 8354465: Open some JTable bugs 8 In-Reply-To: References: Message-ID: On Thu, 17 Apr 2025 19:18:00 GMT, Alisen Chung wrote: > Updating and opening some JTable bugs edited some test instructions and added a jtreg summary to one test, please re-review ------------- PR Comment: https://git.openjdk.org/jdk/pull/24741#issuecomment-2816332483 From serb at openjdk.org Fri Apr 18 23:17:42 2025 From: serb at openjdk.org (Sergey Bylokhov) Date: Fri, 18 Apr 2025 23:17:42 GMT Subject: RFR: 8139228: JFileChooser renders file names as HTML document In-Reply-To: References: Message-ID: On Thu, 17 Apr 2025 10:55:04 GMT, Tejesh R wrote: >> OS or L&F dependant? >> >> macOS uses Aqua by default, Linux uses Metal by default. The behaviour in different L&F could be different. >> >> The test may be customised for a L&F if needed? and it's likely required. I haven't looked into it yet, so I can't suggest anything. Exploring the possibility of making the test automatic is worth the effort. > > Dependant on L&F I hope. > Because it's impossible to create a file with `` in the name on Windows. But is should be possible to trigger the bug using a custom FileSystemView without interacting with the actual file system? ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/24439#discussion_r2051235968 From achung at openjdk.org Fri Apr 18 23:21:05 2025 From: achung at openjdk.org (Alisen Chung) Date: Fri, 18 Apr 2025 23:21:05 GMT Subject: RFR: 8354341: Open some JTable bugs 7 [v2] In-Reply-To: <-A3k5m01IIlys1qXXQIqzcxRaGuGnVK2KMZ33Et4vmM=.c53f6d63-6829-41d9-852c-e436344348eb@github.com> References: <-A3k5m01IIlys1qXXQIqzcxRaGuGnVK2KMZ33Et4vmM=.c53f6d63-6829-41d9-852c-e436344348eb@github.com> Message-ID: > Updating and opening some JTable bugs Alisen Chung has updated the pull request incrementally with one additional commit since the last revision: update test instructions, add manual tag, move frame disposal into edt, volatile keyword ------------- Changes: - all: https://git.openjdk.org/jdk/pull/24739/files - new: https://git.openjdk.org/jdk/pull/24739/files/38145abc..63e60ccd Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=24739&range=01 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=24739&range=00-01 Stats: 16 lines in 2 files changed: 3 ins; 1 del; 12 mod Patch: https://git.openjdk.org/jdk/pull/24739.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/24739/head:pull/24739 PR: https://git.openjdk.org/jdk/pull/24739 From achung at openjdk.org Fri Apr 18 23:21:05 2025 From: achung at openjdk.org (Alisen Chung) Date: Fri, 18 Apr 2025 23:21:05 GMT Subject: RFR: 8354341: Open some JTable bugs 7 In-Reply-To: <-A3k5m01IIlys1qXXQIqzcxRaGuGnVK2KMZ33Et4vmM=.c53f6d63-6829-41d9-852c-e436344348eb@github.com> References: <-A3k5m01IIlys1qXXQIqzcxRaGuGnVK2KMZ33Et4vmM=.c53f6d63-6829-41d9-852c-e436344348eb@github.com> Message-ID: <8LsS-_MZEVDS8vzK5W2OfOZykym1sEEf0X5H2u_Zwrs=.51f51875-bf5a-4945-b332-8cab7c8be19a@github.com> On Thu, 17 Apr 2025 19:11:06 GMT, Alisen Chung wrote: > Updating and opening some JTable bugs updated some tests, please re-review ------------- PR Comment: https://git.openjdk.org/jdk/pull/24739#issuecomment-2816339258 From serb at openjdk.org Fri Apr 18 23:22:41 2025 From: serb at openjdk.org (Sergey Bylokhov) Date: Fri, 18 Apr 2025 23:22:41 GMT Subject: RFR: JDK-8353942 : Open source Swing Tests - Set 5 [v3] In-Reply-To: References: Message-ID: On Wed, 16 Apr 2025 23:59:26 GMT, Harshitha Onkar wrote: >> Following test are open-sourced in this PR: >> >> - javax/swing/DataTransfer/DragOverFeedbackTest.java - manual >> - javax/swing/DataTransfer/ListDragOverFeedbackTest.java - manual >> - javax/swing/DataTransfer/bug4655513.java - automated >> - javax/swing/SwingUtilities/bug4369355.java - automated >> - javax/swing/SwingUtilities/bug4967768.java - manual > > Harshitha Onkar has updated the pull request incrementally with one additional commit since the last revision: > > editor on EDT test/jdk/javax/swing/DataTransfer/bug4655513.java line 65: > 63: robot.delay(1000); > 64: > 65: Point dragStartLoc = Util.getCenterPoint(dragSource); dragSource and editor are initialized on one thread and accessed on the main thread without synchronization. volatile might help. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/24698#discussion_r2051238614 From honkar at openjdk.org Fri Apr 18 23:33:02 2025 From: honkar at openjdk.org (Harshitha Onkar) Date: Fri, 18 Apr 2025 23:33:02 GMT Subject: Integrated: JDK-8354532 : Open source JFileChooser Tests - Set 7 In-Reply-To: <8XQHXRzAJo-kjHCtN6FVqhKz-jgnlFA2T77NcozLqLg=.48d592ec-df58-47d6-a79e-347f4cce131f@github.com> References: <8XQHXRzAJo-kjHCtN6FVqhKz-jgnlFA2T77NcozLqLg=.48d592ec-df58-47d6-a79e-347f4cce131f@github.com> Message-ID: On Thu, 17 Apr 2025 21:14:59 GMT, Harshitha Onkar wrote: > Following tests are open sourced - > > 1. javax/swing/JFileChooser/bug4357012.java > 2. javax/swing/JFileChooser/bug4926884.java > 3. javax/swing/JFileChooser/bug5045464.java > 4. javax/swing/JFileChooser/bug6515169.java This pull request has now been integrated. Changeset: bd73127d Author: Harshitha Onkar URL: https://git.openjdk.org/jdk/commit/bd73127d7495244f93f941530db32b4559d45689 Stats: 387 lines in 4 files changed: 387 ins; 0 del; 0 mod 8354532: Open source JFileChooser Tests - Set 7 Reviewed-by: prr ------------- PR: https://git.openjdk.org/jdk/pull/24743 From honkar at openjdk.org Fri Apr 18 23:52:08 2025 From: honkar at openjdk.org (Harshitha Onkar) Date: Fri, 18 Apr 2025 23:52:08 GMT Subject: RFR: JDK-8353011 : Open source Swing JButton tests - Set 1 Message-ID: Following tests are open sourced in this PR: javax/swing/JButton/bug4151763.java javax/swing/JButton/bug4415505.java javax/swing/JButton/bug4978274.java javax/swing/JRadioButton/bug4673850.java javax/swing/JTable/bug4188504.java ------------- Commit messages: - Set1 tests Changes: https://git.openjdk.org/jdk/pull/24765/files Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=24765&range=00 Issue: https://bugs.openjdk.org/browse/JDK-8353011 Stats: 454 lines in 5 files changed: 454 ins; 0 del; 0 mod Patch: https://git.openjdk.org/jdk/pull/24765.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/24765/head:pull/24765 PR: https://git.openjdk.org/jdk/pull/24765 From honkar at openjdk.org Sat Apr 19 00:14:41 2025 From: honkar at openjdk.org (Harshitha Onkar) Date: Sat, 19 Apr 2025 00:14:41 GMT Subject: RFR: 8354472: Clean up and open source KeyEvent related tests (Part 3) In-Reply-To: References: Message-ID: On Fri, 18 Apr 2025 22:23:25 GMT, Alexander Zuev wrote: > Clean up and publish five more KeyEvent related tests. LGTM apart from minor suggestions. test/jdk/java/awt/event/KeyEvent/CharUndefinedTest.java line 45: > 43: Click on the text field inside the window named "Check KeyChar values". > 44: Of any of the keys mentioned in this list that exist on your keyboard > 45: press once every of them and also press them in two-key combinations such as Suggestion: press each of the listed keys once and also press them in two-key combinations such as test/jdk/java/awt/event/KeyEvent/CharUndefinedTest.java line 48: > 46: Control-Shift or Alt-Control. > 47: The list of keys is: "Control, Shift, Meta, Alt, Command, Option". > 48: After that press once all function keys from F1 to F12, Suggestion: After that press all function keys from F1 to F12 once, test/jdk/java/awt/event/KeyEvent/CharUndefinedTest.java line 86: > 84: > 85: public static void main(String[] args) throws InterruptedException, > 86: InvocationTargetException { generic exception can be used here and at other places. Not mandatory though. Suggestion: public static void main(String[] args) throws Exception { test/jdk/java/awt/event/KeyEvent/KeyEventToLightweight.java line 100: > 98: robot.waitForIdle(); > 99: Point target = new Point(); > 100: middleOf(lwbutton, target); On EDT ? test/jdk/java/awt/event/KeyEvent/KeyEventToLightweight.java line 114: > 112: robot.waitForIdle(); > 113: robot.delay(500); > 114: middleOf(hwbutton, target); on EDT ? ------------- Marked as reviewed by honkar (Reviewer). PR Review: https://git.openjdk.org/jdk/pull/24764#pullrequestreview-2779643001 PR Review Comment: https://git.openjdk.org/jdk/pull/24764#discussion_r2051259429 PR Review Comment: https://git.openjdk.org/jdk/pull/24764#discussion_r2051260646 PR Review Comment: https://git.openjdk.org/jdk/pull/24764#discussion_r2051262318 PR Review Comment: https://git.openjdk.org/jdk/pull/24764#discussion_r2051268071 PR Review Comment: https://git.openjdk.org/jdk/pull/24764#discussion_r2051268065 From zjx001202 at gmail.com Sat Apr 19 03:37:57 2025 From: zjx001202 at gmail.com (Glavo) Date: Sat, 19 Apr 2025 11:37:57 +0800 Subject: Proposal: A new common Image API In-Reply-To: References: <484ae025-47dc-462e-b6bd-e4fce3252005@oracle.com> Message-ID: Hi Jeremy, The purpose of my email is to: 1. Find out if people feel the work is worth the effort. 2. Find out if there is anyone willing to take the lead. 3. Discuss how this work will begin. I did have a draft design, but I was not an expert in the field, so I knew it had a lot of flaws. I guess if that's what people really want, then people should have their own ideas about it. So instead of presenting this flawed idea, I wanted to discuss other things first. Once I've determined that the work is worth the effort, but no expert has the free time to take the lead, I'll try to implement it myself and then seek guidance. What is the difference between what you?re describing and the Apache > Commons Imaging project itself? Apache Commons Imaging currently depends on AWT BufferedImage. It does not include the things mentioned in the email. Glavo On Fri, Apr 18, 2025 at 4:37?AM Jeremy Wood wrote: > What is the scope / ideal feature set of this project? (Can you start > outlining some of the main interfaces you?re envisioning? maybe in a > google doc?) > > What exactly are you looking for in this email thread? Are you looking for > resources (mostly people?) who can work on this project? Or are you looking > to see if OpenJDK is willing/able to maintain this API? (or something else?) > > What is the difference between what you?re describing and the Apache > Commons Imaging project itself? > > I assume this project is strictly related to reading & writing images. So > it will NOT support anything analogous to: > 1. Graphics2D > 2. AffineTransform > 3. PerspectiveTransform > 4. Fonts > 5. MultiResolutionImage > > - Jeremy > > obligatory xkcd reference: > > https://www.explainxkcd.com/wiki/index.php/927:_Standards > > ------ Original Message ------ > From "Scott Palmer" > To "Philip Race" > Cc "Glavo" ; "openjfx-dev" ; > client-libs-dev at openjdk.org > Date 4/17/2025 12:57:17?PM > Subject Re: Proposal: A new common Image API > > I think a common image I/O library that is not tied to a UI > framework makes sense and is long overdue. > Raster images do have a common format that encapsulates everything. We > essentially have this abstracted in the two UI frameworks already. At some > level it comes down to PixelFormats and data buffers. There are not so > many of them that it is impossible to make a common abstraction for the > purposes of I/O that can be mapped to what is needed by the UI framework. > Just as JavaFX already has the SwingFxUtils for converting between AWT and > JavaFX formats, there can be a utility to convert between the I/O library > format and each UI framework's format. I would expect in most cases that > the raw pixel data could be shared without extra copying. > ImageIO is a good starting point. Remove the actual UI classes from it > like BufferedImage and keep plain raster representations of the data that > can be wrapped by the UI classes. Under the hood the arrays or buffers of > raster data don't have to change,they are the important parts that the I/O > library needs to deal with. Mapping the metadata (width, height, colour > space, pixel format, etc.) will usually be very cheap. Some cases may need > to run a conversion, like the example of 1-bpp black/white needing to be > remapped to RGB, but that that can happen in the utility layer that moves > the image from the Image I/O domain to the UI framework domain on a > case-by-case basis. Worst case is that the UI framework throws an > UnsupportImageFormat exception when it doesn't have code to deal with > raster data in a particular format. > > I'm sure it is all much harder than I suspect, but I don't think it should > be. :-) > > Scott > > > On Thu, Apr 17, 2025 at 12:10?AM Philip Race > wrote: > >> First, note than John Neffenger replied to this but only on openjfx-dev >> and the first thing I saw was the reply and couldn't see the original. >> After some consternation I tracked down this cross-post. >> >> Here's a link to the reply >> https://mail.openjdk.org/pipermail/openjfx-dev/2025-April/053616.html >> >> A fundamental problem is that all the users need to be able to produce >> and consume the data. >> So there either needs to be a module dependency (not viable) or an >> agreed format (are we >> really going to define an image format which encapsulates everything, >> including the multi-frame >> GIF support) and then everyone needs a reader and don't forget writers >> and they need to be able to do .. so much .. >> >> I just don't see a viable path here. >> And several (8 ?) years ago, I pondered some way to separate image >> handling from the >> desktop module to see if a server app could use it without pulling in >> AWT but the intra-package >> dependencies made it impossible without changes I didn't even figure out >> if they were possible. >> >> -phil. >> >> On 4/16/25 3:04 AM, Glavo wrote: >> > Currently, there are multiple different image APIs in the Java >> > ecosystem: AWT, JavaFX, Android, etc. >> > What's worse, the Android platform does not provide support for AWT, >> > making the Java ecosystem even more fragmented. >> > >> > There are some obvious problems with the current situation: >> > >> > * Third-party libraries that need an image API are difficult to be >> > universal. >> > A practical example: Apache Commons Imaging has been in the alpha >> > stage and cannot release version 1.0. >> > The main reason is that it depends on `java.awt.image`, so it >> > doesn't work on Android. >> > We hope to solve this problem before the official release. >> > * Different image APIs have to repeatedly implement support for >> > reading the same image format (such as JPEG). >> > In fact, AWT, JavaFX, and Android now each implement reading JPEG >> > images. >> > This is a waste. >> > >> > I thought we might be able to create a new module independent of >> > java.desktop that provides a common abstraction for images. >> > It should: >> > >> > * Provides common Image and ImageProvider interfaces that can be >> > implemented by different providers. >> > * Provides a unified abstraction for colors, color spaces, pixel >> > formats, etc. >> > * Provides general and extensible image I/O support. >> > Read/write support should only need to be implemented once per image >> > format. >> > It should be bidirectionally compatible with `javax.imageio`: >> > The implementation of either API can be accessed through the other >> API. >> > >> > I want to know if this is an idea worth putting into practice? >> > I'm not an expert in this field, so I'm worried about creating designs >> > with many flaws. >> > Therefore, I haven't attempted to implement it yet. >> > If anyone is willing to implement it, I'd like to help. >> > >> > I had sent an email a few days ago but no one responded, so I >> > re-edited it and sent this one. >> > >> > Glavo >> > >> >> -------------- next part -------------- An HTML attachment was scrubbed... URL: From achung at openjdk.org Sat Apr 19 04:34:30 2025 From: achung at openjdk.org (Alisen Chung) Date: Sat, 19 Apr 2025 04:34:30 GMT Subject: RFR: 8353488: Open some JComboBox bugs 3 Message-ID: Opening some JComboBox bugs ------------- Commit messages: - update jtreg paths - opening tests Changes: https://git.openjdk.org/jdk/pull/24767/files Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=24767&range=00 Issue: https://bugs.openjdk.org/browse/JDK-8353488 Stats: 317 lines in 4 files changed: 317 ins; 0 del; 0 mod Patch: https://git.openjdk.org/jdk/pull/24767.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/24767/head:pull/24767 PR: https://git.openjdk.org/jdk/pull/24767 From serb at openjdk.org Sat Apr 19 07:51:44 2025 From: serb at openjdk.org (Sergey Bylokhov) Date: Sat, 19 Apr 2025 07:51:44 GMT Subject: Integrated: 8354077: Get rid of offscreenSharingEnabled windows flag In-Reply-To: References: Message-ID: On Wed, 9 Apr 2025 03:16:38 GMT, Sergey Bylokhov wrote: > Another unused obsoleted flag removed (offscreenSharingEnabled) from WindowsFlags. Its last usage was eliminated by [JDK-6725214](https://bugs.openjdk.org/browse/JDk-6725214) ("D3D: forward-port the new pipeline from 6u10"), see [commit](https://github.com/openjdk/jdk/commit/e4c9db984fe1a3a9d06fb60e333e92df3b165454#diff-c27da1eb4bdc7e69158f38ab3e7a1aa02b074c131c18ad15d04d0f88f169febeL319). > > Interestingly, the original JDK 6u10 changes marked many options as "Obsoleted" (see [System Properties for Java 2D Technology](https://docs.oracle.com/javase/8/docs/technotes/guides/2d/flags.html)). Some of them later were removed in JDK 9 via [JDK-8155682](https://bugs.openjdk.org/browse/JDK-8155682) ("Get rid of legacy Windows Flags for DX"). > > However, two obsoleted flags remain: > - **sun.java2d.noddraw**: Obsoleted in: Java SE 6 Update 10, which contains a new implementation of D3D support. Setting sun.java2d.noddraw=true is now interpreted exactly the same as disabling that via sun.java2d.d3d=false. > Intended use: To turn off the Java 2D system's use of DirectDraw and Direct3D completely. > Introduced: 1.2 > Default value: false > How to use: Setting this flag to true turns off DirectDraw usage, which sometimes helps to get rid of rendering problems on Win32. > - **sun.java2d.ddoffscreen**: Obsoleted in: Java SE 6 Update 10 > Intended use: To turn on hardware-accelerated scaling when the DirectDraw/Direct3D pipeline is in use. > Introduced: 1.2 > Default value: false > How to use: Setting this flag to true enables hardware-accelerated scaling if the DirectDraw/Direct3D pipeline is in use. DirectDraw/Direct3D hardware scaling is disabled by default to avoid rendering artifacts in existing applications. These rendering artifacts are caused by possible inconsistencies between the scale method that the software scaling operation uses (nearest neighbor) and the different scale methods that video cards use. Certain events that occur while an application is running might cause a scaled image to be rendered partially with hardware scaling operations and partially with software scaling operations, resulting in an inconsistent appearance. For now, you can enable acceleration by setting the ddscale flag to true. > > Should we: > - Continue supporting these indefinitely, or > - Mark them as deprecated for removal in some upcoming release? This pull request has now been integrated. Changeset: c7c77eb6 Author: Sergey Bylokhov URL: https://git.openjdk.org/jdk/commit/c7c77eb6aa25cbf84ba4b7519e16c092c222e504 Stats: 41 lines in 3 files changed: 0 ins; 37 del; 4 mod 8354077: Get rid of offscreenSharingEnabled windows flag Reviewed-by: prr ------------- PR: https://git.openjdk.org/jdk/pull/24534 From duke at openjdk.org Sat Apr 19 14:05:40 2025 From: duke at openjdk.org (Pabulaner IV) Date: Sat, 19 Apr 2025 14:05:40 GMT Subject: RFR: 8332947: [macos] java.awt.desktop.OpenURIHandler is not receiving events In-Reply-To: <8_5DuAdY2okQ_NBdL64KKU_CxkAjtfRlXK78SExhuk0=.b3586b94-fb27-475d-a653-0e39d3424e73@github.com> References: <8_5DuAdY2okQ_NBdL64KKU_CxkAjtfRlXK78SExhuk0=.b3586b94-fb27-475d-a653-0e39d3424e73@github.com> Message-ID: On Fri, 18 Apr 2025 20:24:20 GMT, Phil Race wrote: >> When trying to register an open URI handler when using JavaFX with a native menu, this task fails on Mac. >> Either the native menu is not shown or the URIs are not received. >> >> This pull request fixes this issue if AWT is registered after JavaFX, so that AWT runs embedded inside JavaFX. >> It fixes this by introducing a native event to AWT, which can be used by JavaFX to forward events such as an openURL event. >> >> JavaFX Pull Request: https://github.com/openjdk/jfx/pull/1755 >> Co-Author: @FlorianKirmaier > > src/java.desktop/macosx/native/libawt_lwawt/awt/ApplicationDelegate.m line 200: > >> 198: if (!self) return self; >> 199: >> 200: // register for the finish launching and system power off notifications by default > > I assume there is a good reason that AWT only registered for these notifications if IT is the main toolkit. > The implications of changing this might be that it will try to handle events that should be left to FX in the > case that FX is the main toolkit. Exactly, it only installs the handlers if it doesn't run embedded. But since JavaFX doesn't handle urls by itself, it still blocks AWT from receiving those events. Therefore the only event for now that is forwarded to AWT is the url event. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/24379#discussion_r2051489793 From kevin.rushforth at oracle.com Sat Apr 19 16:11:04 2025 From: kevin.rushforth at oracle.com (Kevin Rushforth) Date: Sat, 19 Apr 2025 09:11:04 -0700 Subject: Proposal: A new common Image API In-Reply-To: References: <484ae025-47dc-462e-b6bd-e4fce3252005@oracle.com> Message-ID: I agree with Phil on this. I don't see enough value in creating yet another image library in the JDK to justify the effort and the weight of the API and implementation. We would need to design, specify, implement, and support a new imaging API all while maintaining the existing JavaFX and Java2D imaging libraries. We wouldn't deprecate the existing imaging libraries in favor of the new one, at least not any time in the next several years (if ever), so we would either end up with three implementations (instead of two) or additional effort to redo the implementation BufferedImage, Raster, Image, etc, on top of the new library. Similarly for JavaFX's (smaller) implementation. And then there's Image IO, which would also need to be redone. So I am not at all optimistic about this, and I doubt this is something we should pursue. --Kevin On 4/18/2025 8:37 PM, Glavo wrote: > Hi?Jeremy, > > The purpose of my email is to: > > 1. Find out if people feel the work is worth the effort. > 2. Find out if there is anyone willing to take the lead. > 3. Discuss how this work will begin. > > I did have a draft design, but I was not an expert in the field, so I > knew it had a lot of flaws. > I guess if that's what people really want, then people should have > their own ideas about it. > So instead of presenting this flawed idea, I wanted to discuss other > things first. > > Once I've determined that the work is worth the effort, but no expert > has the free time to take the lead, > I'll try to implement it myself and then seek guidance. > > What is the difference between what you?re describing and the > Apache Commons Imaging project itself? > > > Apache Commons Imaging currently depends on AWT BufferedImage. It does > not include the things mentioned in the email. > > Glavo > > On Fri, Apr 18, 2025 at 4:37?AM Jeremy Wood wrote: > > What is the scope / ideal feature set of this project? (Can you > start outlining some of the main interfaces you?re envisioning? > maybe in a google doc?) > > What exactly are you looking for in this email thread? Are you > looking for resources (mostly people?) who can work on this > project? Or are you looking to see if OpenJDK is willing/able to > maintain this API? (or something else?) > > What is the difference between what you?re describing and the > Apache Commons Imaging project itself? > > I assume this project is strictly related to reading & writing > images. So it will NOT support anything analogous to: > 1. Graphics2D > 2. AffineTransform > 3. PerspectiveTransform > 4. Fonts > 5. MultiResolutionImage > > ?- Jeremy > > obligatory xkcd reference: > > https://www.explainxkcd.com/wiki/index.php/927:_Standards > > ------ Original Message ------ > From "Scott Palmer" > To "Philip Race" > Cc "Glavo" ; "openjfx-dev" > ; client-libs-dev at openjdk.org > Date 4/17/2025 12:57:17?PM > Subject Re: Proposal: A new common Image API > >> I think a common image I/O library that is not tied to a UI >> framework?makes sense and is long overdue. >> Raster images do have a common format that encapsulates >> everything. We essentially have this abstracted in the two UI >> frameworks already. At some level it comes down to PixelFormats >> and data buffers. There are not so many of them that it is >> impossible to make a common abstraction for the purposes of I/O >> that can be mapped to what is needed by the UI framework. >> Just as JavaFX already has the SwingFxUtils for converting >> between AWT and JavaFX formats, there can be a utility to convert >> between the I/O library format and each UI framework's format. I >> would expect in most cases that the raw pixel data could be >> shared without extra copying. >> ImageIO is a good starting point. Remove the actual UI classes >> from it like BufferedImage and keep plain raster representations >> of the data that can be wrapped by the UI classes.? Under the >> hood the arrays or buffers of raster data don't have to >> change,they are the important parts that the I/O library?needs to >> deal with.? Mapping the metadata (width, height, colour space, >> pixel format, etc.) will usually be very cheap. Some cases may >> need to run a conversion, like the example of 1-bpp black/white >> needing to be remapped to RGB, but that that can happen in the >> utility layer that moves the image from the Image I/O domain to >> the UI framework domain on a case-by-case basis. Worst case is >> that the UI framework throws an UnsupportImageFormat exception >> when it doesn't have code to deal with raster data in a >> particular format. >> >> I'm sure it is all much harder than I suspect, but I don't think >> it should be. :-) >> >> Scott >> >> >> On Thu, Apr 17, 2025 at 12:10?AM Philip Race >> wrote: >> >> First, note than John Neffenger replied to this but only on >> openjfx-dev >> and the first thing I saw was the reply and couldn't see the >> original. >> After some consternation I tracked down this cross-post. >> >> Here's a link to the reply >> https://mail.openjdk.org/pipermail/openjfx-dev/2025-April/053616.html >> >> A fundamental problem is that all the users need to be able >> to produce >> and consume the data. >> So there either needs to be a module dependency (not viable) >> or an >> agreed format (are we >> really going to define an image format which encapsulates >> everything, >> including the multi-frame >> GIF support) and then everyone needs a reader and don't >> forget writers >> and they need to be able to do .. so much .. >> >> I just don't see a viable path here. >> And several (8 ?) years ago, I pondered some way to separate >> image >> handling from the >> desktop module to see if a server app could use it without >> pulling in >> AWT but the intra-package >> dependencies made it impossible without changes I didn't even >> figure out >> if they were possible. >> >> -phil. >> >> On 4/16/25 3:04 AM, Glavo wrote: >> > Currently, there are multiple different image APIs in the Java >> > ecosystem: AWT, JavaFX, Android, etc. >> > What's worse, the Android platform does not provide support >> for AWT, >> > making the Java ecosystem even more fragmented. >> > >> > There are some obvious problems with the current situation: >> > >> > * Third-party libraries that need an image API are >> difficult to be >> > universal. >> > ? A practical example: Apache Commons Imaging has been in >> the alpha >> > stage and cannot release version 1.0. >> > ? The main reason is that it depends on `java.awt.image`, >> so it >> > doesn't work on Android. >> > ? We hope to solve this problem before the official release. >> > * Different image APIs have to repeatedly implement support >> for >> > reading the same image format (such as JPEG). >> > ? In fact, AWT, JavaFX, and Android now each implement >> reading JPEG >> > images. >> > ? This is a waste. >> > >> > I thought we might be able to create a new module >> independent of >> > java.desktop that provides a common abstraction for images. >> > It should: >> > >> > * Provides common Image and ImageProvider interfaces that >> can be >> > implemented by different providers. >> > * Provides a unified abstraction for colors, color spaces, >> pixel >> > formats, etc. >> > * Provides general and extensible image I/O support. >> > ? Read/write support should only need to be implemented >> once per image >> > format. >> > ? It should be bidirectionally compatible with `javax.imageio`: >> > ? The implementation of either API can be accessed through >> the other API. >> > >> > I want to know if this is an idea worth putting into practice? >> > I'm not an expert in this field, so I'm worried about >> creating designs >> > with many flaws. >> > Therefore, I haven't attempted to implement it yet. >> > If anyone is willing to implement it, I'd like to help. >> > >> > I had sent an email a few days ago but no one responded, so I >> > re-edited it and sent this one. >> > >> > Glavo >> > >> -------------- next part -------------- An HTML attachment was scrubbed... URL: From zjx001202 at gmail.com Sat Apr 19 17:33:17 2025 From: zjx001202 at gmail.com (Glavo) Date: Sun, 20 Apr 2025 01:33:17 +0800 Subject: Proposal: A new common Image API In-Reply-To: References: <484ae025-47dc-462e-b6bd-e4fce3252005@oracle.com> Message-ID: Hi Kevin, Going from two implementations to three is really frustrating. But what?s even more frustrating is that the Java ecosystem now doesn?t have just two implementations?it has five, six, or even more. In addition to AWT and JavaFX, there are Android, SWT, Qt Jambi, and Skija, along with countless other image libraries. The problem isn?t that there are multiple implementations, but that none of them are common enough, so developers keep reinventing the wheel. Here?s a recent example: jxlatte[1]. It?s a pure Java JPEG XL decoder. To avoid depending on java.desktop, its developers once again created new abstractions for colors and images. The current situation is chaotic for the entire ecosystem and also sets a high barrier for creating new libraries. Developing a small library for image processing should be simple, but now developers have to think carefully before starting?and might even end up reinventing the wheel themselves. This also creates a poor experience for users. I?m not suggesting we deprecate all existing implementations, but I do think a new common library is important. This library should provide a unified facade for existing implementations (SLF4J is a good example) and prevent developers from having to reinvent the wheel repeatedly. Glavo [1]: https://github.com/Traneptora/jxlatte On Sun, Apr 20, 2025 at 12:11?AM Kevin Rushforth wrote: > I agree with Phil on this. I don't see enough value in creating yet > another image library in the JDK to justify the effort and the weight of > the API and implementation. We would need to design, specify, implement, > and support a new imaging API all while maintaining the existing JavaFX and > Java2D imaging libraries. We wouldn't deprecate the existing imaging > libraries in favor of the new one, at least not any time in the next > several years (if ever), so we would either end up with three > implementations (instead of two) or additional effort to redo the > implementation BufferedImage, Raster, Image, etc, on top of the new > library. Similarly for JavaFX's (smaller) implementation. And then there's > Image IO, which would also need to be redone. > > So I am not at all optimistic about this, and I doubt this is something we > should pursue. > > --Kevin > > > On 4/18/2025 8:37 PM, Glavo wrote: > > Hi Jeremy, > > The purpose of my email is to: > > > 1. Find out if people feel the work is worth the effort. > 2. Find out if there is anyone willing to take the lead. > 3. Discuss how this work will begin. > > I did have a draft design, but I was not an expert in the field, so I knew > it had a lot of flaws. > I guess if that's what people really want, then people should have their > own ideas about it. > So instead of presenting this flawed idea, I wanted to discuss other > things first. > > Once I've determined that the work is worth the effort, but no expert has > the free time to take the lead, > I'll try to implement it myself and then seek guidance. > > What is the difference between what you?re describing and the Apache >> Commons Imaging project itself? > > > Apache Commons Imaging currently depends on AWT BufferedImage. It does not > include the things mentioned in the email. > > Glavo > > On Fri, Apr 18, 2025 at 4:37?AM Jeremy Wood wrote: > >> What is the scope / ideal feature set of this project? (Can you start >> outlining some of the main interfaces you?re envisioning? maybe in a >> google doc?) >> >> What exactly are you looking for in this email thread? Are you looking >> for resources (mostly people?) who can work on this project? Or are you >> looking to see if OpenJDK is willing/able to maintain this API? (or >> something else?) >> >> What is the difference between what you?re describing and the Apache >> Commons Imaging project itself? >> >> I assume this project is strictly related to reading & writing images. So >> it will NOT support anything analogous to: >> 1. Graphics2D >> 2. AffineTransform >> 3. PerspectiveTransform >> 4. Fonts >> 5. MultiResolutionImage >> >> - Jeremy >> >> obligatory xkcd reference: >> >> https://www.explainxkcd.com/wiki/index.php/927:_Standards >> >> ------ Original Message ------ >> From "Scott Palmer" >> To "Philip Race" >> Cc "Glavo" ; "openjfx-dev" ; >> client-libs-dev at openjdk.org >> Date 4/17/2025 12:57:17?PM >> Subject Re: Proposal: A new common Image API >> >> I think a common image I/O library that is not tied to a UI >> framework makes sense and is long overdue. >> Raster images do have a common format that encapsulates everything. We >> essentially have this abstracted in the two UI frameworks already. At some >> level it comes down to PixelFormats and data buffers. There are not so >> many of them that it is impossible to make a common abstraction for the >> purposes of I/O that can be mapped to what is needed by the UI framework. >> Just as JavaFX already has the SwingFxUtils for converting between AWT >> and JavaFX formats, there can be a utility to convert between the I/O >> library format and each UI framework's format. I would expect in most cases >> that the raw pixel data could be shared without extra copying. >> ImageIO is a good starting point. Remove the actual UI classes from it >> like BufferedImage and keep plain raster representations of the data that >> can be wrapped by the UI classes. Under the hood the arrays or buffers of >> raster data don't have to change,they are the important parts that the I/O >> library needs to deal with. Mapping the metadata (width, height, colour >> space, pixel format, etc.) will usually be very cheap. Some cases may need >> to run a conversion, like the example of 1-bpp black/white needing to be >> remapped to RGB, but that that can happen in the utility layer that moves >> the image from the Image I/O domain to the UI framework domain on a >> case-by-case basis. Worst case is that the UI framework throws an >> UnsupportImageFormat exception when it doesn't have code to deal with >> raster data in a particular format. >> >> I'm sure it is all much harder than I suspect, but I don't think it >> should be. :-) >> >> Scott >> >> >> On Thu, Apr 17, 2025 at 12:10?AM Philip Race >> wrote: >> >>> First, note than John Neffenger replied to this but only on openjfx-dev >>> and the first thing I saw was the reply and couldn't see the original. >>> After some consternation I tracked down this cross-post. >>> >>> Here's a link to the reply >>> https://mail.openjdk.org/pipermail/openjfx-dev/2025-April/053616.html >>> >>> A fundamental problem is that all the users need to be able to produce >>> and consume the data. >>> So there either needs to be a module dependency (not viable) or an >>> agreed format (are we >>> really going to define an image format which encapsulates everything, >>> including the multi-frame >>> GIF support) and then everyone needs a reader and don't forget writers >>> and they need to be able to do .. so much .. >>> >>> I just don't see a viable path here. >>> And several (8 ?) years ago, I pondered some way to separate image >>> handling from the >>> desktop module to see if a server app could use it without pulling in >>> AWT but the intra-package >>> dependencies made it impossible without changes I didn't even figure out >>> if they were possible. >>> >>> -phil. >>> >>> On 4/16/25 3:04 AM, Glavo wrote: >>> > Currently, there are multiple different image APIs in the Java >>> > ecosystem: AWT, JavaFX, Android, etc. >>> > What's worse, the Android platform does not provide support for AWT, >>> > making the Java ecosystem even more fragmented. >>> > >>> > There are some obvious problems with the current situation: >>> > >>> > * Third-party libraries that need an image API are difficult to be >>> > universal. >>> > A practical example: Apache Commons Imaging has been in the alpha >>> > stage and cannot release version 1.0. >>> > The main reason is that it depends on `java.awt.image`, so it >>> > doesn't work on Android. >>> > We hope to solve this problem before the official release. >>> > * Different image APIs have to repeatedly implement support for >>> > reading the same image format (such as JPEG). >>> > In fact, AWT, JavaFX, and Android now each implement reading JPEG >>> > images. >>> > This is a waste. >>> > >>> > I thought we might be able to create a new module independent of >>> > java.desktop that provides a common abstraction for images. >>> > It should: >>> > >>> > * Provides common Image and ImageProvider interfaces that can be >>> > implemented by different providers. >>> > * Provides a unified abstraction for colors, color spaces, pixel >>> > formats, etc. >>> > * Provides general and extensible image I/O support. >>> > Read/write support should only need to be implemented once per image >>> > format. >>> > It should be bidirectionally compatible with `javax.imageio`: >>> > The implementation of either API can be accessed through the other >>> API. >>> > >>> > I want to know if this is an idea worth putting into practice? >>> > I'm not an expert in this field, so I'm worried about creating designs >>> > with many flaws. >>> > Therefore, I haven't attempted to implement it yet. >>> > If anyone is willing to implement it, I'd like to help. >>> > >>> > I had sent an email a few days ago but no one responded, so I >>> > re-edited it and sent this one. >>> > >>> > Glavo >>> > >>> >>> > -------------- next part -------------- An HTML attachment was scrubbed... URL: From lordpixel at mac.com Sat Apr 19 17:55:52 2025 From: lordpixel at mac.com (Andrew Thompson) Date: Sat, 19 Apr 2025 13:55:52 -0400 Subject: Proposal: A new common Image API In-Reply-To: References: <484ae025-47dc-462e-b6bd-e4fce3252005@oracle.com> Message-ID: <0CDBC7B1-8257-4918-986D-CB53556E1BE5@mac.com> Reading this thread as an outsider, the things that keep coming up over and over again is that java.desktop needs to be modularized. This sounds like painstaking slow work which would doubtless requires many long interactions to get approvals and not offer much glory. But is that where the value really is? Andrew -------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/pkcs7-signature Size: 4387 bytes Desc: not available URL: From zjx001202 at gmail.com Sat Apr 19 18:09:19 2025 From: zjx001202 at gmail.com (Glavo) Date: Sun, 20 Apr 2025 02:09:19 +0800 Subject: Proposal: A new common Image API In-Reply-To: <0CDBC7B1-8257-4918-986D-CB53556E1BE5@mac.com> References: <484ae025-47dc-462e-b6bd-e4fce3252005@oracle.com> <0CDBC7B1-8257-4918-986D-CB53556E1BE5@mac.com> Message-ID: Hi Andrew, To be honest, I think splitting up java.desktop might be impossible. The APIs in this module have dependencies on each other, and I can't figure out how to split it up without breaking compatibility. For example, javax.imageio.ImageIO has several APIs that return a java.awt.image.BufferedImage, and BufferedImage::createGraphics() returns a java.awt.Graphics2D. Considering that a package cannot be split into multiple JPMS modules, this means that java.awt, java.awt.image, and javax.imageio are tightly linked. Such coupling is everywhere in java.desktop. I think splitting it is just a delusion. I don't understand why so many people expect it. I think creating a new module containing a new API is the pragmatic choice. Glavo On Sun, Apr 20, 2025 at 1:56?AM Andrew Thompson wrote: > Reading this thread as an outsider, the things that keep coming up over > and over again is that java.desktop needs to be modularized. > This sounds like painstaking slow work which would doubtless requires many > long interactions to get approvals and not offer much glory. > > But is that where the value really is? > > Andrew > -------------- next part -------------- An HTML attachment was scrubbed... URL: From ysuenaga at openjdk.org Sun Apr 20 05:07:31 2025 From: ysuenaga at openjdk.org (Yasumasa Suenaga) Date: Sun, 20 Apr 2025 05:07:31 GMT Subject: RFR: 8355077: Compiler error at splashscreen_gif.c due to unterminated string initialization Message-ID: I tried to build OpenJDK with GCC 15.0.1 on Fedora 42 x86_64, however I saw following error. * For target support_native_java.desktop_libsplashscreen_splashscreen_gif.o: /home/ysuenaga/github-forked/jdk/src/java.desktop/share/native/libsplashscreen/splashscreen_gif.c:51:41: error: initializer-string for array of ?char? truncates NUL terminator but destination lacks ?nonstring? attribute (12 chars into 11 available) [-Werror=unterminated-string-initialization] 51 | static const char szNetscape20ext[11] = "NETSCAPE2.0"; | ^~~~~~~~~~~~~ cc1: all warnings being treated as errors This constant seems to be used to detect Netscape 2.0 extension in GIF image. It should be used to compare with extension block without NUL char, but we should tweak initialization to avoid this error for safety code. ------------- Commit messages: - 8355077: Compiler error at splashscreen_gif.c due to unterminated string initialization Changes: https://git.openjdk.org/jdk/pull/24770/files Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=24770&range=00 Issue: https://bugs.openjdk.org/browse/JDK-8355077 Stats: 3 lines in 1 file changed: 0 ins; 0 del; 3 mod Patch: https://git.openjdk.org/jdk/pull/24770.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/24770/head:pull/24770 PR: https://git.openjdk.org/jdk/pull/24770 From kizune at openjdk.org Sun Apr 20 07:55:47 2025 From: kizune at openjdk.org (Alexander Zuev) Date: Sun, 20 Apr 2025 07:55:47 GMT Subject: RFR: 8353488: Open some JComboBox bugs 3 In-Reply-To: References: Message-ID: On Sat, 19 Apr 2025 04:29:16 GMT, Alisen Chung wrote: > Opening some JComboBox bugs test/jdk/javax/swing/JComboBox/bug4248128.java line 51: > 49: > 50: robot.keyPress(KeyEvent.VK_ALT); > 51: robot.keyPress(KeyEvent.VK_DOWN); Please add keyRelease for the same keys in the reverse order - if tests are running in the same VM it can lead to the key combination being stack which in turn can affect other tests. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/24767#discussion_r2051661050 From duke at openjdk.org Sun Apr 20 08:24:34 2025 From: duke at openjdk.org (Jeremy Wood) Date: Sun, 20 Apr 2025 08:24:34 GMT Subject: RFR: 4811995: BorderLayout does not respect minimum size of its components Message-ID: This PR changes how the BorderLayout positions components when they don't fit inside a container. This should have no effect on BorderLayouts that match or exceed their preferred size. (The name of this PR/ticket is a little misleading: this in no way relates to `component.getMinimumSize()`.) Here is part of a comment in that ticket that sums up what this PR is trying to fix: > Instead of the South Component being placed partially offscreen as Windows does, it is often placed on top of the North Component. Indeed, BorderLayout.layoutContainer() always places the South Component flush with the bottom of the Container and does not check if the Container is smaller than the minimum size, or if the North and South Components overlap. Previously child components could: A. be assigned negative (x,y) coordinates B. be assigned negative widths or heights C. overlap other child components D. be assigned dimensions that don't fit inside the target container This PR will instead constrain certain values. Now child components may be given a width/height of zero pixels, but they should never show the 4 behaviors stated above. We encountered this basic problem last week at work (we could end up with a component with a negative height). Our work-around was more complex than this PR: we wrote a modified BorderLayout that would switch to using `component.getMinimumSize()` when the preferred size wouldn't fit. IMO that is a better option all-around, but it is dangerously invasive for an OpenJDK proposal. I'm happy to discuss that idea further, though, if anyone here disagrees. ------------- Commit messages: - 4811995: trivial formatting for PR review - 4811995: constraining BorderLayout math to prevent negative values - 4811995: adding baseline unit test - Merge branch 'master' of https://github.com/mickleness/jdk - Merge branch 'master' of https://github.com/mickleness/jdk - Merge branch 'openjdk:master' into master - Merge branch 'openjdk:master' into master - Merge branch 'openjdk:master' into master - Merge pull request #5 from openjdk/master - Merge pull request #4 from openjdk/master - ... and 3 more: https://git.openjdk.org/jdk/compare/128f2d1c...c30f1803 Changes: https://git.openjdk.org/jdk/pull/24772/files Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=24772&range=00 Issue: https://bugs.openjdk.org/browse/JDK-4811995 Stats: 277 lines in 2 files changed: 264 ins; 0 del; 13 mod Patch: https://git.openjdk.org/jdk/pull/24772.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/24772/head:pull/24772 PR: https://git.openjdk.org/jdk/pull/24772 From abhiscxk at openjdk.org Mon Apr 21 04:44:46 2025 From: abhiscxk at openjdk.org (Abhishek Kumar) Date: Mon, 21 Apr 2025 04:44:46 GMT Subject: RFR: 8353445: Open source several AWT Menu tests - Batch 1 [v3] In-Reply-To: References: Message-ID: On Fri, 18 Apr 2025 13:03:56 GMT, Tejesh R wrote: >> Open source these AWT Menu tests: >> >> java/awt/Menu/MenuVisibilityTest/MenuVisibilityTest.java >> java/awt/Menu/MenuActionEventTest/MenuActionEventTest.java >> java/awt/Menu/RmInHideTest/RmInHideTest.java >> java/awt/Menu/SetShortCutTest/SetShortCutTest.java > > Tejesh R has updated the pull request incrementally with one additional commit since the last revision: > > Update PL test/jdk/ProblemList.txt line 261: > 259: java/awt/Clipboard/HTMLTransferTest/HTMLTransferTest.java 8017454 macosx-all > 260: java/awt/Frame/MiscUndecorated/RepaintTest.java 8266244 macosx-aarch64 > 261: java/awt/Menu/MenuVisibilityTest.java 8161110 macosx-all @prrace Should it be moved to `Client manual tests` section ? ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/24649#discussion_r2051944195 From abhiscxk at openjdk.org Mon Apr 21 04:52:49 2025 From: abhiscxk at openjdk.org (Abhishek Kumar) Date: Mon, 21 Apr 2025 04:52:49 GMT Subject: RFR: 8354466: Open some misc Swing bugs 9 [v2] In-Reply-To: References: Message-ID: On Fri, 18 Apr 2025 22:56:38 GMT, Alisen Chung wrote: >> Updating and opening some misc swing bugs > > Alisen Chung has updated the pull request incrementally with one additional commit since the last revision: > > update jtreg path test/jdk/javax/swing/JSplitPane/bug4820080.java line 66: > 64: > 65: JPanel jleft = new JPanel(); > 66: jleft.setBackground(Color.darkGray); You may change from lowercase to uppercase for constants here and below Suggestion: jleft.setBackground(Color.DARK_GRAY); ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/24703#discussion_r2051950518 From aturbanov at openjdk.org Mon Apr 21 07:42:42 2025 From: aturbanov at openjdk.org (Andrey Turbanov) Date: Mon, 21 Apr 2025 07:42:42 GMT Subject: RFR: JDK-8353011 : Open source Swing JButton tests - Set 1 In-Reply-To: References: Message-ID: On Fri, 18 Apr 2025 23:46:52 GMT, Harshitha Onkar wrote: > Following tests are open sourced in this PR: > > javax/swing/JButton/bug4151763.java > javax/swing/JButton/bug4415505.java > javax/swing/JButton/bug4978274.java > javax/swing/JRadioButton/bug4673850.java > javax/swing/JTable/bug4188504.java test/jdk/javax/swing/JButton/bug4978274.java line 98: > 96: jButton.setEnabled(!jButton.isEnabled()); > 97: jToggleButton.setEnabled(jButton.isEnabled()); > 98: for(int i = 0; i < panel.getComponentCount(); i++) { Suggestion: for (int i = 0; i < panel.getComponentCount(); i++) { ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/24765#discussion_r2052083359 From mickleness at gmail.com Mon Apr 21 07:43:11 2025 From: mickleness at gmail.com (Jeremy Wood) Date: Mon, 21 Apr 2025 07:43:11 +0000 Subject: Removing obsolete Aqua code In-Reply-To: References: Message-ID: Thanks. I have a branch for this work that is ready for feedback, but I assume I shouldn?t make a PR until I have a new ticket number to use. I submitted a new OpenJDK ticket a week or so ago. Hopefully after couple of weeks I?ll see it in the ticket database. - Jeremy ------ Original Message ------ >From "Philip Race" To "Jeremy Wood" ; "client-libs-dev at openjdk.org" Date 4/11/2025 1:41:33?PM Subject Re: Removing obsolete Aqua code >https://bugs.openjdk.org/browse/JDK-8344697 is closed as a dup. >At this point I'd say A, although re-opening and renaming is possible. > >-phil > > >On 4/11/25 9:58 AM, Jeremy Wood wrote: >>in https://bugs.openjdk.org/browse/JDK-8344697 I pointed out that in >>Mac's Aqua L&F: we?re using AncestorListeners to help repaint >>JRootPane default buttons. >> >>Over a decade ago this logic was needed to emulate the native Aqua >>experience, but since around 2016 the default button in Aqua does NOT >>continually pulse. >> >>I?d like to remove this code, but I?m not sure how to proceed. >> >>Originally I planned to make a PR for 8344697 >> that removes the unused >>code. But after rebalancing the AWTEventMulticaster (in >>https://bugs.openjdk.org/browse/JDK-8342782 ), the performance >>problems observed in 8344697 >> do not reproduce. >> >>Should I: >>A. File a new ticket just to remove the obsolete code? >>B. Go ahead and name this new PR after 8344697 >> , even though that?s a >>little misleading now? >>C. Don?t pursue this, because without a concrete problem / business >>case the OpenJDK community shouldn?t focus on this tech debt. >> >>Thoughts? >> >>Regards, >> - Jeremy > -------------- next part -------------- An HTML attachment was scrubbed... URL: From aturbanov at openjdk.org Mon Apr 21 07:43:40 2025 From: aturbanov at openjdk.org (Andrey Turbanov) Date: Mon, 21 Apr 2025 07:43:40 GMT Subject: RFR: 8354695: Open source several swing tests batch7 In-Reply-To: <_UYipF8V8voPBRGVdOg7APlb0vu9VEfObY1qaHDTFBI=.0337e295-3b52-4d63-81c3-3cd21f708496@github.com> References: <_UYipF8V8voPBRGVdOg7APlb0vu9VEfObY1qaHDTFBI=.0337e295-3b52-4d63-81c3-3cd21f708496@github.com> Message-ID: On Fri, 18 Apr 2025 18:39:09 GMT, Damon Nguyen wrote: > Open-sourcing and standardizing several swing tests (JScrollPane & JRootPane) test/jdk/javax/swing/JScrollPane/AcceleratedWheelScrolling/RTLScrollers.java line 250: > 248: comp.setBackground(Color.RED); > 249: } > 250: else if ((row + 1) % 3 == 0) { Suggestion: else if ((row + 1) % 3 == 0) { ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/24758#discussion_r2052085154 From aturbanov at openjdk.org Mon Apr 21 07:45:49 2025 From: aturbanov at openjdk.org (Andrey Turbanov) Date: Mon, 21 Apr 2025 07:45:49 GMT Subject: RFR: 8354928: Clean up and open source some miscellaneous AWT tests [v3] In-Reply-To: References: Message-ID: On Fri, 18 Apr 2025 21:26:10 GMT, Alexander Zuev wrote: >> Clean up and open source some tests related to event processing in AWT library. > > Alexander Zuev has updated the pull request incrementally with one additional commit since the last revision: > > Update HWWheelScroll.java > > Set title on file dialog owner frame. test/jdk/java/awt/event/MouseWheelEvent/HWWheelScroll.java line 114: > 112: TextArea ta = new TextArea("", 0, 0, policy); > 113: if (textShape == TEXT_TALL) { > 114: for(int i = 0; i < 50 ; i++) { Suggestion: for (int i = 0; i < 50 ; i++) { test/jdk/java/awt/event/MouseWheelEvent/HWWheelScroll.java line 124: > 122: ta.append("text"); > 123: } else if (textShape == TEXT_BIG) { > 124: for(int i = 0; i < 50 ; i++) { Suggestion: for (int i = 0; i < 50 ; i++) { test/jdk/java/awt/event/MouseWheelEvent/HWWheelScroll.java line 134: > 132: java.awt.List l = new java.awt.List(); > 133: if (textShape == TEXT_TALL) { > 134: for(int i = 0; i < 50 ; i++) { Suggestion: for (int i = 0; i < 50 ; i++) { test/jdk/java/awt/event/MouseWheelEvent/HWWheelScroll.java line 138: > 136: } > 137: } else if (textShape == TEXT_WIDE) { > 138: for(int i = 0; i < 2 ; i++) { Suggestion: for (int i = 0; i < 2 ; i++) { test/jdk/java/awt/event/MouseWheelEvent/HWWheelScroll.java line 144: > 142: l.add("text"); > 143: } else if (textShape == TEXT_BIG) { > 144: for(int i = 0; i < 50 ; i++) { Suggestion: for (int i = 0; i < 50 ; i++) { test/jdk/java/awt/event/MouseWheelEvent/WheelEventCoord.java line 57: > 55: public WheelEventCoord() { > 56: super("Wheel Event Coordinates"); > 57: setLayout(new GridLayout(3,1)); Suggestion: setLayout(new GridLayout(3, 1)); test/jdk/java/awt/event/MouseWheelEvent/WheelEventCoord.java line 85: > 83: > 84: public Dimension getPreferredSize() { > 85: return new Dimension(300,100); Suggestion: return new Dimension(300, 100); test/jdk/java/awt/event/MouseWheelEvent/WheelScrollEnabled.java line 98: > 96: > 97: add(pl2, BorderLayout.SOUTH); > 98: setSize (400,200); Suggestion: setSize(400, 200); ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/24755#discussion_r2052085563 PR Review Comment: https://git.openjdk.org/jdk/pull/24755#discussion_r2052085713 PR Review Comment: https://git.openjdk.org/jdk/pull/24755#discussion_r2052085860 PR Review Comment: https://git.openjdk.org/jdk/pull/24755#discussion_r2052085968 PR Review Comment: https://git.openjdk.org/jdk/pull/24755#discussion_r2052086040 PR Review Comment: https://git.openjdk.org/jdk/pull/24755#discussion_r2052086484 PR Review Comment: https://git.openjdk.org/jdk/pull/24755#discussion_r2052086600 PR Review Comment: https://git.openjdk.org/jdk/pull/24755#discussion_r2052086774 From aturbanov at openjdk.org Mon Apr 21 09:42:48 2025 From: aturbanov at openjdk.org (Andrey Turbanov) Date: Mon, 21 Apr 2025 09:42:48 GMT Subject: RFR: 8354561: Open source several swing tests batch0 [v2] In-Reply-To: <1TVLT8SYNn1C5ddWj3GkaxDyL3td5-nUBE2Va3yautA=.29242f16-d5b3-4388-a8df-31d45045fa0c@github.com> References: <1TVLT8SYNn1C5ddWj3GkaxDyL3td5-nUBE2Va3yautA=.29242f16-d5b3-4388-a8df-31d45045fa0c@github.com> Message-ID: On Thu, 17 Apr 2025 02:01:42 GMT, Alexander Zvegintsev wrote: >> Few more tests open sourced: >> >> javax/swing/JTextArea/4474400/bug4474400.java >> javax/swing/border/TitledBorder/TransparentTitleTest.java >> javax/swing/JComboBox/4139900/bug4139900.java >> javax/swing/JComboBox/4174876/bug4174876.java > > Alexander Zvegintsev has updated the pull request incrementally with one additional commit since the last revision: > > review comments test/jdk/javax/swing/border/TransparentTitleTest.java line 108: > 106: imageIcon = new ImageIcon(bufferedImage); > 107: > 108: TitledBorder b = new TitledBorder(new LineBorder(Color.black,3), "title text"); Suggestion: TitledBorder b = new TitledBorder(new LineBorder(Color.black, 3), "title text"); ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/24680#discussion_r2052195217 From psadhukhan at openjdk.org Mon Apr 21 11:32:53 2025 From: psadhukhan at openjdk.org (Prasanta Sadhukhan) Date: Mon, 21 Apr 2025 11:32:53 GMT Subject: RFR: 8346828: javax/swing/JScrollBar/4865918/bug4865918.java still fails in CI [v2] In-Reply-To: References: <6fI7ASQUHVtYX3hJlWDsB4HEJbWNmc0WhVuLQioyxC4=.281743c0-22d5-49e0-8456-81666a34eba8@github.com> Message-ID: On Wed, 29 Jan 2025 02:55:22 GMT, Sergey Bylokhov wrote: > > We can restrict the test to windows/linux as [JDK-4865918](https://bugs.openjdk.org/browse/JDK-4865918) was meant for windows 2000, linux > > It is for sure should work on macOS, the bug you mentioned was reported at time we did not have macOS port. I suggest to create another ticket and update the test to be headful and working on macOS. Reverted in https://github.com/openjdk/jdk/pull/24774 ------------- PR Comment: https://git.openjdk.org/jdk/pull/22937#issuecomment-2818229431 From psadhukhan at openjdk.org Mon Apr 21 11:36:01 2025 From: psadhukhan at openjdk.org (Prasanta Sadhukhan) Date: Mon, 21 Apr 2025 11:36:01 GMT Subject: RFR: 8355179: Reinstate javax/swing/JScrollBar/4865918/bug4865918.java headful and macos run Message-ID: Now that CI linux system is transitioned, the [JDK-8346828](https://bugs.openjdk.org/browse/JDK-8346828) changes is reverted and test is made headful and run on all platforms including macos. CI testing is ok now.. ------------- Commit messages: - 8355179: Reinstate javax/swing/JScrollBar/4865918/bug4865918.java headful and macos run Changes: https://git.openjdk.org/jdk/pull/24774/files Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=24774&range=00 Issue: https://bugs.openjdk.org/browse/JDK-8355179 Stats: 34 lines in 1 file changed: 18 ins; 3 del; 13 mod Patch: https://git.openjdk.org/jdk/pull/24774.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/24774/head:pull/24774 PR: https://git.openjdk.org/jdk/pull/24774 From tr at openjdk.org Mon Apr 21 14:50:07 2025 From: tr at openjdk.org (Tejesh R) Date: Mon, 21 Apr 2025 14:50:07 GMT Subject: RFR: 8353445: Open source several AWT Menu tests - Batch 1 [v4] In-Reply-To: References: Message-ID: > Open source these AWT Menu tests: > > java/awt/Menu/MenuVisibilityTest/MenuVisibilityTest.java > java/awt/Menu/MenuActionEventTest/MenuActionEventTest.java > java/awt/Menu/RmInHideTest/RmInHideTest.java > java/awt/Menu/SetShortCutTest/SetShortCutTest.java Tejesh R has updated the pull request incrementally with one additional commit since the last revision: Update PL ------------- Changes: - all: https://git.openjdk.org/jdk/pull/24649/files - new: https://git.openjdk.org/jdk/pull/24649/files/92b224ac..7a22269d Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=24649&range=03 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=24649&range=02-03 Stats: 2 lines in 1 file changed: 1 ins; 1 del; 0 mod Patch: https://git.openjdk.org/jdk/pull/24649.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/24649/head:pull/24649 PR: https://git.openjdk.org/jdk/pull/24649 From tr at openjdk.org Mon Apr 21 14:50:07 2025 From: tr at openjdk.org (Tejesh R) Date: Mon, 21 Apr 2025 14:50:07 GMT Subject: RFR: 8353445: Open source several AWT Menu tests - Batch 1 [v3] In-Reply-To: References: Message-ID: On Mon, 21 Apr 2025 04:41:29 GMT, Abhishek Kumar wrote: >> Tejesh R has updated the pull request incrementally with one additional commit since the last revision: >> >> Update PL > > test/jdk/ProblemList.txt line 261: > >> 259: java/awt/Clipboard/HTMLTransferTest/HTMLTransferTest.java 8017454 macosx-all >> 260: java/awt/Frame/MiscUndecorated/RepaintTest.java 8266244 macosx-aarch64 >> 261: java/awt/Menu/MenuVisibilityTest.java 8161110 macosx-all > > @prrace Should it be moved to `Client manual tests` section ? I think yes, I've updated. Can you please re-review and approve if its fine. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/24649#discussion_r2052512442 From kizune at openjdk.org Mon Apr 21 14:53:14 2025 From: kizune at openjdk.org (Alexander Zuev) Date: Mon, 21 Apr 2025 14:53:14 GMT Subject: RFR: 8354472: Clean up and open source KeyEvent related tests (Part 3) [v2] In-Reply-To: References: Message-ID: > Clean up and publish five more KeyEvent related tests. Alexander Zuev has updated the pull request incrementally with two additional commits since the last revision: - Update test/jdk/java/awt/event/KeyEvent/CharUndefinedTest.java Co-authored-by: Harshitha Onkar - Update test/jdk/java/awt/event/KeyEvent/CharUndefinedTest.java Co-authored-by: Harshitha Onkar ------------- Changes: - all: https://git.openjdk.org/jdk/pull/24764/files - new: https://git.openjdk.org/jdk/pull/24764/files/d3dda1c5..a26a22e9 Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=24764&range=01 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=24764&range=00-01 Stats: 2 lines in 1 file changed: 0 ins; 0 del; 2 mod Patch: https://git.openjdk.org/jdk/pull/24764.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/24764/head:pull/24764 PR: https://git.openjdk.org/jdk/pull/24764 From kizune at openjdk.org Mon Apr 21 14:53:14 2025 From: kizune at openjdk.org (Alexander Zuev) Date: Mon, 21 Apr 2025 14:53:14 GMT Subject: RFR: 8354472: Clean up and open source KeyEvent related tests (Part 3) [v2] In-Reply-To: References: Message-ID: On Sat, 19 Apr 2025 00:02:02 GMT, Harshitha Onkar wrote: >> Alexander Zuev has updated the pull request incrementally with two additional commits since the last revision: >> >> - Update test/jdk/java/awt/event/KeyEvent/CharUndefinedTest.java >> >> Co-authored-by: Harshitha Onkar >> - Update test/jdk/java/awt/event/KeyEvent/CharUndefinedTest.java >> >> Co-authored-by: Harshitha Onkar > > test/jdk/java/awt/event/KeyEvent/CharUndefinedTest.java line 86: > >> 84: >> 85: public static void main(String[] args) throws InterruptedException, >> 86: InvocationTargetException { > > generic exception can be used here and at other places. Not mandatory though. > > Suggestion: > > public static void main(String[] args) throws Exception { I prefer to list exactly the exceptions i expect to be thrown when possible - this way in the future i (or someone else) accidentally change something that introduces new exception it does not go unnoticed. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/24764#discussion_r2052520788 From kevin.rushforth at oracle.com Mon Apr 21 14:54:08 2025 From: kevin.rushforth at oracle.com (Kevin Rushforth) Date: Mon, 21 Apr 2025 07:54:08 -0700 Subject: Removing obsolete Aqua code In-Reply-To: References: Message-ID: <2718b4ec-7d30-4ede-ab9b-0c3d902aca77@oracle.com> Hi Jeremy, I can see your bug submission, and have pinged the triage team to help move it along. You can create a Draft PR without a bug ID, if you like, but you will need a bug ID before it can be "rfr". -- Kevin On 4/21/2025 12:43 AM, Jeremy Wood wrote: > Thanks. > > I have a branch > > for this work that is ready for feedback, but I assume I shouldn?t > make a PR until I have a new ticket number to use. > > I submitted a new OpenJDK ticket a week or so ago. Hopefully after > couple of weeks I?ll see it in the ticket database. > > ?- Jeremy > > ------ Original Message ------ > From "Philip Race" > To "Jeremy Wood" ; "client-libs-dev at openjdk.org" > > Date 4/11/2025 1:41:33?PM > Subject Re: Removing obsolete Aqua code > >> https://bugs.openjdk.org/browse/JDK-8344697 is closed as a dup. >> At this point I'd say A, although re-opening and renaming is possible. >> >> -phil >> >> >> On 4/11/25 9:58 AM, Jeremy Wood wrote: >>> in https://bugs.openjdk.org/browse/JDK-8344697?I pointed out that in >>> Mac's Aqua L&F: we?re using AncestorListeners to help repaint >>> JRootPane default buttons. >>> >>> Over a decade ago this logic was needed to emulate the native Aqua >>> experience, but since around 2016 the default button in Aqua does >>> NOT continually pulse. >>> >>> I?d like to remove this code, but I?m not sure how to proceed. >>> >>> Originally I planned to make a PR for 8344697 >>> ?that removes the >>> unused code. But after rebalancing the AWTEventMulticaster (in >>> https://bugs.openjdk.org/browse/JDK-8342782?), the performance >>> problems observed in 8344697 >>> ?do not reproduce. >>> >>> Should I: >>> A. File a new ticket just to remove the obsolete code? >>> B. Go ahead and name this new PR after8344697 >>> ?, even though that?s a >>> little misleading now? >>> C. Don?t pursue this, because without a concrete problem / business >>> case the OpenJDK community shouldn?t focus on this tech debt. >>> >>> Thoughts? >>> >>> Regards, >>> ?- Jeremy >> -------------- next part -------------- An HTML attachment was scrubbed... URL: From kizune at openjdk.org Mon Apr 21 15:00:07 2025 From: kizune at openjdk.org (Alexander Zuev) Date: Mon, 21 Apr 2025 15:00:07 GMT Subject: RFR: 8354472: Clean up and open source KeyEvent related tests (Part 3) [v3] In-Reply-To: References: Message-ID: <6Lnx4aSYSK6kc91zaXu5I6se1JmhHYEapMMYWiRpmfw=.e7f2d1c1-19c2-421f-8062-0f35bb4aafe0@github.com> > Clean up and publish five more KeyEvent related tests. Alexander Zuev has updated the pull request incrementally with one additional commit since the last revision: Move middleOf calls to EDT. ------------- Changes: - all: https://git.openjdk.org/jdk/pull/24764/files - new: https://git.openjdk.org/jdk/pull/24764/files/a26a22e9..d3b38f66 Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=24764&range=02 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=24764&range=01-02 Stats: 4 lines in 1 file changed: 1 ins; 0 del; 3 mod Patch: https://git.openjdk.org/jdk/pull/24764.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/24764/head:pull/24764 PR: https://git.openjdk.org/jdk/pull/24764 From kizune at openjdk.org Mon Apr 21 15:00:07 2025 From: kizune at openjdk.org (Alexander Zuev) Date: Mon, 21 Apr 2025 15:00:07 GMT Subject: RFR: 8354472: Clean up and open source KeyEvent related tests (Part 3) [v3] In-Reply-To: References: Message-ID: On Sat, 19 Apr 2025 00:08:49 GMT, Harshitha Onkar wrote: >> Alexander Zuev has updated the pull request incrementally with one additional commit since the last revision: >> >> Move middleOf calls to EDT. > > test/jdk/java/awt/event/KeyEvent/KeyEventToLightweight.java line 100: > >> 98: robot.waitForIdle(); >> 99: Point target = new Point(); >> 100: middleOf(lwbutton, target); > > On EDT ? Yes in both cases. I even introduced this method to be called on EDT and then just forgot all about it :( Fixed. > test/jdk/java/awt/event/KeyEvent/KeyEventToLightweight.java line 114: > >> 112: robot.waitForIdle(); >> 113: robot.delay(500); >> 114: middleOf(hwbutton, target); > > on EDT ? Fixed. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/24764#discussion_r2052534153 PR Review Comment: https://git.openjdk.org/jdk/pull/24764#discussion_r2052534376 From tr at openjdk.org Mon Apr 21 15:46:24 2025 From: tr at openjdk.org (Tejesh R) Date: Mon, 21 Apr 2025 15:46:24 GMT Subject: RFR: 8343977: Convert java/awt/TextArea/TextAreaCursorTest/HoveringAndDraggingTest to main [v6] In-Reply-To: <1-_jByjqN_aYGzQOMP2uHKC6oS3D87BO8rFHUl0mXvY=.c3b17bc5-d486-410e-b88b-c0ab5b90dca2@github.com> References: <1-_jByjqN_aYGzQOMP2uHKC6oS3D87BO8rFHUl0mXvY=.c3b17bc5-d486-410e-b88b-c0ab5b90dca2@github.com> Message-ID: <6ozoDgLyf3MMGR6OPBmSvjXhmcTS7Q5uc7t60V-SV9Q=.36c4b35d-69d4-482a-89f3-22d81e47e71b@github.com> On Fri, 18 Apr 2025 20:12:19 GMT, Phil Race wrote: > I guess it works, although it would be nice if you could make the instruction window bigger so scrolling isn't needed. Updated. ------------- PR Comment: https://git.openjdk.org/jdk/pull/22026#issuecomment-2818830252 From tr at openjdk.org Mon Apr 21 15:46:24 2025 From: tr at openjdk.org (Tejesh R) Date: Mon, 21 Apr 2025 15:46:24 GMT Subject: RFR: 8343977: Convert java/awt/TextArea/TextAreaCursorTest/HoveringAndDraggingTest to main [v7] In-Reply-To: References: Message-ID: > 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 automatically resolve the issue. Tejesh R has updated the pull request incrementally with one additional commit since the last revision: Review comments updated ------------- Changes: - all: https://git.openjdk.org/jdk/pull/22026/files - new: https://git.openjdk.org/jdk/pull/22026/files/113c4a4a..7e7b8857 Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=22026&range=06 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=22026&range=05-06 Stats: 2 lines in 1 file changed: 0 ins; 0 del; 2 mod Patch: https://git.openjdk.org/jdk/pull/22026.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/22026/head:pull/22026 PR: https://git.openjdk.org/jdk/pull/22026 From honkar at openjdk.org Mon Apr 21 16:17:42 2025 From: honkar at openjdk.org (Harshitha Onkar) Date: Mon, 21 Apr 2025 16:17:42 GMT Subject: RFR: 8354472: Clean up and open source KeyEvent related tests (Part 3) [v3] In-Reply-To: <6Lnx4aSYSK6kc91zaXu5I6se1JmhHYEapMMYWiRpmfw=.e7f2d1c1-19c2-421f-8062-0f35bb4aafe0@github.com> References: <6Lnx4aSYSK6kc91zaXu5I6se1JmhHYEapMMYWiRpmfw=.e7f2d1c1-19c2-421f-8062-0f35bb4aafe0@github.com> Message-ID: On Mon, 21 Apr 2025 15:00:07 GMT, Alexander Zuev wrote: >> Clean up and publish five more KeyEvent related tests. > > Alexander Zuev has updated the pull request incrementally with one additional commit since the last revision: > > Move middleOf calls to EDT. LGTM ------------- Marked as reviewed by honkar (Reviewer). PR Review: https://git.openjdk.org/jdk/pull/24764#pullrequestreview-2781696283 From kevin.rushforth at oracle.com Mon Apr 21 16:40:55 2025 From: kevin.rushforth at oracle.com (Kevin Rushforth) Date: Mon, 21 Apr 2025 09:40:55 -0700 Subject: Removing obsolete Aqua code In-Reply-To: <2718b4ec-7d30-4ede-ab9b-0c3d902aca77@oracle.com> References: <2718b4ec-7d30-4ede-ab9b-0c3d902aca77@oracle.com> Message-ID: <5de6104c-be8d-4a40-81c1-0e4da7181d9e@oracle.com> https://bugs.openjdk.org/browse/JDK-8355203 On 4/21/2025 7:54 AM, Kevin Rushforth wrote: > Hi Jeremy, > > I can see your bug submission, and have pinged the triage team to help > move it along. > > You can create a Draft PR without a bug ID, if you like, but you will > need a bug ID before it can be "rfr". > > -- Kevin > > > On 4/21/2025 12:43 AM, Jeremy Wood wrote: >> Thanks. >> >> I have a branch >> >> for this work that is ready for feedback, but I assume I shouldn?t >> make a PR until I have a new ticket number to use. >> >> I submitted a new OpenJDK ticket a week or so ago. Hopefully after >> couple of weeks I?ll see it in the ticket database. >> >> ?- Jeremy >> >> ------ Original Message ------ >> From "Philip Race" >> To "Jeremy Wood" ; >> "client-libs-dev at openjdk.org" >> Date 4/11/2025 1:41:33?PM >> Subject Re: Removing obsolete Aqua code >> >>> https://bugs.openjdk.org/browse/JDK-8344697 is closed as a dup. >>> At this point I'd say A, although re-opening and renaming is possible. >>> >>> -phil >>> >>> >>> On 4/11/25 9:58 AM, Jeremy Wood wrote: >>>> in https://bugs.openjdk.org/browse/JDK-8344697?I pointed out that >>>> in Mac's Aqua L&F: we?re using AncestorListeners to help repaint >>>> JRootPane default buttons. >>>> >>>> Over a decade ago this logic was needed to emulate the native Aqua >>>> experience, but since around 2016 the default button in Aqua does >>>> NOT continually pulse. >>>> >>>> I?d like to remove this code, but I?m not sure how to proceed. >>>> >>>> Originally I planned to make a PR for 8344697 >>>> ?that removes the >>>> unused code. But after rebalancing the AWTEventMulticaster (in >>>> https://bugs.openjdk.org/browse/JDK-8342782?), the performance >>>> problems observed in 8344697 >>>> ?do not reproduce. >>>> >>>> Should I: >>>> A. File a new ticket just to remove the obsolete code? >>>> B. Go ahead and name this new PR after8344697 >>>> ?, even though that?s >>>> a little misleading now? >>>> C. Don?t pursue this, because without a concrete problem / business >>>> case the OpenJDK community shouldn?t focus on this tech debt. >>>> >>>> Thoughts? >>>> >>>> Regards, >>>> ?- Jeremy >>> > -------------- next part -------------- An HTML attachment was scrubbed... URL: From honkar at openjdk.org Mon Apr 21 17:15:50 2025 From: honkar at openjdk.org (Harshitha Onkar) Date: Mon, 21 Apr 2025 17:15:50 GMT Subject: RFR: JDK-8353486 : Open source Swing Tests - Set 4 [v7] In-Reply-To: References: Message-ID: > Open-sourced the following Swing tests: > > 1. javax/swing/JFileChooser/bug4464774.java > 2. javax/swing/JFileChooser/bug4522756.java > 3. javax/swing/JFileChooser/bug4759934.java > 4. javax/swing/JFileChooser/bug4943900.java > 5. javax/swing/JOptionPane/bug4194862.java Harshitha Onkar has updated the pull request incrementally with one additional commit since the last revision: review changes ------------- Changes: - all: https://git.openjdk.org/jdk/pull/24456/files - new: https://git.openjdk.org/jdk/pull/24456/files/5e5cbb4a..7d43f122 Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=24456&range=06 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=24456&range=05-06 Stats: 13 lines in 4 files changed: 5 ins; 1 del; 7 mod Patch: https://git.openjdk.org/jdk/pull/24456.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/24456/head:pull/24456 PR: https://git.openjdk.org/jdk/pull/24456 From honkar at openjdk.org Mon Apr 21 17:15:52 2025 From: honkar at openjdk.org (Harshitha Onkar) Date: Mon, 21 Apr 2025 17:15:52 GMT Subject: RFR: JDK-8353486 : Open source Swing Tests - Set 4 [v6] In-Reply-To: References: <-jaKTmgwNA9JNGIaVqutoIFJKc43PKmNxbni9iAk7Dg=.679497d9-dffe-4af0-8e7f-e517284d2012@github.com> Message-ID: On Fri, 18 Apr 2025 18:08:36 GMT, Alexey Ivanov wrote: >> Harshitha Onkar has updated the pull request incrementally with one additional commit since the last revision: >> >> remove redudant frame > > test/jdk/javax/swing/JFileChooser/bug4943900.java line 57: > >> 55: is updated properly. >> 56: >> 57: If the FileFilter works correctly, press PASS else press FAIL. > > I wonder why so many people use capitals for *Pass* and *Fail*? Probably for emphasis > test/jdk/javax/swing/JFileChooser/bug4943900.java line 100: > >> 98: } >> 99: >> 100: public String getExtension(File f) { > > Suggestion: > > private static String getExtension(File f) { > > This is an internal helper method for the class. Updated > test/jdk/javax/swing/JOptionPane/bug4194862.java line 57: > >> 55: .columns(40) >> 56: .testUI(bug4194862::createAndShowUI) >> 57: .build() > > Enable screenshot? > > I've been thinking about a feature which could the screenshot automatically? as a failure handler. There's a tracking bug for it, [JDK-8317114](https://bugs.openjdk.org/browse/JDK-8317114): *Provide failure handlers for PassFailJFrame*. Many UI manual tests could benefit from it, Updated ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/24456#discussion_r2052730784 PR Review Comment: https://git.openjdk.org/jdk/pull/24456#discussion_r2052731298 PR Review Comment: https://git.openjdk.org/jdk/pull/24456#discussion_r2052730597 From kizune at openjdk.org Mon Apr 21 17:41:02 2025 From: kizune at openjdk.org (Alexander Zuev) Date: Mon, 21 Apr 2025 17:41:02 GMT Subject: Integrated: 8354472: Clean up and open source KeyEvent related tests (Part 3) In-Reply-To: References: Message-ID: On Fri, 18 Apr 2025 22:23:25 GMT, Alexander Zuev wrote: > Clean up and publish five more KeyEvent related tests. This pull request has now been integrated. Changeset: cd2d49f7 Author: Alexander Zuev URL: https://git.openjdk.org/jdk/commit/cd2d49f7119459f07844ce8201ca2320850cd51f Stats: 531 lines in 5 files changed: 531 ins; 0 del; 0 mod 8354472: Clean up and open source KeyEvent related tests (Part 3) Reviewed-by: honkar ------------- PR: https://git.openjdk.org/jdk/pull/24764 From kizune at openjdk.org Mon Apr 21 17:42:44 2025 From: kizune at openjdk.org (Alexander Zuev) Date: Mon, 21 Apr 2025 17:42:44 GMT Subject: RFR: 8354928: Clean up and open source some miscellaneous AWT tests [v4] In-Reply-To: References: Message-ID: > Clean up and open source some tests related to event processing in AWT library. Alexander Zuev has updated the pull request incrementally with eight additional commits since the last revision: - Update test/jdk/java/awt/event/MouseWheelEvent/HWWheelScroll.java Co-authored-by: Andrey Turbanov - Update test/jdk/java/awt/event/MouseWheelEvent/HWWheelScroll.java Co-authored-by: Andrey Turbanov - Update test/jdk/java/awt/event/MouseWheelEvent/HWWheelScroll.java Co-authored-by: Andrey Turbanov - Update test/jdk/java/awt/event/MouseWheelEvent/HWWheelScroll.java Co-authored-by: Andrey Turbanov - Update test/jdk/java/awt/event/MouseWheelEvent/HWWheelScroll.java Co-authored-by: Andrey Turbanov - Update test/jdk/java/awt/event/MouseWheelEvent/WheelEventCoord.java Co-authored-by: Andrey Turbanov - Update test/jdk/java/awt/event/MouseWheelEvent/WheelScrollEnabled.java Co-authored-by: Andrey Turbanov - Update test/jdk/java/awt/event/MouseWheelEvent/WheelEventCoord.java Co-authored-by: Andrey Turbanov ------------- Changes: - all: https://git.openjdk.org/jdk/pull/24755/files - new: https://git.openjdk.org/jdk/pull/24755/files/fe71e17e..e210a092 Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=24755&range=03 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=24755&range=02-03 Stats: 8 lines in 3 files changed: 0 ins; 0 del; 8 mod Patch: https://git.openjdk.org/jdk/pull/24755.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/24755/head:pull/24755 PR: https://git.openjdk.org/jdk/pull/24755 From achung at openjdk.org Mon Apr 21 17:43:26 2025 From: achung at openjdk.org (Alisen Chung) Date: Mon, 21 Apr 2025 17:43:26 GMT Subject: RFR: 8353488: Open some JComboBox bugs 3 [v2] In-Reply-To: References: Message-ID: > Opening some JComboBox bugs Alisen Chung has updated the pull request incrementally with one additional commit since the last revision: add robot keyrelease ------------- Changes: - all: https://git.openjdk.org/jdk/pull/24767/files - new: https://git.openjdk.org/jdk/pull/24767/files/62b1bb59..68ba2ec0 Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=24767&range=01 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=24767&range=00-01 Stats: 7 lines in 1 file changed: 4 ins; 0 del; 3 mod Patch: https://git.openjdk.org/jdk/pull/24767.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/24767/head:pull/24767 PR: https://git.openjdk.org/jdk/pull/24767 From honkar at openjdk.org Mon Apr 21 17:44:14 2025 From: honkar at openjdk.org (Harshitha Onkar) Date: Mon, 21 Apr 2025 17:44:14 GMT Subject: RFR: JDK-8353486 : Open source Swing Tests - Set 4 [v8] In-Reply-To: References: Message-ID: > Open-sourced the following Swing tests: > > 1. javax/swing/JFileChooser/bug4464774.java > 2. javax/swing/JFileChooser/bug4522756.java > 3. javax/swing/JFileChooser/bug4759934.java > 4. javax/swing/JFileChooser/bug4943900.java > 5. javax/swing/JOptionPane/bug4194862.java Harshitha Onkar has updated the pull request incrementally with one additional commit since the last revision: bug4943900 instruction update ------------- Changes: - all: https://git.openjdk.org/jdk/pull/24456/files - new: https://git.openjdk.org/jdk/pull/24456/files/7d43f122..fa05f0ca Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=24456&range=07 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=24456&range=06-07 Stats: 10 lines in 1 file changed: 1 ins; 5 del; 4 mod Patch: https://git.openjdk.org/jdk/pull/24456.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/24456/head:pull/24456 PR: https://git.openjdk.org/jdk/pull/24456 From honkar at openjdk.org Mon Apr 21 17:44:14 2025 From: honkar at openjdk.org (Harshitha Onkar) Date: Mon, 21 Apr 2025 17:44:14 GMT Subject: RFR: JDK-8353486 : Open source Swing Tests - Set 4 [v6] In-Reply-To: References: <-jaKTmgwNA9JNGIaVqutoIFJKc43PKmNxbni9iAk7Dg=.679497d9-dffe-4af0-8e7f-e517284d2012@github.com> Message-ID: On Fri, 18 Apr 2025 18:01:08 GMT, Alexey Ivanov wrote: >> Harshitha Onkar has updated the pull request incrementally with one additional commit since the last revision: >> >> remove redudant frame > > test/jdk/javax/swing/JFileChooser/bug4522756.java line 29: > >> 27: * @requires (os.family == "windows") >> 28: * @summary To verify that if for the first time JFileChooser is opened, >> 29: the icon for Desktop is not missing. > > Suggestion: > > * @summary Verifies that the Desktop icon is not missing when > JFileChooser is opened for the first time. > > > I presume it refers to the location bar on the left, does it? The original bug was on GTK+linux only. I have extended it to SystemLookAndFeel. Since there are slight variations on how the file filter works on different LaF and the test instructions would be confusing if we were to account for all variations of installed LaF. Hence limited it System LaF. For example on macOS (Aqua LaF) when the txt filter is applied non-text files are greyed out. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/24456#discussion_r2052763845 From dgredler at openjdk.org Mon Apr 21 17:45:56 2025 From: dgredler at openjdk.org (Daniel Gredler) Date: Mon, 21 Apr 2025 17:45:56 GMT Subject: RFR: 8353230: Emoji rendering regression after JDK-8208377 In-Reply-To: References: <-N8_d2SHcl-h9yG8t6-WKGF_nGLJZQTu4ymMD2oPGrg=.651c8251-b235-4681-b82a-4ee680eb6593@github.com> Message-ID: On Tue, 15 Apr 2025 17:28:12 GMT, Nikita Gubarkov wrote: >> It looks like this regression actually fits into a longer series of fixes / regressions in this area: >> >> - [JDK-4517298](https://bugs.openjdk.org/browse/JDK-4517298) fixed metrics for zero-width characters, but broke some ligatures / glyph substitutions >> - [JDK-7017058](https://bugs.openjdk.org/browse/JDK-7017058) fixed the ligatures / glyph substitutions, but broke some zero-width metrics >> - [JDK-8208377](https://bugs.openjdk.org/browse/JDK-8208377) fixed some metrics and rendering for zero-width characters, but broke some ligatures / glyph substitutions >> - Now, with this PR, we aim to fix the ligatures without re-breaking zero-width metrics and display >> >> We have two different types of use cases pulling `CharToGlyphMapper` in two different directions: the users who need raw, untransformed glyph info, and the users who need normalized / transformed glyph info. >> >> It looks to me like, in the current code base, the only `CharToGlyphMapper` user which requires raw font data is HarfBuzz (explicitly confirmed with the HarfBuzz team here: https://github.com/harfbuzz/harfbuzz/discussions/5234). >> >> The regression mechanism at play here is that the HarfBuzz font callbacks are currently providing HarfBuzz with transformed glyph info (e.g. ZWJ -> INVISIBLE_GLYPH_ID), which prevents HarfBuzz from recognizing and applying the correct font GSUB substitutions (which involve ZWJ). >> >> In order to fix this without (yet again) breaking metrics and display behavior elsewhere, I've added two methods to `CharToGlyphMapper` which provide access to raw glyph info, to be used by the HarfBuzz font callbacks: `charToGlyphRaw(int)` and `charToVariationGlyphRaw(int)`. >> >> Note two intricacies related to `CompositeGlyphMapper`: >> 1. We need to be careful to only cache raw (untransformed) values, to avoid conflicts between requests for a raw version of a glyph and a transformed version of the same glyph. Another option would have been two separate caches, but I don't think that's necessary. >> 2. Consumers who are using `CompositeGlyphMapper.SLOTMASK` to check glyph slots (e.g. `FontRunIterator` and `CTextPipe`) will "see" invisible glyphs as having come from slot 0. This isn't new, and I think it's OK, but something to be aware of. >> >> The glyph cache handling in `CCharToGlyphMapper` (for macOS) also requires care to avoid mixing value types. >> >> Please also note that I'm not sure if the tweak to `sunFont.c` is being tested, since FFM is being used by default for Harf... > > We had similar emoji-related regressions at JetBrains. Although our font-related code diverged from OpenJDK a bit, porting this patch seems to resolve them too. I am not an OpenJDK reviewer, but LGTM nevertheless. @YaaZ Thanks for the information! @prrace Have you had a chance to look at this PR? ------------- PR Comment: https://git.openjdk.org/jdk/pull/24412#issuecomment-2819107922 From achung at openjdk.org Mon Apr 21 17:46:39 2025 From: achung at openjdk.org (Alisen Chung) Date: Mon, 21 Apr 2025 17:46:39 GMT Subject: RFR: 8354466: Open some misc Swing bugs 9 [v3] In-Reply-To: References: Message-ID: > Updating and opening some misc swing bugs Alisen Chung has updated the pull request incrementally with one additional commit since the last revision: update color uppercase ------------- Changes: - all: https://git.openjdk.org/jdk/pull/24703/files - new: https://git.openjdk.org/jdk/pull/24703/files/24fd9e94..4875b8ff Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=24703&range=02 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=24703&range=01-02 Stats: 5 lines in 1 file changed: 0 ins; 0 del; 5 mod Patch: https://git.openjdk.org/jdk/pull/24703.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/24703/head:pull/24703 PR: https://git.openjdk.org/jdk/pull/24703 From honkar at openjdk.org Mon Apr 21 17:47:55 2025 From: honkar at openjdk.org (Harshitha Onkar) Date: Mon, 21 Apr 2025 17:47:55 GMT Subject: RFR: JDK-8353942 : Open source Swing Tests - Set 5 [v4] In-Reply-To: References: Message-ID: <_uyppbs9SP5PA69OTWo7VG2d9SYEMMutZ-skCPSlSVE=.b1610c31-a864-4192-a205-9aa5b94adda2@github.com> > Following test are open-sourced in this PR: > > - javax/swing/DataTransfer/DragOverFeedbackTest.java - manual > - javax/swing/DataTransfer/ListDragOverFeedbackTest.java - manual > - javax/swing/DataTransfer/bug4655513.java - automated > - javax/swing/SwingUtilities/bug4369355.java - automated > - javax/swing/SwingUtilities/bug4967768.java - manual Harshitha Onkar has updated the pull request incrementally with one additional commit since the last revision: volatile vars ------------- Changes: - all: https://git.openjdk.org/jdk/pull/24698/files - new: https://git.openjdk.org/jdk/pull/24698/files/8935321e..0b22a66a Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=24698&range=03 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=24698&range=02-03 Stats: 2 lines in 1 file changed: 0 ins; 0 del; 2 mod Patch: https://git.openjdk.org/jdk/pull/24698.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/24698/head:pull/24698 PR: https://git.openjdk.org/jdk/pull/24698 From kizune at openjdk.org Mon Apr 21 17:51:46 2025 From: kizune at openjdk.org (Alexander Zuev) Date: Mon, 21 Apr 2025 17:51:46 GMT Subject: RFR: 8353488: Open some JComboBox bugs 3 [v2] In-Reply-To: References: Message-ID: <9Wl6fcVOqHs_uPPzphk4GEf_vIkvxuGmLdZfwLKaJBo=.96378937-88b5-44a5-8f52-7d2f030dd8a3@github.com> On Mon, 21 Apr 2025 17:43:26 GMT, Alisen Chung wrote: >> Opening some JComboBox bugs > > Alisen Chung has updated the pull request incrementally with one additional commit since the last revision: > > add robot keyrelease Marked as reviewed by kizune (Reviewer). ------------- PR Review: https://git.openjdk.org/jdk/pull/24767#pullrequestreview-2781870165 From kizune at openjdk.org Mon Apr 21 17:54:48 2025 From: kizune at openjdk.org (Alexander Zuev) Date: Mon, 21 Apr 2025 17:54:48 GMT Subject: RFR: 8354465: Open some JTable bugs 8 [v2] In-Reply-To: References: Message-ID: On Fri, 18 Apr 2025 23:12:32 GMT, Alisen Chung wrote: >> Updating and opening some JTable bugs > > Alisen Chung has updated the pull request incrementally with one additional commit since the last revision: > > update some test instructions, add jtreg summary Looks good. ------------- Marked as reviewed by kizune (Reviewer). PR Review: https://git.openjdk.org/jdk/pull/24741#pullrequestreview-2781876784 From honkar at openjdk.org Mon Apr 21 18:10:56 2025 From: honkar at openjdk.org (Harshitha Onkar) Date: Mon, 21 Apr 2025 18:10:56 GMT Subject: RFR: 8352905: Open some JComboBox bugs 1 [v3] In-Reply-To: References: Message-ID: On Fri, 18 Apr 2025 22:28:56 GMT, Alisen Chung wrote: >> Updating and opening some tests > > Alisen Chung has updated the pull request incrementally with one additional commit since the last revision: > > fix test Changes requested by honkar (Reviewer). test/jdk/javax/swing/JComboBox/bug4180054.java line 37: > 35: * @test > 36: * @bug 4180054 > 37: * @summary Tests that DefaultComboBoxModel doesn't fire a "contents changed" unneccesarily Suggestion: * @summary Tests that DefaultComboBoxModel doesn't fire a "contents changed" unnecessarily test/jdk/javax/swing/JComboBox/bug4530952.java line 51: > 49: static volatile Point loc; > 50: > 51: private static boolean flag = false; Can this be made volatile and directly be used in the test instead of using passed() and pass(). These functions are not required if the var is directly used in the test. Suggestion: private static boolean flag = false; test/jdk/javax/swing/JComboBox/bug4530952.java line 140: > 138: > 139: public static void resetButtons() { > 140: int length = ((JTextField) cmbAction.getEditor().getEditorComponent()). Test fails since cmbAction is declared as local var in testUI ..probably change it to static var if you need to access it in resetButtons? test/jdk/javax/swing/JComboBox/bug4530953.java line 49: > 47: SwingUtilities.invokeAndWait(() -> createTestUI()); > 48: robot.waitForIdle(); > 49: robot.delay(250); Usually a delay of 1s is used after testUI creation. Suggestion: robot.delay(1000); ------------- PR Review: https://git.openjdk.org/jdk/pull/24495#pullrequestreview-2781888363 PR Review Comment: https://git.openjdk.org/jdk/pull/24495#discussion_r2052782363 PR Review Comment: https://git.openjdk.org/jdk/pull/24495#discussion_r2052790364 PR Review Comment: https://git.openjdk.org/jdk/pull/24495#discussion_r2052790478 PR Review Comment: https://git.openjdk.org/jdk/pull/24495#discussion_r2052793420 From honkar at openjdk.org Mon Apr 21 18:21:44 2025 From: honkar at openjdk.org (Harshitha Onkar) Date: Mon, 21 Apr 2025 18:21:44 GMT Subject: RFR: 8352905: Open some JComboBox bugs 1 [v3] In-Reply-To: References: Message-ID: <66bop7MC3A5aflJOuKmddlS7jbvPx9gSpbgCrMb51ds=.acbe7982-f4da-4ed1-99ad-889a0a0e3b1f@github.com> On Fri, 18 Apr 2025 22:28:56 GMT, Alisen Chung wrote: >> Updating and opening some tests > > Alisen Chung has updated the pull request incrementally with one additional commit since the last revision: > > fix test test/jdk/javax/swing/JComboBox/bug4530952.java line 81: > 79: robot.delay(250); > 80: > 81: robot.mouseMove(loc.x, loc.y); For test stability , is it better to click on the center of the button rather than at the edge. You could use Util.getCenterPoint(btnAction) but you'll have to add Util to jtreg header or you can use the code below. Suggestion: SwingUtilities.invokeAndWait(() -> { loc = btnAction.getLocationOnScreen(); btnSize = btnAction.getSize(); }); robot.waitForIdle(); robot.delay(250); robot.mouseMove(loc.x + btnSize.width / 2, loc.y + btnSize.height / 2); ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/24495#discussion_r2052817877 From kizune at openjdk.org Mon Apr 21 18:25:49 2025 From: kizune at openjdk.org (Alexander Zuev) Date: Mon, 21 Apr 2025 18:25:49 GMT Subject: RFR: 8354341: Open some JTable bugs 7 [v2] In-Reply-To: References: <-A3k5m01IIlys1qXXQIqzcxRaGuGnVK2KMZ33Et4vmM=.c53f6d63-6829-41d9-852c-e436344348eb@github.com> Message-ID: On Fri, 18 Apr 2025 23:21:05 GMT, Alisen Chung wrote: >> Updating and opening some JTable bugs > > Alisen Chung has updated the pull request incrementally with one additional commit since the last revision: > > update test instructions, add manual tag, move frame disposal into edt, volatile keyword test/jdk/javax/swing/JTable/bug4190222.java line 61: > 59: > 60: SwingUtilities.invokeAndWait(() -> { > 61: preResize = tbl.getSize(); If you do all the sizes retrieval inside the single invokeAndWait block you can also do a comparison here and throw an exception if sizes mismatch. This way you only need one variable preResize and you can do comparison as `if (!preResize.equals(tbl.getSize()) ...` so you will only need only one local variable. It is not critical but looks cleaner. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/24739#discussion_r2052821780 From honkar at openjdk.org Mon Apr 21 18:37:56 2025 From: honkar at openjdk.org (Harshitha Onkar) Date: Mon, 21 Apr 2025 18:37:56 GMT Subject: RFR: 8354466: Open some misc Swing bugs 9 [v3] In-Reply-To: References: Message-ID: On Mon, 21 Apr 2025 17:46:39 GMT, Alisen Chung wrote: >> Updating and opening some misc swing bugs > > Alisen Chung has updated the pull request incrementally with one additional commit since the last revision: > > update color uppercase LGTM apart from minor inline suggestions test/jdk/javax/swing/JPasswordField/bug4382819.java line 50: > 48: robot.setAutoDelay(250); > 49: SwingUtilities.invokeAndWait(() -> createTestUI()); > 50: robot.waitForIdle(); Add some delay after testUI ? Suggestion: robot.waitForIdle(); robot.delay(1000); test/jdk/javax/swing/JPasswordField/bug4382819.java line 59: > 57: SwingUtilities.invokeAndWait(() -> passwordField.setEnabled(false)); > 58: robot.waitForIdle(); > 59: robot.delay(1000); delay can be reduced here Suggestion: robot.delay(250); test/jdk/javax/swing/JSplitPane/bug4820080.java line 68: > 66: jleft.setBackground(Color.DARK_GRAY); > 67: JPanel jright = new JPanel(); > 68: jright.setBackground(Color.DARK_GRAY); using setPreferredSize() makes the UI look better and the divider is not skewed to the left Same for left and right panels below. Suggestion: JPanel jleft = new JPanel(); jleft.setBackground(Color.DARK_GRAY); jleft.setPreferredSize(new Dimension(100, 100)); JPanel jright = new JPanel(); jright.setBackground(Color.DARK_GRAY); ------------- Marked as reviewed by honkar (Reviewer). PR Review: https://git.openjdk.org/jdk/pull/24703#pullrequestreview-2781960121 PR Review Comment: https://git.openjdk.org/jdk/pull/24703#discussion_r2052826603 PR Review Comment: https://git.openjdk.org/jdk/pull/24703#discussion_r2052827242 PR Review Comment: https://git.openjdk.org/jdk/pull/24703#discussion_r2052835538 From kizune at openjdk.org Mon Apr 21 18:56:42 2025 From: kizune at openjdk.org (Alexander Zuev) Date: Mon, 21 Apr 2025 18:56:42 GMT Subject: RFR: 8354233: Open some JTable bugs 6 [v2] In-Reply-To: References: Message-ID: On Fri, 18 Apr 2025 22:53:10 GMT, Alisen Chung wrote: >> Updating and opening some JTable bugs > > Alisen Chung has updated the pull request incrementally with one additional commit since the last revision: > > update jtreg paths, volatile, manual jtreg tag test/jdk/javax/swing/JTable/bug4193727.java line 54: > 52: Push button "Resize". > 53: If either of the following happen, test fails: > 54: 1) The size of the columns are wrong Please elaborate on the meaning of "wrong". In my case the address does not fit the width of the second column. Is it wrong? Or is it correct? I can not tell what test expects from me. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/24735#discussion_r2052859925 From honkar at openjdk.org Mon Apr 21 19:17:44 2025 From: honkar at openjdk.org (Harshitha Onkar) Date: Mon, 21 Apr 2025 19:17:44 GMT Subject: RFR: 8353685: Open some JComboBox bugs 4 [v2] In-Reply-To: References: Message-ID: On Fri, 18 Apr 2025 22:40:14 GMT, Alisen Chung wrote: >> Updating and opening some JComboBox bugs > > Alisen Chung has updated the pull request incrementally with one additional commit since the last revision: > > move disposal onto edt LGTM apart from minor suggestions test/jdk/javax/swing/JComboBox/bug4212498.java line 34: > 32: * @test > 33: * @bug 4212498 > 34: * @key headful `@key headful` not required for manual test test/jdk/javax/swing/JComboBox/bug4459267.java line 49: > 47: > 48: SwingUtilities.invokeAndWait(() -> createTestUI()); > 49: robot.waitForIdle(); Suggestion: robot.waitForIdle(); robot.delay(1000); test/jdk/javax/swing/JComboBox/bug4519269.java line 56: > 54: > 55: SwingUtilities.invokeAndWait (() -> p = combo.getLocationOnScreen()); > 56: robot.mouseMove(p.x+5, p.y+5); Suggestion: robot.mouseMove(p.x + 5, p.y + 5); ------------- Marked as reviewed by honkar (Reviewer). PR Review: https://git.openjdk.org/jdk/pull/24733#pullrequestreview-2782027288 PR Review Comment: https://git.openjdk.org/jdk/pull/24733#discussion_r2052869116 PR Review Comment: https://git.openjdk.org/jdk/pull/24733#discussion_r2052876327 PR Review Comment: https://git.openjdk.org/jdk/pull/24733#discussion_r2052881923 From dnguyen at openjdk.org Mon Apr 21 19:20:13 2025 From: dnguyen at openjdk.org (Damon Nguyen) Date: Mon, 21 Apr 2025 19:20:13 GMT Subject: RFR: 8354695: Open source several swing tests batch7 [v2] In-Reply-To: <_UYipF8V8voPBRGVdOg7APlb0vu9VEfObY1qaHDTFBI=.0337e295-3b52-4d63-81c3-3cd21f708496@github.com> References: <_UYipF8V8voPBRGVdOg7APlb0vu9VEfObY1qaHDTFBI=.0337e295-3b52-4d63-81c3-3cd21f708496@github.com> Message-ID: > Open-sourcing and standardizing several swing tests (JScrollPane & JRootPane) Damon Nguyen has updated the pull request incrementally with one additional commit since the last revision: Syntax fix ------------- Changes: - all: https://git.openjdk.org/jdk/pull/24758/files - new: https://git.openjdk.org/jdk/pull/24758/files/3f0a6d8a..e49e87eb Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=24758&range=01 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=24758&range=00-01 Stats: 1 line in 1 file changed: 0 ins; 0 del; 1 mod Patch: https://git.openjdk.org/jdk/pull/24758.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/24758/head:pull/24758 PR: https://git.openjdk.org/jdk/pull/24758 From duke at openjdk.org Mon Apr 21 19:57:23 2025 From: duke at openjdk.org (Jeremy Wood) Date: Mon, 21 Apr 2025 19:57:23 GMT Subject: RFR: 8355203: AquaButtonUI and AquaRootPaneUI repaint default button unnecessarily Message-ID: This removes the constant repainting of the AquaRootPaneUI's default button. A long time ago (before Mac OS Yosemite, around 2014) this was needed to match Aqua's native experience. But the default button no longer pulses, so we don't need to repaint ("pulse") the button continually. Here's a clip from a YouTube video I found demonstrating the pulsing effect that this PR removes (you may want to turn your volume off): https://github.com/user-attachments/assets/496bc003-ccba-4178-81bc-765e96d94316 This PR includes a test, but this test has never failed. (That is: this PR does not resolve a failing test.) This test would fail if the default button ever looked the same as a non-default button. My primary goal here was to remove the AquaButtonUI's AncestorListener, but while we're here we might as well remove the AquaRootPaneUI's timer and other cleanup. I tried and failed to rename the `private static final byte _pulsed` constant. (More details [here](https://github.com/openjdk/jdk/commit/89d0689f226b9e883df464e6f3e8c20074970499).) If anyone has suggestions for how to rename that without errors please let me know. ------------- Commit messages: - 8344697: code cleanup for PR - 8344697: avoid state.set(Animating.YES) for default buttons - 8344697: Removing performance-based test - 8344697: trivial code cleanup for PR - Merge branch 'master' into JDK-8344697 - Merge branch 'master' of https://github.com/mickleness/jdk - Merge branch 'master' of https://github.com/mickleness/jdk - Merge branch 'openjdk:master' into master - Merge branch 'openjdk:master' into master - Merge branch 'master' into JDK-8344697 - ... and 9 more: https://git.openjdk.org/jdk/compare/128f2d1c...b8a0d31d Changes: https://git.openjdk.org/jdk/pull/24778/files Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=24778&range=00 Issue: https://bugs.openjdk.org/browse/JDK-8355203 Stats: 368 lines in 5 files changed: 234 ins; 127 del; 7 mod Patch: https://git.openjdk.org/jdk/pull/24778.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/24778/head:pull/24778 PR: https://git.openjdk.org/jdk/pull/24778 From serb at openjdk.org Mon Apr 21 20:12:43 2025 From: serb at openjdk.org (Sergey Bylokhov) Date: Mon, 21 Apr 2025 20:12:43 GMT Subject: RFR: 8353488: Open some JComboBox bugs 3 [v2] In-Reply-To: References: Message-ID: On Mon, 21 Apr 2025 17:43:26 GMT, Alisen Chung wrote: >> Opening some JComboBox bugs > > Alisen Chung has updated the pull request incrementally with one additional commit since the last revision: > > add robot keyrelease test/jdk/javax/swing/JComboBox/bug4248128.java line 56: > 54: robot.waitForIdle(); > 55: > 56: if (!combo.isPopupVisible()) { combo fields here and in the next test are accessed on non EDT. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/24767#discussion_r2052939467 From serb at openjdk.org Mon Apr 21 20:14:40 2025 From: serb at openjdk.org (Sergey Bylokhov) Date: Mon, 21 Apr 2025 20:14:40 GMT Subject: RFR: JDK-8353011 : Open source Swing JButton tests - Set 1 In-Reply-To: References: Message-ID: On Fri, 18 Apr 2025 23:46:52 GMT, Harshitha Onkar wrote: > Following tests are open sourced in this PR: > > javax/swing/JButton/bug4151763.java > javax/swing/JButton/bug4415505.java > javax/swing/JButton/bug4978274.java > javax/swing/JRadioButton/bug4673850.java > javax/swing/JTable/bug4188504.java Marked as reviewed by serb (Reviewer). ------------- PR Review: https://git.openjdk.org/jdk/pull/24765#pullrequestreview-2782156772 From kizune at openjdk.org Mon Apr 21 20:15:43 2025 From: kizune at openjdk.org (Alexander Zuev) Date: Mon, 21 Apr 2025 20:15:43 GMT Subject: RFR: 8354233: Open some JTable bugs 6 [v2] In-Reply-To: References: Message-ID: On Fri, 18 Apr 2025 22:53:10 GMT, Alisen Chung wrote: >> Updating and opening some JTable bugs > > Alisen Chung has updated the pull request incrementally with one additional commit since the last revision: > > update jtreg paths, volatile, manual jtreg tag test/jdk/javax/swing/JTable/bug4460382.java line 120: > 118: row1 = editingRow; > 119: setValueAt(value, editingRow, editingColumn); > 120: row2 = editingRow; Can you tell me what are we testing here? We extending JTable and we are checking that during the cell content replacement some random internal protected variable does not change. What does it tells us? Why is it a criteria of test passing or not? ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/24735#discussion_r2052941999 From serb at openjdk.org Mon Apr 21 20:17:43 2025 From: serb at openjdk.org (Sergey Bylokhov) Date: Mon, 21 Apr 2025 20:17:43 GMT Subject: RFR: 8354653: Clean up and open source KeyEvent related tests (Part 4) In-Reply-To: References: Message-ID: On Fri, 18 Apr 2025 21:17:40 GMT, Alexander Zuev wrote: > Clean up four more KeyEvent related tests. Marked as reviewed by serb (Reviewer). ------------- PR Review: https://git.openjdk.org/jdk/pull/24763#pullrequestreview-2782160941 From serb at openjdk.org Mon Apr 21 20:19:43 2025 From: serb at openjdk.org (Sergey Bylokhov) Date: Mon, 21 Apr 2025 20:19:43 GMT Subject: RFR: 8353470: Clean up and open source couple AWT Graphics related tests (Part 2) In-Reply-To: References: Message-ID: On Fri, 18 Apr 2025 21:04:09 GMT, Alexander Zuev wrote: > Clean up and open source four more tests problem listing one for known issues on linux and macos. Marked as reviewed by serb (Reviewer). ------------- PR Review: https://git.openjdk.org/jdk/pull/24761#pullrequestreview-2782165098 From serb at openjdk.org Mon Apr 21 20:21:42 2025 From: serb at openjdk.org (Sergey Bylokhov) Date: Mon, 21 Apr 2025 20:21:42 GMT Subject: RFR: 8354695: Open source several swing tests batch7 [v2] In-Reply-To: References: <_UYipF8V8voPBRGVdOg7APlb0vu9VEfObY1qaHDTFBI=.0337e295-3b52-4d63-81c3-3cd21f708496@github.com> Message-ID: <66O1xGoR5iN5j7O_Oda7rfqpK95tvEc2Gns0c732JNk=.3b2e84e4-94d1-4884-9dd6-07fd8bb4f6e1@github.com> On Mon, 21 Apr 2025 19:20:13 GMT, Damon Nguyen wrote: >> Open-sourcing and standardizing several swing tests (JScrollPane & JRootPane) > > Damon Nguyen has updated the pull request incrementally with one additional commit since the last revision: > > Syntax fix test/jdk/javax/swing/JRootPane/bug4403624.java line 79: > 77: SwingUtilities.invokeAndWait(() -> p = b.getLocationOnScreen()); > 78: > 79: r.mouseMove(p.x + (b.getWidth() / 2), p.y + (b.getHeight() / 2)); you called the b.getLocationOnScreen() on EDt but what about b.getWidth() and b.getHeight() ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/24758#discussion_r2052947669 From kizune at openjdk.org Mon Apr 21 20:22:55 2025 From: kizune at openjdk.org (Alexander Zuev) Date: Mon, 21 Apr 2025 20:22:55 GMT Subject: Integrated: 8354653: Clean up and open source KeyEvent related tests (Part 4) In-Reply-To: References: Message-ID: On Fri, 18 Apr 2025 21:17:40 GMT, Alexander Zuev wrote: > Clean up four more KeyEvent related tests. This pull request has now been integrated. Changeset: a7128d86 Author: Alexander Zuev URL: https://git.openjdk.org/jdk/commit/a7128d86eac2c40dbfa79811234ab6226fb4d080 Stats: 409 lines in 4 files changed: 409 ins; 0 del; 0 mod 8354653: Clean up and open source KeyEvent related tests (Part 4) Reviewed-by: serb ------------- PR: https://git.openjdk.org/jdk/pull/24763 From serb at openjdk.org Mon Apr 21 20:24:41 2025 From: serb at openjdk.org (Sergey Bylokhov) Date: Mon, 21 Apr 2025 20:24:41 GMT Subject: RFR: 8354465: Open some JTable bugs 8 [v2] In-Reply-To: References: Message-ID: On Fri, 18 Apr 2025 23:12:32 GMT, Alisen Chung wrote: >> Updating and opening some JTable bugs > > Alisen Chung has updated the pull request incrementally with one additional commit since the last revision: > > update some test instructions, add jtreg summary Marked as reviewed by serb (Reviewer). ------------- PR Review: https://git.openjdk.org/jdk/pull/24741#pullrequestreview-2782171778 From kizune at openjdk.org Mon Apr 21 20:25:48 2025 From: kizune at openjdk.org (Alexander Zuev) Date: Mon, 21 Apr 2025 20:25:48 GMT Subject: Integrated: 8353470: Clean up and open source couple AWT Graphics related tests (Part 2) In-Reply-To: References: Message-ID: <2eozuW3OgJZAgSC-FUAO1ZGlAtra7MMFL3stORCi-rs=.29e74935-dfb4-46b0-910d-d6dea33f685f@github.com> On Fri, 18 Apr 2025 21:04:09 GMT, Alexander Zuev wrote: > Clean up and open source four more tests problem listing one for known issues on linux and macos. This pull request has now been integrated. Changeset: 8270cd0a Author: Alexander Zuev URL: https://git.openjdk.org/jdk/commit/8270cd0ad2e0df72f063f36853328a935595f71f Stats: 606 lines in 5 files changed: 606 ins; 0 del; 0 mod 8353470: Clean up and open source couple AWT Graphics related tests (Part 2) Reviewed-by: serb ------------- PR: https://git.openjdk.org/jdk/pull/24761 From serb at openjdk.org Mon Apr 21 20:28:42 2025 From: serb at openjdk.org (Sergey Bylokhov) Date: Mon, 21 Apr 2025 20:28:42 GMT Subject: RFR: 8354095: Open some JTable bugs 5 [v3] In-Reply-To: References: <4t0GC0P2HhS-hgc6dNndlsbTxaliBcWUqSypiPPb7cw=.ea094f23-779a-45f5-a4ab-85c6e76841a6@github.com> Message-ID: <5OWPHBVbjiMnHmmF3AkPz4eRxqsYx73fY6HWq0qZBkE=.79aa2272-97a6-478c-a3f0-8b4de0279561@github.com> On Fri, 18 Apr 2025 22:45:39 GMT, Alisen Chung wrote: >> Updating and opening some JTable bugs > > Alisen Chung has updated the pull request incrementally with one additional commit since the last revision: > > manual jtreg tag, make jtable field local test/jdk/javax/swing/JTable/bug4118307.java line 50: > 48: static Point tableLoc; > 49: static Point p; > 50: private static boolean flag = false; should we mark it as volatile or is it somehow synced? ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/24734#discussion_r2052955540 From serb at openjdk.org Mon Apr 21 20:32:42 2025 From: serb at openjdk.org (Sergey Bylokhov) Date: Mon, 21 Apr 2025 20:32:42 GMT Subject: RFR: 8352793: Open source several AWT TextComponent tests - Batch 1 [v3] In-Reply-To: <7sw9lmEN6f9hE7q0cIJkveWe1J6jQINnLUmZnFNpffo=.8be1bfc6-f3d6-42b9-86ee-49344eec1f01@github.com> References: <7sw9lmEN6f9hE7q0cIJkveWe1J6jQINnLUmZnFNpffo=.8be1bfc6-f3d6-42b9-86ee-49344eec1f01@github.com> Message-ID: On Thu, 17 Apr 2025 09:54:27 GMT, Tejesh R wrote: >> Open source these AWT TextComponent tests: >> >> java/awt/TextComponent/BackgroundTest/BackgroundTest.java >> java/awt/TextComponent/DisableTest/DisableTest.java >> java/awt/TextComponent/TextFieldMargin/TextFieldMargin.java >> java/awt/TextComponent/ModifiersTest/ModifiersTest.java > > Tejesh R has updated the pull request incrementally with one additional commit since the last revision: > > Updated review comments Marked as reviewed by serb (Reviewer). ------------- PR Review: https://git.openjdk.org/jdk/pull/24656#pullrequestreview-2782186906 From serb at openjdk.org Mon Apr 21 20:32:43 2025 From: serb at openjdk.org (Sergey Bylokhov) Date: Mon, 21 Apr 2025 20:32:43 GMT Subject: RFR: JDK-8353942 : Open source Swing Tests - Set 5 [v4] In-Reply-To: <_uyppbs9SP5PA69OTWo7VG2d9SYEMMutZ-skCPSlSVE=.b1610c31-a864-4192-a205-9aa5b94adda2@github.com> References: <_uyppbs9SP5PA69OTWo7VG2d9SYEMMutZ-skCPSlSVE=.b1610c31-a864-4192-a205-9aa5b94adda2@github.com> Message-ID: <61vyBoOwxteN_RnJwyDTg8LGgls8Wr2A5l9DvadKSZU=.579d5ee5-7691-45e6-8f70-653d882e1ab8@github.com> On Mon, 21 Apr 2025 17:47:55 GMT, Harshitha Onkar wrote: >> Following test are open-sourced in this PR: >> >> - javax/swing/DataTransfer/DragOverFeedbackTest.java - manual >> - javax/swing/DataTransfer/ListDragOverFeedbackTest.java - manual >> - javax/swing/DataTransfer/bug4655513.java - automated >> - javax/swing/SwingUtilities/bug4369355.java - automated >> - javax/swing/SwingUtilities/bug4967768.java - manual > > Harshitha Onkar has updated the pull request incrementally with one additional commit since the last revision: > > volatile vars Marked as reviewed by serb (Reviewer). ------------- PR Review: https://git.openjdk.org/jdk/pull/24698#pullrequestreview-2782185372 From serb at openjdk.org Mon Apr 21 20:35:48 2025 From: serb at openjdk.org (Sergey Bylokhov) Date: Mon, 21 Apr 2025 20:35:48 GMT Subject: RFR: 8353445: Open source several AWT Menu tests - Batch 1 [v4] In-Reply-To: References: Message-ID: On Mon, 21 Apr 2025 14:50:07 GMT, Tejesh R wrote: >> Open source these AWT Menu tests: >> >> java/awt/Menu/MenuVisibilityTest/MenuVisibilityTest.java >> java/awt/Menu/MenuActionEventTest/MenuActionEventTest.java >> java/awt/Menu/RmInHideTest/RmInHideTest.java >> java/awt/Menu/SetShortCutTest/SetShortCutTest.java > > Tejesh R has updated the pull request incrementally with one additional commit since the last revision: > > Update PL test/jdk/java/awt/Menu/SetShortCutTest.java line 115: > 113: //Click on the "Stuff" menu to remove the "first" menu item > 114: else if (event.getSource() == item2) { > 115: //If the item has not been removed from the menu,then remove "First" from the "File" menu please split long line to 80 chars ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/24649#discussion_r2052964200 From serb at openjdk.org Mon Apr 21 20:37:56 2025 From: serb at openjdk.org (Sergey Bylokhov) Date: Mon, 21 Apr 2025 20:37:56 GMT Subject: RFR: 8355203: AquaButtonUI and AquaRootPaneUI repaint default button unnecessarily In-Reply-To: References: Message-ID: <9ok7x8AADpGFkVPORr8UGxQeNb3l-5fyjngxBuQc-aY=.e0207e50-b7db-403a-8c76-7626b6b4e10e@github.com> On Mon, 21 Apr 2025 19:52:18 GMT, Jeremy Wood wrote: > This removes the constant repainting of the AquaRootPaneUI's default button. > > A long time ago (before Mac OS Yosemite, around 2014) this was needed to match Aqua's native experience. But the default button no longer pulses, so we don't need to repaint ("pulse") the button continually. > > Here's a clip from a YouTube video I found demonstrating the pulsing effect that this PR removes (you may want to turn your volume off): > > https://github.com/user-attachments/assets/496bc003-ccba-4178-81bc-765e96d94316 > > This PR includes a test, but this test has never failed. (That is: this PR does not resolve a failing test.) This test would fail if the default button ever looked the same as a non-default button. > > My primary goal here was to remove the AquaButtonUI's AncestorListener, but while we're here we might as well remove the AquaRootPaneUI's timer and other cleanup. > > I tried and failed to rename the `private static final byte _pulsed` constant. (More details [here](https://github.com/openjdk/jdk/commit/89d0689f226b9e883df464e6f3e8c20074970499).) If anyone has suggestions for how to rename that without errors please let me know. Just to confirm, have you checked that the default button pulse has been disabled since macOS Yosemite? ------------- PR Comment: https://git.openjdk.org/jdk/pull/24778#issuecomment-2819451363 From javalists at cbfiddle.com Mon Apr 21 20:47:57 2025 From: javalists at cbfiddle.com (Alan Snyder) Date: Mon, 21 Apr 2025 13:47:57 -0700 Subject: RFR: 4811995: BorderLayout does not respect minimum size of its components In-Reply-To: References: Message-ID: > On Apr 20, 2025, at 1:24?AM, Jeremy Wood wrote: > > Our work-around was more complex than this PR: we wrote a modified BorderLayout that would switch to using `component.getMinimumSize()` when the preferred size wouldn't fit. IMO that is a better option all-around, but it is dangerously invasive for an OpenJDK proposal. But it would not be dangerous as a new Layout Manager, would it? Or it could go in a third party library. -------------- next part -------------- An HTML attachment was scrubbed... URL: From honkar at openjdk.org Mon Apr 21 20:51:42 2025 From: honkar at openjdk.org (Harshitha Onkar) Date: Mon, 21 Apr 2025 20:51:42 GMT Subject: RFR: 8354095: Open some JTable bugs 5 [v3] In-Reply-To: References: <4t0GC0P2HhS-hgc6dNndlsbTxaliBcWUqSypiPPb7cw=.ea094f23-779a-45f5-a4ab-85c6e76841a6@github.com> Message-ID: On Fri, 18 Apr 2025 22:45:39 GMT, Alisen Chung wrote: >> Updating and opening some JTable bugs > > Alisen Chung has updated the pull request incrementally with one additional commit since the last revision: > > manual jtreg tag, make jtable field local test/jdk/javax/swing/JTable/InternationalCharacters.java line 173: > 171: } > 172: }; > 173: frame.addWindowListener(l); System.exit(0); is not required in jtreg tests. It needs to be removed. test/jdk/javax/swing/JTable/bug4118307.java line 64: > 62: robot.setAutoDelay(250); > 63: SwingUtilities.invokeAndWait(() -> createTestUI()); > 64: robot.waitForIdle(); robot.delay(1000) ? test/jdk/javax/swing/JTable/bug4118307.java line 137: > 135: static synchronized boolean isFail() { > 136: return flag; > 137: } These can be removed once flag is made volatile and flag can directly be used in the test test/jdk/javax/swing/JTable/bug4118307.java line 158: > 156: public int getColumnCount() { > 157: return columnNames.length; > 158: } `@Override ` can be added for all the overridden TableModel methods test/jdk/javax/swing/JTable/bug4138158.java line 40: > 38: private static final String INSTRUCTIONS = """ > 39: Move mouse to beginning of table, press left mouse button and move mouse down > 40: so that mouse cursor is below the bottom border of table. If the table isn't Test instructions are not clear especially this stmt - "mouse cursor is below the bottom border of table". Can we rephrase it for clarity ? ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/24734#discussion_r2052890452 PR Review Comment: https://git.openjdk.org/jdk/pull/24734#discussion_r2052891877 PR Review Comment: https://git.openjdk.org/jdk/pull/24734#discussion_r2052969417 PR Review Comment: https://git.openjdk.org/jdk/pull/24734#discussion_r2052971578 PR Review Comment: https://git.openjdk.org/jdk/pull/24734#discussion_r2052977191 From honkar at openjdk.org Mon Apr 21 20:51:48 2025 From: honkar at openjdk.org (Harshitha Onkar) Date: Mon, 21 Apr 2025 20:51:48 GMT Subject: RFR: 8354095: Open some JTable bugs 5 [v3] In-Reply-To: <5OWPHBVbjiMnHmmF3AkPz4eRxqsYx73fY6HWq0qZBkE=.79aa2272-97a6-478c-a3f0-8b4de0279561@github.com> References: <4t0GC0P2HhS-hgc6dNndlsbTxaliBcWUqSypiPPb7cw=.ea094f23-779a-45f5-a4ab-85c6e76841a6@github.com> <5OWPHBVbjiMnHmmF3AkPz4eRxqsYx73fY6HWq0qZBkE=.79aa2272-97a6-478c-a3f0-8b4de0279561@github.com> Message-ID: On Mon, 21 Apr 2025 20:25:51 GMT, Sergey Bylokhov wrote: >> Alisen Chung has updated the pull request incrementally with one additional commit since the last revision: >> >> manual jtreg tag, make jtable field local > > test/jdk/javax/swing/JTable/bug4118307.java line 50: > >> 48: static Point tableLoc; >> 49: static Point p; >> 50: private static boolean flag = false; > > should we mark it as volatile or is it somehow synced? I agree. 'flag' can be made volatile and directly used in the test. This eliminates the need for setFail(), isFail() synchronized functions below. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/24734#discussion_r2052968371 From duke at openjdk.org Mon Apr 21 21:12:40 2025 From: duke at openjdk.org (Jeremy Wood) Date: Mon, 21 Apr 2025 21:12:40 GMT Subject: RFR: 8355203: AquaButtonUI and AquaRootPaneUI repaint default button unnecessarily In-Reply-To: <9ok7x8AADpGFkVPORr8UGxQeNb3l-5fyjngxBuQc-aY=.e0207e50-b7db-403a-8c76-7626b6b4e10e@github.com> References: <9ok7x8AADpGFkVPORr8UGxQeNb3l-5fyjngxBuQc-aY=.e0207e50-b7db-403a-8c76-7626b6b4e10e@github.com> Message-ID: On Mon, 21 Apr 2025 20:34:53 GMT, Sergey Bylokhov wrote: > have you checked that the default button pulse has been disabled since macOS Yosemite No; I'm not sure how to check that with 100% certainty. Does anyone know of a resource to confirm how older Mac UI's looked? (I don't have access to a Mavericks machine (which should pulse) or a Yosemite machine (which should not pulse).) Wikipedia says the pulsing was discontinued with Yosemite: image I can find old videos featuring a non-pulsing default button. Here's one from 2015: https://www.youtube.com/watch?v=tzgP3YwGwRw ------------- PR Comment: https://git.openjdk.org/jdk/pull/24778#issuecomment-2819511141 From honkar at openjdk.org Mon Apr 21 21:18:46 2025 From: honkar at openjdk.org (Harshitha Onkar) Date: Mon, 21 Apr 2025 21:18:46 GMT Subject: RFR: 8354701: Open source few JToolTip tests In-Reply-To: References: Message-ID: On Thu, 17 Apr 2025 02:15:30 GMT, Alexander Zvegintsev wrote: > Few more tests are open sourced: > > - javax/swing/JToolTip/4225314/bug4225314.java manual > - javax/swing/JToolTip/TooltipTest/TooltipTest.java manual > - javax/swing/JToolTip/4255441/bug4255441.java manual LGTM apart from minor test instruction edit. test/jdk/javax/swing/JToolTip/TooltipTest.java line 49: > 47: 2. Move the mouse over the button labeled "Long tip". If the\s > 48: last letter of the tooltip that appears is not all visible, > 49: then the test fails. If you can see the entire last character, Suggestion: last letter of the tooltip appears clipped, then the test fails. If you can see the entire last character, test/jdk/javax/swing/JToolTip/TooltipTest.java line 55: > 53: Move the mouse pointer over the button labeled "Mnemonic" and look > 54: at tooltip when it appears. It should read "hint". > 55: Test passes if it is so and fails otherwise (bug 4375928). Suggestion: If the above is true test passes else test fails (bug 4375928). ------------- Marked as reviewed by honkar (Reviewer). PR Review: https://git.openjdk.org/jdk/pull/24708#pullrequestreview-2782255059 PR Review Comment: https://git.openjdk.org/jdk/pull/24708#discussion_r2053001939 PR Review Comment: https://git.openjdk.org/jdk/pull/24708#discussion_r2053002854 From duke at openjdk.org Mon Apr 21 21:31:41 2025 From: duke at openjdk.org (Jeremy Wood) Date: Mon, 21 Apr 2025 21:31:41 GMT Subject: RFR: 4811995: BorderLayout does not respect minimum size of its components In-Reply-To: References: Message-ID: On Mon, 21 Apr 2025 20:49:34 GMT, Alan Snyder wrote: > But it would not be dangerous as a new Layout Manager, would it? > Or it could go in a third party library. Correct. If anyone wants it, or a draft of it, feel free to email me. Someday if I need it I'll add it to my personal repo. (Personally (being new-ish to this group) I try to limit my OpenJDK PRs to fixes, but not enhancements.) To be fair: this PR is still a little invasive. It's possible some UIs are relying on the legacy behavior as-is. But IMO assigning a negative width/height is a significant bug worth fixing. ------------- PR Comment: https://git.openjdk.org/jdk/pull/24772#issuecomment-2819543295 From honkar at openjdk.org Mon Apr 21 22:37:54 2025 From: honkar at openjdk.org (Harshitha Onkar) Date: Mon, 21 Apr 2025 22:37:54 GMT Subject: Integrated: JDK-8353011 : Open source Swing JButton tests - Set 1 In-Reply-To: References: Message-ID: On Fri, 18 Apr 2025 23:46:52 GMT, Harshitha Onkar wrote: > Following tests are open sourced in this PR: > > javax/swing/JButton/bug4151763.java > javax/swing/JButton/bug4415505.java > javax/swing/JButton/bug4978274.java > javax/swing/JRadioButton/bug4673850.java > javax/swing/JTable/bug4188504.java This pull request has now been integrated. Changeset: f7155183 Author: Harshitha Onkar URL: https://git.openjdk.org/jdk/commit/f7155183d7f7c6fcea2090f906de69e02973a6d9 Stats: 454 lines in 5 files changed: 454 ins; 0 del; 0 mod 8353011: Open source Swing JButton tests - Set 1 Reviewed-by: serb ------------- PR: https://git.openjdk.org/jdk/pull/24765 From achung at openjdk.org Mon Apr 21 22:56:30 2025 From: achung at openjdk.org (Alisen Chung) Date: Mon, 21 Apr 2025 22:56:30 GMT Subject: RFR: 8352905: Open some JComboBox bugs 1 [v4] In-Reply-To: References: Message-ID: > Updating and opening some tests Alisen Chung has updated the pull request incrementally with one additional commit since the last revision: update tests ------------- Changes: - all: https://git.openjdk.org/jdk/pull/24495/files - new: https://git.openjdk.org/jdk/pull/24495/files/9b36a10f..95cdfc12 Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=24495&range=03 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=24495&range=02-03 Stats: 28 lines in 2 files changed: 11 ins; 8 del; 9 mod Patch: https://git.openjdk.org/jdk/pull/24495.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/24495/head:pull/24495 PR: https://git.openjdk.org/jdk/pull/24495 From achung at openjdk.org Mon Apr 21 22:56:31 2025 From: achung at openjdk.org (Alisen Chung) Date: Mon, 21 Apr 2025 22:56:31 GMT Subject: RFR: 8352905: Open some JComboBox bugs 1 [v3] In-Reply-To: <66bop7MC3A5aflJOuKmddlS7jbvPx9gSpbgCrMb51ds=.acbe7982-f4da-4ed1-99ad-889a0a0e3b1f@github.com> References: <66bop7MC3A5aflJOuKmddlS7jbvPx9gSpbgCrMb51ds=.acbe7982-f4da-4ed1-99ad-889a0a0e3b1f@github.com> Message-ID: On Mon, 21 Apr 2025 18:19:10 GMT, Harshitha Onkar wrote: >> Alisen Chung has updated the pull request incrementally with one additional commit since the last revision: >> >> fix test > > test/jdk/javax/swing/JComboBox/bug4530952.java line 81: > >> 79: robot.delay(250); >> 80: >> 81: robot.mouseMove(loc.x, loc.y); > > For test stability , is it better to click on the center of the button rather than at the edge. You could use Util.getCenterPoint(btnAction) but you'll have to add Util to jtreg header or you can use the code below. > > Suggestion: > > SwingUtilities.invokeAndWait(() -> { > loc = btnAction.getLocationOnScreen(); > btnSize = btnAction.getSize(); > }); > robot.waitForIdle(); > robot.delay(250); > > robot.mouseMove(loc.x + btnSize.width / 2, > loc.y + btnSize.height / 2); i've just used your code to find the center of the button ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/24495#discussion_r2053081543 From achung at openjdk.org Mon Apr 21 22:58:37 2025 From: achung at openjdk.org (Alisen Chung) Date: Mon, 21 Apr 2025 22:58:37 GMT Subject: RFR: 8353007: Open some JComboBox bugs 2 [v5] In-Reply-To: References: Message-ID: <-WD2pfFwnlzwP8PLQkDsQBkhYC_ZmpFB74CduoxbFmY=.88f0c35a-5e64-4cc7-a1a1-0fa9da1551fd@github.com> > Updating and opening some tests Alisen Chung has updated the pull request incrementally with one additional commit since the last revision: reduce number of rows ------------- Changes: - all: https://git.openjdk.org/jdk/pull/24496/files - new: https://git.openjdk.org/jdk/pull/24496/files/d7bba188..e53b046c Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=24496&range=04 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=24496&range=03-04 Stats: 1 line in 1 file changed: 0 ins; 0 del; 1 mod Patch: https://git.openjdk.org/jdk/pull/24496.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/24496/head:pull/24496 PR: https://git.openjdk.org/jdk/pull/24496 From achung at openjdk.org Mon Apr 21 22:58:38 2025 From: achung at openjdk.org (Alisen Chung) Date: Mon, 21 Apr 2025 22:58:38 GMT Subject: RFR: 8353007: Open some JComboBox bugs 2 [v5] In-Reply-To: References: Message-ID: On Wed, 9 Apr 2025 00:12:36 GMT, Harshitha Onkar wrote: >> Alisen Chung has updated the pull request incrementally with one additional commit since the last revision: >> >> reduce number of rows > > test/jdk/javax/swing/JComboBox/bug4201964.java line 57: > >> 55: PassFailJFrame.builder() >> 56: .instructions(INSTRUCTIONS) >> 57: .rows(50) > > 50 rows might be more for this test. reduced to 30 ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/24496#discussion_r2053083102 From achung at openjdk.org Mon Apr 21 23:02:13 2025 From: achung at openjdk.org (Alisen Chung) Date: Mon, 21 Apr 2025 23:02:13 GMT Subject: RFR: 8353488: Open some JComboBox bugs 3 [v3] In-Reply-To: References: Message-ID: > Opening some JComboBox bugs Alisen Chung has updated the pull request incrementally with one additional commit since the last revision: add volatile ------------- Changes: - all: https://git.openjdk.org/jdk/pull/24767/files - new: https://git.openjdk.org/jdk/pull/24767/files/68ba2ec0..44b3691d Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=24767&range=02 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=24767&range=01-02 Stats: 4 lines in 2 files changed: 2 ins; 1 del; 1 mod Patch: https://git.openjdk.org/jdk/pull/24767.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/24767/head:pull/24767 PR: https://git.openjdk.org/jdk/pull/24767 From achung at openjdk.org Mon Apr 21 23:05:31 2025 From: achung at openjdk.org (Alisen Chung) Date: Mon, 21 Apr 2025 23:05:31 GMT Subject: RFR: 8353685: Open some JComboBox bugs 4 [v3] In-Reply-To: References: Message-ID: > Updating and opening some JComboBox bugs Alisen Chung has updated the pull request incrementally with one additional commit since the last revision: add longer delay, remove headful from manual test, spacing ------------- Changes: - all: https://git.openjdk.org/jdk/pull/24733/files - new: https://git.openjdk.org/jdk/pull/24733/files/0799d454..911acf73 Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=24733&range=02 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=24733&range=01-02 Stats: 7 lines in 3 files changed: 4 ins; 1 del; 2 mod Patch: https://git.openjdk.org/jdk/pull/24733.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/24733/head:pull/24733 PR: https://git.openjdk.org/jdk/pull/24733 From honkar at openjdk.org Mon Apr 21 23:13:49 2025 From: honkar at openjdk.org (Harshitha Onkar) Date: Mon, 21 Apr 2025 23:13:49 GMT Subject: Integrated: JDK-8353942 : Open source Swing Tests - Set 5 In-Reply-To: References: Message-ID: On Wed, 16 Apr 2025 20:37:19 GMT, Harshitha Onkar wrote: > Following test are open-sourced in this PR: > > - javax/swing/DataTransfer/DragOverFeedbackTest.java - manual > - javax/swing/DataTransfer/ListDragOverFeedbackTest.java - manual > - javax/swing/DataTransfer/bug4655513.java - automated > - javax/swing/SwingUtilities/bug4369355.java - automated > - javax/swing/SwingUtilities/bug4967768.java - manual This pull request has now been integrated. Changeset: 9a0cff69 Author: Harshitha Onkar URL: https://git.openjdk.org/jdk/commit/9a0cff692d6f96b8c89b1510cd2b4b1a8e318b6e Stats: 495 lines in 5 files changed: 495 ins; 0 del; 0 mod 8353942: Open source Swing Tests - Set 5 Reviewed-by: serb, dnguyen ------------- PR: https://git.openjdk.org/jdk/pull/24698 From achung at openjdk.org Mon Apr 21 23:17:19 2025 From: achung at openjdk.org (Alisen Chung) Date: Mon, 21 Apr 2025 23:17:19 GMT Subject: RFR: 8354095: Open some JTable bugs 5 [v4] In-Reply-To: <4t0GC0P2HhS-hgc6dNndlsbTxaliBcWUqSypiPPb7cw=.ea094f23-779a-45f5-a4ab-85c6e76841a6@github.com> References: <4t0GC0P2HhS-hgc6dNndlsbTxaliBcWUqSypiPPb7cw=.ea094f23-779a-45f5-a4ab-85c6e76841a6@github.com> Message-ID: > Updating and opening some JTable bugs Alisen Chung has updated the pull request incrementally with two additional commits since the last revision: - manual - update tests ------------- Changes: - all: https://git.openjdk.org/jdk/pull/24734/files - new: https://git.openjdk.org/jdk/pull/24734/files/b514a695..94446eee Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=24734&range=03 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=24734&range=02-03 Stats: 27 lines in 3 files changed: 6 ins; 14 del; 7 mod Patch: https://git.openjdk.org/jdk/pull/24734.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/24734/head:pull/24734 PR: https://git.openjdk.org/jdk/pull/24734 From achung at openjdk.org Mon Apr 21 23:24:32 2025 From: achung at openjdk.org (Alisen Chung) Date: Mon, 21 Apr 2025 23:24:32 GMT Subject: RFR: 8354233: Open some JTable bugs 6 [v3] In-Reply-To: References: Message-ID: > Updating and opening some JTable bugs Alisen Chung has updated the pull request incrementally with one additional commit since the last revision: update test, remove old test ------------- Changes: - all: https://git.openjdk.org/jdk/pull/24735/files - new: https://git.openjdk.org/jdk/pull/24735/files/f0762516..c1165ff9 Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=24735&range=02 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=24735&range=01-02 Stats: 127 lines in 2 files changed: 0 ins; 124 del; 3 mod Patch: https://git.openjdk.org/jdk/pull/24735.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/24735/head:pull/24735 PR: https://git.openjdk.org/jdk/pull/24735 From achung at openjdk.org Mon Apr 21 23:24:32 2025 From: achung at openjdk.org (Alisen Chung) Date: Mon, 21 Apr 2025 23:24:32 GMT Subject: RFR: 8354233: Open some JTable bugs 6 [v2] In-Reply-To: References: Message-ID: On Mon, 21 Apr 2025 20:12:43 GMT, Alexander Zuev wrote: >> Alisen Chung has updated the pull request incrementally with one additional commit since the last revision: >> >> update jtreg paths, volatile, manual jtreg tag > > test/jdk/javax/swing/JTable/bug4460382.java line 120: > >> 118: row1 = editingRow; >> 119: setValueAt(value, editingRow, editingColumn); >> 120: row2 = editingRow; > > Can you tell me what are we testing here? We extending JTable and we are checking that during the cell content replacement some random internal protected variable does not change. What does it tells us? Why is it a criteria of test passing or not? i think this test should probably be removed, since the manual test was also like this in that it didn't really test anything. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/24735#discussion_r2053098563 From honkar at openjdk.org Mon Apr 21 23:26:42 2025 From: honkar at openjdk.org (Harshitha Onkar) Date: Mon, 21 Apr 2025 23:26:42 GMT Subject: RFR: 8352905: Open some JComboBox bugs 1 [v4] In-Reply-To: References: Message-ID: On Mon, 21 Apr 2025 22:56:30 GMT, Alisen Chung wrote: >> Updating and opening some tests > > Alisen Chung has updated the pull request incrementally with one additional commit since the last revision: > > update tests @alisenchung Updated changes LGTM. Does CI Testing look good for the automated tests on all platforms? ------------- PR Review: https://git.openjdk.org/jdk/pull/24495#pullrequestreview-2782404950 From achung at openjdk.org Mon Apr 21 23:27:30 2025 From: achung at openjdk.org (Alisen Chung) Date: Mon, 21 Apr 2025 23:27:30 GMT Subject: RFR: 8354341: Open some JTable bugs 7 [v3] In-Reply-To: <-A3k5m01IIlys1qXXQIqzcxRaGuGnVK2KMZ33Et4vmM=.c53f6d63-6829-41d9-852c-e436344348eb@github.com> References: <-A3k5m01IIlys1qXXQIqzcxRaGuGnVK2KMZ33Et4vmM=.c53f6d63-6829-41d9-852c-e436344348eb@github.com> Message-ID: > Updating and opening some JTable bugs Alisen Chung has updated the pull request incrementally with one additional commit since the last revision: update test ------------- Changes: - all: https://git.openjdk.org/jdk/pull/24739/files - new: https://git.openjdk.org/jdk/pull/24739/files/63e60ccd..0041e76c Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=24739&range=02 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=24739&range=01-02 Stats: 11 lines in 1 file changed: 2 ins; 5 del; 4 mod Patch: https://git.openjdk.org/jdk/pull/24739.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/24739/head:pull/24739 PR: https://git.openjdk.org/jdk/pull/24739 From achung at openjdk.org Mon Apr 21 23:32:01 2025 From: achung at openjdk.org (Alisen Chung) Date: Mon, 21 Apr 2025 23:32:01 GMT Subject: RFR: 8354466: Open some misc Swing bugs 9 [v4] In-Reply-To: References: Message-ID: > Updating and opening some misc swing bugs Alisen Chung has updated the pull request incrementally with one additional commit since the last revision: update test ------------- Changes: - all: https://git.openjdk.org/jdk/pull/24703/files - new: https://git.openjdk.org/jdk/pull/24703/files/4875b8ff..227df62e Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=24703&range=03 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=24703&range=02-03 Stats: 6 lines in 2 files changed: 5 ins; 1 del; 0 mod Patch: https://git.openjdk.org/jdk/pull/24703.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/24703/head:pull/24703 PR: https://git.openjdk.org/jdk/pull/24703 From honkar at openjdk.org Mon Apr 21 23:44:43 2025 From: honkar at openjdk.org (Harshitha Onkar) Date: Mon, 21 Apr 2025 23:44:43 GMT Subject: RFR: JDK-8353486 : Open source Swing Tests - Set 4 [v6] In-Reply-To: References: <-jaKTmgwNA9JNGIaVqutoIFJKc43PKmNxbni9iAk7Dg=.679497d9-dffe-4af0-8e7f-e517284d2012@github.com> Message-ID: On Fri, 18 Apr 2025 18:04:54 GMT, Alexey Ivanov wrote: >> Harshitha Onkar has updated the pull request incrementally with one additional commit since the last revision: >> >> remove redudant frame > > test/jdk/javax/swing/JFileChooser/bug4943900.java line 65: > >> 63: } catch (Exception e) { >> 64: throw new SkippedException("LaF not supported", e); >> 65: } > > Is the intention to run in system L&F only rather than in all L&Fs? The original bug was on GTK+linux only. I have extended it to SystemLookAndFeel. Since there are slight variations on how the file filter works on different LaF and the test instructions would be confusing if we were to account for all variations of installed LaF. Hence limited it System LaF. For example on macOS (Aqua LaF) when the txt filter is applied non-text files are greyed out. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/24456#discussion_r2053117061 From honkar at openjdk.org Tue Apr 22 00:14:50 2025 From: honkar at openjdk.org (Harshitha Onkar) Date: Tue, 22 Apr 2025 00:14:50 GMT Subject: RFR: 8352905: Open some JComboBox bugs 1 [v4] In-Reply-To: References: Message-ID: On Mon, 21 Apr 2025 22:56:30 GMT, Alisen Chung wrote: >> Updating and opening some tests > > Alisen Chung has updated the pull request incrementally with one additional commit since the last revision: > > update tests LGTM. Approved. Plz verify if CI testing looks good before integrating. ------------- Marked as reviewed by honkar (Reviewer). PR Review: https://git.openjdk.org/jdk/pull/24495#pullrequestreview-2782454746 From honkar at openjdk.org Tue Apr 22 00:19:41 2025 From: honkar at openjdk.org (Harshitha Onkar) Date: Tue, 22 Apr 2025 00:19:41 GMT Subject: RFR: 8354466: Open some misc Swing bugs 9 [v3] In-Reply-To: References: Message-ID: <1Iv5uad3xZJt0tcd4aSsjXgl65WqvuEmKwMr8hk3flQ=.8c525378-0c4e-4d2e-94bf-ee5c6386fb2f@github.com> On Mon, 21 Apr 2025 18:27:22 GMT, Harshitha Onkar wrote: >> Alisen Chung has updated the pull request incrementally with one additional commit since the last revision: >> >> update color uppercase > > test/jdk/javax/swing/JPasswordField/bug4382819.java line 59: > >> 57: SwingUtilities.invokeAndWait(() -> passwordField.setEnabled(false)); >> 58: robot.waitForIdle(); >> 59: robot.delay(1000); > > delay can be reduced here > > Suggestion: > > robot.delay(250); delay was removed instead of reducing it here. Please add back the delay. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/24703#discussion_r2053137736 From honkar at openjdk.org Tue Apr 22 00:19:42 2025 From: honkar at openjdk.org (Harshitha Onkar) Date: Tue, 22 Apr 2025 00:19:42 GMT Subject: RFR: 8354466: Open some misc Swing bugs 9 [v4] In-Reply-To: References: Message-ID: On Mon, 21 Apr 2025 23:32:01 GMT, Alisen Chung wrote: >> Updating and opening some misc swing bugs > > Alisen Chung has updated the pull request incrementally with one additional commit since the last revision: > > update test test/jdk/javax/swing/JSplitPane/bug4820080.java line 84: > 82: left.setBackground(Color.DARK_GRAY); > 83: Panel right = new Panel(); > 84: right.setBackground(Color.DARK_GRAY); You missed adding setPreferredSize() to the left and right panels ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/24703#discussion_r2053137122 From kizune at openjdk.org Tue Apr 22 00:39:42 2025 From: kizune at openjdk.org (Alexander Zuev) Date: Tue, 22 Apr 2025 00:39:42 GMT Subject: RFR: 8354233: Open some JTable bugs 6 [v3] In-Reply-To: References: Message-ID: On Mon, 21 Apr 2025 23:24:32 GMT, Alisen Chung wrote: >> Updating and opening some JTable bugs > > Alisen Chung has updated the pull request incrementally with one additional commit since the last revision: > > update test, remove old test Marked as reviewed by kizune (Reviewer). ------------- PR Review: https://git.openjdk.org/jdk/pull/24735#pullrequestreview-2782474177 From kizune at openjdk.org Tue Apr 22 00:41:40 2025 From: kizune at openjdk.org (Alexander Zuev) Date: Tue, 22 Apr 2025 00:41:40 GMT Subject: RFR: 8354341: Open some JTable bugs 7 [v3] In-Reply-To: References: <-A3k5m01IIlys1qXXQIqzcxRaGuGnVK2KMZ33Et4vmM=.c53f6d63-6829-41d9-852c-e436344348eb@github.com> Message-ID: On Mon, 21 Apr 2025 23:27:30 GMT, Alisen Chung wrote: >> Updating and opening some JTable bugs > > Alisen Chung has updated the pull request incrementally with one additional commit since the last revision: > > update test Marked as reviewed by kizune (Reviewer). ------------- PR Review: https://git.openjdk.org/jdk/pull/24739#pullrequestreview-2782475631 From achung at openjdk.org Tue Apr 22 01:04:56 2025 From: achung at openjdk.org (Alisen Chung) Date: Tue, 22 Apr 2025 01:04:56 GMT Subject: RFR: 8354466: Open some misc Swing bugs 9 [v5] In-Reply-To: References: Message-ID: > Updating and opening some misc swing bugs Alisen Chung has updated the pull request incrementally with one additional commit since the last revision: add preferred size to panels ------------- Changes: - all: https://git.openjdk.org/jdk/pull/24703/files - new: https://git.openjdk.org/jdk/pull/24703/files/227df62e..6d96622e Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=24703&range=04 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=24703&range=03-04 Stats: 3 lines in 1 file changed: 3 ins; 0 del; 0 mod Patch: https://git.openjdk.org/jdk/pull/24703.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/24703/head:pull/24703 PR: https://git.openjdk.org/jdk/pull/24703 From achung at openjdk.org Tue Apr 22 01:04:56 2025 From: achung at openjdk.org (Alisen Chung) Date: Tue, 22 Apr 2025 01:04:56 GMT Subject: RFR: 8354466: Open some misc Swing bugs 9 [v3] In-Reply-To: <1Iv5uad3xZJt0tcd4aSsjXgl65WqvuEmKwMr8hk3flQ=.8c525378-0c4e-4d2e-94bf-ee5c6386fb2f@github.com> References: <1Iv5uad3xZJt0tcd4aSsjXgl65WqvuEmKwMr8hk3flQ=.8c525378-0c4e-4d2e-94bf-ee5c6386fb2f@github.com> Message-ID: On Tue, 22 Apr 2025 00:17:10 GMT, Harshitha Onkar wrote: >> test/jdk/javax/swing/JPasswordField/bug4382819.java line 59: >> >>> 57: SwingUtilities.invokeAndWait(() -> passwordField.setEnabled(false)); >>> 58: robot.waitForIdle(); >>> 59: robot.delay(1000); >> >> delay can be reduced here >> >> Suggestion: >> >> robot.delay(250); > > delay was removed instead of reducing it here. Please add back the delay. delay is present via setAutoDelay(250) ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/24703#discussion_r2053161662 From dnguyen at openjdk.org Tue Apr 22 01:06:11 2025 From: dnguyen at openjdk.org (Damon Nguyen) Date: Tue, 22 Apr 2025 01:06:11 GMT Subject: RFR: 8354695: Open source several swing tests batch7 [v3] In-Reply-To: <_UYipF8V8voPBRGVdOg7APlb0vu9VEfObY1qaHDTFBI=.0337e295-3b52-4d63-81c3-3cd21f708496@github.com> References: <_UYipF8V8voPBRGVdOg7APlb0vu9VEfObY1qaHDTFBI=.0337e295-3b52-4d63-81c3-3cd21f708496@github.com> Message-ID: > Open-sourcing and standardizing several swing tests (JScrollPane & JRootPane) Damon Nguyen has updated the pull request incrementally with one additional commit since the last revision: Move width and height to EDT ------------- Changes: - all: https://git.openjdk.org/jdk/pull/24758/files - new: https://git.openjdk.org/jdk/pull/24758/files/e49e87eb..48328c4f Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=24758&range=02 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=24758&range=01-02 Stats: 8 lines in 1 file changed: 6 ins; 0 del; 2 mod Patch: https://git.openjdk.org/jdk/pull/24758.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/24758/head:pull/24758 PR: https://git.openjdk.org/jdk/pull/24758 From dnguyen at openjdk.org Tue Apr 22 01:06:12 2025 From: dnguyen at openjdk.org (Damon Nguyen) Date: Tue, 22 Apr 2025 01:06:12 GMT Subject: RFR: 8354695: Open source several swing tests batch7 [v2] In-Reply-To: <66O1xGoR5iN5j7O_Oda7rfqpK95tvEc2Gns0c732JNk=.3b2e84e4-94d1-4884-9dd6-07fd8bb4f6e1@github.com> References: <_UYipF8V8voPBRGVdOg7APlb0vu9VEfObY1qaHDTFBI=.0337e295-3b52-4d63-81c3-3cd21f708496@github.com> <66O1xGoR5iN5j7O_Oda7rfqpK95tvEc2Gns0c732JNk=.3b2e84e4-94d1-4884-9dd6-07fd8bb4f6e1@github.com> Message-ID: On Mon, 21 Apr 2025 20:18:37 GMT, Sergey Bylokhov wrote: >> Damon Nguyen has updated the pull request incrementally with one additional commit since the last revision: >> >> Syntax fix > > test/jdk/javax/swing/JRootPane/bug4403624.java line 79: > >> 77: SwingUtilities.invokeAndWait(() -> p = b.getLocationOnScreen()); >> 78: >> 79: r.mouseMove(p.x + (b.getWidth() / 2), p.y + (b.getHeight() / 2)); > > you called the b.getLocationOnScreen() on EDt but what about b.getWidth() and b.getHeight() Good point. I was previously advised to remove a `Point.move` call in favor of this, and I didn't put it in the EDT when doing so. Thanks, updated! ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/24758#discussion_r2053163692 From achung at openjdk.org Tue Apr 22 01:06:59 2025 From: achung at openjdk.org (Alisen Chung) Date: Tue, 22 Apr 2025 01:06:59 GMT Subject: Integrated: 8354465: Open some JTable bugs 8 In-Reply-To: References: Message-ID: <-Q4Bvjalqp3DN2_ufrs-8iJ31Dqs2uLLr7ZOtpl-Kk8=.2c00317e-a230-4605-bb5a-fad0f0ae499c@github.com> On Thu, 17 Apr 2025 19:18:00 GMT, Alisen Chung wrote: > Updating and opening some JTable bugs This pull request has now been integrated. Changeset: 7a72f0fa Author: Alisen Chung URL: https://git.openjdk.org/jdk/commit/7a72f0fac9a0704c4a0ada781f1cadd7c4903b3e Stats: 612 lines in 5 files changed: 612 ins; 0 del; 0 mod 8354465: Open some JTable bugs 8 Reviewed-by: serb, kizune ------------- PR: https://git.openjdk.org/jdk/pull/24741 From achung at openjdk.org Tue Apr 22 01:07:59 2025 From: achung at openjdk.org (Alisen Chung) Date: Tue, 22 Apr 2025 01:07:59 GMT Subject: Integrated: 8354233: Open some JTable bugs 6 In-Reply-To: References: Message-ID: On Thu, 17 Apr 2025 18:44:23 GMT, Alisen Chung wrote: > Updating and opening some JTable bugs This pull request has now been integrated. Changeset: ade67df0 Author: Alisen Chung URL: https://git.openjdk.org/jdk/commit/ade67df0f363cb95434832f750ac901c1c75c29c Stats: 366 lines in 3 files changed: 366 ins; 0 del; 0 mod 8354233: Open some JTable bugs 6 Reviewed-by: kizune ------------- PR: https://git.openjdk.org/jdk/pull/24735 From serb at openjdk.org Tue Apr 22 02:18:36 2025 From: serb at openjdk.org (Sergey Bylokhov) Date: Tue, 22 Apr 2025 02:18:36 GMT Subject: RFR: 8352638: Enhance code consistency: java.desktop/windows [v2] In-Reply-To: <5qm_Hyp98_iQNlGpxru_EapE3rVlCfTTqVTWyF4zlzI=.450e15f8-7a75-44c2-8916-abd44426566d@github.com> References: <5qm_Hyp98_iQNlGpxru_EapE3rVlCfTTqVTWyF4zlzI=.450e15f8-7a75-44c2-8916-abd44426566d@github.com> Message-ID: <8NEEfIugV7aLoRO9BzB_cJNLFTNJFFrKMFx8dCSV5Mc=.1243c0f7-cc3d-4812-9eb0-741080279e75@github.com> > The `java.desktop` module currently lacks proper use of the `@Override` annotation for methods and the `final` modifier for classes. While similar changes were previously made in the [JavaSound](https://github.com/openjdk/jdk/commit/e0c7d59246cf36644d494eced76e4b9d96ff1ded#diff-ae3e5f9c40fe25ef03e7a89844de174ef5c15e6179d769e2a4bcb7e73688c9b5) (and some of the classes on demand), these changes are not as critical now due to the new jdk "encapsulation", but they are still useful for improving code consistency. > > To make the code review process easier I have made the following changes: > > 1. I chose `java.desktop/windows` as the starting package because it contains a relatively small number of classes > 2. The public API was not affected so there is no need to worry about a CSR > 3. In a few places I removed the `final` modifier from methods since they were already defined in final classes > > Note: I will submit additional patches in this area later because: > > 1. Only lines with `@Override` and `final` were modified to keep the diff clear - header dates were not updated (that could be covered by one patch similar to [this](https://bugs.openjdk.org/browse/JDK-8345797)) > 2. I skipped adding `@Override` for anonymous classes > > Any feedback or suggestions are welcome! > > Here is a [link](https://patch-diff.githubusercontent.com/raw/openjdk/jdk/pull/24170.diff) to a simple diff file, it might be more convenient for reviewing the changes. > > To download the diff file and filter only the modified lines you can use the following script: > > > curl -s https://patch-diff.githubusercontent.com/raw/openjdk/jdk/pull/24170.diff -o d.txt && grep -E '^+|^-' d.txt > > > The build was successful, and I ran all the open jtreg tests without issues. But it's possible that some closed tests may be affected by these changes. It would be good to verify this by mach5 to ensure everything works as expected. Sergey Bylokhov 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 four additional commits since the last revision: - Merge branch 'openjdk:master' into overwin - @Override for toString/equals/hashCode - add final - initial version ------------- Changes: - all: https://git.openjdk.org/jdk/pull/24170/files - new: https://git.openjdk.org/jdk/pull/24170/files/ca0318f1..b5269324 Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=24170&range=01 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=24170&range=00-01 Stats: 328690 lines in 3584 files changed: 82558 ins; 232336 del; 13796 mod Patch: https://git.openjdk.org/jdk/pull/24170.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/24170/head:pull/24170 PR: https://git.openjdk.org/jdk/pull/24170 From kizune at openjdk.org Tue Apr 22 02:19:42 2025 From: kizune at openjdk.org (Alexander Zuev) Date: Tue, 22 Apr 2025 02:19:42 GMT Subject: RFR: 8354466: Open some misc Swing bugs 9 [v5] In-Reply-To: References: Message-ID: On Tue, 22 Apr 2025 01:04:56 GMT, Alisen Chung wrote: >> Updating and opening some misc swing bugs > > Alisen Chung has updated the pull request incrementally with one additional commit since the last revision: > > add preferred size to panels Marked as reviewed by kizune (Reviewer). ------------- PR Review: https://git.openjdk.org/jdk/pull/24703#pullrequestreview-2782592738 From kizune at openjdk.org Tue Apr 22 02:21:41 2025 From: kizune at openjdk.org (Alexander Zuev) Date: Tue, 22 Apr 2025 02:21:41 GMT Subject: RFR: 8354095: Open some JTable bugs 5 [v4] In-Reply-To: References: <4t0GC0P2HhS-hgc6dNndlsbTxaliBcWUqSypiPPb7cw=.ea094f23-779a-45f5-a4ab-85c6e76841a6@github.com> Message-ID: <04clz-YelAHLX13zuyLZXxxZ_12Y7vU9f009rZjKCjo=.56838baf-1bfe-406d-ad45-7327eb5f178f@github.com> On Mon, 21 Apr 2025 23:17:19 GMT, Alisen Chung wrote: >> Updating and opening some JTable bugs > > Alisen Chung has updated the pull request incrementally with two additional commits since the last revision: > > - manual > - update tests Marked as reviewed by kizune (Reviewer). ------------- PR Review: https://git.openjdk.org/jdk/pull/24734#pullrequestreview-2782594945 From kizune at openjdk.org Tue Apr 22 02:22:41 2025 From: kizune at openjdk.org (Alexander Zuev) Date: Tue, 22 Apr 2025 02:22:41 GMT Subject: RFR: 8353685: Open some JComboBox bugs 4 [v3] In-Reply-To: References: Message-ID: On Mon, 21 Apr 2025 23:05:31 GMT, Alisen Chung wrote: >> Updating and opening some JComboBox bugs > > Alisen Chung has updated the pull request incrementally with one additional commit since the last revision: > > add longer delay, remove headful from manual test, spacing Marked as reviewed by kizune (Reviewer). ------------- PR Review: https://git.openjdk.org/jdk/pull/24733#pullrequestreview-2782595323 From tr at openjdk.org Tue Apr 22 03:12:50 2025 From: tr at openjdk.org (Tejesh R) Date: Tue, 22 Apr 2025 03:12:50 GMT Subject: Integrated: 8352793: Open source several AWT TextComponent tests - Batch 1 In-Reply-To: References: Message-ID: On Tue, 15 Apr 2025 10:03:42 GMT, Tejesh R wrote: > Open source these AWT TextComponent tests: > > java/awt/TextComponent/BackgroundTest/BackgroundTest.java > java/awt/TextComponent/DisableTest/DisableTest.java > java/awt/TextComponent/TextFieldMargin/TextFieldMargin.java > java/awt/TextComponent/ModifiersTest/ModifiersTest.java This pull request has now been integrated. Changeset: f880fa91 Author: Tejesh R URL: https://git.openjdk.org/jdk/commit/f880fa91dce7b8844cfa4e95caa3a982e280165a Stats: 377 lines in 4 files changed: 377 ins; 0 del; 0 mod 8352793: Open source several AWT TextComponent tests - Batch 1 Reviewed-by: prr, serb ------------- PR: https://git.openjdk.org/jdk/pull/24656 From tr at openjdk.org Tue Apr 22 03:19:11 2025 From: tr at openjdk.org (Tejesh R) Date: Tue, 22 Apr 2025 03:19:11 GMT Subject: RFR: 8353445: Open source several AWT Menu tests - Batch 1 [v5] In-Reply-To: References: Message-ID: <5nEs9Ji13LGJXMWYVdGEgsmolocaYx_qy0RpVA4lzKg=.68593923-a0a6-41cc-a12c-a6a734a2abf4@github.com> > Open source these AWT Menu tests: > > java/awt/Menu/MenuVisibilityTest/MenuVisibilityTest.java > java/awt/Menu/MenuActionEventTest/MenuActionEventTest.java > java/awt/Menu/RmInHideTest/RmInHideTest.java > java/awt/Menu/SetShortCutTest/SetShortCutTest.java Tejesh R has updated the pull request incrementally with one additional commit since the last revision: Update review comments ------------- Changes: - all: https://git.openjdk.org/jdk/pull/24649/files - new: https://git.openjdk.org/jdk/pull/24649/files/7a22269d..a83a3936 Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=24649&range=04 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=24649&range=03-04 Stats: 2 lines in 1 file changed: 1 ins; 0 del; 1 mod Patch: https://git.openjdk.org/jdk/pull/24649.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/24649/head:pull/24649 PR: https://git.openjdk.org/jdk/pull/24649 From tr at openjdk.org Tue Apr 22 03:19:11 2025 From: tr at openjdk.org (Tejesh R) Date: Tue, 22 Apr 2025 03:19:11 GMT Subject: RFR: 8353445: Open source several AWT Menu tests - Batch 1 [v4] In-Reply-To: References: Message-ID: On Mon, 21 Apr 2025 20:32:37 GMT, Sergey Bylokhov wrote: >> Tejesh R has updated the pull request incrementally with one additional commit since the last revision: >> >> Update PL > > test/jdk/java/awt/Menu/SetShortCutTest.java line 115: > >> 113: //Click on the "Stuff" menu to remove the "first" menu item >> 114: else if (event.getSource() == item2) { >> 115: //If the item has not been removed from the menu,then remove "First" from the "File" menu > > please split long line to 80 chars Updated. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/24649#discussion_r2053264496 From tr at openjdk.org Tue Apr 22 03:28:38 2025 From: tr at openjdk.org (Tejesh R) Date: Tue, 22 Apr 2025 03:28:38 GMT Subject: RFR: 8354248: Open source several AWT GridBagLayout and List tests [v2] In-Reply-To: References: Message-ID: > Open source these AWT GridBagLayout and List tests: > > java/awt/GridBagLayout/ComponentShortage/ComponentShortage.java > java/awt/List/ListScrollbarCursorTest/ListScrollbarCursorTest.java > java/awt/List/ListScrollbarTest/ListScrollbarTest.java Tejesh R has updated the pull request incrementally with one additional commit since the last revision: Update review comments ------------- Changes: - all: https://git.openjdk.org/jdk/pull/24749/files - new: https://git.openjdk.org/jdk/pull/24749/files/1b8b80a8..93e1f0ec Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=24749&range=01 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=24749&range=00-01 Stats: 8 lines in 3 files changed: 0 ins; 2 del; 6 mod Patch: https://git.openjdk.org/jdk/pull/24749.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/24749/head:pull/24749 PR: https://git.openjdk.org/jdk/pull/24749 From tr at openjdk.org Tue Apr 22 03:28:40 2025 From: tr at openjdk.org (Tejesh R) Date: Tue, 22 Apr 2025 03:28:40 GMT Subject: RFR: 8354248: Open source several AWT GridBagLayout and List tests [v2] In-Reply-To: References: Message-ID: On Fri, 18 Apr 2025 10:58:01 GMT, Abhishek Kumar wrote: >> Tejesh R has updated the pull request incrementally with one additional commit since the last revision: >> >> Update review comments > > test/jdk/java/awt/GridBagLayout/ComponentShortage.java line 45: > >> 43: static JTextField jtf; >> 44: static Dimension size; >> 45: static Dimension fSize; > > Should be Volatile ? > Accessed on EDT and main thread Updated. > test/jdk/java/awt/List/ListScrollbarCursorTest.java line 49: > >> 47: """; >> 48: PassFailJFrame.builder() >> 49: .title("Test Instructions") > > Title is not required. Updated. > test/jdk/java/awt/List/ListScrollbarTest.java line 142: > >> 140: l2.addItem(l1.getItem(i)); >> 141: } >> 142: l1.delItems(0, l1.countItems() - 1); // or l1.clear(); > > Is this comment required? Removed. > test/jdk/java/awt/List/ListScrollbarTest.java line 143: > >> 141: } >> 142: l1.delItems(0, l1.countItems() - 1); // or l1.clear(); >> 143: } else { //else move the selected items > > For consistency in comments > > Suggestion: > > } else { // else move the selected items Removed. > test/jdk/java/awt/List/ListScrollbarTest.java line 150: > >> 148: for (int i = 0; i < items.length; i++) { >> 149: l2.addItem(items[i]); // add it >> 150: l2.select(l2.countItems() - 1);// and select it > > Comments are redundant. Removed. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/24749#discussion_r2053269241 PR Review Comment: https://git.openjdk.org/jdk/pull/24749#discussion_r2053269274 PR Review Comment: https://git.openjdk.org/jdk/pull/24749#discussion_r2053269539 PR Review Comment: https://git.openjdk.org/jdk/pull/24749#discussion_r2053269361 PR Review Comment: https://git.openjdk.org/jdk/pull/24749#discussion_r2053269611 From tr at openjdk.org Tue Apr 22 03:41:40 2025 From: tr at openjdk.org (Tejesh R) Date: Tue, 22 Apr 2025 03:41:40 GMT Subject: RFR: 8353957: Open source several AWT ScrollPane tests - Batch 1 In-Reply-To: References: Message-ID: On Fri, 18 Apr 2025 10:07:14 GMT, Prasanta Sadhukhan wrote: >> test/jdk/java/awt/ScrollPane/ScrollPanePaint.java line 63: >> >>> 61: 2. The contents of the frame should alternate between >>> 62: a red panel and a scroll pane containing a green panel >>> 63: If this does not happen (specifically, if the scroll >> >> this line is missing from closed test >> >> `pane does not consistantly contain a green panel` > > rectify the spelling though.. Updated. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/24684#discussion_r2053277135 From tr at openjdk.org Tue Apr 22 03:41:42 2025 From: tr at openjdk.org (Tejesh R) Date: Tue, 22 Apr 2025 03:41:42 GMT Subject: RFR: 8353957: Open source several AWT ScrollPane tests - Batch 1 In-Reply-To: References: Message-ID: On Fri, 18 Apr 2025 10:14:39 GMT, Prasanta Sadhukhan wrote: >> Open source these AWT ScrollPane tests: >> >> java/awt/ScrollPane/ScrollPaneFlicker/ScrollPaneFlicker.java >> java/awt/ScrollPane/ScrollbarsAsNeeded/ScrollbarsAsNeededTest.java >> java/awt/ScrollPane/ScrollPanePaint/ScrollPanePaint.java >> java/awt/ScrollPane/ScrollPositionTest/ScrollPositionTest.java > > test/jdk/java/awt/ScrollPane/ScrollPositionTest.java line 101: > >> 99: synchronized (ScrollPositionTest.lock) { >> 100: ScrollPositionTest.lock.notify(); >> 101: } > > Better to use CountDownLatch than wait-notify but there is no lock.wait(timeout) so not sure whom it is notifying so it seems to be a no-op Then shall I remove it ? > test/jdk/java/awt/ScrollPane/ScrollbarsAsNeededTest.java line 58: > >> 56: static Frame initialize() { >> 57: Frame frame = new Frame("Scrollbar as needed test"); >> 58: ScrollPane scrollPane = new java.awt.ScrollPane() { > > expansion not needed Updated. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/24684#discussion_r2053276209 PR Review Comment: https://git.openjdk.org/jdk/pull/24684#discussion_r2053277253 From tr at openjdk.org Tue Apr 22 03:41:42 2025 From: tr at openjdk.org (Tejesh R) Date: Tue, 22 Apr 2025 03:41:42 GMT Subject: RFR: 8353957: Open source several AWT ScrollPane tests - Batch 1 In-Reply-To: References: Message-ID: On Tue, 22 Apr 2025 03:36:09 GMT, Tejesh R wrote: >> test/jdk/java/awt/ScrollPane/ScrollPositionTest.java line 101: >> >>> 99: synchronized (ScrollPositionTest.lock) { >>> 100: ScrollPositionTest.lock.notify(); >>> 101: } >> >> Better to use CountDownLatch than wait-notify but there is no lock.wait(timeout) so not sure whom it is notifying so it seems to be a no-op > > Then shall I remove it ? Anyhow I've removed it and seems like no-op. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/24684#discussion_r2053277589 From tr at openjdk.org Tue Apr 22 03:47:32 2025 From: tr at openjdk.org (Tejesh R) Date: Tue, 22 Apr 2025 03:47:32 GMT Subject: RFR: 8353957: Open source several AWT ScrollPane tests - Batch 1 [v2] In-Reply-To: References: Message-ID: > Open source these AWT ScrollPane tests: > > java/awt/ScrollPane/ScrollPaneFlicker/ScrollPaneFlicker.java > java/awt/ScrollPane/ScrollbarsAsNeeded/ScrollbarsAsNeededTest.java > java/awt/ScrollPane/ScrollPanePaint/ScrollPanePaint.java > java/awt/ScrollPane/ScrollPositionTest/ScrollPositionTest.java Tejesh R has updated the pull request with a new target base due to a merge or a rebase. The pull request now contains three commits: - Merge conflict - Open source - Open source ------------- Changes: https://git.openjdk.org/jdk/pull/24684/files Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=24684&range=01 Stats: 520 lines in 5 files changed: 520 ins; 0 del; 0 mod Patch: https://git.openjdk.org/jdk/pull/24684.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/24684/head:pull/24684 PR: https://git.openjdk.org/jdk/pull/24684 From tr at openjdk.org Tue Apr 22 03:51:41 2025 From: tr at openjdk.org (Tejesh R) Date: Tue, 22 Apr 2025 03:51:41 GMT Subject: RFR: 8353446: Open source several AWT Menu tests - Batch 2 In-Reply-To: References: Message-ID: On Fri, 18 Apr 2025 07:58:46 GMT, Abhishek Kumar wrote: >> Open source these AWT Menu tests: >> >> java/awt/Menu/OnFlyRepaintMenuTest/OnFlyRepaintMenuTest.java >> java/awt/Menu/DestroyMenuTest/DestroyMenuTest.java >> java/awt/Menu/MenuAddRemoveCrash/MenuAddRemoveCrash.java >> java/awt/Menu/MenuZOrderTest/MenuZOrderTest.java > > test/jdk/java/awt/Menu/MenuAddRemoveCrash.java line 63: > >> 61: } >> 62: } >> 63: }; > > Can it be move to EventQueue.invokeAndWait ? No I guess, hence retaining it. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/24681#discussion_r2053283320 From tr at openjdk.org Tue Apr 22 03:59:35 2025 From: tr at openjdk.org (Tejesh R) Date: Tue, 22 Apr 2025 03:59:35 GMT Subject: RFR: 8353446: Open source several AWT Menu tests - Batch 2 [v2] In-Reply-To: References: Message-ID: > Open source these AWT Menu tests: > > java/awt/Menu/OnFlyRepaintMenuTest/OnFlyRepaintMenuTest.java > java/awt/Menu/DestroyMenuTest/DestroyMenuTest.java > java/awt/Menu/MenuAddRemoveCrash/MenuAddRemoveCrash.java > java/awt/Menu/MenuZOrderTest/MenuZOrderTest.java 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 since the last revision: - Updated review comments - Merge branch 'master' of https://git.openjdk.java.net/jdk into branch_8353446 - Open source ------------- Changes: - all: https://git.openjdk.org/jdk/pull/24681/files - new: https://git.openjdk.org/jdk/pull/24681/files/75ba673e..8c5df043 Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=24681&range=01 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=24681&range=00-01 Stats: 245433 lines in 1433 files changed: 51955 ins; 188229 del; 5249 mod Patch: https://git.openjdk.org/jdk/pull/24681.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/24681/head:pull/24681 PR: https://git.openjdk.org/jdk/pull/24681 From tr at openjdk.org Tue Apr 22 03:59:39 2025 From: tr at openjdk.org (Tejesh R) Date: Tue, 22 Apr 2025 03:59:39 GMT Subject: RFR: 8353446: Open source several AWT Menu tests - Batch 2 [v2] In-Reply-To: References: Message-ID: On Fri, 18 Apr 2025 07:51:25 GMT, Abhishek Kumar 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 since the last revision: >> >> - Updated review comments >> - Merge branch 'master' of https://git.openjdk.java.net/jdk into branch_8353446 >> - Open source > > test/jdk/java/awt/Menu/DestroyMenuTest/DestroyMenuTest.java line 47: > >> 45: public static void main(String[] args) throws Exception { >> 46: String INSTRUCTIONS = """ >> 47: 1. Create many windows by randomly clicking 'Show Menu Test 1, > > Suggestion: > > 1. Create many windows by randomly clicking 'Show Menu Test 1', Updated. > test/jdk/java/awt/Menu/DestroyMenuTest/DestroyMenuTest.java line 57: > >> 55: """; >> 56: PassFailJFrame.builder() >> 57: .title("Test Instructions") > > Setting title is redundant. You can remove in all the tests Updated. > test/jdk/java/awt/Menu/DestroyMenuTest/DestroyMenuTest.java line 133: > >> 131: >> 132: static class mySimpleCanvas extends Canvas { >> 133: public void paint(Graphics g) { > > Please add @Override for overridden methods Updated. > test/jdk/java/awt/Menu/DestroyMenuTest/MenuTest.java line 153: > >> 151: >> 152: class MyRectCanvas extends Canvas { >> 153: public void paint(Graphics g) { > > Add @Override Updated. > test/jdk/java/awt/Menu/DestroyMenuTest/MenuTest.java line 165: > >> 163: >> 164: class MycircleCanvas extends Canvas { >> 165: public void paint(Graphics g) { > > same here Updated. > test/jdk/java/awt/Menu/MenuZOrderTest.java line 27: > >> 25: * @test >> 26: * @bug 6267182 >> 27: * @summary Menu is not visible after showing and disposing a file dialog, XToolkit > > XToolkit ? Removed. > test/jdk/java/awt/Menu/MenuZOrderTest.java line 43: > >> 41: public class MenuZOrderTest { >> 42: static class Listener implements ActionListener { >> 43: public void actionPerformed(ActionEvent e) { > > Add Override Updated. > test/jdk/java/awt/Menu/MenuZOrderTest.java line 54: > >> 52: 1. Choose Menu 1 --> Menu Item 1 several times. >> 53: 2. If menu window is shown correctly and each click >> 54: creates new frame - press PASS.", > > Suggestion: > > creates new frame - press PASS. Updated. > test/jdk/java/awt/Menu/OnFlyRepaintMenuTest.java line 69: > >> 67: MenuItem menuItem; >> 68: MenuItem submenuItem; >> 69: CheckboxMenuItem checkMenuItem; > > Can be removed and declared where it is initializing Updated. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/24681#discussion_r2053287113 PR Review Comment: https://git.openjdk.org/jdk/pull/24681#discussion_r2053287567 PR Review Comment: https://git.openjdk.org/jdk/pull/24681#discussion_r2053287612 PR Review Comment: https://git.openjdk.org/jdk/pull/24681#discussion_r2053288157 PR Review Comment: https://git.openjdk.org/jdk/pull/24681#discussion_r2053287706 PR Review Comment: https://git.openjdk.org/jdk/pull/24681#discussion_r2053287845 PR Review Comment: https://git.openjdk.org/jdk/pull/24681#discussion_r2053287906 PR Review Comment: https://git.openjdk.org/jdk/pull/24681#discussion_r2053287951 PR Review Comment: https://git.openjdk.org/jdk/pull/24681#discussion_r2053288004 From honkar at openjdk.org Tue Apr 22 04:13:40 2025 From: honkar at openjdk.org (Harshitha Onkar) Date: Tue, 22 Apr 2025 04:13:40 GMT Subject: RFR: 8353685: Open some JComboBox bugs 4 [v3] In-Reply-To: References: Message-ID: On Mon, 21 Apr 2025 23:05:31 GMT, Alisen Chung wrote: >> Updating and opening some JComboBox bugs > > Alisen Chung has updated the pull request incrementally with one additional commit since the last revision: > > add longer delay, remove headful from manual test, spacing Marked as reviewed by honkar (Reviewer). ------------- PR Review: https://git.openjdk.org/jdk/pull/24733#pullrequestreview-2782708423 From honkar at openjdk.org Tue Apr 22 04:14:40 2025 From: honkar at openjdk.org (Harshitha Onkar) Date: Tue, 22 Apr 2025 04:14:40 GMT Subject: RFR: 8354095: Open some JTable bugs 5 [v4] In-Reply-To: References: <4t0GC0P2HhS-hgc6dNndlsbTxaliBcWUqSypiPPb7cw=.ea094f23-779a-45f5-a4ab-85c6e76841a6@github.com> Message-ID: On Mon, 21 Apr 2025 23:17:19 GMT, Alisen Chung wrote: >> Updating and opening some JTable bugs > > Alisen Chung has updated the pull request incrementally with two additional commits since the last revision: > > - manual > - update tests LGTM ------------- Marked as reviewed by honkar (Reviewer). PR Review: https://git.openjdk.org/jdk/pull/24734#pullrequestreview-2782709049 From honkar at openjdk.org Tue Apr 22 04:20:50 2025 From: honkar at openjdk.org (Harshitha Onkar) Date: Tue, 22 Apr 2025 04:20:50 GMT Subject: RFR: 8354466: Open some misc Swing bugs 9 [v5] In-Reply-To: References: Message-ID: On Tue, 22 Apr 2025 01:04:56 GMT, Alisen Chung wrote: >> Updating and opening some misc swing bugs > > Alisen Chung has updated the pull request incrementally with one additional commit since the last revision: > > add preferred size to panels You missed adding the preferred size to the correct panel vars. Please check inline comments test/jdk/javax/swing/JSplitPane/bug4820080.java line 83: > 81: Panel left = new Panel(); > 82: left.setBackground(Color.DARK_GRAY); > 83: jleft.setPreferredSize(new Dimension(100, 100)); Suggestion: left.setPreferredSize(new Dimension(100, 100)); test/jdk/javax/swing/JSplitPane/bug4820080.java line 86: > 84: Panel right = new Panel(); > 85: right.setBackground(Color.DARK_GRAY); > 86: jleft.setPreferredSize(new Dimension(100, 100)); Suggestion: right.setPreferredSize(new Dimension(100, 100)); ------------- PR Review: https://git.openjdk.org/jdk/pull/24703#pullrequestreview-2782712705 PR Review Comment: https://git.openjdk.org/jdk/pull/24703#discussion_r2053299586 PR Review Comment: https://git.openjdk.org/jdk/pull/24703#discussion_r2053299944 From abhiscxk at openjdk.org Tue Apr 22 04:28:40 2025 From: abhiscxk at openjdk.org (Abhishek Kumar) Date: Tue, 22 Apr 2025 04:28:40 GMT Subject: RFR: 8353445: Open source several AWT Menu tests - Batch 1 [v5] In-Reply-To: <5nEs9Ji13LGJXMWYVdGEgsmolocaYx_qy0RpVA4lzKg=.68593923-a0a6-41cc-a12c-a6a734a2abf4@github.com> References: <5nEs9Ji13LGJXMWYVdGEgsmolocaYx_qy0RpVA4lzKg=.68593923-a0a6-41cc-a12c-a6a734a2abf4@github.com> Message-ID: On Tue, 22 Apr 2025 03:19:11 GMT, Tejesh R wrote: >> Open source these AWT Menu tests: >> >> java/awt/Menu/MenuVisibilityTest/MenuVisibilityTest.java >> java/awt/Menu/MenuActionEventTest/MenuActionEventTest.java >> java/awt/Menu/RmInHideTest/RmInHideTest.java >> java/awt/Menu/SetShortCutTest/SetShortCutTest.java > > Tejesh R has updated the pull request incrementally with one additional commit since the last revision: > > Update review comments test/jdk/java/awt/Menu/MenuActionEventTest.java line 78: > 76: } > 77: > 78: protected void processActionEvent(ActionEvent e) { I suggest to add `@Override` for all the overridden methods across tests. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/24649#discussion_r2053305911 From honkar at openjdk.org Tue Apr 22 04:35:44 2025 From: honkar at openjdk.org (Harshitha Onkar) Date: Tue, 22 Apr 2025 04:35:44 GMT Subject: RFR: 8353007: Open some JComboBox bugs 2 [v5] In-Reply-To: <-WD2pfFwnlzwP8PLQkDsQBkhYC_ZmpFB74CduoxbFmY=.88f0c35a-5e64-4cc7-a1a1-0fa9da1551fd@github.com> References: <-WD2pfFwnlzwP8PLQkDsQBkhYC_ZmpFB74CduoxbFmY=.88f0c35a-5e64-4cc7-a1a1-0fa9da1551fd@github.com> Message-ID: On Mon, 21 Apr 2025 22:58:37 GMT, Alisen Chung wrote: >> Updating and opening some tests > > Alisen Chung has updated the pull request incrementally with one additional commit since the last revision: > > reduce number of rows LGTM, minor suggestions added. test/jdk/javax/swing/JComboBox/bug4201964.java line 55: > 53: PassFailJFrame.builder() > 54: .instructions(INSTRUCTIONS) > 55: .rows(30) .rows(8) ? test/jdk/javax/swing/JComboBox/bug4249732.java line 61: > 59: .build() > 60: .awaitAndCheck(); > 61: } The Instruction window has a lot of white space. May be consider decreasing number of rows to 8 ? image ------------- Marked as reviewed by honkar (Reviewer). PR Review: https://git.openjdk.org/jdk/pull/24496#pullrequestreview-2782723918 PR Review Comment: https://git.openjdk.org/jdk/pull/24496#discussion_r2053307657 PR Review Comment: https://git.openjdk.org/jdk/pull/24496#discussion_r2053310369 From tr at openjdk.org Tue Apr 22 04:36:05 2025 From: tr at openjdk.org (Tejesh R) Date: Tue, 22 Apr 2025 04:36:05 GMT Subject: RFR: 8353445: Open source several AWT Menu tests - Batch 1 [v6] In-Reply-To: References: Message-ID: > Open source these AWT Menu tests: > > java/awt/Menu/MenuVisibilityTest/MenuVisibilityTest.java > java/awt/Menu/MenuActionEventTest/MenuActionEventTest.java > java/awt/Menu/RmInHideTest/RmInHideTest.java > java/awt/Menu/SetShortCutTest/SetShortCutTest.java Tejesh R has updated the pull request incrementally with one additional commit since the last revision: Updated review comments ------------- Changes: - all: https://git.openjdk.org/jdk/pull/24649/files - new: https://git.openjdk.org/jdk/pull/24649/files/a83a3936..584f58b3 Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=24649&range=05 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=24649&range=04-05 Stats: 2 lines in 1 file changed: 2 ins; 0 del; 0 mod Patch: https://git.openjdk.org/jdk/pull/24649.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/24649/head:pull/24649 PR: https://git.openjdk.org/jdk/pull/24649 From tr at openjdk.org Tue Apr 22 04:36:06 2025 From: tr at openjdk.org (Tejesh R) Date: Tue, 22 Apr 2025 04:36:06 GMT Subject: RFR: 8353445: Open source several AWT Menu tests - Batch 1 [v5] In-Reply-To: References: <5nEs9Ji13LGJXMWYVdGEgsmolocaYx_qy0RpVA4lzKg=.68593923-a0a6-41cc-a12c-a6a734a2abf4@github.com> Message-ID: On Tue, 22 Apr 2025 04:25:33 GMT, Abhishek Kumar wrote: >> Tejesh R has updated the pull request incrementally with one additional commit since the last revision: >> >> Update review comments > > test/jdk/java/awt/Menu/MenuActionEventTest.java line 78: > >> 76: } >> 77: >> 78: protected void processActionEvent(ActionEvent e) { > > I suggest to add `@Override` for all the overridden methods across tests. Updated. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/24649#discussion_r2053311457 From abhiscxk at openjdk.org Tue Apr 22 04:37:42 2025 From: abhiscxk at openjdk.org (Abhishek Kumar) Date: Tue, 22 Apr 2025 04:37:42 GMT Subject: RFR: 8354248: Open source several AWT GridBagLayout and List tests [v2] In-Reply-To: References: Message-ID: On Tue, 22 Apr 2025 03:28:38 GMT, Tejesh R wrote: >> Open source these AWT GridBagLayout and List tests: >> >> java/awt/GridBagLayout/ComponentShortage/ComponentShortage.java >> java/awt/List/ListScrollbarCursorTest/ListScrollbarCursorTest.java >> java/awt/List/ListScrollbarTest/ListScrollbarTest.java > > Tejesh R has updated the pull request incrementally with one additional commit since the last revision: > > Update review comments test/jdk/java/awt/GridBagLayout/ComponentShortage.java line 70: > 68: robot.waitForIdle(); > 69: robot.delay(1000); > 70: EventQueue.invokeAndWait(() -> { I suggest to add a blank line before each `EventQueue.invokeAndWait(() -> {` can be added to separate different operations. test/jdk/java/awt/GridBagLayout/ComponentShortage.java line 83: > 81: }); > 82: System.out.println("TextField size after Frame's width reduction : " + size); > 83: if (size.width < fSize.width - WIDTH_REDUCTION) { Same here, a blank line between print and if statement. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/24749#discussion_r2053312036 PR Review Comment: https://git.openjdk.org/jdk/pull/24749#discussion_r2053312794 From prr at openjdk.org Tue Apr 22 04:52:54 2025 From: prr at openjdk.org (Phil Race) Date: Tue, 22 Apr 2025 04:52:54 GMT Subject: RFR: 8343977: Convert java/awt/TextArea/TextAreaCursorTest/HoveringAndDraggingTest to main [v7] In-Reply-To: References: Message-ID: <-Zoj7jSuItqPN0baQY5YHodSOw6kBx47gazgk9p9LnI=.4c18d266-4c1e-420c-8d53-6332afffac52@github.com> On Mon, 21 Apr 2025 15:46:24 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 automatically resolve the issue. > > Tejesh R has updated the pull request incrementally with one additional commit since the last revision: > > Review comments updated Marked as reviewed by prr (Reviewer). ------------- PR Review: https://git.openjdk.org/jdk/pull/22026#pullrequestreview-2782749826 From abhiscxk at openjdk.org Tue Apr 22 04:56:48 2025 From: abhiscxk at openjdk.org (Abhishek Kumar) Date: Tue, 22 Apr 2025 04:56:48 GMT Subject: RFR: 8353446: Open source several AWT Menu tests - Batch 2 [v2] In-Reply-To: References: Message-ID: On Tue, 22 Apr 2025 03:59:35 GMT, Tejesh R wrote: >> Open source these AWT Menu tests: >> >> java/awt/Menu/OnFlyRepaintMenuTest/OnFlyRepaintMenuTest.java >> java/awt/Menu/DestroyMenuTest/DestroyMenuTest.java >> java/awt/Menu/MenuAddRemoveCrash/MenuAddRemoveCrash.java >> java/awt/Menu/MenuZOrderTest/MenuZOrderTest.java > > 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 since the last revision: > > - Updated review comments > - Merge branch 'master' of https://git.openjdk.java.net/jdk into branch_8353446 > - Open source test/jdk/java/awt/Menu/DestroyMenuTest/DestroyMenuTest.java line 103: > 101: X.add(topPanel, "North"); > 102: X.add(bottomPanel, "South"); > 103: frame.add(X, "South"); Please add constants to add components wherever applicable. Suggestion: topPanel.add(vScrollbar, BorderLayout.EAST); topPanel.add(hScrollbar, BorderLayout.SOUTH); X.add(topPanel, BorderLayout.NORTH); X.add(bottomPanel, BorderLayout.SOUTH); frame.add(X, BorderLayout.SOUTH); test/jdk/java/awt/Menu/OnFlyRepaintMenuTest.java line 50: > 48: 1. Click the button 'Change state' and wait for 5 secs. > 49: 2. If menu is repainted correctly after its setLabel() > 50: and setEnabled() methods called test PASSED, else FAILED. How to know that correct menu is repainted ? You may add the initial menu details... like menu labels, menu state, menu checked state etc. And then after clicks... what change is expected ? This will give tester an info to compare against the test instructions. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/24681#discussion_r2053319029 PR Review Comment: https://git.openjdk.org/jdk/pull/24681#discussion_r2053326884 From tr at openjdk.org Tue Apr 22 05:01:50 2025 From: tr at openjdk.org (Tejesh R) Date: Tue, 22 Apr 2025 05:01:50 GMT Subject: RFR: 8354248: Open source several AWT GridBagLayout and List tests [v3] In-Reply-To: References: Message-ID: > Open source these AWT GridBagLayout and List tests: > > java/awt/GridBagLayout/ComponentShortage/ComponentShortage.java > java/awt/List/ListScrollbarCursorTest/ListScrollbarCursorTest.java > java/awt/List/ListScrollbarTest/ListScrollbarTest.java Tejesh R has updated the pull request incrementally with one additional commit since the last revision: Updated review comments ------------- Changes: - all: https://git.openjdk.org/jdk/pull/24749/files - new: https://git.openjdk.org/jdk/pull/24749/files/93e1f0ec..17bc5b0c Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=24749&range=02 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=24749&range=01-02 Stats: 4 lines in 1 file changed: 4 ins; 0 del; 0 mod Patch: https://git.openjdk.org/jdk/pull/24749.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/24749/head:pull/24749 PR: https://git.openjdk.org/jdk/pull/24749 From tr at openjdk.org Tue Apr 22 05:01:50 2025 From: tr at openjdk.org (Tejesh R) Date: Tue, 22 Apr 2025 05:01:50 GMT Subject: RFR: 8354248: Open source several AWT GridBagLayout and List tests [v2] In-Reply-To: References: Message-ID: On Tue, 22 Apr 2025 04:34:02 GMT, Abhishek Kumar wrote: >> Tejesh R has updated the pull request incrementally with one additional commit since the last revision: >> >> Update review comments > > test/jdk/java/awt/GridBagLayout/ComponentShortage.java line 70: > >> 68: robot.waitForIdle(); >> 69: robot.delay(1000); >> 70: EventQueue.invokeAndWait(() -> { > > I suggest to add a blank line before each `EventQueue.invokeAndWait(() -> {` can be added to separate different operations. Updated. > test/jdk/java/awt/GridBagLayout/ComponentShortage.java line 83: > >> 81: }); >> 82: System.out.println("TextField size after Frame's width reduction : " + size); >> 83: if (size.width < fSize.width - WIDTH_REDUCTION) { > > Same here, a blank line between print and if statement. Updated. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/24749#discussion_r2053330115 PR Review Comment: https://git.openjdk.org/jdk/pull/24749#discussion_r2053330186 From psadhukhan at openjdk.org Tue Apr 22 05:05:47 2025 From: psadhukhan at openjdk.org (Prasanta Sadhukhan) Date: Tue, 22 Apr 2025 05:05:47 GMT Subject: RFR: 8353957: Open source several AWT ScrollPane tests - Batch 1 [v2] In-Reply-To: References: Message-ID: <5Y1msN8kPQ_1fitolIm7Dfckp9EUSNFAs_5O5csZ474=.5b3c470e-8b6d-4884-a157-45b9707a72ac@github.com> On Tue, 22 Apr 2025 03:47:32 GMT, Tejesh R wrote: >> Open source these AWT ScrollPane tests: >> >> java/awt/ScrollPane/ScrollPaneFlicker/ScrollPaneFlicker.java >> java/awt/ScrollPane/ScrollbarsAsNeeded/ScrollbarsAsNeededTest.java >> java/awt/ScrollPane/ScrollPanePaint/ScrollPanePaint.java >> java/awt/ScrollPane/ScrollPositionTest/ScrollPositionTest.java > > Tejesh R has updated the pull request with a new target base due to a merge or a rebase. The pull request now contains three commits: > > - Merge conflict > - Open source > - Open source Please check in CI for the automated test before integrating, if not done already.. ------------- Marked as reviewed by psadhukhan (Reviewer). PR Review: https://git.openjdk.org/jdk/pull/24684#pullrequestreview-2782765862 From achung at openjdk.org Tue Apr 22 05:06:47 2025 From: achung at openjdk.org (Alisen Chung) Date: Tue, 22 Apr 2025 05:06:47 GMT Subject: RFR: 8354695: Open source several swing tests batch7 [v3] In-Reply-To: References: <_UYipF8V8voPBRGVdOg7APlb0vu9VEfObY1qaHDTFBI=.0337e295-3b52-4d63-81c3-3cd21f708496@github.com> Message-ID: On Tue, 22 Apr 2025 01:06:11 GMT, Damon Nguyen wrote: >> Open-sourcing and standardizing several swing tests (JScrollPane & JRootPane) > > Damon Nguyen has updated the pull request incrementally with one additional commit since the last revision: > > Move width and height to EDT looks good ------------- Marked as reviewed by achung (Committer). PR Review: https://git.openjdk.org/jdk/pull/24758#pullrequestreview-2782765985 From tr at openjdk.org Tue Apr 22 05:13:57 2025 From: tr at openjdk.org (Tejesh R) Date: Tue, 22 Apr 2025 05:13:57 GMT Subject: RFR: 8353446: Open source several AWT Menu tests - Batch 2 [v3] In-Reply-To: References: Message-ID: > Open source these AWT Menu tests: > > java/awt/Menu/OnFlyRepaintMenuTest/OnFlyRepaintMenuTest.java > java/awt/Menu/DestroyMenuTest/DestroyMenuTest.java > java/awt/Menu/MenuAddRemoveCrash/MenuAddRemoveCrash.java > java/awt/Menu/MenuZOrderTest/MenuZOrderTest.java Tejesh R has updated the pull request incrementally with one additional commit since the last revision: Updated review comments ------------- Changes: - all: https://git.openjdk.org/jdk/pull/24681/files - new: https://git.openjdk.org/jdk/pull/24681/files/8c5df043..8989a0f8 Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=24681&range=02 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=24681&range=01-02 Stats: 8 lines in 1 file changed: 0 ins; 0 del; 8 mod Patch: https://git.openjdk.org/jdk/pull/24681.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/24681/head:pull/24681 PR: https://git.openjdk.org/jdk/pull/24681 From tr at openjdk.org Tue Apr 22 05:13:59 2025 From: tr at openjdk.org (Tejesh R) Date: Tue, 22 Apr 2025 05:13:59 GMT Subject: RFR: 8353446: Open source several AWT Menu tests - Batch 2 [v2] In-Reply-To: References: Message-ID: On Tue, 22 Apr 2025 04:44:01 GMT, Abhishek Kumar 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 since the last revision: >> >> - Updated review comments >> - Merge branch 'master' of https://git.openjdk.java.net/jdk into branch_8353446 >> - Open source > > test/jdk/java/awt/Menu/DestroyMenuTest/DestroyMenuTest.java line 103: > >> 101: X.add(topPanel, "North"); >> 102: X.add(bottomPanel, "South"); >> 103: frame.add(X, "South"); > > Please add constants to add components wherever applicable. > Suggestion: > > topPanel.add(vScrollbar, BorderLayout.EAST); > topPanel.add(hScrollbar, BorderLayout.SOUTH); > > X.add(topPanel, BorderLayout.NORTH); > X.add(bottomPanel, BorderLayout.SOUTH); > frame.add(X, BorderLayout.SOUTH); Updated. > test/jdk/java/awt/Menu/OnFlyRepaintMenuTest.java line 50: > >> 48: 1. Click the button 'Change state' and wait for 5 secs. >> 49: 2. If menu is repainted correctly after its setLabel() >> 50: and setEnabled() methods called test PASSED, else FAILED. > > How to know that correct menu is repainted ? > > You may add the initial menu details... like menu labels, menu state, menu checked state etc. > And then after clicks... what change is expected ? > > This will give tester an info to compare against the test instructions. repainted correctly after setLabel and setEnabled is evident that its w.r.t to label and enable/disable. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/24681#discussion_r2053339487 PR Review Comment: https://git.openjdk.org/jdk/pull/24681#discussion_r2053338954 From abhiscxk at openjdk.org Tue Apr 22 05:18:45 2025 From: abhiscxk at openjdk.org (Abhishek Kumar) Date: Tue, 22 Apr 2025 05:18:45 GMT Subject: RFR: 8353446: Open source several AWT Menu tests - Batch 2 [v2] In-Reply-To: References: Message-ID: <6id5eOBhCyTFPs87TD-a84W2jEFtZIV_tUC0cTRNVIs=.7bfbf46e-81db-495e-bf08-5c5aef207a01@github.com> On Tue, 22 Apr 2025 05:10:16 GMT, Tejesh R wrote: >> test/jdk/java/awt/Menu/OnFlyRepaintMenuTest.java line 50: >> >>> 48: 1. Click the button 'Change state' and wait for 5 secs. >>> 49: 2. If menu is repainted correctly after its setLabel() >>> 50: and setEnabled() methods called test PASSED, else FAILED. >> >> How to know that correct menu is repainted ? >> >> You may add the initial menu details... like menu labels, menu state, menu checked state etc. >> And then after clicks... what change is expected ? >> >> This will give tester an info to compare against the test instructions. > > repainted correctly after setLabel and setEnabled is evident that its w.r.t to label and enable/disable. In that case, there is no info about `setDisable` method in test instruction. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/24681#discussion_r2053343847 From abhiscxk at openjdk.org Tue Apr 22 05:18:46 2025 From: abhiscxk at openjdk.org (Abhishek Kumar) Date: Tue, 22 Apr 2025 05:18:46 GMT Subject: RFR: 8353446: Open source several AWT Menu tests - Batch 2 [v3] In-Reply-To: References: Message-ID: On Tue, 22 Apr 2025 05:13:57 GMT, Tejesh R wrote: >> Open source these AWT Menu tests: >> >> java/awt/Menu/OnFlyRepaintMenuTest/OnFlyRepaintMenuTest.java >> java/awt/Menu/DestroyMenuTest/DestroyMenuTest.java >> java/awt/Menu/MenuAddRemoveCrash/MenuAddRemoveCrash.java >> java/awt/Menu/MenuZOrderTest/MenuZOrderTest.java > > Tejesh R has updated the pull request incrementally with one additional commit since the last revision: > > Updated review comments test/jdk/java/awt/Menu/OnFlyRepaintMenuTest.java line 65: > 63: Frame f = new Frame("OnFly Menu Repaint Test"); > 64: > 65: f.setLayout(new BorderLayout()); Setting BorderLayout is not required. You can remove this line and import also. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/24681#discussion_r2053342184 From tr at openjdk.org Tue Apr 22 05:19:42 2025 From: tr at openjdk.org (Tejesh R) Date: Tue, 22 Apr 2025 05:19:42 GMT Subject: RFR: 8353445: Open source several AWT Menu tests - Batch 1 [v7] In-Reply-To: References: Message-ID: > Open source these AWT Menu tests: > > java/awt/Menu/MenuVisibilityTest/MenuVisibilityTest.java > java/awt/Menu/MenuActionEventTest/MenuActionEventTest.java > java/awt/Menu/RmInHideTest/RmInHideTest.java > java/awt/Menu/SetShortCutTest/SetShortCutTest.java Tejesh R has updated the pull request incrementally with one additional commit since the last revision: Updated review comments ------------- Changes: - all: https://git.openjdk.org/jdk/pull/24649/files - new: https://git.openjdk.org/jdk/pull/24649/files/584f58b3..b1c137a7 Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=24649&range=06 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=24649&range=05-06 Stats: 4 lines in 1 file changed: 3 ins; 0 del; 1 mod Patch: https://git.openjdk.org/jdk/pull/24649.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/24649/head:pull/24649 PR: https://git.openjdk.org/jdk/pull/24649 From abhiscxk at openjdk.org Tue Apr 22 05:22:48 2025 From: abhiscxk at openjdk.org (Abhishek Kumar) Date: Tue, 22 Apr 2025 05:22:48 GMT Subject: RFR: 8353445: Open source several AWT Menu tests - Batch 1 [v7] In-Reply-To: References: Message-ID: On Tue, 22 Apr 2025 05:19:42 GMT, Tejesh R wrote: >> Open source these AWT Menu tests: >> >> java/awt/Menu/MenuVisibilityTest/MenuVisibilityTest.java >> java/awt/Menu/MenuActionEventTest/MenuActionEventTest.java >> java/awt/Menu/RmInHideTest/RmInHideTest.java >> java/awt/Menu/SetShortCutTest/SetShortCutTest.java > > Tejesh R has updated the pull request incrementally with one additional commit since the last revision: > > Updated review comments test/jdk/java/awt/Menu/SetShortCutTest.java line 106: > 104: } > 105: > 106: public void actionPerformed(ActionEvent event) { Add `@Override` here as well test/jdk/java/awt/Menu/SetShortCutTest.java line 113: > 111: } > 112: > 113: //Click on the "Stuff" menu to remove the "first" menu item Suggestion: // Click on the "Stuff" menu to remove the "first" menu item test/jdk/java/awt/Menu/SetShortCutTest.java line 116: > 114: else if (event.getSource() == item2) { > 115: //If the item has not been removed from the menu, > 116: //then remove "First" from the "File" menu Suggestion: // If the item has not been removed from the menu, // then remove "First" from the "File" menu ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/24649#discussion_r2053345722 PR Review Comment: https://git.openjdk.org/jdk/pull/24649#discussion_r2053346577 PR Review Comment: https://git.openjdk.org/jdk/pull/24649#discussion_r2053346858 From tr at openjdk.org Tue Apr 22 05:25:32 2025 From: tr at openjdk.org (Tejesh R) Date: Tue, 22 Apr 2025 05:25:32 GMT Subject: RFR: 8353446: Open source several AWT Menu tests - Batch 2 [v4] In-Reply-To: References: Message-ID: > Open source these AWT Menu tests: > > java/awt/Menu/OnFlyRepaintMenuTest/OnFlyRepaintMenuTest.java > java/awt/Menu/DestroyMenuTest/DestroyMenuTest.java > java/awt/Menu/MenuAddRemoveCrash/MenuAddRemoveCrash.java > java/awt/Menu/MenuZOrderTest/MenuZOrderTest.java Tejesh R has updated the pull request incrementally with one additional commit since the last revision: Updated review comments ------------- Changes: - all: https://git.openjdk.org/jdk/pull/24681/files - new: https://git.openjdk.org/jdk/pull/24681/files/8989a0f8..bd4b4aa1 Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=24681&range=03 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=24681&range=02-03 Stats: 1 line in 1 file changed: 0 ins; 1 del; 0 mod Patch: https://git.openjdk.org/jdk/pull/24681.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/24681/head:pull/24681 PR: https://git.openjdk.org/jdk/pull/24681 From tr at openjdk.org Tue Apr 22 05:25:32 2025 From: tr at openjdk.org (Tejesh R) Date: Tue, 22 Apr 2025 05:25:32 GMT Subject: RFR: 8353446: Open source several AWT Menu tests - Batch 2 [v3] In-Reply-To: References: Message-ID: On Tue, 22 Apr 2025 05:13:45 GMT, Abhishek Kumar wrote: >> Tejesh R has updated the pull request incrementally with one additional commit since the last revision: >> >> Updated review comments > > test/jdk/java/awt/Menu/OnFlyRepaintMenuTest.java line 65: > >> 63: Frame f = new Frame("OnFly Menu Repaint Test"); >> 64: >> 65: f.setLayout(new BorderLayout()); > > Setting BorderLayout is not required. You can remove this line and import also. Updated. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/24681#discussion_r2053349125 From abhiscxk at openjdk.org Tue Apr 22 05:31:48 2025 From: abhiscxk at openjdk.org (Abhishek Kumar) Date: Tue, 22 Apr 2025 05:31:48 GMT Subject: RFR: 8353446: Open source several AWT Menu tests - Batch 2 [v4] In-Reply-To: References: Message-ID: On Tue, 22 Apr 2025 05:25:32 GMT, Tejesh R wrote: >> Open source these AWT Menu tests: >> >> java/awt/Menu/OnFlyRepaintMenuTest/OnFlyRepaintMenuTest.java >> java/awt/Menu/DestroyMenuTest/DestroyMenuTest.java >> java/awt/Menu/MenuAddRemoveCrash/MenuAddRemoveCrash.java >> java/awt/Menu/MenuZOrderTest/MenuZOrderTest.java > > Tejesh R has updated the pull request incrementally with one additional commit since the last revision: > > Updated review comments test/jdk/java/awt/Menu/OnFlyRepaintMenuTest.java line 35: > 33: */ > 34: > 35: import java.awt.BorderLayout; Unused import ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/24681#discussion_r2053354798 From tr at openjdk.org Tue Apr 22 05:31:48 2025 From: tr at openjdk.org (Tejesh R) Date: Tue, 22 Apr 2025 05:31:48 GMT Subject: RFR: 8353446: Open source several AWT Menu tests - Batch 2 [v2] In-Reply-To: <6id5eOBhCyTFPs87TD-a84W2jEFtZIV_tUC0cTRNVIs=.7bfbf46e-81db-495e-bf08-5c5aef207a01@github.com> References: <6id5eOBhCyTFPs87TD-a84W2jEFtZIV_tUC0cTRNVIs=.7bfbf46e-81db-495e-bf08-5c5aef207a01@github.com> Message-ID: <7doJ5lR93thj4ZUIrIxEJBP4tV73DUZ0QxkGzM5WXlA=.58b9a726-6f15-452a-addd-da7fb9590067@github.com> On Tue, 22 Apr 2025 05:15:53 GMT, Abhishek Kumar wrote: >> repainted correctly after setLabel and setEnabled is evident that its w.r.t to label and enable/disable. > > In that case, there is no info about `setDisable` method in test instruction. I hope setEnabled method caters to both enable/disabled. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/24681#discussion_r2053355087 From tr at openjdk.org Tue Apr 22 05:39:30 2025 From: tr at openjdk.org (Tejesh R) Date: Tue, 22 Apr 2025 05:39:30 GMT Subject: RFR: 8354248: Open source several AWT GridBagLayout and List tests [v4] In-Reply-To: References: Message-ID: > Open source these AWT GridBagLayout and List tests: > > java/awt/GridBagLayout/ComponentShortage/ComponentShortage.java > java/awt/List/ListScrollbarCursorTest/ListScrollbarCursorTest.java > java/awt/List/ListScrollbarTest/ListScrollbarTest.java Tejesh R has updated the pull request incrementally with one additional commit since the last revision: Updated review comments ------------- Changes: - all: https://git.openjdk.org/jdk/pull/24749/files - new: https://git.openjdk.org/jdk/pull/24749/files/17bc5b0c..46e3848a Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=24749&range=03 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=24749&range=02-03 Stats: 2 lines in 1 file changed: 2 ins; 0 del; 0 mod Patch: https://git.openjdk.org/jdk/pull/24749.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/24749/head:pull/24749 PR: https://git.openjdk.org/jdk/pull/24749 From tr at openjdk.org Tue Apr 22 05:42:47 2025 From: tr at openjdk.org (Tejesh R) Date: Tue, 22 Apr 2025 05:42:47 GMT Subject: RFR: 8353445: Open source several AWT Menu tests - Batch 1 [v7] In-Reply-To: References: Message-ID: On Tue, 22 Apr 2025 05:18:16 GMT, Abhishek Kumar wrote: >> Tejesh R has updated the pull request incrementally with one additional commit since the last revision: >> >> Updated review comments > > test/jdk/java/awt/Menu/SetShortCutTest.java line 106: > >> 104: } >> 105: >> 106: public void actionPerformed(ActionEvent event) { > > Add `@Override` here as well Updated. > test/jdk/java/awt/Menu/SetShortCutTest.java line 113: > >> 111: } >> 112: >> 113: //Click on the "Stuff" menu to remove the "first" menu item > > Suggestion: > > // Click on the "Stuff" menu to remove the "first" menu item Updated. > test/jdk/java/awt/Menu/SetShortCutTest.java line 116: > >> 114: else if (event.getSource() == item2) { >> 115: //If the item has not been removed from the menu, >> 116: //then remove "First" from the "File" menu > > Suggestion: > > // If the item has not been removed from the menu, > // then remove "First" from the "File" menu Updated. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/24649#discussion_r2053363633 PR Review Comment: https://git.openjdk.org/jdk/pull/24649#discussion_r2053363709 PR Review Comment: https://git.openjdk.org/jdk/pull/24649#discussion_r2053363782 From psadhukhan at openjdk.org Tue Apr 22 05:46:47 2025 From: psadhukhan at openjdk.org (Prasanta Sadhukhan) Date: Tue, 22 Apr 2025 05:46:47 GMT Subject: RFR: 8348760: RadioButton is not shown if JRadioButtonMenuItem is rendered with ImageIcon in WindowsLookAndFeel [v24] In-Reply-To: References: <_OqONGmbeH9KtcJvhT_kMpl5xZ8hTN-VvOat7vWFjsI=.c0bb8661-5c33-433c-a722-a39153f63df2@github.com> Message-ID: On Sat, 29 Mar 2025 20:30:15 GMT, Phil Race wrote: > > ``` > > mii.fMask = MIIM_FTYPE | MIIM_STRING | MIIM_ID | MIIM_BITMAP | MIIM_CHECKMARKS; > > ``` > > Per https://learn.microsoft.com/en-us/windows/win32/api/winuser/ns-winuser-menuiteminfoa > > The MFT_BITMAP, MFT_SEPARATOR, and MFT_STRING values cannot be combined with one another. (nb MIIM is the replacement name for MFT but the same applies) > > I suspect you mean to be setting HBITMAP hbmpChecked; and/or HBITMAP hbmpUnchecked; > > not HBITMAP hbmpItem; which is used to display a bitmap instead of a text string label. > > Also you aren't clearing the fMask / resetting it when using the entries without a bitmap I have no idea how much all of this can confuse the GDI API. Here's the new program without setting MFT_BITMAP and MFT_STRING together and using hbmpChecked #include #include #define IDM_RADIO1 1001 #define IDM_RADIO2 1002 #define IDM_RADIO3 1003 LRESULT CALLBACK WndProc(HWND, UINT, WPARAM, LPARAM); int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, PSTR szCmdLine, int iCmdShow) { static TCHAR szAppName[] = TEXT("RadioMenuDemo"); HWND hwnd; MSG msg; WNDCLASS wndclass; wndclass.style = CS_HREDRAW | CS_VREDRAW; wndclass.lpfnWndProc = WndProc; wndclass.cbClsExtra = 0; wndclass.cbWndExtra = 0; wndclass.hInstance = hInstance; wndclass.hIcon = LoadIcon(NULL, IDI_APPLICATION); wndclass.hCursor = LoadCursor(NULL, IDC_ARROW); wndclass.hbrBackground = (HBRUSH)GetStockObject(WHITE_BRUSH); wndclass.lpszMenuName = NULL; wndclass.lpszClassName = szAppName; RegisterClass(&wndclass); hwnd = CreateWindow(szAppName, TEXT("Radio Menu Demo"), WS_OVERLAPPEDWINDOW, CW_USEDEFAULT, CW_USEDEFAULT, 400, 300, NULL, NULL, hInstance, NULL); ShowWindow(hwnd, iCmdShow); UpdateWindow(hwnd); while (GetMessage(&msg, NULL, 0, 0)) { TranslateMessage(&msg); DispatchMessage(&msg); } return msg.wParam; } LRESULT CALLBACK WndProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam) { static HMENU hMainMenu, hRadioSubMenu; switch (message) { case WM_CREATE: { // Create main menu hMainMenu = CreateMenu(); hRadioSubMenu = CreatePopupMenu(); // Configure menu items using MENUITEMINFO MENUITEMINFO mii = { 0 }; mii.cbSize = sizeof(MENUITEMINFO); mii.fMask = MIIM_FTYPE | MIIM_STRING | MIIM_ID | MIIM_CHECKMARKS; // | MIIM_BITMAP; // First radio item mii.fType = MFT_RADIOCHECK; std::wstring wstr1 = L"Radio Option 1"; LPWSTR lp1 = (LPWSTR)wstr1.c_str(); mii.dwTypeData = lp1; mii.cch = (UINT)strlen((const char *)lp1); mii.wID = IDM_RADIO1; mii.fState = MFS_CHECKED; HDC hdc = GetDC(hwnd); HBITMAP hBitmap = CreateCompatibleBitmap(hdc, 16, 16); HDC memDC = CreateCompatibleDC(hdc); //HGDIOBJ oldObj = SelectObject(memDC, hBitmap); HBRUSH hBrush = CreateSolidBrush(RGB(255, 0, 0)); RECT rect = { 0, 0, 16, 16 }; FillRect(memDC, &rect, hBrush); mii.hbmpChecked = hBitmap; //mii.hbmpItem = hBitmap; InsertMenuItem(hRadioSubMenu, 0, TRUE, &mii); // Second radio item std::wstring wstr2 = L"Radio Option 2"; LPWSTR lp2 = (LPWSTR)wstr2.c_str(); mii.dwTypeData = lp2; mii.cch = (UINT)strlen((const char *)lp2); mii.wID = IDM_RADIO2; mii.hbmpChecked = hBitmap; InsertMenuItem(hRadioSubMenu, 1, TRUE, &mii); // Third radio item std::wstring wstr3 = L"Radio Option 3"; LPWSTR lp3 = (LPWSTR)wstr3.c_str(); memset((void *) & mii, 0, sizeof(mii)); mii.cbSize = sizeof(MENUITEMINFO); mii.fType = MFT_RADIOCHECK; mii.fMask = MIIM_FTYPE | MIIM_STRING | MIIM_ID | MIIM_CHECKMARKS; mii.dwTypeData = lp3; mii.cch = (UINT)strlen((const char *)lp3); mii.wID = IDM_RADIO3; mii.hbmpChecked = NULL; //mii.hbmpItem = NULL; InsertMenuItem(hRadioSubMenu, 2, TRUE, &mii); // Add submenu to main menu AppendMenu(hMainMenu, MF_POPUP, (UINT_PTR)hRadioSubMenu, L"Options"); SetMenu(hwnd, hMainMenu); // Set initial checked item using CheckMenuRadioItem CheckMenuRadioItem(hRadioSubMenu, IDM_RADIO1, IDM_RADIO3, // Group range IDM_RADIO1, // Initial selection MF_BYCOMMAND); // Identifier type return 0; } case WM_COMMAND: switch (LOWORD(wParam)) { case IDM_RADIO1: case IDM_RADIO2: case IDM_RADIO3: // Update radio selection CheckMenuRadioItem(hRadioSubMenu, IDM_RADIO1, IDM_RADIO3, LOWORD(wParam), MF_BYCOMMAND); break; } return 0; case WM_DESTROY: PostQuitMessage(0); return 0; } return DefWindowProc(hwnd, message, wParam, lParam); } It seems in windows 11 with this program, the imageicon cannot be clubbed with radiobullet/checkmark if BITMAP/STRING cannot be together so it will look like if RadioButton 1 is selected with icon (ie BITMAP) ![image](https://github.com/user-attachments/assets/a7da085e-80d5-4d1d-9e2e-0975b82894d2) if RadioButton 3 is selected without icon (ie BITMAP set to NULL) ![image](https://github.com/user-attachments/assets/ea467c50-ac11-4f6b-a82d-305fdb6a9602) We can make changes in JDK to only draw imageicon if menuitem is selected which will let user distinguish between selected/unselected menuitem ------------- PR Comment: https://git.openjdk.org/jdk/pull/23324#issuecomment-2820134416 From tr at openjdk.org Tue Apr 22 05:58:55 2025 From: tr at openjdk.org (Tejesh R) Date: Tue, 22 Apr 2025 05:58:55 GMT Subject: Integrated: 8343977: Convert java/awt/TextArea/TextAreaCursorTest/HoveringAndDraggingTest to main In-Reply-To: References: Message-ID: On Tue, 12 Nov 2024 07:04:36 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 automatically resolve the issue. This pull request has now been integrated. Changeset: e2cb6467 Author: Tejesh R URL: https://git.openjdk.org/jdk/commit/e2cb64674f5b6b4f000ab1e903fbb75416218bb3 Stats: 294 lines in 2 files changed: 65 ins; 195 del; 34 mod 8343977: Convert java/awt/TextArea/TextAreaCursorTest/HoveringAndDraggingTest to main Reviewed-by: prr, achung ------------- PR: https://git.openjdk.org/jdk/pull/22026 From abhiscxk at openjdk.org Tue Apr 22 06:02:42 2025 From: abhiscxk at openjdk.org (Abhishek Kumar) Date: Tue, 22 Apr 2025 06:02:42 GMT Subject: RFR: 8353445: Open source several AWT Menu tests - Batch 1 [v7] In-Reply-To: References: Message-ID: On Tue, 22 Apr 2025 05:39:25 GMT, Tejesh R wrote: >> test/jdk/java/awt/Menu/SetShortCutTest.java line 106: >> >>> 104: } >>> 105: >>> 106: public void actionPerformed(ActionEvent event) { >> >> Add `@Override` here as well > > Updated. Changes are not reflecting ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/24649#discussion_r2053382774 From abhiscxk at openjdk.org Tue Apr 22 06:02:42 2025 From: abhiscxk at openjdk.org (Abhishek Kumar) Date: Tue, 22 Apr 2025 06:02:42 GMT Subject: RFR: 8354248: Open source several AWT GridBagLayout and List tests [v4] In-Reply-To: References: Message-ID: On Tue, 22 Apr 2025 05:39:30 GMT, Tejesh R wrote: >> Open source these AWT GridBagLayout and List tests: >> >> java/awt/GridBagLayout/ComponentShortage/ComponentShortage.java >> java/awt/List/ListScrollbarCursorTest/ListScrollbarCursorTest.java >> java/awt/List/ListScrollbarTest/ListScrollbarTest.java > > Tejesh R has updated the pull request incrementally with one additional commit since the last revision: > > Updated review comments Marked as reviewed by abhiscxk (Reviewer). ------------- PR Review: https://git.openjdk.org/jdk/pull/24749#pullrequestreview-2782845725 From abhiscxk at openjdk.org Tue Apr 22 06:12:27 2025 From: abhiscxk at openjdk.org (Abhishek Kumar) Date: Tue, 22 Apr 2025 06:12:27 GMT Subject: RFR: 8355241: Move NativeDialogToFrontBackTest.java PL test to manual category Message-ID: `NativeDialogToFrontBackTest.java` test was moved to open PL file while converting from applet and open sourcing in [this PR](https://github.com/openjdk/jdk/pull/24685). It should be under Client manual tests category in PL file. Moved the PL test to manual category ------------- Commit messages: - Move PL test to manual category Changes: https://git.openjdk.org/jdk/pull/24790/files Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=24790&range=00 Issue: https://bugs.openjdk.org/browse/JDK-8355241 Stats: 2 lines in 1 file changed: 1 ins; 1 del; 0 mod Patch: https://git.openjdk.org/jdk/pull/24790.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/24790/head:pull/24790 PR: https://git.openjdk.org/jdk/pull/24790 From tr at openjdk.org Tue Apr 22 06:14:01 2025 From: tr at openjdk.org (Tejesh R) Date: Tue, 22 Apr 2025 06:14:01 GMT Subject: RFR: 8353446: Open source several AWT Menu tests - Batch 2 [v5] In-Reply-To: References: Message-ID: > Open source these AWT Menu tests: > > java/awt/Menu/OnFlyRepaintMenuTest/OnFlyRepaintMenuTest.java > java/awt/Menu/DestroyMenuTest/DestroyMenuTest.java > java/awt/Menu/MenuAddRemoveCrash/MenuAddRemoveCrash.java > java/awt/Menu/MenuZOrderTest/MenuZOrderTest.java Tejesh R has updated the pull request incrementally with one additional commit since the last revision: Updated review comments ------------- Changes: - all: https://git.openjdk.org/jdk/pull/24681/files - new: https://git.openjdk.org/jdk/pull/24681/files/bd4b4aa1..fe7821e8 Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=24681&range=04 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=24681&range=03-04 Stats: 1 line in 1 file changed: 0 ins; 1 del; 0 mod Patch: https://git.openjdk.org/jdk/pull/24681.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/24681/head:pull/24681 PR: https://git.openjdk.org/jdk/pull/24681 From tr at openjdk.org Tue Apr 22 06:14:02 2025 From: tr at openjdk.org (Tejesh R) Date: Tue, 22 Apr 2025 06:14:02 GMT Subject: RFR: 8353446: Open source several AWT Menu tests - Batch 2 [v4] In-Reply-To: References: Message-ID: On Tue, 22 Apr 2025 05:28:50 GMT, Abhishek Kumar wrote: >> Tejesh R has updated the pull request incrementally with one additional commit since the last revision: >> >> Updated review comments > > test/jdk/java/awt/Menu/OnFlyRepaintMenuTest.java line 35: > >> 33: */ >> 34: >> 35: import java.awt.BorderLayout; > > Unused import Updated. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/24681#discussion_r2053394384 From abhiscxk at openjdk.org Tue Apr 22 06:22:59 2025 From: abhiscxk at openjdk.org (Abhishek Kumar) Date: Tue, 22 Apr 2025 06:22:59 GMT Subject: RFR: 8353446: Open source several AWT Menu tests - Batch 2 [v5] In-Reply-To: References: Message-ID: On Tue, 22 Apr 2025 06:14:01 GMT, Tejesh R wrote: >> Open source these AWT Menu tests: >> >> java/awt/Menu/OnFlyRepaintMenuTest/OnFlyRepaintMenuTest.java >> java/awt/Menu/DestroyMenuTest/DestroyMenuTest.java >> java/awt/Menu/MenuAddRemoveCrash/MenuAddRemoveCrash.java >> java/awt/Menu/MenuZOrderTest/MenuZOrderTest.java > > Tejesh R has updated the pull request incrementally with one additional commit since the last revision: > > Updated review comments test/jdk/java/awt/Menu/MenuZOrderTest.java line 33: > 31: */ > 32: > 33: import java.awt.BorderLayout; Can be removed. test/jdk/java/awt/Menu/MenuZOrderTest.java line 73: > 71: MenuItem mi1 = new MenuItem("Menu Item 1"); > 72: > 73: mf.setLayout(new BorderLayout()); Don't think it is required. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/24681#discussion_r2053404743 PR Review Comment: https://git.openjdk.org/jdk/pull/24681#discussion_r2053404693 From psadhukhan at openjdk.org Tue Apr 22 06:22:54 2025 From: psadhukhan at openjdk.org (Prasanta Sadhukhan) Date: Tue, 22 Apr 2025 06:22:54 GMT Subject: RFR: 8355241: Move NativeDialogToFrontBackTest.java PL test to manual category In-Reply-To: References: Message-ID: On Tue, 22 Apr 2025 05:04:22 GMT, Abhishek Kumar wrote: > `NativeDialogToFrontBackTest.java` test was moved to open PL file while converting from applet and open sourcing in [this PR](https://github.com/openjdk/jdk/pull/24685). It should be under Client manual tests category in PL file. > > Moved the PL test to manual category Marked as reviewed by psadhukhan (Reviewer). ------------- PR Review: https://git.openjdk.org/jdk/pull/24790#pullrequestreview-2782881361 From tr at openjdk.org Tue Apr 22 06:25:42 2025 From: tr at openjdk.org (Tejesh R) Date: Tue, 22 Apr 2025 06:25:42 GMT Subject: Integrated: 8353957: Open source several AWT ScrollPane tests - Batch 1 In-Reply-To: References: Message-ID: On Wed, 16 Apr 2025 11:24:47 GMT, Tejesh R wrote: > Open source these AWT ScrollPane tests: > > java/awt/ScrollPane/ScrollPaneFlicker/ScrollPaneFlicker.java > java/awt/ScrollPane/ScrollbarsAsNeeded/ScrollbarsAsNeededTest.java > java/awt/ScrollPane/ScrollPanePaint/ScrollPanePaint.java > java/awt/ScrollPane/ScrollPositionTest/ScrollPositionTest.java This pull request has now been integrated. Changeset: d1d7d256 Author: Tejesh R URL: https://git.openjdk.org/jdk/commit/d1d7d2569c1745aef778c9b5a62c1bd50735e8a7 Stats: 520 lines in 5 files changed: 520 ins; 0 del; 0 mod 8353957: Open source several AWT ScrollPane tests - Batch 1 Reviewed-by: psadhukhan ------------- PR: https://git.openjdk.org/jdk/pull/24684 From tr at openjdk.org Tue Apr 22 06:42:36 2025 From: tr at openjdk.org (Tejesh R) Date: Tue, 22 Apr 2025 06:42:36 GMT Subject: RFR: 8353446: Open source several AWT Menu tests - Batch 2 [v6] In-Reply-To: References: Message-ID: > Open source these AWT Menu tests: > > java/awt/Menu/OnFlyRepaintMenuTest/OnFlyRepaintMenuTest.java > java/awt/Menu/DestroyMenuTest/DestroyMenuTest.java > java/awt/Menu/MenuAddRemoveCrash/MenuAddRemoveCrash.java > java/awt/Menu/MenuZOrderTest/MenuZOrderTest.java Tejesh R has updated the pull request incrementally with one additional commit since the last revision: Updated review comments ------------- Changes: - all: https://git.openjdk.org/jdk/pull/24681/files - new: https://git.openjdk.org/jdk/pull/24681/files/fe7821e8..6a31b28e Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=24681&range=05 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=24681&range=04-05 Stats: 2 lines in 1 file changed: 0 ins; 2 del; 0 mod Patch: https://git.openjdk.org/jdk/pull/24681.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/24681/head:pull/24681 PR: https://git.openjdk.org/jdk/pull/24681 From tr at openjdk.org Tue Apr 22 06:42:37 2025 From: tr at openjdk.org (Tejesh R) Date: Tue, 22 Apr 2025 06:42:37 GMT Subject: RFR: 8353446: Open source several AWT Menu tests - Batch 2 [v5] In-Reply-To: References: Message-ID: On Tue, 22 Apr 2025 06:20:42 GMT, Abhishek Kumar wrote: >> Tejesh R has updated the pull request incrementally with one additional commit since the last revision: >> >> Updated review comments > > test/jdk/java/awt/Menu/MenuZOrderTest.java line 33: > >> 31: */ >> 32: >> 33: import java.awt.BorderLayout; > > Can be removed. Updated. > test/jdk/java/awt/Menu/MenuZOrderTest.java line 73: > >> 71: MenuItem mi1 = new MenuItem("Menu Item 1"); >> 72: >> 73: mf.setLayout(new BorderLayout()); > > Don't think it is required. Updated. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/24681#discussion_r2053426663 PR Review Comment: https://git.openjdk.org/jdk/pull/24681#discussion_r2053426538 From abhiscxk at openjdk.org Tue Apr 22 06:44:47 2025 From: abhiscxk at openjdk.org (Abhishek Kumar) Date: Tue, 22 Apr 2025 06:44:47 GMT Subject: RFR: 8353446: Open source several AWT Menu tests - Batch 2 [v6] In-Reply-To: References: Message-ID: <304iNrPFiLYUhSdFMhRMz7ilu_ghgg8MbFWnkaDAPoI=.86ff5ae3-1cae-4797-b065-31acb6ca2314@github.com> On Tue, 22 Apr 2025 06:42:36 GMT, Tejesh R wrote: >> Open source these AWT Menu tests: >> >> java/awt/Menu/OnFlyRepaintMenuTest/OnFlyRepaintMenuTest.java >> java/awt/Menu/DestroyMenuTest/DestroyMenuTest.java >> java/awt/Menu/MenuAddRemoveCrash/MenuAddRemoveCrash.java >> java/awt/Menu/MenuZOrderTest/MenuZOrderTest.java > > Tejesh R has updated the pull request incrementally with one additional commit since the last revision: > > Updated review comments Marked as reviewed by abhiscxk (Reviewer). ------------- PR Review: https://git.openjdk.org/jdk/pull/24681#pullrequestreview-2782923899 From tr at openjdk.org Tue Apr 22 06:53:29 2025 From: tr at openjdk.org (Tejesh R) Date: Tue, 22 Apr 2025 06:53:29 GMT Subject: RFR: 8353445: Open source several AWT Menu tests - Batch 1 [v8] In-Reply-To: References: Message-ID: > Open source these AWT Menu tests: > > java/awt/Menu/MenuVisibilityTest/MenuVisibilityTest.java > java/awt/Menu/MenuActionEventTest/MenuActionEventTest.java > java/awt/Menu/RmInHideTest/RmInHideTest.java > java/awt/Menu/SetShortCutTest/SetShortCutTest.java Tejesh R has updated the pull request incrementally with two additional commits since the last revision: - Empty commit - Updated review comments ------------- Changes: - all: https://git.openjdk.org/jdk/pull/24649/files - new: https://git.openjdk.org/jdk/pull/24649/files/b1c137a7..4c8fe2cc Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=24649&range=07 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=24649&range=06-07 Stats: 5 lines in 1 file changed: 1 ins; 0 del; 4 mod Patch: https://git.openjdk.org/jdk/pull/24649.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/24649/head:pull/24649 PR: https://git.openjdk.org/jdk/pull/24649 From abhiscxk at openjdk.org Tue Apr 22 06:53:48 2025 From: abhiscxk at openjdk.org (Abhishek Kumar) Date: Tue, 22 Apr 2025 06:53:48 GMT Subject: Integrated: 8355241: Move NativeDialogToFrontBackTest.java PL test to manual category In-Reply-To: References: Message-ID: On Tue, 22 Apr 2025 05:04:22 GMT, Abhishek Kumar wrote: > `NativeDialogToFrontBackTest.java` test was moved to open PL file while converting from applet and open sourcing in [this PR](https://github.com/openjdk/jdk/pull/24685). It should be under Client manual tests category in PL file. > > Moved the PL test to manual category This pull request has now been integrated. Changeset: 33bdc807 Author: Abhishek Kumar URL: https://git.openjdk.org/jdk/commit/33bdc807b18914bb57ca7853ab45d4fa8fdefd47 Stats: 2 lines in 1 file changed: 1 ins; 1 del; 0 mod 8355241: Move NativeDialogToFrontBackTest.java PL test to manual category Reviewed-by: psadhukhan ------------- PR: https://git.openjdk.org/jdk/pull/24790 From achung at openjdk.org Tue Apr 22 07:06:57 2025 From: achung at openjdk.org (Alisen Chung) Date: Tue, 22 Apr 2025 07:06:57 GMT Subject: Integrated: 8352905: Open some JComboBox bugs 1 In-Reply-To: References: Message-ID: On Mon, 7 Apr 2025 22:50:14 GMT, Alisen Chung wrote: > Updating and opening some tests This pull request has now been integrated. Changeset: a55ccd26 Author: Alisen Chung URL: https://git.openjdk.org/jdk/commit/a55ccd267cdfbb7a52c0647fa3b2f93b36b1805f Stats: 455 lines in 4 files changed: 455 ins; 0 del; 0 mod 8352905: Open some JComboBox bugs 1 Reviewed-by: honkar, psadhukhan ------------- PR: https://git.openjdk.org/jdk/pull/24495 From achung at openjdk.org Tue Apr 22 07:16:13 2025 From: achung at openjdk.org (Alisen Chung) Date: Tue, 22 Apr 2025 07:16:13 GMT Subject: RFR: 8354466: Open some misc Swing bugs 9 [v6] In-Reply-To: References: Message-ID: <44TqkDj7vzK9Z0pEflL9zogLFrcBBjz3LNi7SQZn6Cw=.1235131c-4658-43a6-ad0d-372b8119251b@github.com> > Updating and opening some misc swing bugs Alisen Chung 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 eight additional commits since the last revision: - update test - reverting test to manual test - Merge branch 'master' of https://github.com/openjdk/jdk into 2025tsb_9 - add preferred size to panels - update test - update color uppercase - update jtreg path - opening tests ------------- Changes: - all: https://git.openjdk.org/jdk/pull/24703/files - new: https://git.openjdk.org/jdk/pull/24703/files/6d96622e..485c20f0 Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=24703&range=05 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=24703&range=04-05 Stats: 24612 lines in 439 files changed: 20497 ins; 2778 del; 1337 mod Patch: https://git.openjdk.org/jdk/pull/24703.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/24703/head:pull/24703 PR: https://git.openjdk.org/jdk/pull/24703 From achung at openjdk.org Tue Apr 22 07:16:13 2025 From: achung at openjdk.org (Alisen Chung) Date: Tue, 22 Apr 2025 07:16:13 GMT Subject: RFR: 8354466: Open some misc Swing bugs 9 [v5] In-Reply-To: References: Message-ID: On Tue, 22 Apr 2025 01:04:56 GMT, Alisen Chung wrote: >> Updating and opening some misc swing bugs > > Alisen Chung has updated the pull request incrementally with one additional commit since the last revision: > > add preferred size to panels just updated inlines, also reverted other test to manual test because grabbing pixels of JPasswordField is inconsistent across platforms and causes issues with automating the test ------------- PR Comment: https://git.openjdk.org/jdk/pull/24703#issuecomment-2820318373 From abhiscxk at openjdk.org Tue Apr 22 07:25:47 2025 From: abhiscxk at openjdk.org (Abhishek Kumar) Date: Tue, 22 Apr 2025 07:25:47 GMT Subject: RFR: 8353445: Open source several AWT Menu tests - Batch 1 [v8] In-Reply-To: References: Message-ID: On Tue, 22 Apr 2025 06:53:29 GMT, Tejesh R wrote: >> Open source these AWT Menu tests: >> >> java/awt/Menu/MenuVisibilityTest/MenuVisibilityTest.java >> java/awt/Menu/MenuActionEventTest/MenuActionEventTest.java >> java/awt/Menu/RmInHideTest/RmInHideTest.java >> java/awt/Menu/SetShortCutTest/SetShortCutTest.java > > Tejesh R has updated the pull request incrementally with two additional commits since the last revision: > > - Empty commit > - Updated review comments Marked as reviewed by abhiscxk (Reviewer). ------------- PR Review: https://git.openjdk.org/jdk/pull/24649#pullrequestreview-2783069333 From dnguyen at openjdk.org Tue Apr 22 07:34:43 2025 From: dnguyen at openjdk.org (Damon Nguyen) Date: Tue, 22 Apr 2025 07:34:43 GMT Subject: RFR: 8354466: Open some misc Swing bugs 9 [v6] In-Reply-To: <44TqkDj7vzK9Z0pEflL9zogLFrcBBjz3LNi7SQZn6Cw=.1235131c-4658-43a6-ad0d-372b8119251b@github.com> References: <44TqkDj7vzK9Z0pEflL9zogLFrcBBjz3LNi7SQZn6Cw=.1235131c-4658-43a6-ad0d-372b8119251b@github.com> Message-ID: On Tue, 22 Apr 2025 07:16:13 GMT, Alisen Chung wrote: >> Updating and opening some misc swing bugs > > Alisen Chung 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 eight additional commits since the last revision: > > - update test > - reverting test to manual test > - Merge branch 'master' of https://github.com/openjdk/jdk into 2025tsb_9 > - add preferred size to panels > - update test > - update color uppercase > - update jtreg path > - opening tests test/jdk/javax/swing/JPasswordField/bug4382819.java line 36: > 34: * @library /java/awt/regtesthelpers > 35: * @build PassFailJFrame > 36: * @run main bug4382819 Suggestion: * @run main/manual bug4382819 Looks like this test is manual when testing. Add the manual tag to the header. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/24703#discussion_r2053509923 From achung at openjdk.org Tue Apr 22 07:46:47 2025 From: achung at openjdk.org (Alisen Chung) Date: Tue, 22 Apr 2025 07:46:47 GMT Subject: RFR: 8354466: Open some misc Swing bugs 9 [v7] In-Reply-To: References: Message-ID: > Updating and opening some misc swing bugs Alisen Chung has updated the pull request incrementally with one additional commit since the last revision: add manual tag ------------- Changes: - all: https://git.openjdk.org/jdk/pull/24703/files - new: https://git.openjdk.org/jdk/pull/24703/files/485c20f0..f042599c Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=24703&range=06 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=24703&range=05-06 Stats: 1 line in 1 file changed: 0 ins; 0 del; 1 mod Patch: https://git.openjdk.org/jdk/pull/24703.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/24703/head:pull/24703 PR: https://git.openjdk.org/jdk/pull/24703 From tr at openjdk.org Tue Apr 22 07:48:10 2025 From: tr at openjdk.org (Tejesh R) Date: Tue, 22 Apr 2025 07:48:10 GMT Subject: Integrated: 8353446: Open source several AWT Menu tests - Batch 2 In-Reply-To: References: Message-ID: On Wed, 16 Apr 2025 10:28:26 GMT, Tejesh R wrote: > Open source these AWT Menu tests: > > java/awt/Menu/OnFlyRepaintMenuTest/OnFlyRepaintMenuTest.java > java/awt/Menu/DestroyMenuTest/DestroyMenuTest.java > java/awt/Menu/MenuAddRemoveCrash/MenuAddRemoveCrash.java > java/awt/Menu/MenuZOrderTest/MenuZOrderTest.java This pull request has now been integrated. Changeset: 17b080b2 Author: Tejesh R URL: https://git.openjdk.org/jdk/commit/17b080b2c90f7fd9986fe38daebb76363d012469 Stats: 596 lines in 5 files changed: 596 ins; 0 del; 0 mod 8353446: Open source several AWT Menu tests - Batch 2 Reviewed-by: abhiscxk ------------- PR: https://git.openjdk.org/jdk/pull/24681 From achung at openjdk.org Tue Apr 22 07:48:57 2025 From: achung at openjdk.org (Alisen Chung) Date: Tue, 22 Apr 2025 07:48:57 GMT Subject: Integrated: 8353685: Open some JComboBox bugs 4 In-Reply-To: References: Message-ID: On Thu, 17 Apr 2025 17:56:45 GMT, Alisen Chung wrote: > Updating and opening some JComboBox bugs This pull request has now been integrated. Changeset: 0b2a2f38 Author: Alisen Chung URL: https://git.openjdk.org/jdk/commit/0b2a2f38d0b0133a562a898836d7a1b2dbd73a5e Stats: 255 lines in 3 files changed: 255 ins; 0 del; 0 mod 8353685: Open some JComboBox bugs 4 Reviewed-by: honkar, kizune ------------- PR: https://git.openjdk.org/jdk/pull/24733 From tr at openjdk.org Tue Apr 22 07:58:04 2025 From: tr at openjdk.org (Tejesh R) Date: Tue, 22 Apr 2025 07:58:04 GMT Subject: RFR: 8353445: Open source several AWT Menu tests - Batch 1 [v9] In-Reply-To: References: Message-ID: > Open source these AWT Menu tests: > > java/awt/Menu/MenuVisibilityTest/MenuVisibilityTest.java > java/awt/Menu/MenuActionEventTest/MenuActionEventTest.java > java/awt/Menu/RmInHideTest/RmInHideTest.java > java/awt/Menu/SetShortCutTest/SetShortCutTest.java Tejesh R has updated the pull request with a new target base due to a merge or a rebase. The pull request now contains 10 commits: - Resolve merge conflict - Empty commit - Updated review comments - Updated review comments - Updated review comments - Update review comments - Update PL - Update PL - Updated review comments - Open source ------------- Changes: https://git.openjdk.org/jdk/pull/24649/files Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=24649&range=08 Stats: 454 lines in 5 files changed: 454 ins; 0 del; 0 mod Patch: https://git.openjdk.org/jdk/pull/24649.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/24649/head:pull/24649 PR: https://git.openjdk.org/jdk/pull/24649 From abhiscxk at openjdk.org Tue Apr 22 07:58:04 2025 From: abhiscxk at openjdk.org (Abhishek Kumar) Date: Tue, 22 Apr 2025 07:58:04 GMT Subject: RFR: 8353445: Open source several AWT Menu tests - Batch 1 [v9] In-Reply-To: References: Message-ID: On Tue, 22 Apr 2025 07:55:13 GMT, Tejesh R wrote: >> Open source these AWT Menu tests: >> >> java/awt/Menu/MenuVisibilityTest/MenuVisibilityTest.java >> java/awt/Menu/MenuActionEventTest/MenuActionEventTest.java >> java/awt/Menu/RmInHideTest/RmInHideTest.java >> java/awt/Menu/SetShortCutTest/SetShortCutTest.java > > Tejesh R has updated the pull request with a new target base due to a merge or a rebase. The pull request now contains 10 commits: > > - Resolve merge conflict > - Empty commit > - Updated review comments > - Updated review comments > - Updated review comments > - Update review comments > - Update PL > - Update PL > - Updated review comments > - Open source Marked as reviewed by abhiscxk (Reviewer). ------------- PR Review: https://git.openjdk.org/jdk/pull/24649#pullrequestreview-2783181703 From achung at openjdk.org Tue Apr 22 07:59:47 2025 From: achung at openjdk.org (Alisen Chung) Date: Tue, 22 Apr 2025 07:59:47 GMT Subject: RFR: 8353007: Open some JComboBox bugs 2 [v6] In-Reply-To: References: Message-ID: > Updating and opening some tests Alisen Chung 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 11 additional commits since the last revision: - manual tag - update tests - Merge branch 'master' of https://github.com/openjdk/jdk into 2025tsb_2 - reduce number of rows - update to PassFailJFrame.forceFail - update to PassFailJFrame.forceFail - update tests - update jtreg - add rows, remove headful key - add rows - ... and 1 more: https://git.openjdk.org/jdk/compare/fbd7be4d...a4471e59 ------------- Changes: - all: https://git.openjdk.org/jdk/pull/24496/files - new: https://git.openjdk.org/jdk/pull/24496/files/e53b046c..a4471e59 Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=24496&range=05 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=24496&range=04-05 Stats: 502938 lines in 8313 files changed: 171566 ins; 287054 del; 44318 mod Patch: https://git.openjdk.org/jdk/pull/24496.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/24496/head:pull/24496 PR: https://git.openjdk.org/jdk/pull/24496 From achung at openjdk.org Tue Apr 22 07:59:49 2025 From: achung at openjdk.org (Alisen Chung) Date: Tue, 22 Apr 2025 07:59:49 GMT Subject: RFR: 8353007: Open some JComboBox bugs 2 [v5] In-Reply-To: <-WD2pfFwnlzwP8PLQkDsQBkhYC_ZmpFB74CduoxbFmY=.88f0c35a-5e64-4cc7-a1a1-0fa9da1551fd@github.com> References: <-WD2pfFwnlzwP8PLQkDsQBkhYC_ZmpFB74CduoxbFmY=.88f0c35a-5e64-4cc7-a1a1-0fa9da1551fd@github.com> Message-ID: On Mon, 21 Apr 2025 22:58:37 GMT, Alisen Chung wrote: >> Updating and opening some tests > > Alisen Chung has updated the pull request incrementally with one additional commit since the last revision: > > reduce number of rows updated. please re-review ------------- PR Comment: https://git.openjdk.org/jdk/pull/24496#issuecomment-2820483784 From achung at openjdk.org Tue Apr 22 08:02:22 2025 From: achung at openjdk.org (Alisen Chung) Date: Tue, 22 Apr 2025 08:02:22 GMT Subject: Integrated: 8354095: Open some JTable bugs 5 In-Reply-To: <4t0GC0P2HhS-hgc6dNndlsbTxaliBcWUqSypiPPb7cw=.ea094f23-779a-45f5-a4ab-85c6e76841a6@github.com> References: <4t0GC0P2HhS-hgc6dNndlsbTxaliBcWUqSypiPPb7cw=.ea094f23-779a-45f5-a4ab-85c6e76841a6@github.com> Message-ID: On Thu, 17 Apr 2025 18:02:32 GMT, Alisen Chung wrote: > Updating and opening some JTable bugs This pull request has now been integrated. Changeset: 7eab2d9f Author: Alisen Chung URL: https://git.openjdk.org/jdk/commit/7eab2d9f9140a27f7a5c5e0a57b9e6a256558690 Stats: 460 lines in 4 files changed: 460 ins; 0 del; 0 mod 8354095: Open some JTable bugs 5 Reviewed-by: kizune, honkar ------------- PR: https://git.openjdk.org/jdk/pull/24734 From tr at openjdk.org Tue Apr 22 08:02:57 2025 From: tr at openjdk.org (Tejesh R) Date: Tue, 22 Apr 2025 08:02:57 GMT Subject: Integrated: 8353445: Open source several AWT Menu tests - Batch 1 In-Reply-To: References: Message-ID: <8GuDAZETnK9PjE2TDbIhidmZIDrALSYAzMS9VNuE9wg=.aad0b549-9e11-4ac7-8f5e-f73d319f88e6@github.com> On Tue, 15 Apr 2025 06:14:33 GMT, Tejesh R wrote: > Open source these AWT Menu tests: > > java/awt/Menu/MenuVisibilityTest/MenuVisibilityTest.java > java/awt/Menu/MenuActionEventTest/MenuActionEventTest.java > java/awt/Menu/RmInHideTest/RmInHideTest.java > java/awt/Menu/SetShortCutTest/SetShortCutTest.java This pull request has now been integrated. Changeset: 367bcc5d Author: Tejesh R URL: https://git.openjdk.org/jdk/commit/367bcc5df83722231106b635068a17f92404477b Stats: 454 lines in 5 files changed: 454 ins; 0 del; 0 mod 8353445: Open source several AWT Menu tests - Batch 1 Reviewed-by: abhiscxk, prr ------------- PR: https://git.openjdk.org/jdk/pull/24649 From achung at openjdk.org Tue Apr 22 09:01:58 2025 From: achung at openjdk.org (Alisen Chung) Date: Tue, 22 Apr 2025 09:01:58 GMT Subject: Integrated: 8354341: Open some JTable bugs 7 In-Reply-To: <-A3k5m01IIlys1qXXQIqzcxRaGuGnVK2KMZ33Et4vmM=.c53f6d63-6829-41d9-852c-e436344348eb@github.com> References: <-A3k5m01IIlys1qXXQIqzcxRaGuGnVK2KMZ33Et4vmM=.c53f6d63-6829-41d9-852c-e436344348eb@github.com> Message-ID: On Thu, 17 Apr 2025 19:11:06 GMT, Alisen Chung wrote: > Updating and opening some JTable bugs This pull request has now been integrated. Changeset: 9eeb86d9 Author: Alisen Chung URL: https://git.openjdk.org/jdk/commit/9eeb86d972ac4cc38d923b2b868b426bbd27a4e8 Stats: 272 lines in 4 files changed: 263 ins; 0 del; 9 mod 8354341: Open some JTable bugs 7 Reviewed-by: kizune, serb ------------- PR: https://git.openjdk.org/jdk/pull/24739 From tr at openjdk.org Tue Apr 22 09:30:27 2025 From: tr at openjdk.org (Tejesh R) Date: Tue, 22 Apr 2025 09:30:27 GMT Subject: RFR: 8354248: Open source several AWT GridBagLayout and List tests [v5] In-Reply-To: References: Message-ID: > Open source these AWT GridBagLayout and List tests: > > java/awt/GridBagLayout/ComponentShortage/ComponentShortage.java > java/awt/List/ListScrollbarCursorTest/ListScrollbarCursorTest.java > java/awt/List/ListScrollbarTest/ListScrollbarTest.java Tejesh R has updated the pull request incrementally with one additional commit since the last revision: Updated PL for failure test ------------- Changes: - all: https://git.openjdk.org/jdk/pull/24749/files - new: https://git.openjdk.org/jdk/pull/24749/files/46e3848a..f4d1b134 Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=24749&range=04 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=24749&range=03-04 Stats: 1 line in 1 file changed: 1 ins; 0 del; 0 mod Patch: https://git.openjdk.org/jdk/pull/24749.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/24749/head:pull/24749 PR: https://git.openjdk.org/jdk/pull/24749 From abhiscxk at openjdk.org Tue Apr 22 09:36:47 2025 From: abhiscxk at openjdk.org (Abhishek Kumar) Date: Tue, 22 Apr 2025 09:36:47 GMT Subject: RFR: 8354248: Open source several AWT GridBagLayout and List tests [v5] In-Reply-To: References: Message-ID: On Tue, 22 Apr 2025 09:30:27 GMT, Tejesh R wrote: >> Open source these AWT GridBagLayout and List tests: >> >> java/awt/GridBagLayout/ComponentShortage/ComponentShortage.java >> java/awt/List/ListScrollbarCursorTest/ListScrollbarCursorTest.java >> java/awt/List/ListScrollbarTest/ListScrollbarTest.java > > Tejesh R has updated the pull request incrementally with one additional commit since the last revision: > > Updated PL for failure test @TejeshR13 You can add a short description `why this test is problem-listed and the tracking bug-id`. ------------- PR Comment: https://git.openjdk.org/jdk/pull/24749#issuecomment-2820743997 From tr at openjdk.org Tue Apr 22 09:46:41 2025 From: tr at openjdk.org (Tejesh R) Date: Tue, 22 Apr 2025 09:46:41 GMT Subject: RFR: 8354248: Open source several AWT GridBagLayout and List tests [v5] In-Reply-To: References: Message-ID: On Tue, 22 Apr 2025 09:34:32 GMT, Abhishek Kumar wrote: > @TejeshR13 You can add a short description `why this test is problem-listed and the tracking bug-id`. Updated. ------------- PR Comment: https://git.openjdk.org/jdk/pull/24749#issuecomment-2820771839 From tr at openjdk.org Tue Apr 22 10:45:53 2025 From: tr at openjdk.org (Tejesh R) Date: Tue, 22 Apr 2025 10:45:53 GMT Subject: RFR: 8139228: JFileChooser renders file names as HTML document In-Reply-To: References: Message-ID: On Fri, 18 Apr 2025 23:15:09 GMT, Sergey Bylokhov wrote: >> Dependant on L&F I hope. > >> Because it's impossible to create a file with `` in the name on Windows. > > But is should be possible to trigger the bug using a custom FileSystemView without interacting with the actual file system? @mrserb You mean to say that, same issue would be their for Windows L&F too, since we are unable to test it directly it's been missed ? ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/24439#discussion_r2053850620 From abhiscxk at openjdk.org Tue Apr 22 12:01:50 2025 From: abhiscxk at openjdk.org (Abhishek Kumar) Date: Tue, 22 Apr 2025 12:01:50 GMT Subject: RFR: 8355179: Reinstate javax/swing/JScrollBar/4865918/bug4865918.java headful and macos run In-Reply-To: References: Message-ID: On Mon, 21 Apr 2025 11:29:03 GMT, Prasanta Sadhukhan wrote: > Now that CI linux system is transitioned, the [JDK-8346828](https://bugs.openjdk.org/browse/JDK-8346828) changes is reverted and test is made headful and run on all platforms including macos. > CI testing is ok now.. test/jdk/javax/swing/JScrollBar/4865918/bug4865918.java line 1: > 1: /* If the test is restored to it's previous version, is it correct to restore copyright year also ? test/jdk/javax/swing/JScrollBar/4865918/bug4865918.java line 1: > 1: /* If the test is restored to it's previous version, is it correct to restore copyright year also ? test/jdk/javax/swing/JScrollBar/4865918/bug4865918.java line 35: > 33: import java.awt.event.MouseAdapter; > 34: import java.awt.event.MouseEvent; > 35: import java.awt.Robot; Suggestion: import java.awt.Dimension; import java.awt.Robot; import java.awt.event.MouseAdapter; import java.awt.event.MouseEvent; test/jdk/javax/swing/JScrollBar/4865918/bug4865918.java line 88: > 86: > 87: private static void createAndShowGUI() { > 88: frame = new JFrame("bug4865918"); `frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);` was set in the initial test but not now. Is it required to restore? Also there was a delay of 200ms after waiting for timeout, that is also not restored. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/24774#discussion_r2053963164 PR Review Comment: https://git.openjdk.org/jdk/pull/24774#discussion_r2053963646 PR Review Comment: https://git.openjdk.org/jdk/pull/24774#discussion_r2053941270 PR Review Comment: https://git.openjdk.org/jdk/pull/24774#discussion_r2053961358 From abhiscxk at openjdk.org Tue Apr 22 12:23:41 2025 From: abhiscxk at openjdk.org (Abhishek Kumar) Date: Tue, 22 Apr 2025 12:23:41 GMT Subject: RFR: 8354248: Open source several AWT GridBagLayout and List tests [v5] In-Reply-To: References: Message-ID: <30qM175TYkaWYFsnRkL8tAeaoTyiTZw6hD_i6Njau7E=.4d7ddeb0-0328-4c27-8208-677765a2f458@github.com> On Tue, 22 Apr 2025 09:30:27 GMT, Tejesh R wrote: >> Open source these AWT GridBagLayout and List tests: >> >> java/awt/GridBagLayout/ComponentShortage/ComponentShortage.java >> java/awt/List/ListScrollbarCursorTest/ListScrollbarCursorTest.java >> java/awt/List/ListScrollbarTest/ListScrollbarTest.java >> >> ComponentShortage.java test fails in Windows and linux after converting to main based. On investigation its found that the test was not running through jtreg, it failed to run with this error - >> `Error: Not a test or directory containing tests: java/awt/GridBagLayout/ComponentShortage/ComponentShortage.html >> ` >> Hence it was gone unnoticed without been problem listed. >> I've created a new JBS for this issue since it needs further investigation - [JDK-8355280](https://bugs.openjdk.org/browse/JDK-8355280) . > > Tejesh R has updated the pull request incrementally with one additional commit since the last revision: > > Updated PL for failure test Marked as reviewed by abhiscxk (Reviewer). ------------- PR Review: https://git.openjdk.org/jdk/pull/24749#pullrequestreview-2783917066 From psadhukhan at openjdk.org Tue Apr 22 12:35:42 2025 From: psadhukhan at openjdk.org (Prasanta Sadhukhan) Date: Tue, 22 Apr 2025 12:35:42 GMT Subject: RFR: 8355179: Reinstate javax/swing/JScrollBar/4865918/bug4865918.java headful and macos run In-Reply-To: References: Message-ID: On Tue, 22 Apr 2025 11:58:51 GMT, Abhishek Kumar wrote: >> Now that CI linux system is transitioned, the [JDK-8346828](https://bugs.openjdk.org/browse/JDK-8346828) changes is reverted and test is made headful and run on all platforms including macos. >> CI testing is ok now.. > > test/jdk/javax/swing/JScrollBar/4865918/bug4865918.java line 1: > >> 1: /* > > If the test is restored to it's previous version, is it correct to restore copyright year also ? Few unneeded changes like setDefaultCLoseOperation were not taken in and there's no need of additional delay..so copyright year change is needed > test/jdk/javax/swing/JScrollBar/4865918/bug4865918.java line 35: > >> 33: import java.awt.event.MouseAdapter; >> 34: import java.awt.event.MouseEvent; >> 35: import java.awt.Robot; > > Suggestion: > > import java.awt.Dimension; > import java.awt.Robot; > import java.awt.event.MouseAdapter; > import java.awt.event.MouseEvent; I guess my sorting is right.. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/24774#discussion_r2054017488 PR Review Comment: https://git.openjdk.org/jdk/pull/24774#discussion_r2054019818 From psadhukhan at openjdk.org Tue Apr 22 12:57:21 2025 From: psadhukhan at openjdk.org (Prasanta Sadhukhan) Date: Tue, 22 Apr 2025 12:57:21 GMT Subject: RFR: 8355179: Reinstate javax/swing/JScrollBar/4865918/bug4865918.java headful and macos run [v2] In-Reply-To: References: Message-ID: > Now that CI linux system is transitioned, the [JDK-8346828](https://bugs.openjdk.org/browse/JDK-8346828) changes is reverted and test is made headful and run on all platforms including macos. > CI testing is ok now.. Prasanta Sadhukhan has updated the pull request incrementally with one additional commit since the last revision: sorting ------------- Changes: - all: https://git.openjdk.org/jdk/pull/24774/files - new: https://git.openjdk.org/jdk/pull/24774/files/42a869c2..926c576c Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=24774&range=01 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=24774&range=00-01 Stats: 2 lines in 1 file changed: 1 ins; 1 del; 0 mod Patch: https://git.openjdk.org/jdk/pull/24774.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/24774/head:pull/24774 PR: https://git.openjdk.org/jdk/pull/24774 From psadhukhan at openjdk.org Tue Apr 22 12:57:21 2025 From: psadhukhan at openjdk.org (Prasanta Sadhukhan) Date: Tue, 22 Apr 2025 12:57:21 GMT Subject: RFR: 8355179: Reinstate javax/swing/JScrollBar/4865918/bug4865918.java headful and macos run [v2] In-Reply-To: References: Message-ID: On Tue, 22 Apr 2025 12:33:14 GMT, Prasanta Sadhukhan wrote: >> test/jdk/javax/swing/JScrollBar/4865918/bug4865918.java line 35: >> >>> 33: import java.awt.event.MouseAdapter; >>> 34: import java.awt.event.MouseEvent; >>> 35: import java.awt.Robot; >> >> Suggestion: >> >> import java.awt.Dimension; >> import java.awt.Robot; >> import java.awt.event.MouseAdapter; >> import java.awt.event.MouseEvent; > > I guess my sorting is right.. ok I see it is being done in other files so modified.. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/24774#discussion_r2054056238 From tr at openjdk.org Tue Apr 22 12:58:04 2025 From: tr at openjdk.org (Tejesh R) Date: Tue, 22 Apr 2025 12:58:04 GMT Subject: RFR: 8354248: Open source several AWT GridBagLayout and List tests [v6] In-Reply-To: References: Message-ID: > Open source these AWT GridBagLayout and List tests: > > java/awt/GridBagLayout/ComponentShortage/ComponentShortage.java > java/awt/List/ListScrollbarCursorTest/ListScrollbarCursorTest.java > java/awt/List/ListScrollbarTest/ListScrollbarTest.java > > ComponentShortage.java test fails in Windows and linux after converting to main based. On investigation its found that the test was not running through jtreg, it failed to run with this error - > `Error: Not a test or directory containing tests: java/awt/GridBagLayout/ComponentShortage/ComponentShortage.html > ` > Hence it was gone unnoticed without been problem listed. > I've created a new JBS for this issue since it needs further investigation - [JDK-8355280](https://bugs.openjdk.org/browse/JDK-8355280) . Tejesh R has updated the pull request incrementally with one additional commit since the last revision: Update PL ------------- Changes: - all: https://git.openjdk.org/jdk/pull/24749/files - new: https://git.openjdk.org/jdk/pull/24749/files/f4d1b134..d8e3c951 Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=24749&range=05 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=24749&range=04-05 Stats: 1 line in 1 file changed: 0 ins; 0 del; 1 mod Patch: https://git.openjdk.org/jdk/pull/24749.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/24749/head:pull/24749 PR: https://git.openjdk.org/jdk/pull/24749 From kizune at openjdk.org Tue Apr 22 15:20:48 2025 From: kizune at openjdk.org (Alexander Zuev) Date: Tue, 22 Apr 2025 15:20:48 GMT Subject: RFR: 8353007: Open some JComboBox bugs 2 [v6] In-Reply-To: References: Message-ID: On Tue, 22 Apr 2025 07:59:47 GMT, Alisen Chung wrote: >> Updating and opening some tests > > Alisen Chung 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 11 additional commits since the last revision: > > - manual tag > - update tests > - Merge branch 'master' of https://github.com/openjdk/jdk into 2025tsb_2 > - reduce number of rows > - update to PassFailJFrame.forceFail > - update to PassFailJFrame.forceFail > - update tests > - update jtreg > - add rows, remove headful key > - add rows > - ... and 1 more: https://git.openjdk.org/jdk/compare/b5e8ee96...a4471e59 Marked as reviewed by kizune (Reviewer). ------------- PR Review: https://git.openjdk.org/jdk/pull/24496#pullrequestreview-2784489340 From kizune at openjdk.org Tue Apr 22 15:21:44 2025 From: kizune at openjdk.org (Alexander Zuev) Date: Tue, 22 Apr 2025 15:21:44 GMT Subject: RFR: 8354466: Open some misc Swing bugs 9 [v7] In-Reply-To: References: Message-ID: On Tue, 22 Apr 2025 07:46:47 GMT, Alisen Chung wrote: >> Updating and opening some misc swing bugs > > Alisen Chung has updated the pull request incrementally with one additional commit since the last revision: > > add manual tag Marked as reviewed by kizune (Reviewer). ------------- PR Review: https://git.openjdk.org/jdk/pull/24703#pullrequestreview-2784494206 From kizune at openjdk.org Tue Apr 22 15:25:50 2025 From: kizune at openjdk.org (Alexander Zuev) Date: Tue, 22 Apr 2025 15:25:50 GMT Subject: RFR: 8353488: Open some JComboBox bugs 3 [v3] In-Reply-To: References: Message-ID: On Mon, 21 Apr 2025 23:02:13 GMT, Alisen Chung wrote: >> Opening some JComboBox bugs > > Alisen Chung has updated the pull request incrementally with one additional commit since the last revision: > > add volatile test/jdk/javax/swing/JComboBox/bug4436376.java line 44: > 42: static JFrame frame; > 43: static volatile Point p; > 44: static volatile JComboBox combo; Making Swing object volatile does not mean that calling its methods not from EDT is Ok. As a solution you can perform the entire check block together with throwing an exception inside the invokeAndWait block. Same with the second test. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/24767#discussion_r2054351732 From aivanov at openjdk.org Tue Apr 22 15:25:53 2025 From: aivanov at openjdk.org (Alexey Ivanov) Date: Tue, 22 Apr 2025 15:25:53 GMT Subject: RFR: 8348760: RadioButton is not shown if JRadioButtonMenuItem is rendered with ImageIcon in WindowsLookAndFeel [v24] In-Reply-To: References: <_OqONGmbeH9KtcJvhT_kMpl5xZ8hTN-VvOat7vWFjsI=.c0bb8661-5c33-433c-a722-a39153f63df2@github.com> Message-ID: On Wed, 12 Mar 2025 11:00:30 GMT, Prasanta Sadhukhan wrote: >> When JRadioButtonMenuItem is called with imageIcon, then only imageIcon is shown without radiobutton in WIndowsLookAndFeel as there was no provision of drawing the radiobutton alongside icon. >> If icon is not there, the radiobutton is drawn. Added provision of drawing the radiobutton windows Skin even when imageIcon is present. > > Prasanta Sadhukhan has updated the pull request incrementally with one additional commit since the last revision: > > Review comments fix I'm pretty sure the previous code was correct. You can combine both `MIIM_STRING | MIIM_BITMAP` for `MENUITEMINFO` but you couldn't and can't combine `MFT_BITMAP`, `MFT_SEPARATOR` with `MFT_STRING`. `MIIM_BITMAP` is a new flag for `hbmpItem` that was added in Windows 98 and wasn't available in Windows 95 which used only `MFT_BITMAP` or `MFT_STRING`. Yet I still didn't have enough time to look thoroughly at this native sample as well as the updates to JDK code. ------------- PR Comment: https://git.openjdk.org/jdk/pull/23324#issuecomment-2821687030 From achung at openjdk.org Tue Apr 22 15:29:53 2025 From: achung at openjdk.org (Alisen Chung) Date: Tue, 22 Apr 2025 15:29:53 GMT Subject: Integrated: 8354466: Open some misc Swing bugs 9 In-Reply-To: References: Message-ID: <4EJIIpUaplcdoRmuSKX1m5pDV3E1BXpNSv6yFZiKD-M=.f6e58046-fc5a-4d25-bd12-fb655d537ef8@github.com> On Wed, 16 Apr 2025 23:19:31 GMT, Alisen Chung wrote: > Updating and opening some misc swing bugs This pull request has now been integrated. Changeset: da16c839 Author: Alisen Chung URL: https://git.openjdk.org/jdk/commit/da16c839735bbf79ece4967f95a98208f74b7f73 Stats: 180 lines in 2 files changed: 180 ins; 0 del; 0 mod 8354466: Open some misc Swing bugs 9 Reviewed-by: kizune, honkar ------------- PR: https://git.openjdk.org/jdk/pull/24703 From aivanov at openjdk.org Tue Apr 22 15:31:48 2025 From: aivanov at openjdk.org (Alexey Ivanov) Date: Tue, 22 Apr 2025 15:31:48 GMT Subject: RFR: 8348760: RadioButton is not shown if JRadioButtonMenuItem is rendered with ImageIcon in WindowsLookAndFeel [v24] In-Reply-To: References: <_OqONGmbeH9KtcJvhT_kMpl5xZ8hTN-VvOat7vWFjsI=.c0bb8661-5c33-433c-a722-a39153f63df2@github.com> Message-ID: On Wed, 12 Mar 2025 11:00:30 GMT, Prasanta Sadhukhan wrote: >> When JRadioButtonMenuItem is called with imageIcon, then only imageIcon is shown without radiobutton in WIndowsLookAndFeel as there was no provision of drawing the radiobutton alongside icon. >> If icon is not there, the radiobutton is drawn. Added provision of drawing the radiobutton windows Skin even when imageIcon is present. > > Prasanta Sadhukhan has updated the pull request incrementally with one additional commit since the last revision: > > Review comments fix As far as I can see from Prasanta's and Alex's screenshots, Swing renders the icons exactly as native Win32 apps would unless menu items are owner-drawn. > Then I guess we can safely say Windows 11 has introduced this "regression" of not highlighting the selected radio/checkmenuitem and can raise a WIndows platform ticket This is what I've been saying from the start of this PR. Windows 11 skin for menus has lost the highlight for the checked menu item ? whether it's a single selection radio-check or multiple selection checkbox-style check. This affects both Swing rendering and Win32 apps that use `MIIM_STRING | MIIM_BITMAP` and `hbmpItem` member of the `MENUITEMINFO` structure. We may seek clarification from Microsoft. ------------- PR Comment: https://git.openjdk.org/jdk/pull/23324#issuecomment-2821704740 From achung at openjdk.org Tue Apr 22 15:33:05 2025 From: achung at openjdk.org (Alisen Chung) Date: Tue, 22 Apr 2025 15:33:05 GMT Subject: RFR: 8353488: Open some JComboBox bugs 3 [v4] In-Reply-To: References: Message-ID: > Opening some JComboBox bugs Alisen Chung 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 six additional commits since the last revision: - update test check fail on EDT - Merge branch 'master' of https://github.com/openjdk/jdk into 2025tsb_3 - add volatile - add robot keyrelease - update jtreg paths - opening tests ------------- Changes: - all: https://git.openjdk.org/jdk/pull/24767/files - new: https://git.openjdk.org/jdk/pull/24767/files/44b3691d..dc34a3c0 Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=24767&range=03 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=24767&range=02-03 Stats: 24562 lines in 439 files changed: 20485 ins; 2760 del; 1317 mod Patch: https://git.openjdk.org/jdk/pull/24767.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/24767/head:pull/24767 PR: https://git.openjdk.org/jdk/pull/24767 From achung at openjdk.org Tue Apr 22 15:33:05 2025 From: achung at openjdk.org (Alisen Chung) Date: Tue, 22 Apr 2025 15:33:05 GMT Subject: RFR: 8353488: Open some JComboBox bugs 3 [v3] In-Reply-To: References: Message-ID: On Tue, 22 Apr 2025 15:22:50 GMT, Alexander Zuev wrote: >> Alisen Chung has updated the pull request incrementally with one additional commit since the last revision: >> >> add volatile > > test/jdk/javax/swing/JComboBox/bug4436376.java line 44: > >> 42: static JFrame frame; >> 43: static volatile Point p; >> 44: static volatile JComboBox combo; > > Making Swing object volatile does not mean that calling its methods not from EDT is Ok. As a solution you can perform the entire check block together with throwing an exception inside the invokeAndWait block. Same with the second test. done ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/24767#discussion_r2054364180 From aivanov at openjdk.org Tue Apr 22 15:37:47 2025 From: aivanov at openjdk.org (Alexey Ivanov) Date: Tue, 22 Apr 2025 15:37:47 GMT Subject: RFR: 8139228: JFileChooser renders file names as HTML document In-Reply-To: References: Message-ID: On Tue, 22 Apr 2025 10:42:42 GMT, Tejesh R wrote: >>> Because it's impossible to create a file with `` in the name on Windows. >> >> But is should be possible to trigger the bug using a custom FileSystemView without interacting with the actual file system? > > @mrserb You mean to say that, same issue would be their for Windows L&F too, since we are unable to test it directly it's been missed ? > > Because it's impossible to create a file with `` in the name on Windows. > > But is should be possible to trigger the bug using a custom FileSystemView without interacting with the actual file system? An interesting idea. Using a custom `FileSystemView` for testing on Windows should be explored. > @mrserb You mean to say that, same issue would be their for Windows L&F too, since we are unable to test it directly it's been missed ? @TejeshR13 I'm pretty sure Windows L&F is affected too. You could remediated the issue by setting `"html.disable"` on `FilePane`, but it may be not enough as you also modified `FileChooserUI` for each L&F. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/24439#discussion_r2054373966 From abhiscxk at openjdk.org Tue Apr 22 15:37:48 2025 From: abhiscxk at openjdk.org (Abhishek Kumar) Date: Tue, 22 Apr 2025 15:37:48 GMT Subject: RFR: 8354248: Open source several AWT GridBagLayout and List tests [v6] In-Reply-To: References: Message-ID: <9l-V67Za_wkViNmIv6m6M7dGqSQRky3XMfMNKxQMH-A=.5b764578-7b82-43df-a6d1-720679b6046c@github.com> On Tue, 22 Apr 2025 12:58:04 GMT, Tejesh R wrote: >> Open source these AWT GridBagLayout and List tests: >> >> java/awt/GridBagLayout/ComponentShortage/ComponentShortage.java >> java/awt/List/ListScrollbarCursorTest/ListScrollbarCursorTest.java >> java/awt/List/ListScrollbarTest/ListScrollbarTest.java >> >> ComponentShortage.java test fails in Windows and linux after converting to main based. On investigation its found that the test was not running through jtreg, it failed to run with this error - >> `Error: Not a test or directory containing tests: java/awt/GridBagLayout/ComponentShortage/ComponentShortage.html >> ` >> Hence it was gone unnoticed without been problem listed. >> I've created a new JBS for this issue since it needs further investigation - [JDK-8355280](https://bugs.openjdk.org/browse/JDK-8355280) . > > Tejesh R has updated the pull request incrementally with one additional commit since the last revision: > > Update PL Marked as reviewed by abhiscxk (Reviewer). ------------- PR Review: https://git.openjdk.org/jdk/pull/24749#pullrequestreview-2784538604 From kizune at openjdk.org Tue Apr 22 15:40:41 2025 From: kizune at openjdk.org (Alexander Zuev) Date: Tue, 22 Apr 2025 15:40:41 GMT Subject: RFR: 8353488: Open some JComboBox bugs 3 [v4] In-Reply-To: References: Message-ID: On Tue, 22 Apr 2025 15:33:05 GMT, Alisen Chung wrote: >> Opening some JComboBox bugs > > Alisen Chung 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 six additional commits since the last revision: > > - update test check fail on EDT > - Merge branch 'master' of https://github.com/openjdk/jdk into 2025tsb_3 > - add volatile > - add robot keyrelease > - update jtreg paths > - opening tests Marked as reviewed by kizune (Reviewer). ------------- PR Review: https://git.openjdk.org/jdk/pull/24767#pullrequestreview-2784547742 From aivanov at openjdk.org Tue Apr 22 15:41:55 2025 From: aivanov at openjdk.org (Alexey Ivanov) Date: Tue, 22 Apr 2025 15:41:55 GMT Subject: RFR: 8343977: Convert java/awt/TextArea/TextAreaCursorTest/HoveringAndDraggingTest to main [v5] In-Reply-To: References: Message-ID: On Tue, 26 Nov 2024 17:20:25 GMT, Damon Nguyen wrote: > I also tried running on win11 after Abhishek's find. Looks like he's right. Looking at your changes, I don't see a `setCursor` anywhere, so it probably has something to do with `PassFailJFrame`. The only other difference in your changes I see is the `StringBuilder`, but that seems unlikely to be the cause. @TejeshR13 You could've waited for review from Abhishek or Damon who had brought up the problem before integrating. I also wonder how and why usage of `PassFailJFrame` affects the behaviour of the test. If could well be a bug in JDK? ------------- PR Comment: https://git.openjdk.org/jdk/pull/22026#issuecomment-2821733591 From abhiscxk at openjdk.org Tue Apr 22 15:47:59 2025 From: abhiscxk at openjdk.org (Abhishek Kumar) Date: Tue, 22 Apr 2025 15:47:59 GMT Subject: RFR: 8355179: Reinstate javax/swing/JScrollBar/4865918/bug4865918.java headful and macos run [v2] In-Reply-To: References: Message-ID: On Tue, 22 Apr 2025 12:57:21 GMT, Prasanta Sadhukhan wrote: >> Now that CI linux system is transitioned, the [JDK-8346828](https://bugs.openjdk.org/browse/JDK-8346828) changes is reverted and test is made headful and run on all platforms including macos. >> CI testing is ok now.. > > Prasanta Sadhukhan has updated the pull request incrementally with one additional commit since the last revision: > > sorting Looks good to me. ------------- Marked as reviewed by abhiscxk (Reviewer). PR Review: https://git.openjdk.org/jdk/pull/24774#pullrequestreview-2784567102 From abhiscxk at openjdk.org Tue Apr 22 15:47:59 2025 From: abhiscxk at openjdk.org (Abhishek Kumar) Date: Tue, 22 Apr 2025 15:47:59 GMT Subject: RFR: 8355179: Reinstate javax/swing/JScrollBar/4865918/bug4865918.java headful and macos run [v2] In-Reply-To: References: Message-ID: On Tue, 22 Apr 2025 12:31:51 GMT, Prasanta Sadhukhan wrote: >> test/jdk/javax/swing/JScrollBar/4865918/bug4865918.java line 1: >> >>> 1: /* >> >> If the test is restored to it's previous version, is it correct to restore copyright year also ? > > Few unneeded changes like setDefaultCLoseOperation were not taken in and there's no need of additional delay..so copyright year change is needed I agree if it is not exactly same as previous version, copyright year change is required. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/24774#discussion_r2054390296 From azvegint at openjdk.org Tue Apr 22 15:48:50 2025 From: azvegint at openjdk.org (Alexander Zvegintsev) Date: Tue, 22 Apr 2025 15:48:50 GMT Subject: Integrated: 8354561: Open source several swing tests batch0 In-Reply-To: References: Message-ID: On Wed, 16 Apr 2025 10:09:48 GMT, Alexander Zvegintsev wrote: > Few more tests open sourced: > > javax/swing/JTextArea/4474400/bug4474400.java > javax/swing/border/TitledBorder/TransparentTitleTest.java > javax/swing/JComboBox/4139900/bug4139900.java > javax/swing/JComboBox/4174876/bug4174876.java This pull request has now been integrated. Changeset: a4c5ed81 Author: Alexander Zvegintsev URL: https://git.openjdk.org/jdk/commit/a4c5ed8144376f7ba0d2cb992da63b3e53d51f8b Stats: 397 lines in 4 files changed: 397 ins; 0 del; 0 mod 8354561: Open source several swing tests batch0 Reviewed-by: prr, psadhukhan ------------- PR: https://git.openjdk.org/jdk/pull/24680 From azvegint at openjdk.org Tue Apr 22 15:48:18 2025 From: azvegint at openjdk.org (Alexander Zvegintsev) Date: Tue, 22 Apr 2025 15:48:18 GMT Subject: RFR: 8354701: Open source few JToolTip tests [v2] In-Reply-To: References: Message-ID: > Few more tests are open sourced: > > - javax/swing/JToolTip/4225314/bug4225314.java manual > - javax/swing/JToolTip/TooltipTest/TooltipTest.java manual > - javax/swing/JToolTip/4255441/bug4255441.java manual Alexander Zvegintsev has updated the pull request incrementally with two additional commits since the last revision: - review comments - review comments ------------- Changes: - all: https://git.openjdk.org/jdk/pull/24708/files - new: https://git.openjdk.org/jdk/pull/24708/files/cdb44bb8..74119df4 Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=24708&range=01 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=24708&range=00-01 Stats: 3 lines in 1 file changed: 0 ins; 0 del; 3 mod Patch: https://git.openjdk.org/jdk/pull/24708.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/24708/head:pull/24708 PR: https://git.openjdk.org/jdk/pull/24708 From serb at openjdk.org Tue Apr 22 15:53:51 2025 From: serb at openjdk.org (Sergey Bylokhov) Date: Tue, 22 Apr 2025 15:53:51 GMT Subject: Integrated: 8352638: Enhance code consistency: java.desktop/windows In-Reply-To: <5qm_Hyp98_iQNlGpxru_EapE3rVlCfTTqVTWyF4zlzI=.450e15f8-7a75-44c2-8916-abd44426566d@github.com> References: <5qm_Hyp98_iQNlGpxru_EapE3rVlCfTTqVTWyF4zlzI=.450e15f8-7a75-44c2-8916-abd44426566d@github.com> Message-ID: <4mG1jxMt7hihhtU_hjPwME3j6k2gamk1QrU4nYAJTRY=.e867d9cf-1eb0-4f76-b4d4-861872a04360@github.com> On Sat, 22 Mar 2025 00:49:25 GMT, Sergey Bylokhov wrote: > The `java.desktop` module currently lacks proper use of the `@Override` annotation for methods and the `final` modifier for classes. While similar changes were previously made in the [JavaSound](https://github.com/openjdk/jdk/commit/e0c7d59246cf36644d494eced76e4b9d96ff1ded#diff-ae3e5f9c40fe25ef03e7a89844de174ef5c15e6179d769e2a4bcb7e73688c9b5) (and some of the classes on demand), these changes are not as critical now due to the new jdk "encapsulation", but they are still useful for improving code consistency. > > To make the code review process easier I have made the following changes: > > 1. I chose `java.desktop/windows` as the starting package because it contains a relatively small number of classes > 2. The public API was not affected so there is no need to worry about a CSR > 3. In a few places I removed the `final` modifier from methods since they were already defined in final classes > > Note: I will submit additional patches in this area later because: > > 1. Only lines with `@Override` and `final` were modified to keep the diff clear - header dates were not updated (that could be covered by one patch similar to [this](https://bugs.openjdk.org/browse/JDK-8345797)) > 2. I skipped adding `@Override` for anonymous classes > > Any feedback or suggestions are welcome! > > Here is a [link](https://patch-diff.githubusercontent.com/raw/openjdk/jdk/pull/24170.diff) to a simple diff file, it might be more convenient for reviewing the changes. > > To download the diff file and filter only the modified lines you can use the following script: > > > curl -s https://patch-diff.githubusercontent.com/raw/openjdk/jdk/pull/24170.diff -o d.txt && grep -E '^+|^-' d.txt > > > The build was successful, and I ran all the open jtreg tests without issues. But it's possible that some closed tests may be affected by these changes. It would be good to verify this by mach5 to ensure everything works as expected. This pull request has now been integrated. Changeset: 477da161 Author: Sergey Bylokhov URL: https://git.openjdk.org/jdk/commit/477da161e62040d77079196ea27d24b27de75b64 Stats: 743 lines in 109 files changed: 543 ins; 0 del; 200 mod 8352638: Enhance code consistency: java.desktop/windows Reviewed-by: prr ------------- PR: https://git.openjdk.org/jdk/pull/24170 From achung at openjdk.org Tue Apr 22 16:04:49 2025 From: achung at openjdk.org (Alisen Chung) Date: Tue, 22 Apr 2025 16:04:49 GMT Subject: Integrated: 8353007: Open some JComboBox bugs 2 In-Reply-To: References: Message-ID: On Tue, 8 Apr 2025 01:53:23 GMT, Alisen Chung wrote: > Updating and opening some tests This pull request has now been integrated. Changeset: 1889dacb Author: Alisen Chung URL: https://git.openjdk.org/jdk/commit/1889dacb1981d3d15174bc5a201e683a6cdab725 Stats: 387 lines in 4 files changed: 387 ins; 0 del; 0 mod 8353007: Open some JComboBox bugs 2 Reviewed-by: kizune, honkar ------------- PR: https://git.openjdk.org/jdk/pull/24496 From honkar at openjdk.org Tue Apr 22 16:07:49 2025 From: honkar at openjdk.org (Harshitha Onkar) Date: Tue, 22 Apr 2025 16:07:49 GMT Subject: RFR: 8354701: Open source few JToolTip tests [v2] In-Reply-To: References: Message-ID: <1wG3bnXA4OKyiEB_fSTGTPrc73kGm962KDVzUehB8Es=.bfae7342-a3a3-47ef-b2fb-c08dda990d82@github.com> On Tue, 22 Apr 2025 15:48:18 GMT, Alexander Zvegintsev wrote: >> Few more tests are open sourced: >> >> - javax/swing/JToolTip/4225314/bug4225314.java manual >> - javax/swing/JToolTip/TooltipTest/TooltipTest.java manual >> - javax/swing/JToolTip/4255441/bug4255441.java manual > > Alexander Zvegintsev has updated the pull request incrementally with two additional commits since the last revision: > > - review comments > - review comments Marked as reviewed by honkar (Reviewer). ------------- PR Review: https://git.openjdk.org/jdk/pull/24708#pullrequestreview-2784620279 From abaya at openjdk.org Tue Apr 22 16:11:28 2025 From: abaya at openjdk.org (Anass Baya) Date: Tue, 22 Apr 2025 16:11:28 GMT Subject: RFR: 8354219 : Automate javax/swing/JComboBox/ComboPopupBug.java [v4] In-Reply-To: References: Message-ID: > This test was designed to manually verify that clicking on the JComboBox when the frame containing it is about to close does not cause an IllegalStateException. > > The test allowed the tester extra time to click on the JComboBox when closing the frame by adding a Thread.sleep() in the close button handler. > > In this test, a JComboBox is displayed with a Close button at the bottom. The tester should click the Close button, then try to click the JComboBox arrow button to display the popup. > > In the automated test, we save the JComboBox location size before closing the frame. We then use this information to click on the JComboBox right before the frame is closed. Anass Baya has updated the pull request incrementally with one additional commit since the last revision: Update Copyright ------------- Changes: - all: https://git.openjdk.org/jdk/pull/24624/files - new: https://git.openjdk.org/jdk/pull/24624/files/a925cc21..7b60535b Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=24624&range=03 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=24624&range=02-03 Stats: 1 line in 1 file changed: 0 ins; 0 del; 1 mod Patch: https://git.openjdk.org/jdk/pull/24624.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/24624/head:pull/24624 PR: https://git.openjdk.org/jdk/pull/24624 From tr at openjdk.org Tue Apr 22 16:14:56 2025 From: tr at openjdk.org (Tejesh R) Date: Tue, 22 Apr 2025 16:14:56 GMT Subject: Integrated: 8354248: Open source several AWT GridBagLayout and List tests In-Reply-To: References: Message-ID: On Fri, 18 Apr 2025 07:45:11 GMT, Tejesh R wrote: > Open source these AWT GridBagLayout and List tests: > > java/awt/GridBagLayout/ComponentShortage/ComponentShortage.java > java/awt/List/ListScrollbarCursorTest/ListScrollbarCursorTest.java > java/awt/List/ListScrollbarTest/ListScrollbarTest.java > > ComponentShortage.java test fails in Windows and linux after converting to main based. On investigation its found that the test was not running through jtreg, it failed to run with this error - > `Error: Not a test or directory containing tests: java/awt/GridBagLayout/ComponentShortage/ComponentShortage.html > ` > Hence it was gone unnoticed without been problem listed. > I've created a new JBS for this issue since it needs further investigation - [JDK-8355280](https://bugs.openjdk.org/browse/JDK-8355280) . This pull request has now been integrated. Changeset: 6a310613 Author: Tejesh R URL: https://git.openjdk.org/jdk/commit/6a310613392b9d619ae1bbe3e663cb4a022165d9 Stats: 368 lines in 4 files changed: 368 ins; 0 del; 0 mod 8354248: Open source several AWT GridBagLayout and List tests Reviewed-by: abhiscxk ------------- PR: https://git.openjdk.org/jdk/pull/24749 From aivanov at openjdk.org Tue Apr 22 16:17:46 2025 From: aivanov at openjdk.org (Alexey Ivanov) Date: Tue, 22 Apr 2025 16:17:46 GMT Subject: RFR: JDK-8353486 : Open source Swing Tests - Set 4 [v8] In-Reply-To: References: Message-ID: On Mon, 21 Apr 2025 17:44:14 GMT, Harshitha Onkar wrote: >> Open-sourced the following Swing tests: >> >> 1. javax/swing/JFileChooser/bug4464774.java >> 2. javax/swing/JFileChooser/bug4522756.java >> 3. javax/swing/JFileChooser/bug4759934.java >> 4. javax/swing/JFileChooser/bug4943900.java >> 5. javax/swing/JOptionPane/bug4194862.java > > Harshitha Onkar has updated the pull request incrementally with one additional commit since the last revision: > > bug4943900 instruction update Looks good except for minor nits. test/jdk/javax/swing/JFileChooser/bug4943900.java line 48: > 46: > 47: 3. Leave the "Text files" item selected and check that the > 48: filter works: only *.txt files can appear in the files list Suggestion: filter works: only *.txt files can appear in the file list. test/jdk/javax/swing/JFileChooser/bug4943900.java line 52: > 50: that contains some *.txt files to ensure they are shown in > 51: the file list. On macOS when the text filter is applied verify > 52: that the non-text files are shown disabled (greyed out). Suggestion: that the non-text files are greyed out. It's more concise, isn't it? ------------- Marked as reviewed by aivanov (Reviewer). PR Review: https://git.openjdk.org/jdk/pull/24456#pullrequestreview-2784635410 PR Review Comment: https://git.openjdk.org/jdk/pull/24456#discussion_r2054432773 PR Review Comment: https://git.openjdk.org/jdk/pull/24456#discussion_r2054433891 From aivanov at openjdk.org Tue Apr 22 16:17:48 2025 From: aivanov at openjdk.org (Alexey Ivanov) Date: Tue, 22 Apr 2025 16:17:48 GMT Subject: RFR: JDK-8353486 : Open source Swing Tests - Set 4 [v6] In-Reply-To: References: <-jaKTmgwNA9JNGIaVqutoIFJKc43PKmNxbni9iAk7Dg=.679497d9-dffe-4af0-8e7f-e517284d2012@github.com> Message-ID: On Mon, 21 Apr 2025 17:11:37 GMT, Harshitha Onkar wrote: >> test/jdk/javax/swing/JFileChooser/bug4943900.java line 57: >> >>> 55: is updated properly. >>> 56: >>> 57: If the FileFilter works correctly, press PASS else press FAIL. >> >> I wonder why so many people use capitals for *Pass* and *Fail*? > > Probably for emphasis All the documentation guides recommend using the same spelling as used on the UI controls themselves. If possible, the control names should be in bold. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/24456#discussion_r2054437073 From tr at openjdk.org Tue Apr 22 16:18:49 2025 From: tr at openjdk.org (Tejesh R) Date: Tue, 22 Apr 2025 16:18:49 GMT Subject: RFR: 8343977: Convert java/awt/TextArea/TextAreaCursorTest/HoveringAndDraggingTest to main [v5] In-Reply-To: References: Message-ID: <8uOqjbaiFsXtH7ihmTxf7HdV1Lax4gqbIR_PsWTuJ-g=.3359ae2b-6c0b-44b4-9b39-8bc0c4de0fb0@github.com> On Tue, 22 Apr 2025 15:39:22 GMT, Alexey Ivanov wrote: > > I also tried running on win11 after Abhishek's find. Looks like he's right. Looking at your changes, I don't see a `setCursor` anywhere, so it probably has something to do with `PassFailJFrame`. The only other difference in your changes I see is the `StringBuilder`, but that seems unlikely to be the cause. > > @TejeshR13 You could've waited for review from Abhishek or Damon who had brought up the problem before integrating. > > I also wonder how and why usage of `PassFailJFrame` affects the behaviour of the test. If could well be a bug in JDK? We can raise a bug separate bug for the issue related to failure when used with 'PassFailJFrame'. Since our focus was to convert to migrate from applet, I didn't analyse it here. ------------- PR Comment: https://git.openjdk.org/jdk/pull/22026#issuecomment-2821833298 From aivanov at openjdk.org Tue Apr 22 16:22:50 2025 From: aivanov at openjdk.org (Alexey Ivanov) Date: Tue, 22 Apr 2025 16:22:50 GMT Subject: RFR: 8343977: Convert java/awt/TextArea/TextAreaCursorTest/HoveringAndDraggingTest to main [v5] In-Reply-To: <8uOqjbaiFsXtH7ihmTxf7HdV1Lax4gqbIR_PsWTuJ-g=.3359ae2b-6c0b-44b4-9b39-8bc0c4de0fb0@github.com> References: <8uOqjbaiFsXtH7ihmTxf7HdV1Lax4gqbIR_PsWTuJ-g=.3359ae2b-6c0b-44b4-9b39-8bc0c4de0fb0@github.com> Message-ID: On Tue, 22 Apr 2025 16:16:02 GMT, Tejesh R wrote: > We can raise a bug separate bug for the issue related to failure when used with 'PassFailJFrame'. That's what I meant: we need a bug to investigate it further. ------------- PR Comment: https://git.openjdk.org/jdk/pull/22026#issuecomment-2821845172 From honkar at openjdk.org Tue Apr 22 16:29:28 2025 From: honkar at openjdk.org (Harshitha Onkar) Date: Tue, 22 Apr 2025 16:29:28 GMT Subject: RFR: JDK-8353486 : Open source Swing Tests - Set 4 [v9] In-Reply-To: References: Message-ID: > Open-sourced the following Swing tests: > > 1. javax/swing/JFileChooser/bug4464774.java > 2. javax/swing/JFileChooser/bug4522756.java > 3. javax/swing/JFileChooser/bug4759934.java > 4. javax/swing/JFileChooser/bug4943900.java > 5. javax/swing/JOptionPane/bug4194862.java Harshitha Onkar has updated the pull request incrementally with one additional commit since the last revision: minor ------------- Changes: - all: https://git.openjdk.org/jdk/pull/24456/files - new: https://git.openjdk.org/jdk/pull/24456/files/fa05f0ca..a26d98e4 Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=24456&range=08 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=24456&range=07-08 Stats: 3 lines in 1 file changed: 0 ins; 0 del; 3 mod Patch: https://git.openjdk.org/jdk/pull/24456.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/24456/head:pull/24456 PR: https://git.openjdk.org/jdk/pull/24456 From aivanov at openjdk.org Tue Apr 22 16:33:50 2025 From: aivanov at openjdk.org (Alexey Ivanov) Date: Tue, 22 Apr 2025 16:33:50 GMT Subject: RFR: JDK-8353486 : Open source Swing Tests - Set 4 [v8] In-Reply-To: References: Message-ID: On Tue, 22 Apr 2025 16:11:57 GMT, Alexey Ivanov wrote: >> Harshitha Onkar has updated the pull request incrementally with one additional commit since the last revision: >> >> bug4943900 instruction update > > test/jdk/javax/swing/JFileChooser/bug4943900.java line 52: > >> 50: that contains some *.txt files to ensure they are shown in >> 51: the file list. On macOS when the text filter is applied verify >> 52: that the non-text files are shown disabled (greyed out). > > Suggestion: > > that the non-text files are greyed out. > > It's more concise, isn't it? I meant to add period too, you end the sentence here, and another sentence starts on the next line. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/24456#discussion_r2054462728 From aivanov at openjdk.org Tue Apr 22 16:37:45 2025 From: aivanov at openjdk.org (Alexey Ivanov) Date: Tue, 22 Apr 2025 16:37:45 GMT Subject: RFR: JDK-8353486 : Open source Swing Tests - Set 4 [v9] In-Reply-To: References: Message-ID: <_ZftbfEE1I2NioOvgtlwE1stgDSC-evAP1v_b_l8mbQ=.79610c3d-796c-4000-b754-2d32fabdd8bc@github.com> On Tue, 22 Apr 2025 16:29:28 GMT, Harshitha Onkar wrote: >> Open-sourced the following Swing tests: >> >> 1. javax/swing/JFileChooser/bug4464774.java >> 2. javax/swing/JFileChooser/bug4522756.java >> 3. javax/swing/JFileChooser/bug4759934.java >> 4. javax/swing/JFileChooser/bug4943900.java >> 5. javax/swing/JOptionPane/bug4194862.java > > Harshitha Onkar has updated the pull request incrementally with one additional commit since the last revision: > > minor Marked as reviewed by aivanov (Reviewer). test/jdk/javax/swing/JFileChooser/bug4522756.java line 47: > 45: go up to the desktop. > 46: > 47: If the above is true press PASS else FAIL. Suggestion: If the above is true, press PASS else FAIL. You've got a comma here in other tests. test/jdk/javax/swing/JFileChooser/bug4943900.java line 40: > 38: > 39: public class bug4943900 { > 40: private static final String INSTRUCTIONS = """ The instructions look quite ugly on macOS, the frame with the instructions is too wide. I guess it's because you had to increase the width to accommodate for a smaller monospaced font on Windows. One way to avoid the issue is to use HTML formatting. (This would also handle word-wrapping.) Another way is to use regular string, rather than a text block, and rely on word-wrapping. It's only cosmetic, though. ------------- PR Review: https://git.openjdk.org/jdk/pull/24456#pullrequestreview-2784685823 PR Review Comment: https://git.openjdk.org/jdk/pull/24456#discussion_r2054464150 PR Review Comment: https://git.openjdk.org/jdk/pull/24456#discussion_r2054468745 From aivanov at openjdk.org Tue Apr 22 16:40:50 2025 From: aivanov at openjdk.org (Alexey Ivanov) Date: Tue, 22 Apr 2025 16:40:50 GMT Subject: RFR: JDK-8353486 : Open source Swing Tests - Set 4 [v8] In-Reply-To: References: Message-ID: <6IBN1hxgNGyJn2-qPvcJSvjjNCHBFNTROGCDawJ_QGo=.14b8082b-ae5d-4d8b-8882-44a183d494cc@github.com> On Tue, 22 Apr 2025 16:11:14 GMT, Alexey Ivanov wrote: >> Harshitha Onkar has updated the pull request incrementally with one additional commit since the last revision: >> >> bug4943900 instruction update > > test/jdk/javax/swing/JFileChooser/bug4943900.java line 48: > >> 46: >> 47: 3. Leave the "Text files" item selected and check that the >> 48: filter works: only *.txt files can appear in the files list > > Suggestion: > > filter works: only *.txt files can appear in the file list. I meant to add period too, you end the sentence here, and another sentence starts on the next line. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/24456#discussion_r2054473562 From honkar at openjdk.org Tue Apr 22 16:50:17 2025 From: honkar at openjdk.org (Harshitha Onkar) Date: Tue, 22 Apr 2025 16:50:17 GMT Subject: RFR: JDK-8353486 : Open source Swing Tests - Set 4 [v10] In-Reply-To: References: Message-ID: > Open-sourced the following Swing tests: > > 1. javax/swing/JFileChooser/bug4464774.java > 2. javax/swing/JFileChooser/bug4522756.java > 3. javax/swing/JFileChooser/bug4759934.java > 4. javax/swing/JFileChooser/bug4943900.java > 5. javax/swing/JOptionPane/bug4194862.java Harshitha Onkar has updated the pull request incrementally with one additional commit since the last revision: minor update ------------- Changes: - all: https://git.openjdk.org/jdk/pull/24456/files - new: https://git.openjdk.org/jdk/pull/24456/files/a26d98e4..18419637 Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=24456&range=09 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=24456&range=08-09 Stats: 16 lines in 2 files changed: 5 ins; 1 del; 10 mod Patch: https://git.openjdk.org/jdk/pull/24456.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/24456/head:pull/24456 PR: https://git.openjdk.org/jdk/pull/24456 From honkar at openjdk.org Tue Apr 22 16:50:18 2025 From: honkar at openjdk.org (Harshitha Onkar) Date: Tue, 22 Apr 2025 16:50:18 GMT Subject: RFR: JDK-8353486 : Open source Swing Tests - Set 4 [v9] In-Reply-To: <_ZftbfEE1I2NioOvgtlwE1stgDSC-evAP1v_b_l8mbQ=.79610c3d-796c-4000-b754-2d32fabdd8bc@github.com> References: <_ZftbfEE1I2NioOvgtlwE1stgDSC-evAP1v_b_l8mbQ=.79610c3d-796c-4000-b754-2d32fabdd8bc@github.com> Message-ID: <1eWOBcuj7n95jXwtWh4RZy2AaiB1EcZr2tqgocmjD10=.ff429f57-313c-4b16-b8ca-f002b9683683@github.com> On Tue, 22 Apr 2025 16:34:47 GMT, Alexey Ivanov wrote: >> Harshitha Onkar has updated the pull request incrementally with one additional commit since the last revision: >> >> minor > > test/jdk/javax/swing/JFileChooser/bug4943900.java line 40: > >> 38: >> 39: public class bug4943900 { >> 40: private static final String INSTRUCTIONS = """ > > The instructions look quite ugly on macOS, the frame with the instructions is too wide. I guess it's because you had to increase the width to accommodate for a smaller monospaced font on Windows. > > One way to avoid the issue is to use HTML formatting. (This would also handle word-wrapping.) > > Another way is to use regular string, rather than a text block, and rely on word-wrapping. > > It's only cosmetic, though. Used HTML formatting. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/24456#discussion_r2054484668 From kizune at openjdk.org Tue Apr 22 16:52:43 2025 From: kizune at openjdk.org (Alexander Zuev) Date: Tue, 22 Apr 2025 16:52:43 GMT Subject: RFR: 8354695: Open source several swing tests batch7 [v3] In-Reply-To: References: <_UYipF8V8voPBRGVdOg7APlb0vu9VEfObY1qaHDTFBI=.0337e295-3b52-4d63-81c3-3cd21f708496@github.com> Message-ID: On Tue, 22 Apr 2025 01:06:11 GMT, Damon Nguyen wrote: >> Open-sourcing and standardizing several swing tests (JScrollPane & JRootPane) > > Damon Nguyen has updated the pull request incrementally with one additional commit since the last revision: > > Move width and height to EDT test/jdk/javax/swing/JRootPane/bug4403624.java line 92: > 90: > 91: r.mouseMove(p.x + OFFSET, p.y + OFFSET); > 92: Color c = r.getPixelColor(p.x + OFFSET, p.y + OFFSET); That might fail intermittently on the macOS because you take a pixel color exactly at the place where mouse cursor is and it's a known issue on m1 based macs that cursor sometimes messes up the screenshots and pixel color grabbing - either directly (cursor is visible on screenshot) or indirectly (macOS calculates cursor effects such as shadow leaving traces of it in the screen buffer that we analyze). Whenever it is logically possible i'm trying to move cursor at least couple of pixels away from the area i'm going to analyze for color comparison. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/24758#discussion_r2054489527 From kizune at openjdk.org Tue Apr 22 17:01:53 2025 From: kizune at openjdk.org (Alexander Zuev) Date: Tue, 22 Apr 2025 17:01:53 GMT Subject: RFR: 8354695: Open source several swing tests batch7 [v3] In-Reply-To: References: <_UYipF8V8voPBRGVdOg7APlb0vu9VEfObY1qaHDTFBI=.0337e295-3b52-4d63-81c3-3cd21f708496@github.com> Message-ID: On Tue, 22 Apr 2025 01:06:11 GMT, Damon Nguyen wrote: >> Open-sourcing and standardizing several swing tests (JScrollPane & JRootPane) > > Damon Nguyen has updated the pull request incrementally with one additional commit since the last revision: > > Move width and height to EDT test/jdk/javax/swing/JScrollPane/AcceleratedWheelScrolling/RTLScrollers.java line 26: > 24: // A few Swing components which use the mouse wheel to scroll > 25: // > 26: // NOTE: The robot portion of this test probably has a number of EDT problems, Yikes. You know that there are EDT problems but just decided to ignore them. Are there a lot of them? How hard it would be to get rid of them? ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/24758#discussion_r2054504721 From aivanov at openjdk.org Tue Apr 22 17:12:01 2025 From: aivanov at openjdk.org (Alexey Ivanov) Date: Tue, 22 Apr 2025 17:12:01 GMT Subject: RFR: JDK-8353486 : Open source Swing Tests - Set 4 [v10] In-Reply-To: References: Message-ID: On Tue, 22 Apr 2025 16:50:17 GMT, Harshitha Onkar wrote: >> Open-sourced the following Swing tests: >> >> 1. javax/swing/JFileChooser/bug4464774.java >> 2. javax/swing/JFileChooser/bug4522756.java >> 3. javax/swing/JFileChooser/bug4759934.java >> 4. javax/swing/JFileChooser/bug4943900.java >> 5. javax/swing/JOptionPane/bug4194862.java > > Harshitha Onkar has updated the pull request incrementally with one additional commit since the last revision: > > minor update Changes requested by aivanov (Reviewer). test/jdk/javax/swing/JFileChooser/bug4943900.java line 61: > 59: press Fail

. > 60: > 61: """; Use proper HTML: Suggestion: private static final String INSTRUCTIONS = """
  1. When the test runs, a JFileChooser will be displayed.
  2. Ensure that there is a filter combo box with these two items:
    • Text Files (*.txt)[must be selected when the dialog opens]
    • All Files
  3. Leave the Text files item selected and check that the filter works: only *.txt files can appear in the file list. You can navigate directories in the file chooser and find one that contains some *.txt files to ensure they are shown in the file list. On macOS when the text filter is applied verify that the non-text files are greyed out.
  4. Try switching the filters and ensure that the file list is updated properly.
  5. If the FileFilter works correctly, press Pass else press Fail.
"""; ------------- PR Review: https://git.openjdk.org/jdk/pull/24456#pullrequestreview-2784770399 PR Review Comment: https://git.openjdk.org/jdk/pull/24456#discussion_r2054516242 From honkar at openjdk.org Tue Apr 22 17:34:20 2025 From: honkar at openjdk.org (Harshitha Onkar) Date: Tue, 22 Apr 2025 17:34:20 GMT Subject: RFR: JDK-8353486 : Open source Swing Tests - Set 4 [v11] In-Reply-To: References: Message-ID: > Open-sourced the following Swing tests: > > 1. javax/swing/JFileChooser/bug4464774.java > 2. javax/swing/JFileChooser/bug4522756.java > 3. javax/swing/JFileChooser/bug4759934.java > 4. javax/swing/JFileChooser/bug4943900.java > 5. javax/swing/JOptionPane/bug4194862.java Harshitha Onkar has updated the pull request incrementally with one additional commit since the last revision: instruction update, jfc added to a JFrame ------------- Changes: - all: https://git.openjdk.org/jdk/pull/24456/files - new: https://git.openjdk.org/jdk/pull/24456/files/18419637..bb9d7649 Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=24456&range=10 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=24456&range=09-10 Stats: 28 lines in 1 file changed: 7 ins; 2 del; 19 mod Patch: https://git.openjdk.org/jdk/pull/24456.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/24456/head:pull/24456 PR: https://git.openjdk.org/jdk/pull/24456 From honkar at openjdk.org Tue Apr 22 17:34:20 2025 From: honkar at openjdk.org (Harshitha Onkar) Date: Tue, 22 Apr 2025 17:34:20 GMT Subject: RFR: JDK-8353486 : Open source Swing Tests - Set 4 [v10] In-Reply-To: References: Message-ID: On Tue, 22 Apr 2025 17:07:10 GMT, Alexey Ivanov wrote: >> Harshitha Onkar has updated the pull request incrementally with one additional commit since the last revision: >> >> minor update > > test/jdk/javax/swing/JFileChooser/bug4943900.java line 61: > >> 59: press Fail

. >> 60: >> 61: """; > > Use proper HTML: > > Suggestion: > > private static final String INSTRUCTIONS = """ > >
    >
  1. When the test runs, a JFileChooser will be displayed. > >
  2. Ensure that there is a filter combo box with these two items: >
      >
    • Text Files (*.txt) > — [must be selected when the dialog opens] >
    • All Files >
    > >
  3. Leave the Text files item selected and check that the > filter works: only *.txt files can appear in the file list. > You can navigate directories in the file chooser and find one > that contains some *.txt files to ensure they are shown in > the file list. On macOS when the text filter is applied verify > that the non-text files are greyed out. > >
  4. Try switching the filters and ensure that the file list > is updated properly. > >
  5. If the FileFilter works correctly, > press Pass else press Fail. >
> > """; Updated. Thanks ! ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/24456#discussion_r2054550436 From azvegint at openjdk.org Tue Apr 22 17:34:53 2025 From: azvegint at openjdk.org (Alexander Zvegintsev) Date: Tue, 22 Apr 2025 17:34:53 GMT Subject: Integrated: 8354701: Open source few JToolTip tests In-Reply-To: References: Message-ID: On Thu, 17 Apr 2025 02:15:30 GMT, Alexander Zvegintsev wrote: > Few more tests are open sourced: > > - javax/swing/JToolTip/4225314/bug4225314.java manual > - javax/swing/JToolTip/TooltipTest/TooltipTest.java manual > - javax/swing/JToolTip/4255441/bug4255441.java manual This pull request has now been integrated. Changeset: f98af0ad Author: Alexander Zvegintsev URL: https://git.openjdk.org/jdk/commit/f98af0ad617a445362859e58af48258bfd5bed03 Stats: 226 lines in 3 files changed: 226 ins; 0 del; 0 mod 8354701: Open source few JToolTip tests Reviewed-by: honkar ------------- PR: https://git.openjdk.org/jdk/pull/24708 From azvegint at openjdk.org Tue Apr 22 17:41:54 2025 From: azvegint at openjdk.org (Alexander Zvegintsev) Date: Tue, 22 Apr 2025 17:41:54 GMT Subject: RFR: JDK-8353486 : Open source Swing Tests - Set 4 [v11] In-Reply-To: References: Message-ID: On Tue, 22 Apr 2025 17:34:20 GMT, Harshitha Onkar wrote: >> Open-sourced the following Swing tests: >> >> 1. javax/swing/JFileChooser/bug4464774.java >> 2. javax/swing/JFileChooser/bug4522756.java >> 3. javax/swing/JFileChooser/bug4759934.java >> 4. javax/swing/JFileChooser/bug4943900.java >> 5. javax/swing/JOptionPane/bug4194862.java > > Harshitha Onkar has updated the pull request incrementally with one additional commit since the last revision: > > instruction update, jfc added to a JFrame Marked as reviewed by azvegint (Reviewer). ------------- PR Review: https://git.openjdk.org/jdk/pull/24456#pullrequestreview-2784841551 From honkar at openjdk.org Tue Apr 22 17:52:50 2025 From: honkar at openjdk.org (Harshitha Onkar) Date: Tue, 22 Apr 2025 17:52:50 GMT Subject: Integrated: JDK-8353486 : Open source Swing Tests - Set 4 In-Reply-To: References: Message-ID: On Fri, 4 Apr 2025 19:38:34 GMT, Harshitha Onkar wrote: > Open-sourced the following Swing tests: > > 1. javax/swing/JFileChooser/bug4464774.java > 2. javax/swing/JFileChooser/bug4522756.java > 3. javax/swing/JFileChooser/bug4759934.java > 4. javax/swing/JFileChooser/bug4943900.java > 5. javax/swing/JOptionPane/bug4194862.java This pull request has now been integrated. Changeset: 486a6646 Author: Harshitha Onkar URL: https://git.openjdk.org/jdk/commit/486a66469bc0c814d07e03ce0e7231b408a4d579 Stats: 462 lines in 5 files changed: 462 ins; 0 del; 0 mod 8353486: Open source Swing Tests - Set 4 Reviewed-by: azvegint, dnguyen, tr ------------- PR: https://git.openjdk.org/jdk/pull/24456 From dnguyen at openjdk.org Tue Apr 22 17:58:04 2025 From: dnguyen at openjdk.org (Damon Nguyen) Date: Tue, 22 Apr 2025 17:58:04 GMT Subject: RFR: 8354695: Open source several swing tests batch7 [v4] In-Reply-To: <_UYipF8V8voPBRGVdOg7APlb0vu9VEfObY1qaHDTFBI=.0337e295-3b52-4d63-81c3-3cd21f708496@github.com> References: <_UYipF8V8voPBRGVdOg7APlb0vu9VEfObY1qaHDTFBI=.0337e295-3b52-4d63-81c3-3cd21f708496@github.com> Message-ID: > Open-sourcing and standardizing several swing tests (JScrollPane & JRootPane) Damon Nguyen has updated the pull request incrementally with one additional commit since the last revision: Test updates ------------- Changes: - all: https://git.openjdk.org/jdk/pull/24758/files - new: https://git.openjdk.org/jdk/pull/24758/files/48328c4f..7ee15af3 Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=24758&range=03 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=24758&range=02-03 Stats: 54 lines in 2 files changed: 1 ins; 46 del; 7 mod Patch: https://git.openjdk.org/jdk/pull/24758.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/24758/head:pull/24758 PR: https://git.openjdk.org/jdk/pull/24758 From dnguyen at openjdk.org Tue Apr 22 17:58:05 2025 From: dnguyen at openjdk.org (Damon Nguyen) Date: Tue, 22 Apr 2025 17:58:05 GMT Subject: RFR: 8354695: Open source several swing tests batch7 [v3] In-Reply-To: References: <_UYipF8V8voPBRGVdOg7APlb0vu9VEfObY1qaHDTFBI=.0337e295-3b52-4d63-81c3-3cd21f708496@github.com> Message-ID: On Tue, 22 Apr 2025 16:49:51 GMT, Alexander Zuev wrote: >> Damon Nguyen has updated the pull request incrementally with one additional commit since the last revision: >> >> Move width and height to EDT > > test/jdk/javax/swing/JRootPane/bug4403624.java line 92: > >> 90: >> 91: r.mouseMove(p.x + OFFSET, p.y + OFFSET); >> 92: Color c = r.getPixelColor(p.x + OFFSET, p.y + OFFSET); > > That might fail intermittently on the macOS because you take a pixel color exactly at the place where mouse cursor is and it's a known issue on m1 based macs that cursor sometimes messes up the screenshots and pixel color grabbing - either directly (cursor is visible on screenshot) or indirectly (macOS calculates cursor effects such as shadow leaving traces of it in the screen buffer that we analyze). Whenever it is logically possible i'm trying to move cursor at least couple of pixels away from the area i'm going to analyze for color comparison. That `mouseMove` call isn't actually necessary, so it has been removed. Thanks for the warning ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/24758#discussion_r2054588773 From achung at openjdk.org Tue Apr 22 17:58:49 2025 From: achung at openjdk.org (Alisen Chung) Date: Tue, 22 Apr 2025 17:58:49 GMT Subject: Integrated: 8353488: Open some JComboBox bugs 3 In-Reply-To: References: Message-ID: On Sat, 19 Apr 2025 04:29:16 GMT, Alisen Chung wrote: > Opening some JComboBox bugs This pull request has now been integrated. Changeset: d61765f6 Author: Alisen Chung URL: https://git.openjdk.org/jdk/commit/d61765f64d6361b6e71c6f783c8c5a127b1ac745 Stats: 326 lines in 4 files changed: 326 ins; 0 del; 0 mod 8353488: Open some JComboBox bugs 3 Reviewed-by: kizune ------------- PR: https://git.openjdk.org/jdk/pull/24767 From dnguyen at openjdk.org Tue Apr 22 18:00:44 2025 From: dnguyen at openjdk.org (Damon Nguyen) Date: Tue, 22 Apr 2025 18:00:44 GMT Subject: RFR: 8354695: Open source several swing tests batch7 [v3] In-Reply-To: References: <_UYipF8V8voPBRGVdOg7APlb0vu9VEfObY1qaHDTFBI=.0337e295-3b52-4d63-81c3-3cd21f708496@github.com> Message-ID: On Tue, 22 Apr 2025 16:59:28 GMT, Alexander Zuev wrote: >> Damon Nguyen has updated the pull request incrementally with one additional commit since the last revision: >> >> Move width and height to EDT > > test/jdk/javax/swing/JScrollPane/AcceleratedWheelScrolling/RTLScrollers.java line 26: > >> 24: // A few Swing components which use the mouse wheel to scroll >> 25: // >> 26: // NOTE: The robot portion of this test probably has a number of EDT problems, > > Yikes. You know that there are EDT problems but just decided to ignore them. Are there a lot of them? How hard it would be to get rid of them? That's a remnant from the original test. I tried cleaning up the robot calls and test methods further. Re-tested `HorizScrollers` on my windows machine and all still looks good. I don't see how it's feasible to call all the methods in EDT in this JDialog helper class. So far the test looks ok and I have not encountered any issues, but let me know if you have any suggestions or concerns. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/24758#discussion_r2054593708 From prr at openjdk.org Tue Apr 22 18:25:54 2025 From: prr at openjdk.org (Phil Race) Date: Tue, 22 Apr 2025 18:25:54 GMT Subject: RFR: 8355077: Compiler error at splashscreen_gif.c due to unterminated string initialization In-Reply-To: References: Message-ID: On Sun, 20 Apr 2025 02:16:50 GMT, Yasumasa Suenaga wrote: > I tried to build OpenJDK with GCC 15.0.1 on Fedora 42 x86_64, however I saw following error. > > > * For target support_native_java.desktop_libsplashscreen_splashscreen_gif.o: > /home/ysuenaga/github-forked/jdk/src/java.desktop/share/native/libsplashscreen/splashscreen_gif.c:51:41: error: initializer-string for array of ?char? truncates NUL terminator but destination lacks ?nonstring? attribute (12 chars into 11 available) [-Werror=unterminated-string-initialization] > 51 | static const char szNetscape20ext[11] = "NETSCAPE2.0"; > | ^~~~~~~~~~~~~ > cc1: all warnings being treated as errors > > > This constant seems to be used to detect Netscape 2.0 extension in GIF image. It should be used to compare with extension block without NUL char, but we should tweak initialization to avoid this error for safety code. Isn't gcc wrong to complain ? I'm looking at what is admittedly an old draft of ANSI C https://www.open-std.org/jtc1/sc22/wg14/www/docs/n1256.pdf and on p130 it has this where t is the same as the usage in splashscreen. ====== EXAMPLE 8 The declaration char s[] = "abc", t[3] = "abc"; defines ??plain?? char array objects s and t whose elements are initialized with character string literals. This declaration is identical to char s[] = { 'a', 'b', 'c', '\0' }, t[] = { 'a', 'b', 'c' }; ===== ------------- PR Comment: https://git.openjdk.org/jdk/pull/24770#issuecomment-2822131320 From dnguyen at openjdk.org Tue Apr 22 18:34:24 2025 From: dnguyen at openjdk.org (Damon Nguyen) Date: Tue, 22 Apr 2025 18:34:24 GMT Subject: RFR: 8354695: Open source several swing tests batch7 [v5] In-Reply-To: <_UYipF8V8voPBRGVdOg7APlb0vu9VEfObY1qaHDTFBI=.0337e295-3b52-4d63-81c3-3cd21f708496@github.com> References: <_UYipF8V8voPBRGVdOg7APlb0vu9VEfObY1qaHDTFBI=.0337e295-3b52-4d63-81c3-3cd21f708496@github.com> Message-ID: > Open-sourcing and standardizing several swing tests (JScrollPane & JRootPane) Damon Nguyen has updated the pull request incrementally with one additional commit since the last revision: Add to EDT ------------- Changes: - all: https://git.openjdk.org/jdk/pull/24758/files - new: https://git.openjdk.org/jdk/pull/24758/files/7ee15af3..920006e3 Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=24758&range=04 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=24758&range=03-04 Stats: 68 lines in 1 file changed: 29 ins; 2 del; 37 mod Patch: https://git.openjdk.org/jdk/pull/24758.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/24758/head:pull/24758 PR: https://git.openjdk.org/jdk/pull/24758 From dnguyen at openjdk.org Tue Apr 22 18:34:25 2025 From: dnguyen at openjdk.org (Damon Nguyen) Date: Tue, 22 Apr 2025 18:34:25 GMT Subject: RFR: 8354695: Open source several swing tests batch7 [v3] In-Reply-To: References: <_UYipF8V8voPBRGVdOg7APlb0vu9VEfObY1qaHDTFBI=.0337e295-3b52-4d63-81c3-3cd21f708496@github.com> Message-ID: On Tue, 22 Apr 2025 17:58:18 GMT, Damon Nguyen wrote: >> test/jdk/javax/swing/JScrollPane/AcceleratedWheelScrolling/RTLScrollers.java line 26: >> >>> 24: // A few Swing components which use the mouse wheel to scroll >>> 25: // >>> 26: // NOTE: The robot portion of this test probably has a number of EDT problems, >> >> Yikes. You know that there are EDT problems but just decided to ignore them. Are there a lot of them? How hard it would be to get rid of them? > > That's a remnant from the original test. I tried cleaning up the robot calls and test methods further. Re-tested `HorizScrollers` on my windows machine and all still looks good. I don't see how it's feasible to call all the methods in EDT in this JDialog helper class. So far the test looks ok and I have not encountered any issues, but let me know if you have any suggestions or concerns. I made what UI elements I could static and volatile to add methods that change UI elements to the EDT. Test still runs as expected and passes on W11. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/24758#discussion_r2054654999 From prr at openjdk.org Tue Apr 22 18:34:44 2025 From: prr at openjdk.org (Phil Race) Date: Tue, 22 Apr 2025 18:34:44 GMT Subject: RFR: 8354928: Clean up and open source some miscellaneous AWT tests [v4] In-Reply-To: References: Message-ID: On Mon, 21 Apr 2025 17:42:44 GMT, Alexander Zuev wrote: >> Clean up and open source some tests related to event processing in AWT library. > > Alexander Zuev has updated the pull request incrementally with eight additional commits since the last revision: > > - Update test/jdk/java/awt/event/MouseWheelEvent/HWWheelScroll.java > > Co-authored-by: Andrey Turbanov > - Update test/jdk/java/awt/event/MouseWheelEvent/HWWheelScroll.java > > Co-authored-by: Andrey Turbanov > - Update test/jdk/java/awt/event/MouseWheelEvent/HWWheelScroll.java > > Co-authored-by: Andrey Turbanov > - Update test/jdk/java/awt/event/MouseWheelEvent/HWWheelScroll.java > > Co-authored-by: Andrey Turbanov > - Update test/jdk/java/awt/event/MouseWheelEvent/HWWheelScroll.java > > Co-authored-by: Andrey Turbanov > - Update test/jdk/java/awt/event/MouseWheelEvent/WheelEventCoord.java > > Co-authored-by: Andrey Turbanov > - Update test/jdk/java/awt/event/MouseWheelEvent/WheelScrollEnabled.java > > Co-authored-by: Andrey Turbanov > - Update test/jdk/java/awt/event/MouseWheelEvent/WheelEventCoord.java > > Co-authored-by: Andrey Turbanov Marked as reviewed by prr (Reviewer). ------------- PR Review: https://git.openjdk.org/jdk/pull/24755#pullrequestreview-2785006003 From kizune at openjdk.org Tue Apr 22 18:40:42 2025 From: kizune at openjdk.org (Alexander Zuev) Date: Tue, 22 Apr 2025 18:40:42 GMT Subject: RFR: 8354695: Open source several swing tests batch7 [v5] In-Reply-To: References: <_UYipF8V8voPBRGVdOg7APlb0vu9VEfObY1qaHDTFBI=.0337e295-3b52-4d63-81c3-3cd21f708496@github.com> Message-ID: <3vJqlM55VWsi0vgvAPlMMTR3RNWqakb9FOQo5CO4L8Q=.fab487bc-34b6-4bdd-96c2-8837a009c2e8@github.com> On Tue, 22 Apr 2025 18:34:24 GMT, Damon Nguyen wrote: >> Open-sourcing and standardizing several swing tests (JScrollPane & JRootPane) > > Damon Nguyen has updated the pull request incrementally with one additional commit since the last revision: > > Add to EDT test/jdk/javax/swing/JScrollPane/AcceleratedWheelScrolling/RTLScrollers.java line 276: > 274: try { > 275: retVal = rtl.runTests(scrollAmount); > 276: rtl.setVisible(false); Since you are creating an instance for each test scenario i would put the setVisible(false) into the finally {} clause so it will be called even if runTests throws an exception and add the dispose() call for good measure. test/jdk/javax/swing/JScrollPane/AcceleratedWheelScrolling/RTLScrollers.java line 677: > 675: }); > 676: } > 677: } github complains about lack of the new line at the end. Minor but still :) ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/24758#discussion_r2054663537 PR Review Comment: https://git.openjdk.org/jdk/pull/24758#discussion_r2054664609 From dnguyen at openjdk.org Tue Apr 22 18:48:20 2025 From: dnguyen at openjdk.org (Damon Nguyen) Date: Tue, 22 Apr 2025 18:48:20 GMT Subject: RFR: 8354695: Open source several swing tests batch7 [v6] In-Reply-To: <_UYipF8V8voPBRGVdOg7APlb0vu9VEfObY1qaHDTFBI=.0337e295-3b52-4d63-81c3-3cd21f708496@github.com> References: <_UYipF8V8voPBRGVdOg7APlb0vu9VEfObY1qaHDTFBI=.0337e295-3b52-4d63-81c3-3cd21f708496@github.com> Message-ID: > Open-sourcing and standardizing several swing tests (JScrollPane & JRootPane) Damon Nguyen has updated the pull request incrementally with three additional commits since the last revision: - Move dispose - Add dispose - Minor edits ------------- Changes: - all: https://git.openjdk.org/jdk/pull/24758/files - new: https://git.openjdk.org/jdk/pull/24758/files/920006e3..999ef58d Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=24758&range=05 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=24758&range=04-05 Stats: 10 lines in 1 file changed: 5 ins; 0 del; 5 mod Patch: https://git.openjdk.org/jdk/pull/24758.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/24758/head:pull/24758 PR: https://git.openjdk.org/jdk/pull/24758 From rmahajan at openjdk.org Tue Apr 22 18:58:57 2025 From: rmahajan at openjdk.org (Rajat Mahajan) Date: Tue, 22 Apr 2025 18:58:57 GMT Subject: RFR: 8351884: Refactor bug8033699.java test code [v2] In-Reply-To: References: Message-ID: > Details: > Refactored code as requested in the Bug description. > > Tested and verified the test passes. Rajat Mahajan has updated the pull request incrementally with one additional commit since the last revision: made changes according to suggestions in code review ------------- Changes: - all: https://git.openjdk.org/jdk/pull/24384/files - new: https://git.openjdk.org/jdk/pull/24384/files/7225dff4..babefb8b Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=24384&range=01 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=24384&range=00-01 Stats: 16 lines in 1 file changed: 7 ins; 0 del; 9 mod Patch: https://git.openjdk.org/jdk/pull/24384.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/24384/head:pull/24384 PR: https://git.openjdk.org/jdk/pull/24384 From rmahajan at openjdk.org Tue Apr 22 18:58:57 2025 From: rmahajan at openjdk.org (Rajat Mahajan) Date: Tue, 22 Apr 2025 18:58:57 GMT Subject: RFR: 8351884: Refactor bug8033699.java test code [v2] In-Reply-To: <3Ezp0nCMjUqfV09qmnDDMHax4O-E-cZIxjS3XldEG1c=.a2f0629d-f200-4248-bcea-7144fb3ad2e5@github.com> References: <3Ezp0nCMjUqfV09qmnDDMHax4O-E-cZIxjS3XldEG1c=.a2f0629d-f200-4248-bcea-7144fb3ad2e5@github.com> Message-ID: On Tue, 15 Apr 2025 19:53:34 GMT, Harshitha Onkar wrote: > LGTM apart from minor inline suggestion. > > Since the test has lot of tab movements, does CI testing look good on all platforms on multiple runs (repeat) ? Yes, it looks good on multiple runs. ------------- PR Comment: https://git.openjdk.org/jdk/pull/24384#issuecomment-2822205623 From dnguyen at openjdk.org Tue Apr 22 19:04:23 2025 From: dnguyen at openjdk.org (Damon Nguyen) Date: Tue, 22 Apr 2025 19:04:23 GMT Subject: RFR: 8354695: Open source several swing tests batch7 [v7] In-Reply-To: <_UYipF8V8voPBRGVdOg7APlb0vu9VEfObY1qaHDTFBI=.0337e295-3b52-4d63-81c3-3cd21f708496@github.com> References: <_UYipF8V8voPBRGVdOg7APlb0vu9VEfObY1qaHDTFBI=.0337e295-3b52-4d63-81c3-3cd21f708496@github.com> Message-ID: > Open-sourcing and standardizing several swing tests (JScrollPane & JRootPane) Damon Nguyen has updated the pull request incrementally with one additional commit since the last revision: Add dispose and setVisible to runTest ------------- Changes: - all: https://git.openjdk.org/jdk/pull/24758/files - new: https://git.openjdk.org/jdk/pull/24758/files/999ef58d..784334da Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=24758&range=06 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=24758&range=05-06 Stats: 4 lines in 1 file changed: 3 ins; 1 del; 0 mod Patch: https://git.openjdk.org/jdk/pull/24758.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/24758/head:pull/24758 PR: https://git.openjdk.org/jdk/pull/24758 From kizune at openjdk.org Tue Apr 22 20:15:42 2025 From: kizune at openjdk.org (Alexander Zuev) Date: Tue, 22 Apr 2025 20:15:42 GMT Subject: RFR: 8354695: Open source several swing tests batch7 [v7] In-Reply-To: References: <_UYipF8V8voPBRGVdOg7APlb0vu9VEfObY1qaHDTFBI=.0337e295-3b52-4d63-81c3-3cd21f708496@github.com> Message-ID: On Tue, 22 Apr 2025 19:04:23 GMT, Damon Nguyen wrote: >> Open-sourcing and standardizing several swing tests (JScrollPane & JRootPane) > > Damon Nguyen has updated the pull request incrementally with one additional commit since the last revision: > > Add dispose and setVisible to runTest Marked as reviewed by kizune (Reviewer). ------------- PR Review: https://git.openjdk.org/jdk/pull/24758#pullrequestreview-2785222733 From kizune at openjdk.org Tue Apr 22 20:19:53 2025 From: kizune at openjdk.org (Alexander Zuev) Date: Tue, 22 Apr 2025 20:19:53 GMT Subject: Integrated: 8354928: Clean up and open source some miscellaneous AWT tests In-Reply-To: References: Message-ID: On Fri, 18 Apr 2025 16:47:49 GMT, Alexander Zuev wrote: > Clean up and open source some tests related to event processing in AWT library. This pull request has now been integrated. Changeset: 1b8f760d Author: Alexander Zuev URL: https://git.openjdk.org/jdk/commit/1b8f760d1b60e63c1391dcad42753a7ebb3f80ec Stats: 499 lines in 4 files changed: 499 ins; 0 del; 0 mod 8354928: Clean up and open source some miscellaneous AWT tests Reviewed-by: prr, dnguyen ------------- PR: https://git.openjdk.org/jdk/pull/24755 From aivanov at openjdk.org Tue Apr 22 20:28:26 2025 From: aivanov at openjdk.org (Alexey Ivanov) Date: Tue, 22 Apr 2025 20:28:26 GMT Subject: RFR: 8352733: Improve RotFontBoundsTest test Message-ID: * Use `PassFailJFrame` framework for creating the manual test UI. * Provide check boxes for each degree of rotation which allow hiding and showing the specified rotation. * Provide **Select All** and **Clear All** buttons. * Display Java version. ------------- Commit messages: - 8352733: Improve RotFontBoundsTest test Changes: https://git.openjdk.org/jdk/pull/24799/files Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=24799&range=00 Issue: https://bugs.openjdk.org/browse/JDK-8352733 Stats: 257 lines in 1 file changed: 257 ins; 0 del; 0 mod Patch: https://git.openjdk.org/jdk/pull/24799.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/24799/head:pull/24799 PR: https://git.openjdk.org/jdk/pull/24799 From azvegint at openjdk.org Tue Apr 22 20:32:55 2025 From: azvegint at openjdk.org (Alexander Zvegintsev) Date: Tue, 22 Apr 2025 20:32:55 GMT Subject: RFR: 8354695: Open source several swing tests batch7 [v7] In-Reply-To: References: <_UYipF8V8voPBRGVdOg7APlb0vu9VEfObY1qaHDTFBI=.0337e295-3b52-4d63-81c3-3cd21f708496@github.com> Message-ID: On Tue, 22 Apr 2025 19:04:23 GMT, Damon Nguyen wrote: >> Open-sourcing and standardizing several swing tests (JScrollPane & JRootPane) > > Damon Nguyen has updated the pull request incrementally with one additional commit since the last revision: > > Add dispose and setVisible to runTest test/jdk/javax/swing/JScrollPane/AcceleratedWheelScrolling/HorizScrollers.java line 54: > 52: import javax.swing.SwingUtilities; > 53: > 54: public class HorizScrollers { The test instantly fails for me on the first phase after the EDT changes:
jtr ----------System.out:(6/265)---------- PassFailJFrame: Phase 1 scroll speed 1 PassFailJFrame: Set the scrolling speed to the slowest value (1 line). PassFailJFrame: Proceed to the test with go button RTLS.runTest() Testing Table PassFailJFrame: Failure: java.lang.reflect.InvocationTargetException ----------System.err:(33/2218)---------- java.lang.Exception: Stack trace at java.base/java.lang.Thread.dumpStack(Thread.java:2148) at PassFailJFrame.forceFail(PassFailJFrame.java:1323) at PassFailJFrame.forceFail(PassFailJFrame.java:1314) at HorizScrollers$ConfigPanel.showFinalReminderIfNeeded(HorizScrollers.java:179) at HorizScrollers$ConfigPanel.lambda$actionPerformed$0(HorizScrollers.java:196) at java.desktop/java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:318) at java.desktop/java.awt.EventQueue.dispatchEventImpl(EventQueue.java:773) at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:720) at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:714) at java.base/java.security.AccessController.doPrivileged(AccessController.java:400) at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:87) at java.desktop/java.awt.EventQueue.dispatchEvent(EventQueue.java:742) at java.desktop/java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:203) at java.desktop/java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:124) at java.desktop/java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:113) at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:109) at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101) at java.desktop/java.awt.EventDispatchThread.run(EventDispatchThread.java:90) java.lang.RuntimeException: Failure Reason: forceFail called at PassFailJFrame.awaitAndCheck(PassFailJFrame.java:1077) at HorizScrollers.main(HorizScrollers.java:76) at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:103) at java.base/java.lang.reflect.Method.invoke(Method.java:580) at com.sun.javatest.regtest.agent.MainWrapper$MainTask.run(MainWrapper.java:138) at java.base/java.lang.Thread.run(Thread.java:1575) JavaTest Message: Test threw exception: java.lang.RuntimeException: Failure Reason: forceFail called JavaTest Message: shutting down test
![image](https://github.com/user-attachments/assets/cf6bf129-a47d-4c3c-904b-27ec6dd85844) Please check it again with the deleted `JTwork` directory, as the test may have used the cached, previously compiled `RTLScrollers` class and didn't pick up your changes. test/jdk/javax/swing/JScrollPane/AcceleratedWheelScrolling/HorizScrollers.java line 165: > 163: ConfigPanel.this.getTopLevelAncestor(), > 164: ("Test %s. please make sure you have restored " + > 165: "the original speed value blah blah") Do we really need this exact wording? ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/24758#discussion_r2054821045 PR Review Comment: https://git.openjdk.org/jdk/pull/24758#discussion_r2054781397 From dnguyen at openjdk.org Tue Apr 22 20:32:57 2025 From: dnguyen at openjdk.org (Damon Nguyen) Date: Tue, 22 Apr 2025 20:32:57 GMT Subject: Integrated: 8354695: Open source several swing tests batch7 In-Reply-To: <_UYipF8V8voPBRGVdOg7APlb0vu9VEfObY1qaHDTFBI=.0337e295-3b52-4d63-81c3-3cd21f708496@github.com> References: <_UYipF8V8voPBRGVdOg7APlb0vu9VEfObY1qaHDTFBI=.0337e295-3b52-4d63-81c3-3cd21f708496@github.com> Message-ID: On Fri, 18 Apr 2025 18:39:09 GMT, Damon Nguyen wrote: > Open-sourcing and standardizing several swing tests (JScrollPane & JRootPane) This pull request has now been integrated. Changeset: cc9148dd Author: Damon Nguyen URL: https://git.openjdk.org/jdk/commit/cc9148ddef95c6ca27ff9fee4c17fb0d4ba7f88e Stats: 1436 lines in 7 files changed: 1436 ins; 0 del; 0 mod 8354695: Open source several swing tests batch7 Reviewed-by: kizune, achung ------------- PR: https://git.openjdk.org/jdk/pull/24758 From prr at openjdk.org Tue Apr 22 21:02:43 2025 From: prr at openjdk.org (Phil Race) Date: Tue, 22 Apr 2025 21:02:43 GMT Subject: RFR: 8352733: Improve RotFontBoundsTest test In-Reply-To: References: Message-ID: On Tue, 22 Apr 2025 20:24:04 GMT, Alexey Ivanov wrote: > * Use `PassFailJFrame` framework for creating the manual test UI. > * Provide check boxes for each degree of rotation which allow hiding and showing the specified rotation. > * Provide **Select All** and **Clear All** buttons. > * Display Java version. ran it. looks good to me. ------------- Marked as reviewed by prr (Reviewer). PR Review: https://git.openjdk.org/jdk/pull/24799#pullrequestreview-2785357857 From aturbanov at openjdk.org Tue Apr 22 21:02:46 2025 From: aturbanov at openjdk.org (Andrey Turbanov) Date: Tue, 22 Apr 2025 21:02:46 GMT Subject: RFR: 4811995: BorderLayout does not respect minimum size of its components In-Reply-To: References: Message-ID: On Sun, 20 Apr 2025 08:19:15 GMT, Jeremy Wood wrote: > This PR changes how the BorderLayout positions components when they don't fit inside a container. > > This should have no effect on BorderLayouts that match or exceed their preferred size. > > (The name of this PR/ticket is a little misleading: this in no way relates to `component.getMinimumSize()`.) > > Here is part of a comment in that ticket that sums up what this PR is trying to fix: >> Instead of the South Component being placed partially offscreen as Windows does, it is often placed on top of the North Component. Indeed, BorderLayout.layoutContainer() always places the South Component flush with the bottom of the Container and does not check if the Container is smaller than the minimum size, or if the North and South Components overlap. > > Previously child components could: > A. be assigned negative (x,y) coordinates > B. be assigned negative widths or heights > C. overlap other child components > D. be assigned dimensions that don't fit inside the target container > > This PR will instead constrain certain values. Now child components may be given a width/height of zero pixels, but they should never show the 4 behaviors stated above. > > We encountered this basic problem last week at work (we could end up with a component with a negative height). Our work-around was more complex than this PR: we wrote a modified BorderLayout that would switch to using `component.getMinimumSize()` when the preferred size wouldn't fit. IMO that is a better option all-around, but it is dangerously invasive for an OpenJDK proposal. I'm happy to discuss that idea further, though, if anyone here disagrees. test/jdk/java/awt/BorderLayout/ConstrainedBorderLayoutChildrenTest.java line 84: > 82: > 83: return true; > 84: } catch(Throwable t) { Suggestion: } catch (Throwable t) { test/jdk/java/awt/BorderLayout/ConstrainedBorderLayoutChildrenTest.java line 120: > 118: > 119: return true; > 120: } catch(Throwable t) { Suggestion: } catch (Throwable t) { test/jdk/java/awt/BorderLayout/ConstrainedBorderLayoutChildrenTest.java line 155: > 153: > 154: return true; > 155: } catch(Throwable t) { Suggestion: } catch (Throwable t) { test/jdk/java/awt/BorderLayout/ConstrainedBorderLayoutChildrenTest.java line 181: > 179: > 180: return true; > 181: } catch(Throwable t) { Suggestion: } catch (Throwable t) { test/jdk/java/awt/BorderLayout/ConstrainedBorderLayoutChildrenTest.java line 206: > 204: > 205: return true; > 206: } catch(Throwable t) { Suggestion: } catch (Throwable t) { test/jdk/java/awt/BorderLayout/ConstrainedBorderLayoutChildrenTest.java line 232: > 230: > 231: return true; > 232: } catch(Throwable t) { Suggestion: } catch (Throwable t) { ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/24772#discussion_r2054863768 PR Review Comment: https://git.openjdk.org/jdk/pull/24772#discussion_r2054863922 PR Review Comment: https://git.openjdk.org/jdk/pull/24772#discussion_r2054864116 PR Review Comment: https://git.openjdk.org/jdk/pull/24772#discussion_r2054864351 PR Review Comment: https://git.openjdk.org/jdk/pull/24772#discussion_r2054864463 PR Review Comment: https://git.openjdk.org/jdk/pull/24772#discussion_r2054864618 From duke at openjdk.org Tue Apr 22 21:09:58 2025 From: duke at openjdk.org (Jeremy Wood) Date: Tue, 22 Apr 2025 21:09:58 GMT Subject: RFR: 4811995: BorderLayout does not respect minimum size of its components [v2] In-Reply-To: References: Message-ID: > This PR changes how the BorderLayout positions components when they don't fit inside a container. > > This should have no effect on BorderLayouts that match or exceed their preferred size. > > (The name of this PR/ticket is a little misleading: this in no way relates to `component.getMinimumSize()`.) > > Here is part of a comment in that ticket that sums up what this PR is trying to fix: >> Instead of the South Component being placed partially offscreen as Windows does, it is often placed on top of the North Component. Indeed, BorderLayout.layoutContainer() always places the South Component flush with the bottom of the Container and does not check if the Container is smaller than the minimum size, or if the North and South Components overlap. > > Previously child components could: > A. be assigned negative (x,y) coordinates > B. be assigned negative widths or heights > C. overlap other child components > D. be assigned dimensions that don't fit inside the target container > > This PR will instead constrain certain values. Now child components may be given a width/height of zero pixels, but they should never show the 4 behaviors stated above. > > We encountered this basic problem last week at work (we could end up with a component with a negative height). Our work-around was more complex than this PR: we wrote a modified BorderLayout that would switch to using `component.getMinimumSize()` when the preferred size wouldn't fit. IMO that is a better option all-around, but it is dangerously invasive for an OpenJDK proposal. I'm happy to discuss that idea further, though, if anyone here disagrees. Jeremy Wood has updated the pull request incrementally with six additional commits since the last revision: - Update test/jdk/java/awt/BorderLayout/ConstrainedBorderLayoutChildrenTest.java Co-authored-by: Andrey Turbanov - Update test/jdk/java/awt/BorderLayout/ConstrainedBorderLayoutChildrenTest.java Co-authored-by: Andrey Turbanov - Update test/jdk/java/awt/BorderLayout/ConstrainedBorderLayoutChildrenTest.java Co-authored-by: Andrey Turbanov - Update test/jdk/java/awt/BorderLayout/ConstrainedBorderLayoutChildrenTest.java Co-authored-by: Andrey Turbanov - Update test/jdk/java/awt/BorderLayout/ConstrainedBorderLayoutChildrenTest.java Co-authored-by: Andrey Turbanov - Update test/jdk/java/awt/BorderLayout/ConstrainedBorderLayoutChildrenTest.java Co-authored-by: Andrey Turbanov ------------- Changes: - all: https://git.openjdk.org/jdk/pull/24772/files - new: https://git.openjdk.org/jdk/pull/24772/files/c30f1803..87e90797 Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=24772&range=01 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=24772&range=00-01 Stats: 6 lines in 1 file changed: 0 ins; 0 del; 6 mod Patch: https://git.openjdk.org/jdk/pull/24772.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/24772/head:pull/24772 PR: https://git.openjdk.org/jdk/pull/24772 From azvegint at openjdk.org Tue Apr 22 21:50:27 2025 From: azvegint at openjdk.org (Alexander Zvegintsev) Date: Tue, 22 Apr 2025 21:50:27 GMT Subject: RFR: 8354553: Open source several clipboard tests batch0 Message-ID: <3_fAqOjaw7YUHcxrZHQL_0TXNfAWQPYhBSOPHiADfKg=.c3d97408-02fd-4ce3-9120-95b960b74da5@github.com> Few more tests are open sourced, all of them are in problem list. ------------- Commit messages: - 8354553: Open source several clipboard tests batch0 Changes: https://git.openjdk.org/jdk/pull/24802/files Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=24802&range=00 Issue: https://bugs.openjdk.org/browse/JDK-8354553 Stats: 1362 lines in 5 files changed: 1362 ins; 0 del; 0 mod Patch: https://git.openjdk.org/jdk/pull/24802.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/24802/head:pull/24802 PR: https://git.openjdk.org/jdk/pull/24802 From prr at openjdk.org Tue Apr 22 22:15:40 2025 From: prr at openjdk.org (Phil Race) Date: Tue, 22 Apr 2025 22:15:40 GMT Subject: RFR: 8354553: Open source several clipboard tests batch0 In-Reply-To: <3_fAqOjaw7YUHcxrZHQL_0TXNfAWQPYhBSOPHiADfKg=.c3d97408-02fd-4ce3-9120-95b960b74da5@github.com> References: <3_fAqOjaw7YUHcxrZHQL_0TXNfAWQPYhBSOPHiADfKg=.c3d97408-02fd-4ce3-9120-95b960b74da5@github.com> Message-ID: On Tue, 22 Apr 2025 21:44:58 GMT, Alexander Zvegintsev wrote: > Few more tests are open sourced, all of them are in problem list. Marked as reviewed by prr (Reviewer). ------------- PR Review: https://git.openjdk.org/jdk/pull/24802#pullrequestreview-2785504074 From dnguyen at openjdk.org Tue Apr 22 22:15:52 2025 From: dnguyen at openjdk.org (Damon Nguyen) Date: Tue, 22 Apr 2025 22:15:52 GMT Subject: RFR: 8355332: Fix failing semi-manual test EDT issue Message-ID: Fixed the failing test by adjusting the EDT block for `runTest`. Also fixed the strange phrasing for one of the instructions. Tested on W11 and passes. ------------- Commit messages: - Initial commit - Merge branch 'master' of github.com:DamonGuy/jdk - Merge branch 'master' of github.com:DamonGuy/jdk - Merge branch 'master' of github.com:DamonGuy/jdk - Merge branch 'master' of github.com:DamonGuy/jdk - Merge branch 'master' of github.com:DamonGuy/jdk - Merge branch 'master' of github.com:DamonGuy/jdk - Initial commit for backout Changes: https://git.openjdk.org/jdk/pull/24804/files Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=24804&range=00 Issue: https://bugs.openjdk.org/browse/JDK-8355332 Stats: 18 lines in 2 files changed: 1 ins; 5 del; 12 mod Patch: https://git.openjdk.org/jdk/pull/24804.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/24804/head:pull/24804 PR: https://git.openjdk.org/jdk/pull/24804 From dnguyen at openjdk.org Tue Apr 22 22:23:51 2025 From: dnguyen at openjdk.org (Damon Nguyen) Date: Tue, 22 Apr 2025 22:23:51 GMT Subject: RFR: 8354695: Open source several swing tests batch7 [v7] In-Reply-To: References: <_UYipF8V8voPBRGVdOg7APlb0vu9VEfObY1qaHDTFBI=.0337e295-3b52-4d63-81c3-3cd21f708496@github.com> Message-ID: <7EkFQpcsm4vsnWwPXMk-k8-zyAu5RGciKTWUAh7JsBg=.99546ef6-03c0-4bac-bc44-3f63b9b599ec@github.com> On Tue, 22 Apr 2025 20:29:28 GMT, Alexander Zvegintsev wrote: >> Damon Nguyen has updated the pull request incrementally with one additional commit since the last revision: >> >> Add dispose and setVisible to runTest > > test/jdk/javax/swing/JScrollPane/AcceleratedWheelScrolling/HorizScrollers.java line 54: > >> 52: import javax.swing.SwingUtilities; >> 53: >> 54: public class HorizScrollers { > > The test instantly fails for me on the first phase after the EDT changes: > >
> jtr > > > ----------System.out:(6/265)---------- > PassFailJFrame: Phase 1 scroll speed 1 > PassFailJFrame: Set the scrolling speed to the slowest value (1 line). > PassFailJFrame: Proceed to the test with go button > RTLS.runTest() > Testing Table > PassFailJFrame: Failure: java.lang.reflect.InvocationTargetException > ----------System.err:(33/2218)---------- > java.lang.Exception: Stack trace > at java.base/java.lang.Thread.dumpStack(Thread.java:2148) > at PassFailJFrame.forceFail(PassFailJFrame.java:1323) > at PassFailJFrame.forceFail(PassFailJFrame.java:1314) > at HorizScrollers$ConfigPanel.showFinalReminderIfNeeded(HorizScrollers.java:179) > at HorizScrollers$ConfigPanel.lambda$actionPerformed$0(HorizScrollers.java:196) > at java.desktop/java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:318) > at java.desktop/java.awt.EventQueue.dispatchEventImpl(EventQueue.java:773) > at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:720) > at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:714) > at java.base/java.security.AccessController.doPrivileged(AccessController.java:400) > at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:87) > at java.desktop/java.awt.EventQueue.dispatchEvent(EventQueue.java:742) > at java.desktop/java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:203) > at java.desktop/java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:124) > at java.desktop/java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:113) > at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:109) > at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101) > at java.desktop/java.awt.EventDispatchThread.run(EventDispatchThread.java:90) > java.lang.RuntimeException: Failure Reason: > forceFail called > at PassFailJFrame.awaitAndCheck(PassFailJFrame.java:1077) > at HorizScrollers.main(HorizScrollers.java:76) > at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:103) > at java.base/java.lang.reflect.Method.invoke(Method.java:580) > at com.sun.javatest.regtest.agent.MainWrapper$MainTask.run(Main... Thanks for finding this. A new [PR](https://github.com/openjdk/jdk/pull/24804) has been created to correct this. I was able to recreate the failure after deleting the `JTwork` dir as you suggested. Went through all the changes and found the problematic EDT related code block. > test/jdk/javax/swing/JScrollPane/AcceleratedWheelScrolling/HorizScrollers.java line 165: > >> 163: ConfigPanel.this.getTopLevelAncestor(), >> 164: ("Test %s. please make sure you have restored " + >> 165: "the original speed value blah blah") > > Do we really need this exact wording? I fixed this as well in the new PR linked in the other comment. Thanks! ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/24758#discussion_r2054971743 PR Review Comment: https://git.openjdk.org/jdk/pull/24758#discussion_r2054972112 From prr at openjdk.org Tue Apr 22 22:42:16 2025 From: prr at openjdk.org (Phil Race) Date: Tue, 22 Apr 2025 22:42:16 GMT Subject: RFR: 8355333: Some Problem list entries point to non-existent / wrong files Message-ID: Fix problem list for non-existent/incorrect paths ------------- Commit messages: - 8355333 Changes: https://git.openjdk.org/jdk/pull/24803/files Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=24803&range=00 Issue: https://bugs.openjdk.org/browse/JDK-8355333 Stats: 5 lines in 1 file changed: 0 ins; 2 del; 3 mod Patch: https://git.openjdk.org/jdk/pull/24803.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/24803/head:pull/24803 PR: https://git.openjdk.org/jdk/pull/24803 From azvegint at openjdk.org Tue Apr 22 22:54:24 2025 From: azvegint at openjdk.org (Alexander Zvegintsev) Date: Tue, 22 Apr 2025 22:54:24 GMT Subject: RFR: 8354554: Open source several clipboard tests batch1 Message-ID: few more clipboard tests are opensourced. Some of them are in problemlist. ------------- Commit messages: - 8354554: Open source several clipboard tests batch1 Changes: https://git.openjdk.org/jdk/pull/24806/files Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=24806&range=00 Issue: https://bugs.openjdk.org/browse/JDK-8354554 Stats: 805 lines in 5 files changed: 805 ins; 0 del; 0 mod Patch: https://git.openjdk.org/jdk/pull/24806.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/24806/head:pull/24806 PR: https://git.openjdk.org/jdk/pull/24806 From azvegint at openjdk.org Tue Apr 22 23:10:40 2025 From: azvegint at openjdk.org (Alexander Zvegintsev) Date: Tue, 22 Apr 2025 23:10:40 GMT Subject: RFR: 8355332: Fix failing semi-manual test EDT issue In-Reply-To: References: Message-ID: On Tue, 22 Apr 2025 22:11:20 GMT, Damon Nguyen wrote: > Fixed the failing test by adjusting the EDT block for `runTest`. Also fixed the strange phrasing for one of the instructions. Tested on W11 and passes. test/jdk/javax/swing/JScrollPane/AcceleratedWheelScrolling/HorizScrollers.java line 166: > 164: ("Test %s. Please make sure you have set " + > 165: "the correct speed value and keep the " + > 166: "mouse stationary.") The updated instructions should be corrected as well. It seems that this `JOptionPane` dialog is only displayed when one of the phases fails at non-default speed, and there is no further testing. So the the `keep the mouse stationary` part is a little bit too late. This can be an issue though, but I think it is better to add a delay just before the test starts(`RTLScrollers.runTest`) to avoid catching mouse movements from a test used when he clicks the button. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/24804#discussion_r2055003086 From azvegint at openjdk.org Tue Apr 22 23:22:40 2025 From: azvegint at openjdk.org (Alexander Zvegintsev) Date: Tue, 22 Apr 2025 23:22:40 GMT Subject: RFR: 8352733: Improve RotFontBoundsTest test In-Reply-To: References: Message-ID: On Tue, 22 Apr 2025 20:24:04 GMT, Alexey Ivanov wrote: > * Use `PassFailJFrame` framework for creating the manual test UI. > * Provide check boxes for each degree of rotation which allow hiding and showing the specified rotation. > * Provide **Select All** and **Clear All** buttons. > * Display Java version. Marked as reviewed by azvegint (Reviewer). ------------- PR Review: https://git.openjdk.org/jdk/pull/24799#pullrequestreview-2785579550 From dnguyen at openjdk.org Tue Apr 22 23:39:19 2025 From: dnguyen at openjdk.org (Damon Nguyen) Date: Tue, 22 Apr 2025 23:39:19 GMT Subject: RFR: 8355332: Fix failing semi-manual test EDT issue [v2] In-Reply-To: References: Message-ID: > Fixed the failing test by adjusting the EDT block for `runTest`. Also fixed the strange phrasing for one of the instructions. Tested on W11 and passes. Damon Nguyen has updated the pull request incrementally with one additional commit since the last revision: Add delay at the start of runTest. Modify final reminder. ------------- Changes: - all: https://git.openjdk.org/jdk/pull/24804/files - new: https://git.openjdk.org/jdk/pull/24804/files/65ce738c..33ec41d5 Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=24804&range=01 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=24804&range=00-01 Stats: 4 lines in 2 files changed: 1 ins; 0 del; 3 mod Patch: https://git.openjdk.org/jdk/pull/24804.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/24804/head:pull/24804 PR: https://git.openjdk.org/jdk/pull/24804 From dnguyen at openjdk.org Tue Apr 22 23:39:19 2025 From: dnguyen at openjdk.org (Damon Nguyen) Date: Tue, 22 Apr 2025 23:39:19 GMT Subject: RFR: 8355332: Fix failing semi-manual test EDT issue [v2] In-Reply-To: References: Message-ID: <20Tgta1PaUruEe-rOk1uqC4LmBl8EZdgxZsirKDrHYY=.33176f7a-0fea-4dde-a4db-80d6096dd6b2@github.com> On Tue, 22 Apr 2025 23:05:01 GMT, Alexander Zvegintsev wrote: >> Damon Nguyen has updated the pull request incrementally with one additional commit since the last revision: >> >> Add delay at the start of runTest. Modify final reminder. > > test/jdk/javax/swing/JScrollPane/AcceleratedWheelScrolling/HorizScrollers.java line 166: > >> 164: ("Test %s. Please make sure you have set " + >> 165: "the correct speed value and keep the " + >> 166: "mouse stationary.") > > The updated instructions should be corrected as well. > > It seems that this `JOptionPane` dialog is only displayed when one of the phases fails at non-default speed, and there is no further testing. > So the the `keep the mouse stationary` part is a little bit too late. > > This can be an issue though, but I think it is better to add a delay just before the test starts(`RTLScrollers.runTest`) to avoid catching mouse movements from a test used when he clicks the button. I see your point. Adjusted the dialog again to make sense for both pass/fail to restore the original speed. Also added a `robot.delay` to the beginning of `runTest`. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/24804#discussion_r2055025696 From azvegint at openjdk.org Wed Apr 23 00:08:40 2025 From: azvegint at openjdk.org (Alexander Zvegintsev) Date: Wed, 23 Apr 2025 00:08:40 GMT Subject: RFR: 8355332: Fix failing semi-manual test EDT issue [v2] In-Reply-To: References: Message-ID: On Tue, 22 Apr 2025 23:39:19 GMT, Damon Nguyen wrote: >> Fixed the failing test by adjusting the EDT block for `runTest`. Also fixed the strange phrasing for one of the instructions. Tested on W11 and passes. > > Damon Nguyen has updated the pull request incrementally with one additional commit since the last revision: > > Add delay at the start of runTest. Modify final reminder. Marked as reviewed by azvegint (Reviewer). ------------- PR Review: https://git.openjdk.org/jdk/pull/24804#pullrequestreview-2785654254 From dnguyen at openjdk.org Wed Apr 23 00:15:45 2025 From: dnguyen at openjdk.org (Damon Nguyen) Date: Wed, 23 Apr 2025 00:15:45 GMT Subject: Integrated: 8355332: Fix failing semi-manual test EDT issue In-Reply-To: References: Message-ID: <4poIGn3Dcztxq2Pnxf7_6LUv2SJ6D7hgA_1MRMDBXrM=.f39c1aeb-f6a8-4650-a2fe-3985faff9793@github.com> On Tue, 22 Apr 2025 22:11:20 GMT, Damon Nguyen wrote: > Fixed the failing test by adjusting the EDT block for `runTest`. Also fixed the strange phrasing for one of the instructions. Tested on W11 and passes. This pull request has now been integrated. Changeset: 53924882 Author: Damon Nguyen URL: https://git.openjdk.org/jdk/commit/53924882326d3756a4ec52f37a59c8a81059a069 Stats: 19 lines in 2 files changed: 2 ins; 5 del; 12 mod 8355332: Fix failing semi-manual test EDT issue Reviewed-by: azvegint ------------- PR: https://git.openjdk.org/jdk/pull/24804 From azvegint at openjdk.org Wed Apr 23 00:27:45 2025 From: azvegint at openjdk.org (Alexander Zvegintsev) Date: Wed, 23 Apr 2025 00:27:45 GMT Subject: RFR: 8347826: Introspector shows wrong method list after 8071693 [v12] In-Reply-To: <0645YLoDLjcLbjQxBs3QFCFVvenQjAeJlZANZ0hay_8=.e50b8551-4a2f-4cc5-b910-5f5544beb1f7@github.com> References: <0645YLoDLjcLbjQxBs3QFCFVvenQjAeJlZANZ0hay_8=.e50b8551-4a2f-4cc5-b910-5f5544beb1f7@github.com> Message-ID: On Thu, 3 Apr 2025 09:21:38 GMT, Roman Marchenko wrote: >> Fixed `com.sun.beans.introspect.MethodInfo#MethodOrder` to make `Introspector.addMethod()` working properly when filtering methods out. >> >> Also, after PR discussion, added the approptiate test cases with corresponding fixes in MethodInfo.java and PropertyInfo.java. >> >> --------- >> `getMethodDescriptors()` returns descriptors of public methods of a class and its parent classes, including default and static methods defined in interfaces. The result doesn't include methods which were declared and not implemented, bridge methods, or methods which were overriden in subclasses. >> >> When a subclass "overrides" a static method from a parent class `getMethodDescriptors()` behaves as follows: >> >> - In case of a clash with a class method, the class version will take precedence rather than interface's one. >> - If the same method appears in multiple classes/interfaces within the same hierarchy, the version from the most specific sub-interface will be selected. >> - If the method appears in classes/interfaces from different hierarchies, the result is undefined, either version can be returned. >> >> `getPropertyDescriptors()` returns descriptors of methods which were identified as getters or setters. As there can be the only method getter/setter per property, the following rules are applied when choosing a getter/setter: >> >> * Getters/setters for the same property defined (not necessarily overriden) in subclasses have higher precedence. >> * If there are getters/setters for the same property defined in the same class and argument types are assignable one to another, the method with the Least Common Supertype has the lower priority. If argument types are not assignable, the result is undefined (any method will be chosen). >> * Gettters/setters declared and not implemented are not considered. > > Roman Marchenko has updated the pull request incrementally with one additional commit since the last revision: > > Fixing review comments src/java.desktop/share/classes/java/beans/Introspector.java line 1060: > 1058: MethodDescriptor composite = new MethodDescriptor(old, md); > 1059: methods.put(name, composite); > 1060: } FYI, one of the JCK introspector tests fails because of this change. The test is quite complicated, so I am not able to provide a simple reproducer right away. But I'll post it later. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/23443#discussion_r2055074803 From ysuenaga at openjdk.org Wed Apr 23 01:07:49 2025 From: ysuenaga at openjdk.org (Yasumasa Suenaga) Date: Wed, 23 Apr 2025 01:07:49 GMT Subject: RFR: 8355077: Compiler error at splashscreen_gif.c due to unterminated string initialization In-Reply-To: References: Message-ID: On Sun, 20 Apr 2025 02:16:50 GMT, Yasumasa Suenaga wrote: > I tried to build OpenJDK with GCC 15.0.1 on Fedora 42 x86_64, however I saw following error. > > > * For target support_native_java.desktop_libsplashscreen_splashscreen_gif.o: > /home/ysuenaga/github-forked/jdk/src/java.desktop/share/native/libsplashscreen/splashscreen_gif.c:51:41: error: initializer-string for array of ?char? truncates NUL terminator but destination lacks ?nonstring? attribute (12 chars into 11 available) [-Werror=unterminated-string-initialization] > 51 | static const char szNetscape20ext[11] = "NETSCAPE2.0"; > | ^~~~~~~~~~~~~ > cc1: all warnings being treated as errors > > > This constant seems to be used to detect Netscape 2.0 extension in GIF image. It should be used to compare with extension block without NUL char, but we should tweak initialization to avoid this error for safety code. I think this behavior is not a bug in GCC. `splashscreen_gif.c` would be compiled with `-Wextra`, then `-Wunterminated-string-initialization` is enabled by default, then the warning would be reported as I shown. https://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html#index-Wunterminated-string-initialization As an option, we can set `nonstring` attribute as following. Similar use case in Linux Kernel has introduced in [GCC bugzilla](https://gcc.gnu.org/bugzilla/show_bug.cgi?id=117178). Is this more suitable in this case? diff --git a/src/java.desktop/share/native/libsplashscreen/splashscreen_gif.c b/src/java.desktop/share/native/libsplashscreen/splashscreen_gif.c index 3654c677493..047f08835ad 100644 --- a/src/java.desktop/share/native/libsplashscreen/splashscreen_gif.c +++ b/src/java.desktop/share/native/libsplashscreen/splashscreen_gif.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2005, 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2005, 2025, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -48,7 +48,7 @@ // restore the area overwritten by the graphic with // what was there prior to rendering the graphic. -static const char szNetscape20ext[11] = "NETSCAPE2.0"; +static const char szNetscape20ext[11] __attribute__((nonstring)) = "NETSCAPE2.0"; #define NSEXT_LOOP 0x01 // Loop Count field code ------------- PR Comment: https://git.openjdk.org/jdk/pull/24770#issuecomment-2822812782 From azvegint at openjdk.org Wed Apr 23 01:51:45 2025 From: azvegint at openjdk.org (Alexander Zvegintsev) Date: Wed, 23 Apr 2025 01:51:45 GMT Subject: RFR: 8339561: The test/jdk/java/awt/Paint/ListRepaint.java may fail after JDK-8327401 [v6] In-Reply-To: References: Message-ID: On Fri, 7 Mar 2025 01:56:41 GMT, Sergey Bylokhov wrote: >> Several tests modified by https://github.com/openjdk/jdk/pull/19339 have been tweaked, see inline comments. >> >> Notes: >> * We have a few XXXRepaint.java tests and in this patch, I updated all of them to follow the change added to the ListRepaint.java >> >> @azvegint @aivanov-jdk please take a look. > > Sergey Bylokhov has updated the pull request incrementally with one additional commit since the last revision: > > drop null check Marked as reviewed by azvegint (Reviewer). ------------- PR Review: https://git.openjdk.org/jdk/pull/20861#pullrequestreview-2785751853 From serb at openjdk.org Wed Apr 23 03:16:45 2025 From: serb at openjdk.org (Sergey Bylokhov) Date: Wed, 23 Apr 2025 03:16:45 GMT Subject: RFR: 8355333: Some Problem list entries point to non-existent / wrong files In-Reply-To: References: Message-ID: On Tue, 22 Apr 2025 22:09:16 GMT, Phil Race wrote: > Fix problem list for non-existent/incorrect paths Marked as reviewed by serb (Reviewer). ------------- PR Review: https://git.openjdk.org/jdk/pull/24803#pullrequestreview-2785829005 From serb at openjdk.org Wed Apr 23 03:16:46 2025 From: serb at openjdk.org (Sergey Bylokhov) Date: Wed, 23 Apr 2025 03:16:46 GMT Subject: RFR: 8354554: Open source several clipboard tests batch1 In-Reply-To: References: Message-ID: On Tue, 22 Apr 2025 22:49:31 GMT, Alexander Zvegintsev wrote: > few more clipboard tests are opensourced. Some of them are in problemlist. test/jdk/java/awt/Clipboard/LostOwnershipChainTest/SystemClipboard2ProcTest.java line 112: > 110: String javaPath = System.getProperty("java.home", ""); > 111: > 112: Process process = new ProcessBuilder( Don't we already have some libraries, like ProcessTools and OutputAnalyzer, to run tests in a separate process? Right now, this test, for example, skips all VM parameters. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/24806#discussion_r2055180010 From serb at openjdk.org Wed Apr 23 03:17:41 2025 From: serb at openjdk.org (Sergey Bylokhov) Date: Wed, 23 Apr 2025 03:17:41 GMT Subject: RFR: 8354553: Open source several clipboard tests batch0 In-Reply-To: <3_fAqOjaw7YUHcxrZHQL_0TXNfAWQPYhBSOPHiADfKg=.c3d97408-02fd-4ce3-9120-95b960b74da5@github.com> References: <3_fAqOjaw7YUHcxrZHQL_0TXNfAWQPYhBSOPHiADfKg=.c3d97408-02fd-4ce3-9120-95b960b74da5@github.com> Message-ID: <9oEWsBBFNr5fbnYFxiQDDBTDFAz2a0JbOqMuAcMhgzQ=.bbb3a09b-aba8-4ed4-b2b3-f0182d3256b8@github.com> On Tue, 22 Apr 2025 21:44:58 GMT, Alexander Zvegintsev wrote: > Few more tests are open sourced, all of them are in problem list. test/jdk/java/awt/Clipboard/ClipboardSecurity.java line 101: > 99: javaPath + File.separator + "bin" + File.separator + "java", > 100: "-cp", System.getProperty("test.classes", "."), > 101: "ClipboardSecurity", "client" Same question as in another PR. can we use ProcessTools/OutputAnalyzer? ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/24802#discussion_r2055180544 From serb at openjdk.org Wed Apr 23 03:20:44 2025 From: serb at openjdk.org (Sergey Bylokhov) Date: Wed, 23 Apr 2025 03:20:44 GMT Subject: RFR: 8355179: Reinstate javax/swing/JScrollBar/4865918/bug4865918.java headful and macos run [v2] In-Reply-To: References: Message-ID: On Tue, 22 Apr 2025 12:57:21 GMT, Prasanta Sadhukhan wrote: >> Now that CI linux system is transitioned, the [JDK-8346828](https://bugs.openjdk.org/browse/JDK-8346828) changes is reverted and test is made headful and run on all platforms including macos. >> CI testing is ok now.. > > Prasanta Sadhukhan has updated the pull request incrementally with one additional commit since the last revision: > > sorting Marked as reviewed by serb (Reviewer). ------------- PR Review: https://git.openjdk.org/jdk/pull/24774#pullrequestreview-2785832794 From serb at openjdk.org Wed Apr 23 03:39:41 2025 From: serb at openjdk.org (Sergey Bylokhov) Date: Wed, 23 Apr 2025 03:39:41 GMT Subject: RFR: 8355203: [macos] AquaButtonUI and AquaRootPaneUI repaint default button unnecessarily In-Reply-To: References: Message-ID: On Mon, 21 Apr 2025 19:52:18 GMT, Jeremy Wood wrote: > This removes the constant repainting of the AquaRootPaneUI's default button. > > A long time ago (before Mac OS Yosemite, around 2014) this was needed to match Aqua's native experience. But the default button no longer pulses, so we don't need to repaint ("pulse") the button continually. > > Here's a clip from a YouTube video I found demonstrating the pulsing effect that this PR removes (you may want to turn your volume off): > > https://github.com/user-attachments/assets/496bc003-ccba-4178-81bc-765e96d94316 > > This PR includes a test, but this test has never failed. (That is: this PR does not resolve a failing test.) This test would fail if the default button ever looked the same as a non-default button. > > My primary goal here was to remove the AquaButtonUI's AncestorListener, but while we're here we might as well remove the AquaRootPaneUI's timer and other cleanup. > > I tried and failed to rename the `private static final byte _pulsed` constant. (More details [here](https://github.com/openjdk/jdk/commit/89d0689f226b9e883df464e6f3e8c20074970499).) If anyone has suggestions for how to rename that without errors please let me know. src/java.desktop/macosx/classes/apple/laf/JRSUIConstants.java line 197: > 195: public static final State PRESSED = new State(_pressed); > 196: @Native private static final byte _pulsed = 5; > 197: public static final State DEFAULTBUTTON = new State(_pulsed); Is it still necessary to use the pulse property from JRS, or can we treat this button like any other and rely on the standard active/inactive state? ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/24778#discussion_r2055193259 From serb at openjdk.org Wed Apr 23 03:39:42 2025 From: serb at openjdk.org (Sergey Bylokhov) Date: Wed, 23 Apr 2025 03:39:42 GMT Subject: RFR: 8355203: [macos] AquaButtonUI and AquaRootPaneUI repaint default button unnecessarily In-Reply-To: References: Message-ID: On Wed, 23 Apr 2025 03:36:26 GMT, Sergey Bylokhov wrote: >> This removes the constant repainting of the AquaRootPaneUI's default button. >> >> A long time ago (before Mac OS Yosemite, around 2014) this was needed to match Aqua's native experience. But the default button no longer pulses, so we don't need to repaint ("pulse") the button continually. >> >> Here's a clip from a YouTube video I found demonstrating the pulsing effect that this PR removes (you may want to turn your volume off): >> >> https://github.com/user-attachments/assets/496bc003-ccba-4178-81bc-765e96d94316 >> >> This PR includes a test, but this test has never failed. (That is: this PR does not resolve a failing test.) This test would fail if the default button ever looked the same as a non-default button. >> >> My primary goal here was to remove the AquaButtonUI's AncestorListener, but while we're here we might as well remove the AquaRootPaneUI's timer and other cleanup. >> >> I tried and failed to rename the `private static final byte _pulsed` constant. (More details [here](https://github.com/openjdk/jdk/commit/89d0689f226b9e883df464e6f3e8c20074970499).) If anyone has suggestions for how to rename that without errors please let me know. > > src/java.desktop/macosx/classes/apple/laf/JRSUIConstants.java line 197: > >> 195: public static final State PRESSED = new State(_pressed); >> 196: @Native private static final byte _pulsed = 5; >> 197: public static final State DEFAULTBUTTON = new State(_pulsed); > > Is it still necessary to use the pulse property from JRS, or can we treat this button like any other and rely on the standard active/inactive state? or default button appearance is different? ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/24778#discussion_r2055193619 From psadhukhan at openjdk.org Wed Apr 23 03:42:48 2025 From: psadhukhan at openjdk.org (Prasanta Sadhukhan) Date: Wed, 23 Apr 2025 03:42:48 GMT Subject: Integrated: 8355179: Reinstate javax/swing/JScrollBar/4865918/bug4865918.java headful and macos run In-Reply-To: References: Message-ID: On Mon, 21 Apr 2025 11:29:03 GMT, Prasanta Sadhukhan wrote: > Now that CI linux system is transitioned, the [JDK-8346828](https://bugs.openjdk.org/browse/JDK-8346828) changes is reverted and test is made headful and run on all platforms including macos. > CI testing is ok now.. This pull request has now been integrated. Changeset: 8c89fb95 Author: Prasanta Sadhukhan URL: https://git.openjdk.org/jdk/commit/8c89fb95351ea0bc5ffdd920c18f9e820231f233 Stats: 34 lines in 1 file changed: 18 ins; 3 del; 13 mod 8355179: Reinstate javax/swing/JScrollBar/4865918/bug4865918.java headful and macos run Reviewed-by: abhiscxk, serb ------------- PR: https://git.openjdk.org/jdk/pull/24774 From duke at openjdk.org Wed Apr 23 05:18:41 2025 From: duke at openjdk.org (Jeremy Wood) Date: Wed, 23 Apr 2025 05:18:41 GMT Subject: RFR: 8355203: [macos] AquaButtonUI and AquaRootPaneUI repaint default button unnecessarily In-Reply-To: References: Message-ID: On Wed, 23 Apr 2025 03:37:01 GMT, Sergey Bylokhov wrote: >> src/java.desktop/macosx/classes/apple/laf/JRSUIConstants.java line 197: >> >>> 195: public static final State PRESSED = new State(_pressed); >>> 196: @Native private static final byte _pulsed = 5; >>> 197: public static final State DEFAULTBUTTON = new State(_pulsed); >> >> Is it still necessary to use the pulse property from JRS, or can we treat this button like any other and rely on the standard active/inactive state? > > or default button appearance is different? If I understand your question, I think the answer is: Yes, the State.DEFAULTBUTTON constant is necessary for default JButtons to render correctly. In case I misunderstood the question here is some additional context: The only place `DEFAULTBUTTON` is referenced is here: protected State getButtonState(final AbstractButton b, final ButtonModel model) { if (!b.isEnabled()) return State.DISABLED; // The default button shouldn't draw its color when the window is inactive. // Changed for : Aqua LAF Buttons are incorrectly drawn disabled // all we need to do is make sure we aren't the default button any more and that // we aren't active, but we still are enabled if the button is enabled. // if we set dimmed we would appear disabled despite being enabled and click through // works so this now matches the text drawing and most importantly the HIG if (!AquaFocusHandler.isActive(b)) return State.INACTIVE; if (model.isArmed() && model.isPressed()) return State.PRESSED; if (model.isSelected() && isSelectionPressing()) return State.PRESSED; if ((b instanceof JButton) && ((JButton)b).isDefaultButton()) return State.DEFAULTBUTTON; return State.ACTIVE; } I tried removing the line that returned `DEFAULTBUTTON`, but then the test attached to this PR failed; the default button rendered like a generic Aqua JButton. So we still need some mechanism to make sure default buttons paint correctly. In this branch: that mechanism is State.DEFAULTBUTTON. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/24778#discussion_r2055262099 From itakiguchi at openjdk.org Wed Apr 23 06:19:57 2025 From: itakiguchi at openjdk.org (Ichiroh Takiguchi) Date: Wed, 23 Apr 2025 06:19:57 GMT Subject: RFR: 8343618: Stack smashing in awt_InputMethod.c on Linux s390x In-Reply-To: <3YjyS-OEdDbu9Gx4R4aGdgnH3CQxOmWveykhXMRE858=.ee5cbd82-e7d2-4f3f-b990-02b89841f750@github.com> References: <3YjyS-OEdDbu9Gx4R4aGdgnH3CQxOmWveykhXMRE858=.ee5cbd82-e7d2-4f3f-b990-02b89841f750@github.com> Message-ID: On Mon, 24 Mar 2025 13:57:31 GMT, Zdenek Zambersky wrote: >> This fixes stack smashing issue in awt library on linux s390x. (jdk compiled with `-fstack-protector-strong`) >> >> Fix is based on patch [submitted](https://mail.openjdk.org/pipermail/awt-dev/2019-July/015337.html) in JDK-8227919 review thread, rebased to master. They decided to go for Solaris only fix there, with [expected follow-up](https://mail.openjdk.org/pipermail/awt-dev/2019-July/015347.html) for linux/s390x. But that never happened. >> >> I was not able to get response from original author for this issue, so I am creating PR myself. >> >> **Testing:** >> I tested jdk with and without this fix on linux/s390x (using Xvfb). It fixes the issue (reproducer for this bug no longer crashes the JVM). I have also tried to run `jdk_awt` tests, where lot of tests was also affected by this. With this patch amount of failures dropped by ~100. >> >> Without fix: >> >> TEST TOTAL PASS FAIL ERROR SKIP >>>> jtreg:test/jdk:jdk_awt 2171 1063 415 6 687 << >> >> >> With fix >> >> TEST TOTAL PASS FAIL ERROR SKIP >>>> jtreg:test/jdk:jdk_awt 2171 1162 316 6 687 << >> >> >> Many tests are no longer crashing the VM: >> >> -java/awt/Choice/ChoiceKeyEventReaction/ChoiceKeyEventReaction.java Failed. Unexpected exit from test [exit code: 134] >> +java/awt/Choice/ChoiceKeyEventReaction/ChoiceKeyEventReaction.java Passed. Execution successful >> >> There seem to be few unstable tests in jdk_awt. (Ones that fail in one or another run, but seem unrelated to this fix) >> >> I have not done any additional manual testing of XIM as did original author (in review thread mentioned higher), as I am not at all familiar with input method for Japanese (or other Asian characters), or how that supposed to work. (So I cannot verify that input of Asian characters works as expected on linux/s390x, but at least JVM no longer crashes.) > > Attaching jdk_awt jtreg results (with and without fix). > [jdk-awt-results.tgz](https://github.com/user-attachments/files/19430946/jdk-awt-results.tgz) @zzambers Sorry for my late reaction. Is it possible to add test result by using `XMODIFIERS=@im=local` ? ------------- PR Comment: https://git.openjdk.org/jdk/pull/24197#issuecomment-2823182871 From jwaters at openjdk.org Wed Apr 23 07:59:51 2025 From: jwaters at openjdk.org (Julian Waters) Date: Wed, 23 Apr 2025 07:59:51 GMT Subject: RFR: 8342870: Errors related to unused code on Windows after 8339120 in accessibility [v6] In-Reply-To: References: Message-ID: <4Ros9K7vGXcZfYkUuFH79oo0fKrJ7t5O-UpKCCOzlYM=.20fab263-2fe7-49c6-939d-9f0f9b369d91@github.com> On Thu, 23 Jan 2025 05:37:29 GMT, Julian Waters wrote: >> After 8339120, gcc began catching many different instances of unused code in the Windows specific codebase. Some of these seem to be bugs. I've taken the effort to mark out all the relevant globals and locals that trigger the unused warnings and addressed all of them by commenting out the code as appropriate. I am confident that in many cases this simplistic approach of commenting out code does not fix the underlying issue, and the warning actually found a bug that should be fixed. In these instances, I will be aiming to fix these bugs with help from reviewers, so I recommend anyone reviewing who knows more about the code than I do to see whether there is indeed a bug that needs fixing in a different way than what I did >> >> build.log on release configuration: >> >> C:/users/vertig0/downloads/eclipse-committers-2023-12-r-win32-x86_64/workspace/jdk/src/jdk.accessibility/windows/native/jabswitch/jabswitch.cpp: In function 'int regEnable()': >> C:/users/vertig0/downloads/eclipse-committers-2023-12-r-win32-x86_64/workspace/jdk/src/jdk.accessibility/windows/native/jabswitch/jabswitch.cpp:334:14: warning: unused variable 'freeData' [-Wunused-variable] >> 334 | bool freeData = false; >> | ^~~~~~~~ >> C:/users/vertig0/downloads/eclipse-committers-2023-12-r-win32-x86_64/workspace/jdk/src/jdk.accessibility/windows/native/jabswitch/jabswitch.cpp:326:11: warning: unused variable 'retval' [-Wunused-variable] >> 326 | DWORD retval = -1; >> | ^~~~~~ >> C:/users/vertig0/downloads/eclipse-committers-2023-12-r-win32-x86_64/workspace/jdk/src/jdk.accessibility/windows/native/jabswitch/jabswitch.cpp: In function 'int regDeleteValue(HKEY, LPCWSTR)': >> C:/users/vertig0/downloads/eclipse-committers-2023-12-r-win32-x86_64/workspace/jdk/src/jdk.accessibility/windows/native/jabswitch/jabswitch.cpp:379:14: warning: unused variable 'freeData' [-Wunused-variable] >> 379 | bool freeData = false; >> | ^~~~~~~~ >> C:/users/vertig0/downloads/eclipse-committers-2023-12-r-win32-x86_64/workspace/jdk/src/jdk.accessibility/windows/native/jabswitch/jabswitch.cpp:367:11: warning: unused variable 'retval' [-Wunused-variable] >> 367 | DWORD retval = -1; >> | ^~~~~~ >> C:/users/vertig0/downloads/eclipse-committers-2023-12-r-win32-x86_64/workspace/jdk/src/jdk.accessibility/windows/native/bridge/AccessBridgeCalls.c: In function 'shutdownAccessBridge': >> C:/users/vertig0/downloads/eclipse-committers-2023-12-r-win3... > > Julian Waters has updated the pull request incrementally with two additional commits since the last revision: > > - Typo in AccessBridgeCalls.c > - Fix AccessBridgeCalls.c Stay open ------------- PR Comment: https://git.openjdk.org/jdk/pull/21656#issuecomment-2823398888 From serb at openjdk.org Wed Apr 23 08:17:42 2025 From: serb at openjdk.org (Sergey Bylokhov) Date: Wed, 23 Apr 2025 08:17:42 GMT Subject: RFR: 8355203: [macos] AquaButtonUI and AquaRootPaneUI repaint default button unnecessarily In-Reply-To: References: Message-ID: On Wed, 23 Apr 2025 05:16:01 GMT, Jeremy Wood wrote: >> or default button appearance is different? > > If I understand your question, I think the answer is: > > Yes, the State.DEFAULTBUTTON constant is necessary for default JButtons to render correctly. > > In case I misunderstood the question here is some additional context: > > The only place `DEFAULTBUTTON` is referenced is here: > > protected State getButtonState(final AbstractButton b, final ButtonModel model) { > if (!b.isEnabled()) return State.DISABLED; > > // The default button shouldn't draw its color when the window is inactive. > // Changed for : Aqua LAF Buttons are incorrectly drawn disabled > // all we need to do is make sure we aren't the default button any more and that > // we aren't active, but we still are enabled if the button is enabled. > // if we set dimmed we would appear disabled despite being enabled and click through > // works so this now matches the text drawing and most importantly the HIG > if (!AquaFocusHandler.isActive(b)) return State.INACTIVE; > > if (model.isArmed() && model.isPressed()) return State.PRESSED; > if (model.isSelected() && isSelectionPressing()) return State.PRESSED; > if ((b instanceof JButton) && ((JButton)b).isDefaultButton()) return State.DEFAULTBUTTON; > > return State.ACTIVE; > } > > > I tried removing the line that returned `DEFAULTBUTTON`, but then the test attached to this PR failed; the default button rendered like a generic Aqua JButton. So we still need some mechanism to make sure default buttons paint correctly. In this branch: that mechanism is State.DEFAULTBUTTON. >public static final State DEFAULTBUTTON = new State(_pulsed); This line maps the State.DEFAULTBUTTON constant to the _pulsed property in JRS (JRSUIProperties.h). Although _pulse is no longer supported, there does not seem to be a suitable alternative, so unfortunately we're still stuck with pulse forever. enum { kJRSUI_State_active = 1, kJRSUI_State_inactive = 2, kJRSUI_State_disabled = 3, kJRSUI_State_pressed = 4, kJRSUI_State_pulsed = 5, kJRSUI_State_rollover = 6, kJRSUI_State_drag = 7 }; typedef CFIndex JRSUIState; ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/24778#discussion_r2055504102 From mvs at openjdk.org Wed Apr 23 09:40:19 2025 From: mvs at openjdk.org (Manukumar V S) Date: Wed, 23 Apr 2025 09:40:19 GMT Subject: RFR: 8355366: Fix the wrong usage of PassFailJFrame.forcePass() in some manual tests Message-ID: Fix the wrong usage of PassFailJFrame.forcePass() in some manual tests from java.awt.Desktop package. These tests should be fixed similar to [JDK-8352109](https://bugs.openjdk.org/browse/JDK-8352109) and jtreg.SkippedException should be used instead of PassFailJFrame.forcePass(). Affected tests: 1. https://github.com/openjdk/jdk/blob/master/test/jdk/java/awt/Desktop/BrowseTest.java 2. https://github.com/openjdk/jdk/blob/master/test/jdk/java/awt/Desktop/OpenTest.java 3. https://github.com/openjdk/jdk/blob/master/test/jdk/java/awt/Desktop/EditAndPrintTest/EditAndPrintTest.java Testing: All the changed tests are tested manually and found to be working fine. ------------- Commit messages: - 8355366: Fix the wrong usage of PassFailJFrame.forcePass() in some manual tests Changes: https://git.openjdk.org/jdk/pull/24820/files Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=24820&range=00 Issue: https://bugs.openjdk.org/browse/JDK-8355366 Stats: 55 lines in 3 files changed: 24 ins; 25 del; 6 mod Patch: https://git.openjdk.org/jdk/pull/24820.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/24820/head:pull/24820 PR: https://git.openjdk.org/jdk/pull/24820 From aivanov at openjdk.org Wed Apr 23 10:12:46 2025 From: aivanov at openjdk.org (Alexey Ivanov) Date: Wed, 23 Apr 2025 10:12:46 GMT Subject: RFR: 8354219 : Automate javax/swing/JComboBox/ComboPopupBug.java [v4] In-Reply-To: References: Message-ID: On Tue, 22 Apr 2025 16:11:28 GMT, Anass Baya wrote: >> This test was designed to manually verify that clicking on the JComboBox when the frame containing it is about to close does not cause an IllegalStateException. >> >> The test allowed the tester extra time to click on the JComboBox when closing the frame by adding a Thread.sleep() in the close button handler. >> >> In this test, a JComboBox is displayed with a Close button at the bottom. The tester should click the Close button, then try to click the JComboBox arrow button to display the popup. >> >> In the automated test, we save the JComboBox location size before closing the frame. We then use this information to click on the JComboBox right before the frame is closed. > > Anass Baya has updated the pull request incrementally with one additional commit since the last revision: > > Update Copyright Changes requested by aivanov (Reviewer). test/jdk/javax/swing/JComboBox/ComboPopupBug.java line 62: > 60: > 61: private static JFrame createUI() { > 62: JFrame frame = new JFrame("ComboPopup"); To reduce the number of changes compared to the previous version, I suggest keeping `createUI` method, just change its return type to `void` and pass the reference `ComboPopupBug::createUI` to `invokeAndWait`. This way would be cleaner, I think. test/jdk/javax/swing/JComboBox/ComboPopupBug.java line 66: > 64: clickComboBox(); > 65: frame.setVisible(false); > 66: }); Reduce indentation. Suggestion: closeButton.addActionListener((e) -> { clickComboBox(); frame.setVisible(false); }); test/jdk/javax/swing/JComboBox/ComboPopupBug.java line 80: > 78: SwingUtilities.invokeAndWait(() -> closeButton.doClick()); > 79: } > 80: finally { Use Java code style. Suggestion: } finally { test/jdk/javax/swing/JComboBox/ComboPopupBug.java line 85: > 83: } > 84: > 85: public static void clickComboBox() { Suggestion: private static void clickComboBox() { Not that important, yet I prefer having all the methods `private`. test/jdk/javax/swing/JComboBox/ComboPopupBug.java line 87: > 85: public static void clickComboBox() { > 86: comboBoxLocation = comboBox.getLocationOnScreen(); > 87: comboBoxSize = comboBox.getSize(); Both `comboBoxLocation` and `comboBoxSize` should be local variables declared here, in the `clickComboBox` method. test/jdk/javax/swing/JComboBox/ComboPopupBug.java line 92: > 90: comboBoxLocation.y + comboBoxSize.height / 2); > 91: robot.mousePress(InputEvent.BUTTON1_MASK); > 92: robot.mouseRelease(InputEvent.BUTTON1_MASK); Use the recommended constants instead of deprecated ones. Suggestion: robot.mousePress(InputEvent.BUTTON1_DOWN_MASK); robot.mouseRelease(InputEvent.BUTTON1_DOWN_MASK); ------------- PR Review: https://git.openjdk.org/jdk/pull/24624#pullrequestreview-2786723132 PR Review Comment: https://git.openjdk.org/jdk/pull/24624#discussion_r2055717632 PR Review Comment: https://git.openjdk.org/jdk/pull/24624#discussion_r2055699136 PR Review Comment: https://git.openjdk.org/jdk/pull/24624#discussion_r2055702144 PR Review Comment: https://git.openjdk.org/jdk/pull/24624#discussion_r2055707240 PR Review Comment: https://git.openjdk.org/jdk/pull/24624#discussion_r2055705815 PR Review Comment: https://git.openjdk.org/jdk/pull/24624#discussion_r2055721502 From syan at openjdk.org Wed Apr 23 10:12:55 2025 From: syan at openjdk.org (SendaoYan) Date: Wed, 23 Apr 2025 10:12:55 GMT Subject: RFR: 8352149: open/test/jdk/java/awt/Frame/MultiScreenTest.java fails in MacOS In-Reply-To: <-t5iRw5c31W0E-mPWTvHk9PoP819SUA9xrAwMZfJEDc=.c61d9c20-5397-4ab2-89ac-dab4b50b2a0e@github.com> References: <-t5iRw5c31W0E-mPWTvHk9PoP819SUA9xrAwMZfJEDc=.c61d9c20-5397-4ab2-89ac-dab4b50b2a0e@github.com> Message-ID: On Fri, 18 Apr 2025 13:10:10 GMT, Khalid Boulanouare wrote: > Fixes issue in which the test fails when run on multi-screen machine. > > Tested on Ubuntu 24.04, MacOS 15 and Windows 11 > > JTREG > > runner starting test: java/awt/Frame/MultiScreenTest.java > runner finished test: java/awt/Frame/MultiScreenTest.java > Passed. Execution successful Copy right year should be updated. ------------- Changes requested by syan (Committer). PR Review: https://git.openjdk.org/jdk/pull/24752#pullrequestreview-2779987625 From duke at openjdk.org Wed Apr 23 10:12:55 2025 From: duke at openjdk.org (Khalid Boulanouare) Date: Wed, 23 Apr 2025 10:12:55 GMT Subject: RFR: 8352149: open/test/jdk/java/awt/Frame/MultiScreenTest.java fails in MacOS Message-ID: <-t5iRw5c31W0E-mPWTvHk9PoP819SUA9xrAwMZfJEDc=.c61d9c20-5397-4ab2-89ac-dab4b50b2a0e@github.com> Fixes issue in which the test fails when run on multi-screen machine. Tested on Ubuntu 24.04, MacOS 15 and Windows 11 JTREG runner starting test: java/awt/Frame/MultiScreenTest.java runner finished test: java/awt/Frame/MultiScreenTest.java Passed. Execution successful ------------- Commit messages: - 8352149: open/test/jdk/java/awt/Frame/MultiScreenTest.java fails in MacOS - 8352149: open/test/jdk/java/awt/Frame/MultiScreenTest.java fails in MacOS Changes: https://git.openjdk.org/jdk/pull/24752/files Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=24752&range=00 Issue: https://bugs.openjdk.org/browse/JDK-8352149 Stats: 33 lines in 1 file changed: 5 ins; 0 del; 28 mod Patch: https://git.openjdk.org/jdk/pull/24752.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/24752/head:pull/24752 PR: https://git.openjdk.org/jdk/pull/24752 From tr at openjdk.org Wed Apr 23 10:19:50 2025 From: tr at openjdk.org (Tejesh R) Date: Wed, 23 Apr 2025 10:19:50 GMT Subject: RFR: 8139228: JFileChooser renders file names as HTML document In-Reply-To: References: Message-ID: On Tue, 22 Apr 2025 15:35:24 GMT, Alexey Ivanov wrote: >> @mrserb You mean to say that, same issue would be their for Windows L&F too, since we are unable to test it directly it's been missed ? > >> > Because it's impossible to create a file with `` in the name on Windows. >> >> But is should be possible to trigger the bug using a custom FileSystemView without interacting with the actual file system? > > An interesting idea. Using a custom `FileSystemView` for testing on Windows should be explored. > >> @mrserb You mean to say that, same issue would be their for Windows L&F too, since we are unable to test it directly it's been missed ? > > @TejeshR13 I'm pretty sure Windows L&F is affected too. > > You could remediated the issue by setting `"html.disable"` on `FilePane`, but it may be not enough as you also modified `FileChooserUI` for each L&F. I don't think we can reproduce this issue even with custom FileSystemView because windows doesn't allow to create a file with special characters, it just discard those special characters. Also it doesn't allow to create a new folder with special characters through JFileChooser also. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/24439#discussion_r2055734029 From aivanov at openjdk.org Wed Apr 23 10:24:41 2025 From: aivanov at openjdk.org (Alexey Ivanov) Date: Wed, 23 Apr 2025 10:24:41 GMT Subject: RFR: 8139228: JFileChooser renders file names as HTML document In-Reply-To: References: Message-ID: On Wed, 23 Apr 2025 10:17:16 GMT, Tejesh R wrote: >>> > Because it's impossible to create a file with `` in the name on Windows. >>> >>> But is should be possible to trigger the bug using a custom FileSystemView without interacting with the actual file system? >> >> An interesting idea. Using a custom `FileSystemView` for testing on Windows should be explored. >> >>> @mrserb You mean to say that, same issue would be their for Windows L&F too, since we are unable to test it directly it's been missed ? >> >> @TejeshR13 I'm pretty sure Windows L&F is affected too. >> >> You could remediated the issue by setting `"html.disable"` on `FilePane`, but it may be not enough as you also modified `FileChooserUI` for each L&F. > > I don't think we can reproduce this issue even with custom FileSystemView because windows doesn't allow to create a file with special characters, it just discard those special characters. Also it doesn't allow to create a new folder with special characters through JFileChooser also. That's the point of using a custom `FileSystemView`? not to create the files on the file system but to return the list of files. The files themselves may not exist on the file system at all. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/24439#discussion_r2055741736 From tr at openjdk.org Wed Apr 23 10:38:44 2025 From: tr at openjdk.org (Tejesh R) Date: Wed, 23 Apr 2025 10:38:44 GMT Subject: RFR: 8139228: JFileChooser renders file names as HTML document In-Reply-To: References: Message-ID: On Wed, 23 Apr 2025 10:22:09 GMT, Alexey Ivanov wrote: >> I don't think we can reproduce this issue even with custom FileSystemView because windows doesn't allow to create a file with special characters, it just discard those special characters. Also it doesn't allow to create a new folder with special characters through JFileChooser also. > > That's the point of using a custom `FileSystemView`? not to create the files on the file system but to return the list of files. The files themselves may not exist on the file system at all. When we are unable to create a folder with special characters in windows OS, why do we need to test it using custom `FileSystemView` ? My point is will any developer do this in windows? ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/24439#discussion_r2055762842 From abhiscxk at openjdk.org Wed Apr 23 11:12:56 2025 From: abhiscxk at openjdk.org (Abhishek Kumar) Date: Wed, 23 Apr 2025 11:12:56 GMT Subject: RFR: 8352733: Improve RotFontBoundsTest test In-Reply-To: References: Message-ID: On Tue, 22 Apr 2025 20:24:04 GMT, Alexey Ivanov wrote: > * Use `PassFailJFrame` framework for creating the manual test UI. > * Provide check boxes for each degree of rotation which allow hiding and showing the specified rotation. > * Provide **Select All** and **Clear All** buttons. > * Display Java version. Marked as reviewed by abhiscxk (Reviewer). ------------- PR Review: https://git.openjdk.org/jdk/pull/24799#pullrequestreview-2786915281 From aivanov at openjdk.org Wed Apr 23 11:25:42 2025 From: aivanov at openjdk.org (Alexey Ivanov) Date: Wed, 23 Apr 2025 11:25:42 GMT Subject: RFR: 8139228: JFileChooser renders file names as HTML document In-Reply-To: References: Message-ID: On Wed, 23 Apr 2025 10:36:13 GMT, Tejesh R wrote: >> That's the point of using a custom `FileSystemView`? not to create the files on the file system but to return the list of files. The files themselves may not exist on the file system at all. > > When we are unable to create a folder with special characters in windows OS, why do we need to test it using custom `FileSystemView` ? My point is will any developer do this in windows? Because the problem is still there, and there are virtual folders on Windows. If a custom `FileSystemView` can return file names with `""` in their name, `JFileChooser` in Windows Look and Feel will render the file name as HTML. Isn't it the problem that you're trying to fix? ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/24439#discussion_r2055837348 From rkannathpari at openjdk.org Wed Apr 23 12:25:16 2025 From: rkannathpari at openjdk.org (Renjith Kannath Pariyangad) Date: Wed, 23 Apr 2025 12:25:16 GMT Subject: RFR: 8334016: Make PrintNullString.java semi-automatic [v2] In-Reply-To: References: Message-ID: > Hi Reviewers, > > I have updated the test and made it semi-automatic (need to click "Print") . Test will initiate a print and result will be generated automatic. > > Please review and let me know your suggestions. Renjith Kannath Pariyangad has updated the pull request incrementally with one additional commit since the last revision: Made test fully automatic ------------- Changes: - all: https://git.openjdk.org/jdk/pull/24501/files - new: https://git.openjdk.org/jdk/pull/24501/files/89af4bea..5d53c5c9 Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=24501&range=01 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=24501&range=00-01 Stats: 50 lines in 1 file changed: 4 ins; 31 del; 15 mod Patch: https://git.openjdk.org/jdk/pull/24501.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/24501/head:pull/24501 PR: https://git.openjdk.org/jdk/pull/24501 From rkannathpari at openjdk.org Wed Apr 23 12:31:46 2025 From: rkannathpari at openjdk.org (Renjith Kannath Pariyangad) Date: Wed, 23 Apr 2025 12:31:46 GMT Subject: RFR: 8334016: Make PrintNullString.java automatic In-Reply-To: References: Message-ID: On Wed, 16 Apr 2025 19:04:57 GMT, Phil Race wrote: >> Hi Reviewers, >> >> I have updated the test and made it semi-automatic (need to click "Print") . Test will initiate a print and result will be generated automatic. >> >> Please review and let me know your suggestions. > > I don't think these changes are worth doing. > What I would do is make the test completely automated. > You don't need a user to create a printerjob any more - although you did when this test was first written > Also you can print to file so you don't even need to waste paper. Thanks @prrace for your time and review, I have modified the test and now its fully automatic, as you suggested above used print to file option. ------------- PR Comment: https://git.openjdk.org/jdk/pull/24501#issuecomment-2824125480 From duke at openjdk.org Wed Apr 23 13:53:41 2025 From: duke at openjdk.org (Pabulaner IV) Date: Wed, 23 Apr 2025 13:53:41 GMT Subject: RFR: 8332947: [macos] java.awt.desktop.OpenURIHandler is not receiving events In-Reply-To: References: Message-ID: On Wed, 2 Apr 2025 14:15:28 GMT, Pabulaner IV wrote: > When trying to register an open URI handler when using JavaFX with a native menu, this task fails on Mac. > Either the native menu is not shown or the URIs are not received. > > This pull request fixes this issue if AWT is registered after JavaFX, so that AWT runs embedded inside JavaFX. > It fixes this by introducing a native event to AWT, which can be used by JavaFX to forward events such as an openURL event. > > JavaFX Pull Request: https://github.com/openjdk/jfx/pull/1755 > Co-Author: @FlorianKirmaier So I adapted the test to the new requirements. The test can be found here: https://github.com/pabulaner/openurifx Currently I just put the JDK and JFX builds right into the repo, but they can be self build and easily changed inside the test script. Maybe You can give me feedback if that is the test You expected or if it was something else @kevinrushforth . When I tested it, it didn't seem to give any errors and worked without problems. ------------- PR Comment: https://git.openjdk.org/jdk/pull/24379#issuecomment-2824378411 From zzambers at openjdk.org Wed Apr 23 15:12:48 2025 From: zzambers at openjdk.org (Zdenek Zambersky) Date: Wed, 23 Apr 2025 15:12:48 GMT Subject: RFR: 8343618: Stack smashing in awt_InputMethod.c on Linux s390x In-Reply-To: <3YjyS-OEdDbu9Gx4R4aGdgnH3CQxOmWveykhXMRE858=.ee5cbd82-e7d2-4f3f-b990-02b89841f750@github.com> References: <3YjyS-OEdDbu9Gx4R4aGdgnH3CQxOmWveykhXMRE858=.ee5cbd82-e7d2-4f3f-b990-02b89841f750@github.com> Message-ID: <_eOfl-anqDLwR6jF6HhNA6oxc4ckZMA8GpwnMfWX73M=.bf4264e7-3aeb-40ac-a136-271b2cbb2a11@github.com> On Mon, 24 Mar 2025 13:57:31 GMT, Zdenek Zambersky wrote: >> This fixes stack smashing issue in awt library on linux s390x. (jdk compiled with `-fstack-protector-strong`) >> >> Fix is based on patch [submitted](https://mail.openjdk.org/pipermail/awt-dev/2019-July/015337.html) in JDK-8227919 review thread, rebased to master. They decided to go for Solaris only fix there, with [expected follow-up](https://mail.openjdk.org/pipermail/awt-dev/2019-July/015347.html) for linux/s390x. But that never happened. >> >> I was not able to get response from original author for this issue, so I am creating PR myself. >> >> **Testing:** >> I tested jdk with and without this fix on linux/s390x (using Xvfb). It fixes the issue (reproducer for this bug no longer crashes the JVM). I have also tried to run `jdk_awt` tests, where lot of tests was also affected by this. With this patch amount of failures dropped by ~100. >> >> Without fix: >> >> TEST TOTAL PASS FAIL ERROR SKIP >>>> jtreg:test/jdk:jdk_awt 2171 1063 415 6 687 << >> >> >> With fix >> >> TEST TOTAL PASS FAIL ERROR SKIP >>>> jtreg:test/jdk:jdk_awt 2171 1162 316 6 687 << >> >> >> Many tests are no longer crashing the VM: >> >> -java/awt/Choice/ChoiceKeyEventReaction/ChoiceKeyEventReaction.java Failed. Unexpected exit from test [exit code: 134] >> +java/awt/Choice/ChoiceKeyEventReaction/ChoiceKeyEventReaction.java Passed. Execution successful >> >> There seem to be few unstable tests in jdk_awt. (Ones that fail in one or another run, but seem unrelated to this fix) >> >> I have not done any additional manual testing of XIM as did original author (in review thread mentioned higher), as I am not at all familiar with input method for Japanese (or other Asian characters), or how that supposed to work. (So I cannot verify that input of Asian characters works as expected on linux/s390x, but at least JVM no longer crashes.) > > Attaching jdk_awt jtreg results (with and without fix). > [jdk-awt-results.tgz](https://github.com/user-attachments/files/19430946/jdk-awt-results.tgz) > @zzambers Sorry for my late reaction. Is it possible to add test result by using `XMODIFIERS=@im=local` ? Thank you for you reaction. I can do some additional testing. You mean to just run the tests with `XMODIFIERS` env. variable set to given value? Are there any other requirements about test system? Note that I only have access to headless linux/s390x machines, so I used Xvfb as X11 server. ------------- PR Comment: https://git.openjdk.org/jdk/pull/24197#issuecomment-2824641158 From prr at openjdk.org Wed Apr 23 15:47:50 2025 From: prr at openjdk.org (Phil Race) Date: Wed, 23 Apr 2025 15:47:50 GMT Subject: Integrated: 8355333: Some Problem list entries point to non-existent / wrong files In-Reply-To: References: Message-ID: On Tue, 22 Apr 2025 22:09:16 GMT, Phil Race wrote: > Fix problem list for non-existent/incorrect paths This pull request has now been integrated. Changeset: 32a597b3 Author: Phil Race URL: https://git.openjdk.org/jdk/commit/32a597b36f994d6e720e0576ad110dac4a5304fe Stats: 5 lines in 1 file changed: 0 ins; 2 del; 3 mod 8355333: Some Problem list entries point to non-existent / wrong files Reviewed-by: serb ------------- PR: https://git.openjdk.org/jdk/pull/24803 From honkar at openjdk.org Wed Apr 23 16:03:41 2025 From: honkar at openjdk.org (Harshitha Onkar) Date: Wed, 23 Apr 2025 16:03:41 GMT Subject: RFR: 8352733: Improve RotFontBoundsTest test In-Reply-To: References: Message-ID: On Tue, 22 Apr 2025 20:24:04 GMT, Alexey Ivanov wrote: > * Use `PassFailJFrame` framework for creating the manual test UI. > * Provide check boxes for each degree of rotation which allow hiding and showing the specified rotation. > * Provide **Select All** and **Clear All** buttons. > * Display Java version. Marked as reviewed by honkar (Reviewer). ------------- PR Review: https://git.openjdk.org/jdk/pull/24799#pullrequestreview-2787880984 From duke at openjdk.org Wed Apr 23 18:15:11 2025 From: duke at openjdk.org (Jeremy Wood) Date: Wed, 23 Apr 2025 18:15:11 GMT Subject: RFR: 8355203: [macos] AquaButtonUI and AquaRootPaneUI repaint default button unnecessarily In-Reply-To: References: Message-ID: <4JC_8BldqfBwUdHe-mjVB-gEvKt-0iaZijOc3M-x8tg=.865559dc-5154-47ec-8e1e-f3ab89ef40e6@github.com> On Wed, 23 Apr 2025 08:15:14 GMT, Sergey Bylokhov wrote: >> If I understand your question, I think the answer is: >> >> Yes, the State.DEFAULTBUTTON constant is necessary for default JButtons to render correctly. >> >> In case I misunderstood the question here is some additional context: >> >> The only place `DEFAULTBUTTON` is referenced is here: >> >> protected State getButtonState(final AbstractButton b, final ButtonModel model) { >> if (!b.isEnabled()) return State.DISABLED; >> >> // The default button shouldn't draw its color when the window is inactive. >> // Changed for : Aqua LAF Buttons are incorrectly drawn disabled >> // all we need to do is make sure we aren't the default button any more and that >> // we aren't active, but we still are enabled if the button is enabled. >> // if we set dimmed we would appear disabled despite being enabled and click through >> // works so this now matches the text drawing and most importantly the HIG >> if (!AquaFocusHandler.isActive(b)) return State.INACTIVE; >> >> if (model.isArmed() && model.isPressed()) return State.PRESSED; >> if (model.isSelected() && isSelectionPressing()) return State.PRESSED; >> if ((b instanceof JButton) && ((JButton)b).isDefaultButton()) return State.DEFAULTBUTTON; >> >> return State.ACTIVE; >> } >> >> >> I tried removing the line that returned `DEFAULTBUTTON`, but then the test attached to this PR failed; the default button rendered like a generic Aqua JButton. So we still need some mechanism to make sure default buttons paint correctly. In this branch: that mechanism is State.DEFAULTBUTTON. > >>public static final State DEFAULTBUTTON = new State(_pulsed); > > This line maps the State.DEFAULTBUTTON constant to the _pulsed property in JRS (JRSUIProperties.h). Although _pulse is no longer supported, there does not seem to be a suitable alternative, so unfortunately we're still stuck with pulse forever. > > > enum { > kJRSUI_State_active = 1, > kJRSUI_State_inactive = 2, > kJRSUI_State_disabled = 3, > kJRSUI_State_pressed = 4, > kJRSUI_State_pulsed = 5, > kJRSUI_State_rollover = 6, > kJRSUI_State_drag = 7 > }; > typedef CFIndex JRSUIState; Ah, thanks for identifying the problem. Wait... is that still the correct file? When I search my machine for that file I get a path like: `/Library/Developer/CommandLineTools/SDKs/MacOSX15.4.sdk/System/Library/Frameworks/JavaRuntimeSupport.framework/Versions/A/Headers/JRSUIProperties.h` But I don't see a copy of that file for JDK v20 or higher. Either way: any objections to my adding comments like these for posterity? image ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/24778#discussion_r2056642928 From honkar at openjdk.org Wed Apr 23 18:34:00 2025 From: honkar at openjdk.org (Harshitha Onkar) Date: Wed, 23 Apr 2025 18:34:00 GMT Subject: RFR: JDK-8355429 : Open source ProgressMonitor test Message-ID: javax/swing/ProgressMonitor/bug4401480.java open-sourced ------------- Commit messages: - JProgressMonitor test Changes: https://git.openjdk.org/jdk/pull/24833/files Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=24833&range=00 Issue: https://bugs.openjdk.org/browse/JDK-8355429 Stats: 101 lines in 1 file changed: 101 ins; 0 del; 0 mod Patch: https://git.openjdk.org/jdk/pull/24833.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/24833/head:pull/24833 PR: https://git.openjdk.org/jdk/pull/24833 From prr at openjdk.org Wed Apr 23 18:40:46 2025 From: prr at openjdk.org (Phil Race) Date: Wed, 23 Apr 2025 18:40:46 GMT Subject: RFR: 8355366: Fix the wrong usage of PassFailJFrame.forcePass() in some manual tests In-Reply-To: References: Message-ID: On Wed, 23 Apr 2025 09:35:25 GMT, Manukumar V S wrote: > Fix the wrong usage of PassFailJFrame.forcePass() in some manual tests from java.awt.Desktop package. These tests should be fixed similar to [JDK-8352109](https://bugs.openjdk.org/browse/JDK-8352109) and jtreg.SkippedException should be used instead of PassFailJFrame.forcePass(). > Affected tests: > 1. https://github.com/openjdk/jdk/blob/master/test/jdk/java/awt/Desktop/BrowseTest.java > 2. https://github.com/openjdk/jdk/blob/master/test/jdk/java/awt/Desktop/OpenTest.java > 3. https://github.com/openjdk/jdk/blob/master/test/jdk/java/awt/Desktop/EditAndPrintTest/EditAndPrintTest.java > > Testing: > All the changed tests are tested manually and found to be working fine. Marked as reviewed by prr (Reviewer). ------------- PR Review: https://git.openjdk.org/jdk/pull/24820#pullrequestreview-2788379069 From aivanov at openjdk.org Wed Apr 23 18:50:01 2025 From: aivanov at openjdk.org (Alexey Ivanov) Date: Wed, 23 Apr 2025 18:50:01 GMT Subject: Integrated: 8352733: Improve RotFontBoundsTest test In-Reply-To: References: Message-ID: <-NKc8JaoX34ZTS6ZB9ZN_9PoYQp7FDYXsrO2bdTIUng=.eb35827e-2f39-451f-8058-de622a0d1a56@github.com> On Tue, 22 Apr 2025 20:24:04 GMT, Alexey Ivanov wrote: > * Use `PassFailJFrame` framework for creating the manual test UI. > * Provide check boxes for each degree of rotation which allow hiding and showing the specified rotation. > * Provide **Select All** and **Clear All** buttons. > * Display Java version. This pull request has now been integrated. Changeset: bf8a881f Author: Alexey Ivanov URL: https://git.openjdk.org/jdk/commit/bf8a881f02da14a3d47b30eaf414dea76a1c231f Stats: 257 lines in 1 file changed: 257 ins; 0 del; 0 mod 8352733: Improve RotFontBoundsTest test Use PassFailJFrame framework for creating manual test UI. Provide check boxes for each degree of rotation which allow hiding and showing the specified rotation. Provide 'Select All' and 'Clear All' buttons. Display Java version at the bottom of the test. Reviewed-by: prr, azvegint, abhiscxk, honkar ------------- PR: https://git.openjdk.org/jdk/pull/24799 From prr at openjdk.org Wed Apr 23 18:57:43 2025 From: prr at openjdk.org (Phil Race) Date: Wed, 23 Apr 2025 18:57:43 GMT Subject: RFR: 8355203: [macos] AquaButtonUI and AquaRootPaneUI repaint default button unnecessarily In-Reply-To: <4JC_8BldqfBwUdHe-mjVB-gEvKt-0iaZijOc3M-x8tg=.865559dc-5154-47ec-8e1e-f3ab89ef40e6@github.com> References: <4JC_8BldqfBwUdHe-mjVB-gEvKt-0iaZijOc3M-x8tg=.865559dc-5154-47ec-8e1e-f3ab89ef40e6@github.com> Message-ID: On Wed, 23 Apr 2025 18:11:43 GMT, Jeremy Wood wrote: >>>public static final State DEFAULTBUTTON = new State(_pulsed); >> >> This line maps the State.DEFAULTBUTTON constant to the _pulsed property in JRS (JRSUIProperties.h). Although _pulse is no longer supported, there does not seem to be a suitable alternative, so unfortunately we're still stuck with pulse forever. >> >> >> enum { >> kJRSUI_State_active = 1, >> kJRSUI_State_inactive = 2, >> kJRSUI_State_disabled = 3, >> kJRSUI_State_pressed = 4, >> kJRSUI_State_pulsed = 5, >> kJRSUI_State_rollover = 6, >> kJRSUI_State_drag = 7 >> }; >> typedef CFIndex JRSUIState; > > Ah, thanks for identifying the problem. > > Wait... is that still the correct file? When I search my machine for that file I get a path like: > `/Library/Developer/CommandLineTools/SDKs/MacOSX15.4.sdk/System/Library/Frameworks/JavaRuntimeSupport.framework/Versions/A/Headers/JRSUIProperties.h` > > But I don't see a copy of that file for JDK v20 or higher. > > Either way: any objections to my adding comments like these for posterity? > > image This file (JRSUIProperties.h) is provided by Apple. It is there exclusively for use by the JDK - its is the compile time part of JavaRuntimeSupport.framework. So you won't find it in JDK sources. There's also a runtime framework part that's on every mac. You can certainly add a comment that it is misleading now, but I don't see anyway to change the name, and since the name matching is generally true for JRS, I don't think we need to call out the one instance. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/24778#discussion_r2056708118 From prr at openjdk.org Wed Apr 23 19:00:41 2025 From: prr at openjdk.org (Phil Race) Date: Wed, 23 Apr 2025 19:00:41 GMT Subject: RFR: 8355203: [macos] AquaButtonUI and AquaRootPaneUI repaint default button unnecessarily In-Reply-To: References: Message-ID: On Mon, 21 Apr 2025 19:52:18 GMT, Jeremy Wood wrote: > This removes the constant repainting of the AquaRootPaneUI's default button. > > A long time ago (before Mac OS Yosemite, around 2014) this was needed to match Aqua's native experience. But the default button no longer pulses, so we don't need to repaint ("pulse") the button continually. > > Here's a clip from a YouTube video I found demonstrating the pulsing effect that this PR removes (you may want to turn your volume off): > > https://github.com/user-attachments/assets/496bc003-ccba-4178-81bc-765e96d94316 > > This PR includes a test, but this test has never failed. (That is: this PR does not resolve a failing test.) This test would fail if the default button ever looked the same as a non-default button. > > My primary goal here was to remove the AquaButtonUI's AncestorListener, but while we're here we might as well remove the AquaRootPaneUI's timer and other cleanup. > > I tried and failed to rename the `private static final byte _pulsed` constant. (More details [here](https://github.com/openjdk/jdk/commit/89d0689f226b9e883df464e6f3e8c20074970499).) If anyone has suggestions for how to rename that without errors please let me know. I'm going to submit a test job, although I've no reason to think any test would be adversely affected, but I've been bitten before. ------------- PR Comment: https://git.openjdk.org/jdk/pull/24778#issuecomment-2825240784 From aivanov at openjdk.org Wed Apr 23 19:49:45 2025 From: aivanov at openjdk.org (Alexey Ivanov) Date: Wed, 23 Apr 2025 19:49:45 GMT Subject: RFR: 8355366: Fix the wrong usage of PassFailJFrame.forcePass() in some manual tests In-Reply-To: References: Message-ID: On Wed, 23 Apr 2025 09:35:25 GMT, Manukumar V S wrote: > Fix the wrong usage of PassFailJFrame.forcePass() in some manual tests from java.awt.Desktop package. These tests should be fixed similar to [JDK-8352109](https://bugs.openjdk.org/browse/JDK-8352109) and jtreg.SkippedException should be used instead of PassFailJFrame.forcePass(). > Affected tests: > 1. https://github.com/openjdk/jdk/blob/master/test/jdk/java/awt/Desktop/BrowseTest.java > 2. https://github.com/openjdk/jdk/blob/master/test/jdk/java/awt/Desktop/OpenTest.java > 3. https://github.com/openjdk/jdk/blob/master/test/jdk/java/awt/Desktop/EditAndPrintTest/EditAndPrintTest.java > > Testing: > All the changed tests are tested manually and found to be working fine. Looks good to me. Thank you for updating these tests to throw `SkippedException` instead of pretending to pass. Update copyright years in all the updated files. ------------- Changes requested by aivanov (Reviewer). PR Review: https://git.openjdk.org/jdk/pull/24820#pullrequestreview-2788534540 From aivanov at openjdk.org Wed Apr 23 20:00:52 2025 From: aivanov at openjdk.org (Alexey Ivanov) Date: Wed, 23 Apr 2025 20:00:52 GMT Subject: RFR: 8355366: Fix the wrong usage of PassFailJFrame.forcePass() in some manual tests In-Reply-To: References: Message-ID: On Wed, 23 Apr 2025 09:35:25 GMT, Manukumar V S wrote: > Fix the wrong usage of PassFailJFrame.forcePass() in some manual tests from java.awt.Desktop package. These tests should be fixed similar to [JDK-8352109](https://bugs.openjdk.org/browse/JDK-8352109) and jtreg.SkippedException should be used instead of PassFailJFrame.forcePass(). > Affected tests: > 1. https://github.com/openjdk/jdk/blob/master/test/jdk/java/awt/Desktop/BrowseTest.java > 2. https://github.com/openjdk/jdk/blob/master/test/jdk/java/awt/Desktop/OpenTest.java > 3. https://github.com/openjdk/jdk/blob/master/test/jdk/java/awt/Desktop/EditAndPrintTest/EditAndPrintTest.java > > Testing: > All the changed tests are tested manually and found to be working fine. I submitted [JDK-8355441](https://bugs.openjdk.org/browse/JDK-8355441) to remove the description of the incorrect usage from `PassFailJFrame.forcePass` javadoc. Feel free to assign to yourself and fix the issue. ------------- PR Comment: https://git.openjdk.org/jdk/pull/24820#issuecomment-2825375882 From honkar at openjdk.org Wed Apr 23 20:35:40 2025 From: honkar at openjdk.org (Harshitha Onkar) Date: Wed, 23 Apr 2025 20:35:40 GMT Subject: RFR: 8355366: Fix the wrong usage of PassFailJFrame.forcePass() in some manual tests In-Reply-To: References: Message-ID: On Wed, 23 Apr 2025 09:35:25 GMT, Manukumar V S wrote: > Fix the wrong usage of PassFailJFrame.forcePass() in some manual tests from java.awt.Desktop package. These tests should be fixed similar to [JDK-8352109](https://bugs.openjdk.org/browse/JDK-8352109) and jtreg.SkippedException should be used instead of PassFailJFrame.forcePass(). > Affected tests: > 1. https://github.com/openjdk/jdk/blob/master/test/jdk/java/awt/Desktop/BrowseTest.java > 2. https://github.com/openjdk/jdk/blob/master/test/jdk/java/awt/Desktop/OpenTest.java > 3. https://github.com/openjdk/jdk/blob/master/test/jdk/java/awt/Desktop/EditAndPrintTest/EditAndPrintTest.java > > Testing: > All the changed tests are tested manually and found to be working fine. LGTM ------------- Marked as reviewed by honkar (Reviewer). PR Review: https://git.openjdk.org/jdk/pull/24820#pullrequestreview-2788625451 From duke at openjdk.org Wed Apr 23 20:36:37 2025 From: duke at openjdk.org (Jeremy Wood) Date: Wed, 23 Apr 2025 20:36:37 GMT Subject: RFR: 8355203: [macos] AquaButtonUI and AquaRootPaneUI repaint default button unnecessarily [v2] In-Reply-To: References: Message-ID: <32mwQn83m5Xd9LrJnBN8iO92Ohfa-r2Wdc9vPqbM1NA=.73cabcf1-ad84-45d3-ad7d-97fd64d0b161@github.com> > This removes the constant repainting of the AquaRootPaneUI's default button. > > A long time ago (before Mac OS Yosemite, around 2014) this was needed to match Aqua's native experience. But the default button no longer pulses, so we don't need to repaint ("pulse") the button continually. > > Here's a clip from a YouTube video I found demonstrating the pulsing effect that this PR removes (you may want to turn your volume off): > > https://github.com/user-attachments/assets/496bc003-ccba-4178-81bc-765e96d94316 > > This PR includes a test, but this test has never failed. (That is: this PR does not resolve a failing test.) This test would fail if the default button ever looked the same as a non-default button. > > My primary goal here was to remove the AquaButtonUI's AncestorListener, but while we're here we might as well remove the AquaRootPaneUI's timer and other cleanup. > > I tried and failed to rename the `private static final byte _pulsed` constant. (More details [here](https://github.com/openjdk/jdk/commit/89d0689f226b9e883df464e6f3e8c20074970499).) If anyone has suggestions for how to rename that without errors please let me know. Jeremy Wood has updated the pull request incrementally with one additional commit since the last revision: 8344697: use `PULSED` again, but add comment for future reference ------------- Changes: - all: https://git.openjdk.org/jdk/pull/24778/files - new: https://git.openjdk.org/jdk/pull/24778/files/b8a0d31d..60021fcc Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=24778&range=01 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=24778&range=00-01 Stats: 10 lines in 2 files changed: 8 ins; 0 del; 2 mod Patch: https://git.openjdk.org/jdk/pull/24778.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/24778/head:pull/24778 PR: https://git.openjdk.org/jdk/pull/24778 From prr at openjdk.org Wed Apr 23 20:57:58 2025 From: prr at openjdk.org (Phil Race) Date: Wed, 23 Apr 2025 20:57:58 GMT Subject: RFR: 8354554: Open source several clipboard tests batch1 In-Reply-To: References: Message-ID: On Wed, 23 Apr 2025 03:13:35 GMT, Sergey Bylokhov wrote: >> few more clipboard tests are opensourced. Some of them are in problemlist. > > test/jdk/java/awt/Clipboard/LostOwnershipChainTest/SystemClipboard2ProcTest.java line 112: > >> 110: String javaPath = System.getProperty("java.home", ""); >> 111: >> 112: Process process = new ProcessBuilder( > > Don't we already have some libraries, like ProcessTools and OutputAnalyzer, to run tests in a separate process? > Right now, this test, for example, skips all VM parameters. This is PR opening tests which had this code written a long time ago. Before those libraries existed. I guess it was a matter of how much effort should be put in to modernise the test, just to get it into open. Alexander just minimally upgraded it to use ProcessBuilder. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/24806#discussion_r2056859607 From abaya at openjdk.org Wed Apr 23 21:00:08 2025 From: abaya at openjdk.org (Anass Baya) Date: Wed, 23 Apr 2025 21:00:08 GMT Subject: RFR: 8354219 : Automate javax/swing/JComboBox/ComboPopupBug.java [v5] In-Reply-To: References: Message-ID: > This test was designed to manually verify that clicking on the JComboBox when the frame containing it is about to close does not cause an IllegalStateException. > > The test allowed the tester extra time to click on the JComboBox when closing the frame by adding a Thread.sleep() in the close button handler. > > In this test, a JComboBox is displayed with a Close button at the bottom. The tester should click the Close button, then try to click the JComboBox arrow button to display the popup. > > In the automated test, we save the JComboBox location size before closing the frame. We then use this information to click on the JComboBox right before the frame is closed. Anass Baya has updated the pull request incrementally with one additional commit since the last revision: Use BUTTON1_DOWN_MASK Co-authored-by: Alexey Ivanov ------------- Changes: - all: https://git.openjdk.org/jdk/pull/24624/files - new: https://git.openjdk.org/jdk/pull/24624/files/7b60535b..ae9eaf10 Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=24624&range=04 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=24624&range=03-04 Stats: 2 lines in 1 file changed: 0 ins; 0 del; 2 mod Patch: https://git.openjdk.org/jdk/pull/24624.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/24624/head:pull/24624 PR: https://git.openjdk.org/jdk/pull/24624 From abaya at openjdk.org Wed Apr 23 21:05:06 2025 From: abaya at openjdk.org (Anass Baya) Date: Wed, 23 Apr 2025 21:05:06 GMT Subject: RFR: 8354219 : Automate javax/swing/JComboBox/ComboPopupBug.java [v6] In-Reply-To: References: Message-ID: <96HsRUw3FO3QGR-I4L2gB2lwuqFwYuDmJ17ZpvjAfEw=.3839e503-50a0-4549-b0fa-c52c2204b0e9@github.com> > This test was designed to manually verify that clicking on the JComboBox when the frame containing it is about to close does not cause an IllegalStateException. > > The test allowed the tester extra time to click on the JComboBox when closing the frame by adding a Thread.sleep() in the close button handler. > > In this test, a JComboBox is displayed with a Close button at the bottom. The tester should click the Close button, then try to click the JComboBox arrow button to display the popup. > > In the automated test, we save the JComboBox location size before closing the frame. We then use this information to click on the JComboBox right before the frame is closed. Anass Baya has updated the pull request incrementally with three additional commits since the last revision: - Adapt with JAVA code style Co-authored-by: Alexey Ivanov - Make clickComboBox private Co-authored-by: Alexey Ivanov - Reduce indentation. Co-authored-by: Alexey Ivanov ------------- Changes: - all: https://git.openjdk.org/jdk/pull/24624/files - new: https://git.openjdk.org/jdk/pull/24624/files/ae9eaf10..35ad53ca Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=24624&range=05 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=24624&range=04-05 Stats: 6 lines in 1 file changed: 0 ins; 1 del; 5 mod Patch: https://git.openjdk.org/jdk/pull/24624.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/24624/head:pull/24624 PR: https://git.openjdk.org/jdk/pull/24624 From azvegint at openjdk.org Wed Apr 23 21:05:29 2025 From: azvegint at openjdk.org (Alexander Zvegintsev) Date: Wed, 23 Apr 2025 21:05:29 GMT Subject: RFR: 8354554: Open source several clipboard tests batch1 [v2] In-Reply-To: References: Message-ID: > few more clipboard tests are opensourced. Some of them are in problemlist. Alexander Zvegintsev has updated the pull request incrementally with one additional commit since the last revision: use ProcessTools ------------- Changes: - all: https://git.openjdk.org/jdk/pull/24806/files - new: https://git.openjdk.org/jdk/pull/24806/files/eeb4c263..63ac4291 Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=24806&range=01 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=24806&range=00-01 Stats: 211 lines in 2 files changed: 14 ins; 184 del; 13 mod Patch: https://git.openjdk.org/jdk/pull/24806.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/24806/head:pull/24806 PR: https://git.openjdk.org/jdk/pull/24806 From azvegint at openjdk.org Wed Apr 23 21:08:38 2025 From: azvegint at openjdk.org (Alexander Zvegintsev) Date: Wed, 23 Apr 2025 21:08:38 GMT Subject: RFR: 8354553: Open source several clipboard tests batch0 [v2] In-Reply-To: <9oEWsBBFNr5fbnYFxiQDDBTDFAz2a0JbOqMuAcMhgzQ=.bbb3a09b-aba8-4ed4-b2b3-f0182d3256b8@github.com> References: <3_fAqOjaw7YUHcxrZHQL_0TXNfAWQPYhBSOPHiADfKg=.c3d97408-02fd-4ce3-9120-95b960b74da5@github.com> <9oEWsBBFNr5fbnYFxiQDDBTDFAz2a0JbOqMuAcMhgzQ=.bbb3a09b-aba8-4ed4-b2b3-f0182d3256b8@github.com> Message-ID: On Wed, 23 Apr 2025 03:14:37 GMT, Sergey Bylokhov wrote: >> Alexander Zvegintsev has updated the pull request incrementally with one additional commit since the last revision: >> >> use ProcessTools > > test/jdk/java/awt/Clipboard/ClipboardSecurity.java line 101: > >> 99: javaPath + File.separator + "bin" + File.separator + "java", >> 100: "-cp", System.getProperty("test.classes", "."), >> 101: "ClipboardSecurity", "client" > > Same question as in another PR. can we use ProcessTools/OutputAnalyzer? Sure, thanks for the tip, updated ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/24802#discussion_r2056871405 From azvegint at openjdk.org Wed Apr 23 21:08:36 2025 From: azvegint at openjdk.org (Alexander Zvegintsev) Date: Wed, 23 Apr 2025 21:08:36 GMT Subject: RFR: 8354553: Open source several clipboard tests batch0 [v2] In-Reply-To: <3_fAqOjaw7YUHcxrZHQL_0TXNfAWQPYhBSOPHiADfKg=.c3d97408-02fd-4ce3-9120-95b960b74da5@github.com> References: <3_fAqOjaw7YUHcxrZHQL_0TXNfAWQPYhBSOPHiADfKg=.c3d97408-02fd-4ce3-9120-95b960b74da5@github.com> Message-ID: > Few more tests are open sourced, all of them are in problem list. Alexander Zvegintsev has updated the pull request incrementally with one additional commit since the last revision: use ProcessTools ------------- Changes: - all: https://git.openjdk.org/jdk/pull/24802/files - new: https://git.openjdk.org/jdk/pull/24802/files/396399c3..0dfab672 Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=24802&range=01 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=24802&range=00-01 Stats: 406 lines in 4 files changed: 29 ins; 316 del; 61 mod Patch: https://git.openjdk.org/jdk/pull/24802.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/24802/head:pull/24802 PR: https://git.openjdk.org/jdk/pull/24802 From azvegint at openjdk.org Wed Apr 23 21:08:55 2025 From: azvegint at openjdk.org (Alexander Zvegintsev) Date: Wed, 23 Apr 2025 21:08:55 GMT Subject: RFR: 8354554: Open source several clipboard tests batch1 [v2] In-Reply-To: References: Message-ID: <4Fq4vyM1YswU8mRyvAuP5eoHzROKLTsyQLsrT21OQDI=.dafcbe8c-2a37-4263-b2e5-1fc00f51fb03@github.com> On Wed, 23 Apr 2025 03:13:35 GMT, Sergey Bylokhov wrote: >> Alexander Zvegintsev has updated the pull request incrementally with one additional commit since the last revision: >> >> use ProcessTools > > test/jdk/java/awt/Clipboard/LostOwnershipChainTest/SystemClipboard2ProcTest.java line 112: > >> 110: String javaPath = System.getProperty("java.home", ""); >> 111: >> 112: Process process = new ProcessBuilder( > > Don't we already have some libraries, like ProcessTools and OutputAnalyzer, to run tests in a separate process? > Right now, this test, for example, skips all VM parameters. @mrserb Thanks for the tip, it allows to remove a lot of duplicated code. @prrace Changing it to use ProcessTools is quite easy, so updated. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/24806#discussion_r2056872931 From azvegint at openjdk.org Wed Apr 23 21:13:57 2025 From: azvegint at openjdk.org (Alexander Zvegintsev) Date: Wed, 23 Apr 2025 21:13:57 GMT Subject: RFR: 8354554: Open source several clipboard tests batch1 [v2] In-Reply-To: References: Message-ID: On Wed, 23 Apr 2025 21:05:29 GMT, Alexander Zvegintsev wrote: >> few more clipboard tests are opensourced. Some of them are in problemlist. > > Alexander Zvegintsev has updated the pull request incrementally with one additional commit since the last revision: > > use ProcessTools test/jdk/java/awt/Clipboard/LostOwnershipChainTest/SystemClipboard2ProcTest.java line 115: > 113: > 114: Process process = ProcessTools.startProcess("Child", pb); > 115: OutputAnalyzer outputAnalyzer = new OutputAnalyzer(process); OutputAnalyzer is not really needed here, as output is printed by `ProcessTools`, exit value can be received from `process.exitValue()` , however it brings the `shouldHaveExitValue` method and prints some useful info like: Command line: [.../jdk/bin/java -cp ... -ea SystemClipboardOwner ] [Child]:.../jdk/bin/java -cp ... -ea SystemClipboardOwner [2025-04-23T20:51:22.569840505Z] Gathering output for process 165156 [2025-04-23T20:51:23.984714408Z] Waiting for completion for process 165156 [2025-04-23T20:51:23.984831108Z] Waiting for completion finished for process 165156 So I decided to use it. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/24806#discussion_r2056877831 From azvegint at openjdk.org Wed Apr 23 21:30:46 2025 From: azvegint at openjdk.org (Alexander Zvegintsev) Date: Wed, 23 Apr 2025 21:30:46 GMT Subject: RFR: JDK-8355429 : Open source ProgressMonitor test In-Reply-To: References: Message-ID: On Wed, 23 Apr 2025 18:28:27 GMT, Harshitha Onkar wrote: > javax/swing/ProgressMonitor/bug4401480.java open-sourced Marked as reviewed by azvegint (Reviewer). ------------- PR Review: https://git.openjdk.org/jdk/pull/24833#pullrequestreview-2788721061 From prr at openjdk.org Wed Apr 23 21:50:46 2025 From: prr at openjdk.org (Phil Race) Date: Wed, 23 Apr 2025 21:50:46 GMT Subject: RFR: 8354554: Open source several clipboard tests batch1 [v2] In-Reply-To: References: Message-ID: On Wed, 23 Apr 2025 21:05:29 GMT, Alexander Zvegintsev wrote: >> few more clipboard tests are opensourced. Some of them are in problemlist. > > Alexander Zvegintsev has updated the pull request incrementally with one additional commit since the last revision: > > use ProcessTools Marked as reviewed by prr (Reviewer). ------------- PR Review: https://git.openjdk.org/jdk/pull/24806#pullrequestreview-2788750859 From prr at openjdk.org Wed Apr 23 21:50:47 2025 From: prr at openjdk.org (Phil Race) Date: Wed, 23 Apr 2025 21:50:47 GMT Subject: RFR: 8354554: Open source several clipboard tests batch1 [v2] In-Reply-To: <4Fq4vyM1YswU8mRyvAuP5eoHzROKLTsyQLsrT21OQDI=.dafcbe8c-2a37-4263-b2e5-1fc00f51fb03@github.com> References: <4Fq4vyM1YswU8mRyvAuP5eoHzROKLTsyQLsrT21OQDI=.dafcbe8c-2a37-4263-b2e5-1fc00f51fb03@github.com> Message-ID: On Wed, 23 Apr 2025 21:06:24 GMT, Alexander Zvegintsev wrote: >> test/jdk/java/awt/Clipboard/LostOwnershipChainTest/SystemClipboard2ProcTest.java line 112: >> >>> 110: String javaPath = System.getProperty("java.home", ""); >>> 111: >>> 112: Process process = new ProcessBuilder( >> >> Don't we already have some libraries, like ProcessTools and OutputAnalyzer, to run tests in a separate process? >> Right now, this test, for example, skips all VM parameters. > > @mrserb Thanks for the tip, it allows to remove a lot of duplicated code. > > @prrace Changing it to use ProcessTools is quite easy, so updated. it does seem to cut a lot of repeated boiler plate ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/24806#discussion_r2056914166 From serb at openjdk.org Wed Apr 23 22:19:54 2025 From: serb at openjdk.org (Sergey Bylokhov) Date: Wed, 23 Apr 2025 22:19:54 GMT Subject: RFR: 8354554: Open source several clipboard tests batch1 [v2] In-Reply-To: References: Message-ID: On Wed, 23 Apr 2025 21:05:29 GMT, Alexander Zvegintsev wrote: >> few more clipboard tests are opensourced. Some of them are in problemlist. > > Alexander Zvegintsev has updated the pull request incrementally with one additional commit since the last revision: > > use ProcessTools test/jdk/java/awt/Clipboard/LostOwnershipChainTest/SystemClipboard2ProcTest.java line 117: > 115: OutputAnalyzer outputAnalyzer = new OutputAnalyzer(process); > 116: > 117: if (!process.waitFor(15, TimeUnit.SECONDS)) { In case of error it will be good to kill the child process via destroyForcibly(), or you can use `OputAnalyzer executeTestJava(String... command)` which will create the builder, then waits till completion and kill child process in case of errors. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/24806#discussion_r2056938002 From honkar at openjdk.org Wed Apr 23 22:21:46 2025 From: honkar at openjdk.org (Harshitha Onkar) Date: Wed, 23 Apr 2025 22:21:46 GMT Subject: RFR: JDK-8355429 : Open source ProgressMonitor test [v2] In-Reply-To: References: Message-ID: <-APLsbx6WUCDuyGIwTT0cg6sFxpXZeKmVJikTB9dCw0=.fef8231f-19cf-4dde-92ee-0f8b3e1cd3b1@github.com> > javax/swing/ProgressMonitor/bug4401480.java open-sourced Harshitha Onkar has updated the pull request incrementally with one additional commit since the last revision: createTestUI changes ------------- Changes: - all: https://git.openjdk.org/jdk/pull/24833/files - new: https://git.openjdk.org/jdk/pull/24833/files/f7ed2144..9f45ff8e Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=24833&range=01 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=24833&range=00-01 Stats: 49 lines in 1 file changed: 22 ins; 20 del; 7 mod Patch: https://git.openjdk.org/jdk/pull/24833.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/24833/head:pull/24833 PR: https://git.openjdk.org/jdk/pull/24833 From honkar at openjdk.org Wed Apr 23 22:24:46 2025 From: honkar at openjdk.org (Harshitha Onkar) Date: Wed, 23 Apr 2025 22:24:46 GMT Subject: RFR: JDK-8355429 : Open source ProgressMonitor test [v2] In-Reply-To: References: Message-ID: On Wed, 23 Apr 2025 21:27:56 GMT, Alexander Zvegintsev wrote: >> Harshitha Onkar has updated the pull request incrementally with one additional commit since the last revision: >> >> createTestUI changes > > Marked as reviewed by azvegint (Reviewer). @azvegint Thanks for the suggestion to move everything into createTestUI(), this way the user can still have access to the Pass/Fail buttons without having to click the start button. ------------- PR Comment: https://git.openjdk.org/jdk/pull/24833#issuecomment-2825620150 From azvegint at openjdk.org Wed Apr 23 22:25:19 2025 From: azvegint at openjdk.org (Alexander Zvegintsev) Date: Wed, 23 Apr 2025 22:25:19 GMT Subject: RFR: 8354554: Open source several clipboard tests batch1 [v3] In-Reply-To: References: Message-ID: > few more clipboard tests are opensourced. Some of them are in problemlist. Alexander Zvegintsev has updated the pull request incrementally with two additional commits since the last revision: - remove ProcessTools.executeTestJava(); - add process.destroyForcibly(); ------------- Changes: - all: https://git.openjdk.org/jdk/pull/24806/files - new: https://git.openjdk.org/jdk/pull/24806/files/63ac4291..f281b157 Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=24806&range=02 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=24806&range=01-02 Stats: 2 lines in 2 files changed: 2 ins; 0 del; 0 mod Patch: https://git.openjdk.org/jdk/pull/24806.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/24806/head:pull/24806 PR: https://git.openjdk.org/jdk/pull/24806 From azvegint at openjdk.org Wed Apr 23 22:25:20 2025 From: azvegint at openjdk.org (Alexander Zvegintsev) Date: Wed, 23 Apr 2025 22:25:20 GMT Subject: RFR: 8354554: Open source several clipboard tests batch1 [v2] In-Reply-To: References: Message-ID: On Wed, 23 Apr 2025 22:16:54 GMT, Sergey Bylokhov wrote: >> Alexander Zvegintsev has updated the pull request incrementally with one additional commit since the last revision: >> >> use ProcessTools > > test/jdk/java/awt/Clipboard/LostOwnershipChainTest/SystemClipboard2ProcTest.java line 117: > >> 115: OutputAnalyzer outputAnalyzer = new OutputAnalyzer(process); >> 116: >> 117: if (!process.waitFor(15, TimeUnit.SECONDS)) { > > In case of error it will be good to kill the child process via destroyForcibly(), or you can use > `OputAnalyzer executeTestJava(String... command)` > which will create the builder, then waits till completion and kill child process in case of errors. I prefer an early timeout, but `ProcessTools.executeProcess()` doesn't allow to set it, so `destroyForcibly()` was added. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/24806#discussion_r2056942873 From azvegint at openjdk.org Wed Apr 23 22:27:57 2025 From: azvegint at openjdk.org (Alexander Zvegintsev) Date: Wed, 23 Apr 2025 22:27:57 GMT Subject: RFR: 8354553: Open source several clipboard tests batch0 [v3] In-Reply-To: <3_fAqOjaw7YUHcxrZHQL_0TXNfAWQPYhBSOPHiADfKg=.c3d97408-02fd-4ce3-9120-95b960b74da5@github.com> References: <3_fAqOjaw7YUHcxrZHQL_0TXNfAWQPYhBSOPHiADfKg=.c3d97408-02fd-4ce3-9120-95b960b74da5@github.com> Message-ID: > Few more tests are open sourced, all of them are in problem list. Alexander Zvegintsev has updated the pull request incrementally with one additional commit since the last revision: add process.destroyForcibly(); ------------- Changes: - all: https://git.openjdk.org/jdk/pull/24802/files - new: https://git.openjdk.org/jdk/pull/24802/files/0dfab672..ba1bd399 Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=24802&range=02 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=24802&range=01-02 Stats: 4 lines in 4 files changed: 4 ins; 0 del; 0 mod Patch: https://git.openjdk.org/jdk/pull/24802.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/24802/head:pull/24802 PR: https://git.openjdk.org/jdk/pull/24802 From serb at openjdk.org Wed Apr 23 22:34:50 2025 From: serb at openjdk.org (Sergey Bylokhov) Date: Wed, 23 Apr 2025 22:34:50 GMT Subject: RFR: 8354554: Open source several clipboard tests batch1 [v3] In-Reply-To: References: Message-ID: <38Bo_TPKFmRuAKLwHY3PEBKDv-FMl4GGejEm9EgHKsw=.23d08fb3-8cd9-4eb2-bd9c-165f08e0c73c@github.com> On Wed, 23 Apr 2025 22:25:19 GMT, Alexander Zvegintsev wrote: >> few more clipboard tests are opensourced. Some of them are in problemlist. > > Alexander Zvegintsev has updated the pull request incrementally with two additional commits since the last revision: > > - remove ProcessTools.executeTestJava(); > - add process.destroyForcibly(); Marked as reviewed by serb (Reviewer). ------------- PR Review: https://git.openjdk.org/jdk/pull/24806#pullrequestreview-2788805635 From serb at openjdk.org Wed Apr 23 22:34:51 2025 From: serb at openjdk.org (Sergey Bylokhov) Date: Wed, 23 Apr 2025 22:34:51 GMT Subject: RFR: 8354554: Open source several clipboard tests batch1 [v2] In-Reply-To: References: Message-ID: <9D_q6aNE36oflQu4pGlLia-AWuRYBYT7dRtX4BjHVe8=.060f322c-0bb0-49f4-8c73-b34219c65561@github.com> On Wed, 23 Apr 2025 22:22:21 GMT, Alexander Zvegintsev wrote: >> test/jdk/java/awt/Clipboard/LostOwnershipChainTest/SystemClipboard2ProcTest.java line 117: >> >>> 115: OutputAnalyzer outputAnalyzer = new OutputAnalyzer(process); >>> 116: >>> 117: if (!process.waitFor(15, TimeUnit.SECONDS)) { >> >> In case of error it will be good to kill the child process via destroyForcibly(), or you can use >> `OputAnalyzer executeTestJava(String... command)` >> which will create the builder, then waits till completion and kill child process in case of errors. > > I prefer an early timeout, but `ProcessTools.executeProcess()` doesn't allow to set it, so `destroyForcibly()` was added. That looks fine. I guess people usually set that timeout via a jtreg parameter, and then executeProcess kills the child process when jtreg shuts down the test. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/24806#discussion_r2056950654 From serb at openjdk.org Wed Apr 23 22:35:46 2025 From: serb at openjdk.org (Sergey Bylokhov) Date: Wed, 23 Apr 2025 22:35:46 GMT Subject: RFR: 8354553: Open source several clipboard tests batch0 [v3] In-Reply-To: References: <3_fAqOjaw7YUHcxrZHQL_0TXNfAWQPYhBSOPHiADfKg=.c3d97408-02fd-4ce3-9120-95b960b74da5@github.com> Message-ID: <3jGOSu8h8GynyU3rIIhns2nR5n83S3WljStshpVWK7E=.21f20dac-7304-4d10-9d4a-65c2e95ccffa@github.com> On Wed, 23 Apr 2025 22:27:57 GMT, Alexander Zvegintsev wrote: >> Few more tests are open sourced, all of them are in problem list. > > Alexander Zvegintsev has updated the pull request incrementally with one additional commit since the last revision: > > add process.destroyForcibly(); Marked as reviewed by serb (Reviewer). ------------- PR Review: https://git.openjdk.org/jdk/pull/24802#pullrequestreview-2788806708 From honkar at openjdk.org Wed Apr 23 22:36:45 2025 From: honkar at openjdk.org (Harshitha Onkar) Date: Wed, 23 Apr 2025 22:36:45 GMT Subject: RFR: JDK-8355429 : Open source ProgressMonitor test [v3] In-Reply-To: References: Message-ID: > javax/swing/ProgressMonitor/bug4401480.java open-sourced Harshitha Onkar has updated the pull request incrementally with one additional commit since the last revision: linelengths ------------- Changes: - all: https://git.openjdk.org/jdk/pull/24833/files - new: https://git.openjdk.org/jdk/pull/24833/files/9f45ff8e..7a01262a Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=24833&range=02 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=24833&range=01-02 Stats: 10 lines in 1 file changed: 4 ins; 2 del; 4 mod Patch: https://git.openjdk.org/jdk/pull/24833.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/24833/head:pull/24833 PR: https://git.openjdk.org/jdk/pull/24833 From prr at openjdk.org Wed Apr 23 22:38:57 2025 From: prr at openjdk.org (Phil Race) Date: Wed, 23 Apr 2025 22:38:57 GMT Subject: RFR: 8355203: [macos] AquaButtonUI and AquaRootPaneUI repaint default button unnecessarily [v2] In-Reply-To: <32mwQn83m5Xd9LrJnBN8iO92Ohfa-r2Wdc9vPqbM1NA=.73cabcf1-ad84-45d3-ad7d-97fd64d0b161@github.com> References: <32mwQn83m5Xd9LrJnBN8iO92Ohfa-r2Wdc9vPqbM1NA=.73cabcf1-ad84-45d3-ad7d-97fd64d0b161@github.com> Message-ID: On Wed, 23 Apr 2025 20:36:37 GMT, Jeremy Wood wrote: >> This removes the constant repainting of the AquaRootPaneUI's default button. >> >> A long time ago (before Mac OS Yosemite, around 2014) this was needed to match Aqua's native experience. But the default button no longer pulses, so we don't need to repaint ("pulse") the button continually. >> >> Here's a clip from a YouTube video I found demonstrating the pulsing effect that this PR removes (you may want to turn your volume off): >> >> https://github.com/user-attachments/assets/496bc003-ccba-4178-81bc-765e96d94316 >> >> This PR includes a test, but this test has never failed. (That is: this PR does not resolve a failing test.) This test would fail if the default button ever looked the same as a non-default button. >> >> My primary goal here was to remove the AquaButtonUI's AncestorListener, but while we're here we might as well remove the AquaRootPaneUI's timer and other cleanup. >> >> I tried and failed to rename the `private static final byte _pulsed` constant. (More details [here](https://github.com/openjdk/jdk/commit/89d0689f226b9e883df464e6f3e8c20074970499).) If anyone has suggestions for how to rename that without errors please let me know. > > Jeremy Wood has updated the pull request incrementally with one additional commit since the last revision: > > 8344697: use `PULSED` again, but add comment for future reference Marked as reviewed by prr (Reviewer). ------------- PR Review: https://git.openjdk.org/jdk/pull/24778#pullrequestreview-2788810270 From azvegint at openjdk.org Wed Apr 23 22:40:48 2025 From: azvegint at openjdk.org (Alexander Zvegintsev) Date: Wed, 23 Apr 2025 22:40:48 GMT Subject: RFR: JDK-8355429 : Open source ProgressMonitor test [v3] In-Reply-To: References: Message-ID: <5oQ7YpE4FPd9tby9DbLq4EnQIBZujfXMHySVvx2Rsoc=.2e94548e-fdb0-4b00-a059-8e13f01162d1@github.com> On Wed, 23 Apr 2025 22:36:45 GMT, Harshitha Onkar wrote: >> javax/swing/ProgressMonitor/bug4401480.java open-sourced > > Harshitha Onkar has updated the pull request incrementally with one additional commit since the last revision: > > linelengths Marked as reviewed by azvegint (Reviewer). ------------- PR Review: https://git.openjdk.org/jdk/pull/24833#pullrequestreview-2788813160 From honkar at openjdk.org Wed Apr 23 22:44:58 2025 From: honkar at openjdk.org (Harshitha Onkar) Date: Wed, 23 Apr 2025 22:44:58 GMT Subject: Integrated: JDK-8355429 : Open source ProgressMonitor test In-Reply-To: References: Message-ID: On Wed, 23 Apr 2025 18:28:27 GMT, Harshitha Onkar wrote: > javax/swing/ProgressMonitor/bug4401480.java open-sourced This pull request has now been integrated. Changeset: 3b7f43f9 Author: Harshitha Onkar URL: https://git.openjdk.org/jdk/commit/3b7f43f95e061274020deaa1eecdb8182a6b64e1 Stats: 105 lines in 1 file changed: 105 ins; 0 del; 0 mod 8355429: Open source ProgressMonitor test Reviewed-by: azvegint ------------- PR: https://git.openjdk.org/jdk/pull/24833 From azvegint at openjdk.org Wed Apr 23 23:01:13 2025 From: azvegint at openjdk.org (Alexander Zvegintsev) Date: Wed, 23 Apr 2025 23:01:13 GMT Subject: Integrated: 8354554: Open source several clipboard tests batch1 In-Reply-To: References: Message-ID: On Tue, 22 Apr 2025 22:49:31 GMT, Alexander Zvegintsev wrote: > few more clipboard tests are opensourced. Some of them are in problemlist. This pull request has now been integrated. Changeset: 4873eec0 Author: Alexander Zvegintsev URL: https://git.openjdk.org/jdk/commit/4873eec06f25227fe221a86b07c6072e676f7d5d Stats: 637 lines in 5 files changed: 637 ins; 0 del; 0 mod 8354554: Open source several clipboard tests batch1 Reviewed-by: serb, prr ------------- PR: https://git.openjdk.org/jdk/pull/24806 From azvegint at openjdk.org Wed Apr 23 23:06:03 2025 From: azvegint at openjdk.org (Alexander Zvegintsev) Date: Wed, 23 Apr 2025 23:06:03 GMT Subject: Integrated: 8354553: Open source several clipboard tests batch0 In-Reply-To: <3_fAqOjaw7YUHcxrZHQL_0TXNfAWQPYhBSOPHiADfKg=.c3d97408-02fd-4ce3-9120-95b960b74da5@github.com> References: <3_fAqOjaw7YUHcxrZHQL_0TXNfAWQPYhBSOPHiADfKg=.c3d97408-02fd-4ce3-9120-95b960b74da5@github.com> Message-ID: <0zqLDeoG8Ma8Q4jIlAP3_Hr6RHm-TtbDeJPR6sW0Ntk=.2ee86d9d-9898-4f71-8324-31fa6a8298fd@github.com> On Tue, 22 Apr 2025 21:44:58 GMT, Alexander Zvegintsev wrote: > Few more tests are open sourced, all of them are in problem list. This pull request has now been integrated. Changeset: b10a304b Author: Alexander Zvegintsev URL: https://git.openjdk.org/jdk/commit/b10a304b2bdec5fdd3d689ae8fcd341e68e80b72 Stats: 1079 lines in 5 files changed: 1079 ins; 0 del; 0 mod 8354553: Open source several clipboard tests batch0 Reviewed-by: serb, prr ------------- PR: https://git.openjdk.org/jdk/pull/24802 From mvs at openjdk.org Wed Apr 23 23:18:06 2025 From: mvs at openjdk.org (Manukumar V S) Date: Wed, 23 Apr 2025 23:18:06 GMT Subject: RFR: 8355366: Fix the wrong usage of PassFailJFrame.forcePass() in some manual tests [v2] In-Reply-To: References: Message-ID: <4n-tsCOQpW-6zbLttPBB16yTrl4S0VrOAkPu_gSYyQ8=.079b92c6-2759-4cf2-ac3c-912116b334f5@github.com> > Fix the wrong usage of PassFailJFrame.forcePass() in some manual tests from java.awt.Desktop package. These tests should be fixed similar to [JDK-8352109](https://bugs.openjdk.org/browse/JDK-8352109) and jtreg.SkippedException should be used instead of PassFailJFrame.forcePass(). > Affected tests: > 1. https://github.com/openjdk/jdk/blob/master/test/jdk/java/awt/Desktop/BrowseTest.java > 2. https://github.com/openjdk/jdk/blob/master/test/jdk/java/awt/Desktop/OpenTest.java > 3. https://github.com/openjdk/jdk/blob/master/test/jdk/java/awt/Desktop/EditAndPrintTest/EditAndPrintTest.java > > Testing: > All the changed tests are tested manually and found to be working fine. Manukumar V S has updated the pull request incrementally with one additional commit since the last revision: Update Copyright year ------------- Changes: - all: https://git.openjdk.org/jdk/pull/24820/files - new: https://git.openjdk.org/jdk/pull/24820/files/e708ef80..7c785daa Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=24820&range=01 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=24820&range=00-01 Stats: 3 lines in 3 files changed: 0 ins; 0 del; 3 mod Patch: https://git.openjdk.org/jdk/pull/24820.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/24820/head:pull/24820 PR: https://git.openjdk.org/jdk/pull/24820 From mvs at openjdk.org Wed Apr 23 23:54:57 2025 From: mvs at openjdk.org (Manukumar V S) Date: Wed, 23 Apr 2025 23:54:57 GMT Subject: RFR: 8355441: Remove antipattern from PassFailJFrame.forcePass javadoc Message-ID: The javadoc for PassFailJFrame.forcePass suggests an anti-pattern of forcibly passing the test if a resource is unavailable. If a resource is unavailable or a feature isn't supported, the test should throw jtreg.SkippedException. PassFailJFrame.forcePass should be used in semi-automatic tests when the test determines that all the conditions for passing the test are met. Please refer: JDK-8355366 and https://github.com/openjdk/jdk/pull/24820 Testing This is a javadoc change, so not testing required. ------------- Commit messages: - 8355441: Remove antipattern from PassFailJFrame.forcePass javadoc Changes: https://git.openjdk.org/jdk/pull/24837/files Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=24837&range=00 Issue: https://bugs.openjdk.org/browse/JDK-8355441 Stats: 12 lines in 1 file changed: 6 ins; 0 del; 6 mod Patch: https://git.openjdk.org/jdk/pull/24837.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/24837/head:pull/24837 PR: https://git.openjdk.org/jdk/pull/24837 From mvs at openjdk.org Wed Apr 23 23:55:41 2025 From: mvs at openjdk.org (Manukumar V S) Date: Wed, 23 Apr 2025 23:55:41 GMT Subject: RFR: 8355366: Fix the wrong usage of PassFailJFrame.forcePass() in some manual tests In-Reply-To: References: Message-ID: On Wed, 23 Apr 2025 19:57:59 GMT, Alexey Ivanov wrote: > I submitted [JDK-8355441](https://bugs.openjdk.org/browse/JDK-8355441) to remove the description of the incorrect usage from `PassFailJFrame.forcePass` javadoc. > > Feel free to assign to yourself and fix the issue. Raised https://github.com/openjdk/jdk/pull/24837 for this. ------------- PR Comment: https://git.openjdk.org/jdk/pull/24820#issuecomment-2825796861 From serb at openjdk.org Thu Apr 24 00:24:12 2025 From: serb at openjdk.org (Sergey Bylokhov) Date: Thu, 24 Apr 2025 00:24:12 GMT Subject: RFR: 8339561: The test/jdk/java/awt/Paint/ListRepaint.java may fail after JDK-8327401 [v7] In-Reply-To: References: Message-ID: > Several tests modified by https://github.com/openjdk/jdk/pull/19339 have been tweaked, see inline comments. > > Notes: > * We have a few XXXRepaint.java tests and in this patch, I updated all of them to follow the change added to the ListRepaint.java > > @azvegint @aivanov-jdk please take a look. Sergey Bylokhov has updated the pull request with a new target base due to a merge or a rebase. The pull request now contains 15 commits: - Merge branch 'openjdk:master' into JDK-8339561 - drop null check - copyright - Merge branch 'openjdk:master' into JDK-8339561 - more volatiles - revert change reported in JDK-8339791 - trigger github for new content - trigger github for new content - Merge branch 'master' into JDK-8339561 - Merge branch 'openjdk:master' into JDK-8339561 - ... and 5 more: https://git.openjdk.org/jdk/compare/bbec3c07...a1b60f7b ------------- Changes: https://git.openjdk.org/jdk/pull/20861/files Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=20861&range=06 Stats: 174 lines in 7 files changed: 48 ins; 45 del; 81 mod Patch: https://git.openjdk.org/jdk/pull/20861.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/20861/head:pull/20861 PR: https://git.openjdk.org/jdk/pull/20861 From prr at openjdk.org Thu Apr 24 03:06:46 2025 From: prr at openjdk.org (Phil Race) Date: Thu, 24 Apr 2025 03:06:46 GMT Subject: RFR: 8353230: Emoji rendering regression after JDK-8208377 In-Reply-To: References: <-N8_d2SHcl-h9yG8t6-WKGF_nGLJZQTu4ymMD2oPGrg=.651c8251-b235-4681-b82a-4ee680eb6593@github.com> Message-ID: <7qRLx0aLwArI3Md49dSXjXVR_aqNzSfRWCo-59TcyYo=.e75861cf-bd30-4118-ab4b-53e6fe86b8f8@github.com> On Tue, 15 Apr 2025 17:28:12 GMT, Nikita Gubarkov wrote: >> It looks like this regression actually fits into a longer series of fixes / regressions in this area: >> >> - [JDK-4517298](https://bugs.openjdk.org/browse/JDK-4517298) fixed metrics for zero-width characters, but broke some ligatures / glyph substitutions >> - [JDK-7017058](https://bugs.openjdk.org/browse/JDK-7017058) fixed the ligatures / glyph substitutions, but broke some zero-width metrics >> - [JDK-8208377](https://bugs.openjdk.org/browse/JDK-8208377) fixed some metrics and rendering for zero-width characters, but broke some ligatures / glyph substitutions >> - Now, with this PR, we aim to fix the ligatures without re-breaking zero-width metrics and display >> >> We have two different types of use cases pulling `CharToGlyphMapper` in two different directions: the users who need raw, untransformed glyph info, and the users who need normalized / transformed glyph info. >> >> It looks to me like, in the current code base, the only `CharToGlyphMapper` user which requires raw font data is HarfBuzz (explicitly confirmed with the HarfBuzz team here: https://github.com/harfbuzz/harfbuzz/discussions/5234). >> >> The regression mechanism at play here is that the HarfBuzz font callbacks are currently providing HarfBuzz with transformed glyph info (e.g. ZWJ -> INVISIBLE_GLYPH_ID), which prevents HarfBuzz from recognizing and applying the correct font GSUB substitutions (which involve ZWJ). >> >> In order to fix this without (yet again) breaking metrics and display behavior elsewhere, I've added two methods to `CharToGlyphMapper` which provide access to raw glyph info, to be used by the HarfBuzz font callbacks: `charToGlyphRaw(int)` and `charToVariationGlyphRaw(int)`. >> >> Note two intricacies related to `CompositeGlyphMapper`: >> 1. We need to be careful to only cache raw (untransformed) values, to avoid conflicts between requests for a raw version of a glyph and a transformed version of the same glyph. Another option would have been two separate caches, but I don't think that's necessary. >> 2. Consumers who are using `CompositeGlyphMapper.SLOTMASK` to check glyph slots (e.g. `FontRunIterator` and `CTextPipe`) will "see" invisible glyphs as having come from slot 0. This isn't new, and I think it's OK, but something to be aware of. >> >> The glyph cache handling in `CCharToGlyphMapper` (for macOS) also requires care to avoid mixing value types. >> >> Please also note that I'm not sure if the tweak to `sunFont.c` is being tested, since FFM is being used by default for Harf... > > We had similar emoji-related regressions at JetBrains. Although our font-related code diverged from OpenJDK a bit, porting this patch seems to resolve them too. I am not an OpenJDK reviewer, but LGTM nevertheless. > @YaaZ Thanks for the information! > > @prrace Have you had a chance to look at this PR? It passed all the testing I did. I still need to look hard at the changes. ------------- PR Comment: https://git.openjdk.org/jdk/pull/24412#issuecomment-2826162827 From psadhukhan at openjdk.org Thu Apr 24 04:23:52 2025 From: psadhukhan at openjdk.org (Prasanta Sadhukhan) Date: Thu, 24 Apr 2025 04:23:52 GMT Subject: RFR: 8315113: Print request Chromaticity.MONOCHROME attribute does not work on macOS [v6] In-Reply-To: References: Message-ID: On Fri, 21 Mar 2025 15:42:29 GMT, GennadiyKrivoshein wrote: >> This update allows users to print with grayscale using color printers. >> Actually, it is not possible to use the "Monochrome" option from the "Color Appearance" panel. Also Chromaticity.MONOCHROME can't be used to print grayscale on color printers ([JDK-8315113](https://bugs.openjdk.org/browse/JDK-8315113)). >> >> **Fix description** >> When a printer supports color printing and a user adds Chromaticity.MONOCHROME attribute to a PrintRequestAttributeSet, then the final printing raster is transformed to the grayscale color using java.awt.image.ColorConvertOp. When the job is a PostScript job, then the "setColor" and "setPaint" methods of the Graphics are overridden, and user colors (paints) are transformed to the grayscale form using the new proxy class GrayscaleProxyGraphics2D. >> >> This approach is assumed to be platform, CUPS, and IPP protocol independent. >> >> **Tests** >> The fix was tested on Ubuntu 22.04 and MacOS 12.6.1. > > GennadiyKrivoshein has updated the pull request incrementally with one additional commit since the last revision: > > Use PassFailJFrame for test. > Move GrayscaleProxyGraphics2D.java to the shared classes. > Update copyright year. Marked as reviewed by psadhukhan (Reviewer). ------------- PR Review: https://git.openjdk.org/jdk/pull/21930#pullrequestreview-2789630188 From abhiscxk at openjdk.org Thu Apr 24 05:05:40 2025 From: abhiscxk at openjdk.org (Abhishek Kumar) Date: Thu, 24 Apr 2025 05:05:40 GMT Subject: RFR: 8352149: open/test/jdk/java/awt/Frame/MultiScreenTest.java fails in MacOS In-Reply-To: <-t5iRw5c31W0E-mPWTvHk9PoP819SUA9xrAwMZfJEDc=.c61d9c20-5397-4ab2-89ac-dab4b50b2a0e@github.com> References: <-t5iRw5c31W0E-mPWTvHk9PoP819SUA9xrAwMZfJEDc=.c61d9c20-5397-4ab2-89ac-dab4b50b2a0e@github.com> Message-ID: On Fri, 18 Apr 2025 13:10:10 GMT, Khalid Boulanouare wrote: > Fixes issue in which the test fails when run on multi-screen machine. > > Tested on Ubuntu 24.04, MacOS 15 and Windows 11 > > JTREG > > runner starting test: java/awt/Frame/MultiScreenTest.java > runner finished test: java/awt/Frame/MultiScreenTest.java > Passed. Execution successful test/jdk/java/awt/Frame/MultiScreenTest.java line 105: > 103: } > 104: GraphicsConfiguration[] gc = primaryDevice.getConfigurations(); > 105: if (gc.length > 0) { Why did you remove the for-loop? I tested your changes on multi-monitor system on Linux platform but don't see any frames created for second screen. There is only one frame created for primary screen. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/24752#discussion_r2057539932 From abhiscxk at openjdk.org Thu Apr 24 05:26:41 2025 From: abhiscxk at openjdk.org (Abhishek Kumar) Date: Thu, 24 Apr 2025 05:26:41 GMT Subject: RFR: 8352149: open/test/jdk/java/awt/Frame/MultiScreenTest.java fails in MacOS In-Reply-To: <-t5iRw5c31W0E-mPWTvHk9PoP819SUA9xrAwMZfJEDc=.c61d9c20-5397-4ab2-89ac-dab4b50b2a0e@github.com> References: <-t5iRw5c31W0E-mPWTvHk9PoP819SUA9xrAwMZfJEDc=.c61d9c20-5397-4ab2-89ac-dab4b50b2a0e@github.com> Message-ID: <0IkXQzTfHKgD2Zn6NLHlFZs6jpVi2ub7Zz-K74wObFA=.f53a3a43-53ec-41cd-a95b-d264fef102f8@github.com> On Fri, 18 Apr 2025 13:10:10 GMT, Khalid Boulanouare wrote: > Fixes issue in which the test fails when run on multi-screen machine. > > Tested on Ubuntu 24.04, MacOS 15 and Windows 11 > > JTREG > > runner starting test: java/awt/Frame/MultiScreenTest.java > runner finished test: java/awt/Frame/MultiScreenTest.java > Passed. Execution successful This test was failing on Solaris platform as per [JDK-4312921](https://bugs.openjdk.org/browse/JDK-4312921) and the test should create multiple frames on second screen. I converted the test from applet to manual test under this [issue](https://bugs.openjdk.org/browse/JDK-8340437). As per original applet test instruction, `This test is to be run only on multiscreen Solaris machine.` Since Solaris is no longer supported, this test was supposed to verify on Linux. I couldn't check this test on all platforms (didn't have the multi-monitor setup) and made this to run on all platforms but I think this test should be restricted to run only on Linux machine. I ran the test (**without your fix**) on Windows, Mac and Linux platform. It failed on Windows and Mac but no issues on Linux. I suggest to revert back the changes and restrict the test to run only on Linux machine. ------------- PR Comment: https://git.openjdk.org/jdk/pull/24752#issuecomment-2826418650 From duke at openjdk.org Thu Apr 24 12:51:09 2025 From: duke at openjdk.org (Khalid Boulanouare) Date: Thu, 24 Apr 2025 12:51:09 GMT Subject: RFR: 8352149: open/test/jdk/java/awt/Frame/MultiScreenTest.java fails in MacOS [v2] In-Reply-To: <-t5iRw5c31W0E-mPWTvHk9PoP819SUA9xrAwMZfJEDc=.c61d9c20-5397-4ab2-89ac-dab4b50b2a0e@github.com> References: <-t5iRw5c31W0E-mPWTvHk9PoP819SUA9xrAwMZfJEDc=.c61d9c20-5397-4ab2-89ac-dab4b50b2a0e@github.com> Message-ID: > Fixes issue in which the test fails when run on multi-screen machine. > > Tested on Ubuntu 24.04, MacOS 15 and Windows 11 > > JTREG > > runner starting test: java/awt/Frame/MultiScreenTest.java > runner finished test: java/awt/Frame/MultiScreenTest.java > Passed. Execution successful Khalid Boulanouare has updated the pull request incrementally with two additional commits since the last revision: - 8352149: open/test/jdk/java/awt/Frame/MultiScreenTest.java fails in MacOS - Revert "8352149: open/test/jdk/java/awt/Frame/MultiScreenTest.java fails in MacOS" This reverts commit e938333b874342a6d0b3aa7d69263b97e5b3e17e. ------------- Changes: - all: https://git.openjdk.org/jdk/pull/24752/files - new: https://git.openjdk.org/jdk/pull/24752/files/6d1984b0..0c26af8a Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=24752&range=01 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=24752&range=00-01 Stats: 33 lines in 1 file changed: 1 ins; 5 del; 27 mod Patch: https://git.openjdk.org/jdk/pull/24752.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/24752/head:pull/24752 PR: https://git.openjdk.org/jdk/pull/24752 From duke at openjdk.org Thu Apr 24 12:51:09 2025 From: duke at openjdk.org (Khalid Boulanouare) Date: Thu, 24 Apr 2025 12:51:09 GMT Subject: RFR: 8352149: open/test/jdk/java/awt/Frame/MultiScreenTest.java fails in MacOS In-Reply-To: <-t5iRw5c31W0E-mPWTvHk9PoP819SUA9xrAwMZfJEDc=.c61d9c20-5397-4ab2-89ac-dab4b50b2a0e@github.com> References: <-t5iRw5c31W0E-mPWTvHk9PoP819SUA9xrAwMZfJEDc=.c61d9c20-5397-4ab2-89ac-dab4b50b2a0e@github.com> Message-ID: On Fri, 18 Apr 2025 13:10:10 GMT, Khalid Boulanouare wrote: > Fixes issue in which the test fails when run on multi-screen machine. > > Tested on Ubuntu 24.04, MacOS 15 and Windows 11 > > JTREG > > runner starting test: java/awt/Frame/MultiScreenTest.java > runner finished test: java/awt/Frame/MultiScreenTest.java > Passed. Execution successful Changes reverted Copyright year updated. @requires os.family == "linux" added ------------- PR Comment: https://git.openjdk.org/jdk/pull/24752#issuecomment-2827497764 From tr at openjdk.org Thu Apr 24 13:15:54 2025 From: tr at openjdk.org (Tejesh R) Date: Thu, 24 Apr 2025 13:15:54 GMT Subject: RFR: 8354495: Open source several AWT DataTransfer tests Message-ID: Open source these AWT DataTransfer tests: java/awt/datatransfer/ImageTransferCrashTest.java java/awt/datatransfer/ClipboardPerformanceTest.java java/awt/datatransfer/HTMLTransferConsoleOutputTest.java ------------- Commit messages: - Open source Changes: https://git.openjdk.org/jdk/pull/24850/files Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=24850&range=00 Issue: https://bugs.openjdk.org/browse/JDK-8354495 Stats: 465 lines in 4 files changed: 465 ins; 0 del; 0 mod Patch: https://git.openjdk.org/jdk/pull/24850.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/24850/head:pull/24850 PR: https://git.openjdk.org/jdk/pull/24850 From aivanov at openjdk.org Thu Apr 24 14:24:54 2025 From: aivanov at openjdk.org (Alexey Ivanov) Date: Thu, 24 Apr 2025 14:24:54 GMT Subject: RFR: 8355441: Remove antipattern from PassFailJFrame.forcePass javadoc In-Reply-To: References: Message-ID: <3l3LAIGDoMtLh8gKGXJXQR6Le_u8Urh1h3Esi-rez1g=.e3cbe425-2428-4621-b868-f5198474e538@github.com> On Wed, 23 Apr 2025 23:50:06 GMT, Manukumar V S wrote: > The javadoc for PassFailJFrame.forcePass suggests an anti-pattern of forcibly passing the test if a resource is unavailable. > > If a resource is unavailable or a feature isn't supported, the test should throw jtreg.SkippedException. > > PassFailJFrame.forcePass should be used in semi-automatic tests when the test determines that all the conditions for passing the test are met. > Please refer: JDK-8355366 and https://github.com/openjdk/jdk/pull/24820 > > Testing > This is a javadoc change, so not testing required. Changes requested by aivanov (Reviewer). test/jdk/java/awt/regtesthelpers/PassFailJFrame.java line 1296: > 1294: > 1295: /** > 1296: * Forcibly pass the test. This should be used in semi-automatic tests when Suggestion: * Forcibly pass the test. This method should be used in semi-automatic tests when I'm inclined to use imperative: _?Use this method in?.?_ test/jdk/java/awt/regtesthelpers/PassFailJFrame.java line 1298: > 1296: * Forcibly pass the test. This should be used in semi-automatic tests when > 1297: * the test determines that all the conditions for passing the test are met. > 1298: * This should not be used in cases where a resource is unavailable or a Suggestion: *

* This method should not be used in cases where a resource is unavailable or a Again imperative could better. test/jdk/java/awt/regtesthelpers/PassFailJFrame.java line 1310: > 1308: * PassFailJFrame.forceFail("TEST FAILED (output file - " + output + ")"); > 1309: * } > 1310: * Shall we scrap the sample completely? It doesn't add clarity. However, this new sample illustrates the use of both `forcePass` and `forceFail`. A section in the javadoc for the class could be better fit for such kind of example. Linking to a real test which uses these methods could be beneficial, too. ------------- PR Review: https://git.openjdk.org/jdk/pull/24837#pullrequestreview-2791385720 PR Review Comment: https://git.openjdk.org/jdk/pull/24837#discussion_r2058557831 PR Review Comment: https://git.openjdk.org/jdk/pull/24837#discussion_r2058562286 PR Review Comment: https://git.openjdk.org/jdk/pull/24837#discussion_r2058573792 From duke at openjdk.org Thu Apr 24 14:42:16 2025 From: duke at openjdk.org (duke) Date: Thu, 24 Apr 2025 14:42:16 GMT Subject: RFR: 8315113: Print request Chromaticity.MONOCHROME attribute does not work on macOS [v6] In-Reply-To: References: Message-ID: On Fri, 21 Mar 2025 15:42:29 GMT, GennadiyKrivoshein wrote: >> This update allows users to print with grayscale using color printers. >> Actually, it is not possible to use the "Monochrome" option from the "Color Appearance" panel. Also Chromaticity.MONOCHROME can't be used to print grayscale on color printers ([JDK-8315113](https://bugs.openjdk.org/browse/JDK-8315113)). >> >> **Fix description** >> When a printer supports color printing and a user adds Chromaticity.MONOCHROME attribute to a PrintRequestAttributeSet, then the final printing raster is transformed to the grayscale color using java.awt.image.ColorConvertOp. When the job is a PostScript job, then the "setColor" and "setPaint" methods of the Graphics are overridden, and user colors (paints) are transformed to the grayscale form using the new proxy class GrayscaleProxyGraphics2D. >> >> This approach is assumed to be platform, CUPS, and IPP protocol independent. >> >> **Tests** >> The fix was tested on Ubuntu 22.04 and MacOS 12.6.1. > > GennadiyKrivoshein has updated the pull request incrementally with one additional commit since the last revision: > > Use PassFailJFrame for test. > Move GrayscaleProxyGraphics2D.java to the shared classes. > Update copyright year. @GennadiyKrivoshein Your change (at version c4850933d04c0bd53e2c45ffba6da1fe1e21fd1e) is now ready to be sponsored by a Committer. ------------- PR Comment: https://git.openjdk.org/jdk/pull/21930#issuecomment-2827889110 From aturbanov at openjdk.org Thu Apr 24 14:54:49 2025 From: aturbanov at openjdk.org (Andrey Turbanov) Date: Thu, 24 Apr 2025 14:54:49 GMT Subject: RFR: 8354791: Use Hashtable.putIfAbsent in CSS constructor In-Reply-To: References: Message-ID: On Tue, 12 Nov 2024 09:13:07 GMT, Andrey Turbanov wrote: > We can use Hashtable.putIfAbsent instead of pair `get`/`put` methods. > It's faster and cleaner. Any more reviews ? ------------- PR Comment: https://git.openjdk.org/jdk/pull/22032#issuecomment-2827930887 From mvs at openjdk.org Thu Apr 24 15:06:50 2025 From: mvs at openjdk.org (Manukumar V S) Date: Thu, 24 Apr 2025 15:06:50 GMT Subject: RFR: 8355441: Remove antipattern from PassFailJFrame.forcePass javadoc [v2] In-Reply-To: <3l3LAIGDoMtLh8gKGXJXQR6Le_u8Urh1h3Esi-rez1g=.e3cbe425-2428-4621-b868-f5198474e538@github.com> References: <3l3LAIGDoMtLh8gKGXJXQR6Le_u8Urh1h3Esi-rez1g=.e3cbe425-2428-4621-b868-f5198474e538@github.com> Message-ID: On Thu, 24 Apr 2025 14:22:00 GMT, Alexey Ivanov wrote: >> Manukumar V S has updated the pull request incrementally with one additional commit since the last revision: >> >> Review comments fixed : Formatting changes, added reference to a real test > > test/jdk/java/awt/regtesthelpers/PassFailJFrame.java line 1310: > >> 1308: * PassFailJFrame.forceFail("TEST FAILED (output file - " + output + ")"); >> 1309: * } >> 1310: * > > Shall we scrap the sample completely? It doesn't add clarity. > > However, this new sample illustrates the use of both `forcePass` and `forceFail`. A section in the javadoc for the class could be better fit for such kind of example. > > Linking to a real test which uses these methods could be beneficial, too. Added link to a real test ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/24837#discussion_r2058663677 From mvs at openjdk.org Thu Apr 24 15:06:48 2025 From: mvs at openjdk.org (Manukumar V S) Date: Thu, 24 Apr 2025 15:06:48 GMT Subject: RFR: 8355441: Remove antipattern from PassFailJFrame.forcePass javadoc [v2] In-Reply-To: References: Message-ID: > The javadoc for PassFailJFrame.forcePass suggests an anti-pattern of forcibly passing the test if a resource is unavailable. > > If a resource is unavailable or a feature isn't supported, the test should throw jtreg.SkippedException. > > PassFailJFrame.forcePass should be used in semi-automatic tests when the test determines that all the conditions for passing the test are met. > Please refer: JDK-8355366 and https://github.com/openjdk/jdk/pull/24820 > > Testing > This is a javadoc change, so not testing required. Manukumar V S has updated the pull request incrementally with one additional commit since the last revision: Review comments fixed : Formatting changes, added reference to a real test ------------- Changes: - all: https://git.openjdk.org/jdk/pull/24837/files - new: https://git.openjdk.org/jdk/pull/24837/files/99b9cfb2..97b8b5a5 Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=24837&range=01 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=24837&range=00-01 Stats: 12 lines in 1 file changed: 1 ins; 6 del; 5 mod Patch: https://git.openjdk.org/jdk/pull/24837.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/24837/head:pull/24837 PR: https://git.openjdk.org/jdk/pull/24837 From aivanov at openjdk.org Thu Apr 24 15:13:57 2025 From: aivanov at openjdk.org (Alexey Ivanov) Date: Thu, 24 Apr 2025 15:13:57 GMT Subject: RFR: 8355366: Fix the wrong usage of PassFailJFrame.forcePass() in some manual tests [v2] In-Reply-To: <4n-tsCOQpW-6zbLttPBB16yTrl4S0VrOAkPu_gSYyQ8=.079b92c6-2759-4cf2-ac3c-912116b334f5@github.com> References: <4n-tsCOQpW-6zbLttPBB16yTrl4S0VrOAkPu_gSYyQ8=.079b92c6-2759-4cf2-ac3c-912116b334f5@github.com> Message-ID: On Wed, 23 Apr 2025 23:18:06 GMT, Manukumar V S wrote: >> Fix the wrong usage of PassFailJFrame.forcePass() in some manual tests from java.awt.Desktop package. These tests should be fixed similar to [JDK-8352109](https://bugs.openjdk.org/browse/JDK-8352109) and jtreg.SkippedException should be used instead of PassFailJFrame.forcePass(). >> Affected tests: >> 1. https://github.com/openjdk/jdk/blob/master/test/jdk/java/awt/Desktop/BrowseTest.java >> 2. https://github.com/openjdk/jdk/blob/master/test/jdk/java/awt/Desktop/OpenTest.java >> 3. https://github.com/openjdk/jdk/blob/master/test/jdk/java/awt/Desktop/EditAndPrintTest/EditAndPrintTest.java >> >> Testing: >> All the changed tests are tested manually and found to be working fine. > > Manukumar V S has updated the pull request incrementally with one additional commit since the last revision: > > Update Copyright year Changes requested by aivanov (Reviewer). test/jdk/java/awt/Desktop/BrowseTest.java line 34: > 32: > 33: import jtreg.SkippedException; > 34: import java.awt.Desktop; It is more common to put `jtreg.SkippedException` after `javax.*` imports followed by a blank line. https://github.com/openjdk/jdk/blob/0edd018a48c202a6da4afe80e245799b47000885/test/jdk/javax/swing/Popup/TaskbarPositionTest.java#L58-L60 https://github.com/openjdk/jdk/blob/0edd018a48c202a6da4afe80e245799b47000885/test/jdk/javax/swing/plaf/basic/BasicSliderUI/bug4419255.java#L26-L28 The most common order of imports in JDK source and tests: - classes in `java.*` packages; - (optional blank line) - classes in `javax.*` packages; - (blank line) - other imports (`com.*`, `sun.*`; includes jtreg.* and `test.*`) - (blank line) - static imports This comment applies to all the tests. test/jdk/java/awt/Desktop/EditAndPrintTest/EditAndPrintTest.java line 52: > 50: If you see any EXCEPTION messages in the output press FAIL. > 51: """; > 52: static Desktop desktop; Suggestion: """; static Desktop desktop; This two fields are unrelated, a blank line separates them. ------------- PR Review: https://git.openjdk.org/jdk/pull/24820#pullrequestreview-2791570458 PR Review Comment: https://git.openjdk.org/jdk/pull/24820#discussion_r2058670906 PR Review Comment: https://git.openjdk.org/jdk/pull/24820#discussion_r2058675794 From mvs at openjdk.org Thu Apr 24 15:25:14 2025 From: mvs at openjdk.org (Manukumar V S) Date: Thu, 24 Apr 2025 15:25:14 GMT Subject: RFR: 8355366: Fix the wrong usage of PassFailJFrame.forcePass() in some manual tests [v3] In-Reply-To: References: Message-ID: > Fix the wrong usage of PassFailJFrame.forcePass() in some manual tests from java.awt.Desktop package. These tests should be fixed similar to [JDK-8352109](https://bugs.openjdk.org/browse/JDK-8352109) and jtreg.SkippedException should be used instead of PassFailJFrame.forcePass(). > Affected tests: > 1. https://github.com/openjdk/jdk/blob/master/test/jdk/java/awt/Desktop/BrowseTest.java > 2. https://github.com/openjdk/jdk/blob/master/test/jdk/java/awt/Desktop/OpenTest.java > 3. https://github.com/openjdk/jdk/blob/master/test/jdk/java/awt/Desktop/EditAndPrintTest/EditAndPrintTest.java > > Testing: > All the changed tests are tested manually and found to be working fine. Manukumar V S has updated the pull request incrementally with 29 additional commits since the last revision: - Review comments fixed : Changed the position of imports, formatting changes - 8354553: Open source several clipboard tests batch0 Reviewed-by: serb, prr - 8353596: GenShen: Test TestClone.java#generational-no-coops intermittent timed out Reviewed-by: kdnilsen, ysr - 8354554: Open source several clipboard tests batch1 Reviewed-by: serb, prr - 8355429: Open source ProgressMonitor test Reviewed-by: azvegint - 8355328: Improve negative tests coverage for jpackage signing Reviewed-by: almatvee - 8354899: Reduce overhead associated with type switches Reviewed-by: asotona - 8355335: Avoid pattern matching switches in core ClassFile API Reviewed-by: asotona - 8353298: AOT cache creation asserts with _array_klasses in an unregistered InstanceKlass Reviewed-by: ccheung, kvn - 8355237: Upstream AOT test cases from Leyden repo to mainline Reviewed-by: ccheung, kvn, lmesnik, shade - ... and 19 more: https://git.openjdk.org/jdk/compare/7c785daa...1a9cfbc8 ------------- Changes: - all: https://git.openjdk.org/jdk/pull/24820/files - new: https://git.openjdk.org/jdk/pull/24820/files/7c785daa..1a9cfbc8 Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=24820&range=02 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=24820&range=01-02 Stats: 9572 lines in 281 files changed: 6809 ins; 2407 del; 356 mod Patch: https://git.openjdk.org/jdk/pull/24820.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/24820/head:pull/24820 PR: https://git.openjdk.org/jdk/pull/24820 From aivanov at openjdk.org Thu Apr 24 15:26:57 2025 From: aivanov at openjdk.org (Alexey Ivanov) Date: Thu, 24 Apr 2025 15:26:57 GMT Subject: RFR: 8355366: Fix the wrong usage of PassFailJFrame.forcePass() in some manual tests [v2] In-Reply-To: <4n-tsCOQpW-6zbLttPBB16yTrl4S0VrOAkPu_gSYyQ8=.079b92c6-2759-4cf2-ac3c-912116b334f5@github.com> References: <4n-tsCOQpW-6zbLttPBB16yTrl4S0VrOAkPu_gSYyQ8=.079b92c6-2759-4cf2-ac3c-912116b334f5@github.com> Message-ID: On Wed, 23 Apr 2025 23:18:06 GMT, Manukumar V S wrote: >> Fix the wrong usage of PassFailJFrame.forcePass() in some manual tests from java.awt.Desktop package. These tests should be fixed similar to [JDK-8352109](https://bugs.openjdk.org/browse/JDK-8352109) and jtreg.SkippedException should be used instead of PassFailJFrame.forcePass(). >> Affected tests: >> 1. https://github.com/openjdk/jdk/blob/master/test/jdk/java/awt/Desktop/BrowseTest.java >> 2. https://github.com/openjdk/jdk/blob/master/test/jdk/java/awt/Desktop/OpenTest.java >> 3. https://github.com/openjdk/jdk/blob/master/test/jdk/java/awt/Desktop/EditAndPrintTest/EditAndPrintTest.java >> >> Testing: >> All the changed tests are tested manually and found to be working fine. > > Manukumar V S has updated the pull request incrementally with one additional commit since the last revision: > > Update Copyright year I assume you tried merging master but something went awry along the lines? 281 files changed instead of 3 doesn't look good. ------------- PR Comment: https://git.openjdk.org/jdk/pull/24820#issuecomment-2828031135 From abhiscxk at openjdk.org Thu Apr 24 15:50:51 2025 From: abhiscxk at openjdk.org (Abhishek Kumar) Date: Thu, 24 Apr 2025 15:50:51 GMT Subject: RFR: 8352149: open/test/jdk/java/awt/Frame/MultiScreenTest.java fails in MacOS [v2] In-Reply-To: References: <-t5iRw5c31W0E-mPWTvHk9PoP819SUA9xrAwMZfJEDc=.c61d9c20-5397-4ab2-89ac-dab4b50b2a0e@github.com> Message-ID: <5wH38sojKf1sqlOdB4hP4I-Z2Jk4_e8n42p9i7Lnpfs=.2666632a-46a6-4665-a83f-a8c4fe47ed8e@github.com> On Thu, 24 Apr 2025 12:51:09 GMT, Khalid Boulanouare wrote: >> Fixes issue in which the test fails when run on multi-screen machine. >> >> Tested on Ubuntu 24.04, MacOS 15 and Windows 11 >> >> JTREG >> >> runner starting test: java/awt/Frame/MultiScreenTest.java >> runner finished test: java/awt/Frame/MultiScreenTest.java >> Passed. Execution successful > > Khalid Boulanouare has updated the pull request incrementally with two additional commits since the last revision: > > - 8352149: open/test/jdk/java/awt/Frame/MultiScreenTest.java fails in MacOS > - Revert "8352149: open/test/jdk/java/awt/Frame/MultiScreenTest.java fails in MacOS" > > This reverts commit e938333b874342a6d0b3aa7d69263b97e5b3e17e. Please update the title of the PR to `8352149: open/test/jdk/java/awt/Frame/MultiScreenTest.java fails` ------------- PR Comment: https://git.openjdk.org/jdk/pull/24752#issuecomment-2828105575 From mvs at openjdk.org Thu Apr 24 15:51:16 2025 From: mvs at openjdk.org (Manukumar V S) Date: Thu, 24 Apr 2025 15:51:16 GMT Subject: RFR: 8355366: Fix the wrong usage of PassFailJFrame.forcePass() in some manual tests [v4] In-Reply-To: References: Message-ID: <5GkS0mYlKGfOr-Sq4_sgi3p4GkzASeMX1x9w_lvZ6RU=.26cc588d-b299-420d-9bcd-e41d35e08bb1@github.com> > Fix the wrong usage of PassFailJFrame.forcePass() in some manual tests from java.awt.Desktop package. These tests should be fixed similar to [JDK-8352109](https://bugs.openjdk.org/browse/JDK-8352109) and jtreg.SkippedException should be used instead of PassFailJFrame.forcePass(). > Affected tests: > 1. https://github.com/openjdk/jdk/blob/master/test/jdk/java/awt/Desktop/BrowseTest.java > 2. https://github.com/openjdk/jdk/blob/master/test/jdk/java/awt/Desktop/OpenTest.java > 3. https://github.com/openjdk/jdk/blob/master/test/jdk/java/awt/Desktop/EditAndPrintTest/EditAndPrintTest.java > > Testing: > All the changed tests are tested manually and found to be working fine. Manukumar V S has updated the pull request with a new target base due to a merge or a rebase. ------------- Changes: https://git.openjdk.org/jdk/pull/24820/files Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=24820&range=03 Stats: 0 lines in 0 files changed: 0 ins; 0 del; 0 mod Patch: https://git.openjdk.org/jdk/pull/24820.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/24820/head:pull/24820 PR: https://git.openjdk.org/jdk/pull/24820 From mvs at openjdk.org Thu Apr 24 15:51:16 2025 From: mvs at openjdk.org (Manukumar V S) Date: Thu, 24 Apr 2025 15:51:16 GMT Subject: Withdrawn: 8355366: Fix the wrong usage of PassFailJFrame.forcePass() in some manual tests In-Reply-To: References: Message-ID: On Wed, 23 Apr 2025 09:35:25 GMT, Manukumar V S wrote: > Fix the wrong usage of PassFailJFrame.forcePass() in some manual tests from java.awt.Desktop package. These tests should be fixed similar to [JDK-8352109](https://bugs.openjdk.org/browse/JDK-8352109) and jtreg.SkippedException should be used instead of PassFailJFrame.forcePass(). > Affected tests: > 1. https://github.com/openjdk/jdk/blob/master/test/jdk/java/awt/Desktop/BrowseTest.java > 2. https://github.com/openjdk/jdk/blob/master/test/jdk/java/awt/Desktop/OpenTest.java > 3. https://github.com/openjdk/jdk/blob/master/test/jdk/java/awt/Desktop/EditAndPrintTest/EditAndPrintTest.java > > Testing: > All the changed tests are tested manually and found to be working fine. This pull request has been closed without being integrated. ------------- PR: https://git.openjdk.org/jdk/pull/24820 From mvs at openjdk.org Thu Apr 24 15:57:05 2025 From: mvs at openjdk.org (Manukumar V S) Date: Thu, 24 Apr 2025 15:57:05 GMT Subject: RFR: 8355366: Fix the wrong usage of PassFailJFrame.forcePass() in some manual tests [v2] In-Reply-To: References: <4n-tsCOQpW-6zbLttPBB16yTrl4S0VrOAkPu_gSYyQ8=.079b92c6-2759-4cf2-ac3c-912116b334f5@github.com> Message-ID: On Thu, 24 Apr 2025 15:24:00 GMT, Alexey Ivanov wrote: > I assume you tried merging master but something went awry along the lines? 281 files changed instead of 3 doesn't look good. Sorry, it somehow got messed up, I will create a fresh PR. ------------- PR Comment: https://git.openjdk.org/jdk/pull/24820#issuecomment-2828126132 From duke at openjdk.org Thu Apr 24 16:03:41 2025 From: duke at openjdk.org (Khalid Boulanouare) Date: Thu, 24 Apr 2025 16:03:41 GMT Subject: RFR: 8352149: open/test/jdk/java/awt/Frame/MultiScreenTest.java fails [v2] In-Reply-To: References: <-t5iRw5c31W0E-mPWTvHk9PoP819SUA9xrAwMZfJEDc=.c61d9c20-5397-4ab2-89ac-dab4b50b2a0e@github.com> Message-ID: On Thu, 24 Apr 2025 12:51:09 GMT, Khalid Boulanouare wrote: >> Fixes issue in which the test fails when run on multi-screen machine. >> >> Tested on Ubuntu 24.04, MacOS 15 and Windows 11 >> >> JTREG >> >> runner starting test: java/awt/Frame/MultiScreenTest.java >> runner finished test: java/awt/Frame/MultiScreenTest.java >> Passed. Execution successful > > Khalid Boulanouare has updated the pull request incrementally with two additional commits since the last revision: > > - 8352149: open/test/jdk/java/awt/Frame/MultiScreenTest.java fails in MacOS > - Revert "8352149: open/test/jdk/java/awt/Frame/MultiScreenTest.java fails in MacOS" > > This reverts commit e938333b874342a6d0b3aa7d69263b97e5b3e17e. PR title updated ------------- PR Comment: https://git.openjdk.org/jdk/pull/24752#issuecomment-2828144239 From duke at openjdk.org Thu Apr 24 16:10:06 2025 From: duke at openjdk.org (GennadiyKrivoshein) Date: Thu, 24 Apr 2025 16:10:06 GMT Subject: Integrated: 8315113: Print request Chromaticity.MONOCHROME attribute does not work on macOS In-Reply-To: References: Message-ID: On Wed, 6 Nov 2024 14:15:44 GMT, GennadiyKrivoshein wrote: > This update allows users to print with grayscale using color printers. > Actually, it is not possible to use the "Monochrome" option from the "Color Appearance" panel. Also Chromaticity.MONOCHROME can't be used to print grayscale on color printers ([JDK-8315113](https://bugs.openjdk.org/browse/JDK-8315113)). > > **Fix description** > When a printer supports color printing and a user adds Chromaticity.MONOCHROME attribute to a PrintRequestAttributeSet, then the final printing raster is transformed to the grayscale color using java.awt.image.ColorConvertOp. When the job is a PostScript job, then the "setColor" and "setPaint" methods of the Graphics are overridden, and user colors (paints) are transformed to the grayscale form using the new proxy class GrayscaleProxyGraphics2D. > > This approach is assumed to be platform, CUPS, and IPP protocol independent. > > **Tests** > The fix was tested on Ubuntu 22.04 and MacOS 12.6.1. This pull request has now been integrated. Changeset: 8e51ff70 Author: Gennadiy Krivoshein Committer: Phil Race URL: https://git.openjdk.org/jdk/commit/8e51ff70d896aeb5b35e6bb6b00f1818d67c99e7 Stats: 505 lines in 4 files changed: 501 ins; 0 del; 4 mod 8315113: Print request Chromaticity.MONOCHROME attribute does not work on macOS Reviewed-by: prr, psadhukhan ------------- PR: https://git.openjdk.org/jdk/pull/21930 From azvegint at openjdk.org Thu Apr 24 16:30:42 2025 From: azvegint at openjdk.org (Alexander Zvegintsev) Date: Thu, 24 Apr 2025 16:30:42 GMT Subject: RFR: 8354495: Open source several AWT DataTransfer tests In-Reply-To: References: Message-ID: <2WVvRNdfW5eWQ2PV9RVaffh5TogcbqMM9kAkf8_XnBM=.708b3fe4-d50f-4076-8a2d-55e4b375dd7f@github.com> On Thu, 24 Apr 2025 13:09:42 GMT, Tejesh R wrote: > Open source these AWT DataTransfer tests: > > java/awt/datatransfer/ImageTransferCrashTest.java > java/awt/datatransfer/ClipboardPerformanceTest.java > java/awt/datatransfer/HTMLTransferConsoleOutputTest.java Marked as reviewed by azvegint (Reviewer). ------------- PR Review: https://git.openjdk.org/jdk/pull/24850#pullrequestreview-2791830155 From mvs at openjdk.org Thu Apr 24 16:43:10 2025 From: mvs at openjdk.org (Manukumar V S) Date: Thu, 24 Apr 2025 16:43:10 GMT Subject: RFR: 8355366: Fix the wrong usage of PassFailJFrame.forcePass() in some manual tests Message-ID: Fix the wrong usage of PassFailJFrame.forcePass() in some manual tests from java.awt.Desktop package. These tests should be fixed similar to [JDK-8352109](https://bugs.openjdk.org/browse/JDK-8352109) and jtreg.SkippedException should be used instead of PassFailJFrame.forcePass(). Affected tests: 1. https://github.com/openjdk/jdk/blob/master/test/jdk/java/awt/Desktop/BrowseTest.java 2. https://github.com/openjdk/jdk/blob/master/test/jdk/java/awt/Desktop/OpenTest.java 3. https://github.com/openjdk/jdk/blob/master/test/jdk/java/awt/Desktop/EditAndPrintTest/EditAndPrintTest.java I have opened this PR because my other PR https://github.com/openjdk/jdk/pull/24820 got accidentally closed. ------------- Commit messages: - 8355366: Fix the wrong usage of PassFailJFrame.forcePass() in some manual tests Changes: https://git.openjdk.org/jdk/pull/24853/files Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=24853&range=00 Issue: https://bugs.openjdk.org/browse/JDK-8355366 Stats: 63 lines in 3 files changed: 27 ins; 24 del; 12 mod Patch: https://git.openjdk.org/jdk/pull/24853.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/24853/head:pull/24853 PR: https://git.openjdk.org/jdk/pull/24853 From aivanov at openjdk.org Thu Apr 24 16:59:47 2025 From: aivanov at openjdk.org (Alexey Ivanov) Date: Thu, 24 Apr 2025 16:59:47 GMT Subject: RFR: 8355441: Remove antipattern from PassFailJFrame.forcePass javadoc [v2] In-Reply-To: References: Message-ID: On Thu, 24 Apr 2025 15:06:48 GMT, Manukumar V S wrote: >> The javadoc for PassFailJFrame.forcePass suggests an anti-pattern of forcibly passing the test if a resource is unavailable. >> >> If a resource is unavailable or a feature isn't supported, the test should throw jtreg.SkippedException. >> >> PassFailJFrame.forcePass should be used in semi-automatic tests when the test determines that all the conditions for passing the test are met. >> Please refer: JDK-8355366 and https://github.com/openjdk/jdk/pull/24820 >> >> Testing >> This is a javadoc change, so not testing required. > > Manukumar V S has updated the pull request incrementally with one additional commit since the last revision: > > Review comments fixed : Formatting changes, added reference to a real test Do you mind expanding the documentation for `forcePass` and `forceFail` by adding a new section to `PassFailJFrame` description? I submitted [JDK-8355515](https://bugs.openjdk.org/browse/JDK-8355515). test/jdk/java/awt/regtesthelpers/PassFailJFrame.java line 1305: > 1303: *

A sample usage can be found in this test : > 1304: * SaveFileNameOverrideTest.java > 1305: * Suggestion: * Forcibly pass the test. *

* Use this method in semi-automatic tests when * the test determines that all the conditions for passing the test are met. *

* Do not use this method in cases where a resource is unavailable or a * feature isn't supported, throw {@code jtreg.SkippedException} instead. * *

A sample usage can be found in * {@code * SaveFileNameOverrideTest.java} This way looks better to me. You want a permanent link; the test could change in the future. ------------- Changes requested by aivanov (Reviewer). PR Review: https://git.openjdk.org/jdk/pull/24837#pullrequestreview-2791839556 PR Review Comment: https://git.openjdk.org/jdk/pull/24837#discussion_r2058836519 From honkar at openjdk.org Thu Apr 24 21:03:55 2025 From: honkar at openjdk.org (Harshitha Onkar) Date: Thu, 24 Apr 2025 21:03:55 GMT Subject: RFR: 8355366: Fix the wrong usage of PassFailJFrame.forcePass() in some manual tests In-Reply-To: References: Message-ID: On Thu, 24 Apr 2025 16:36:56 GMT, Manukumar V S wrote: > Fix the wrong usage of PassFailJFrame.forcePass() in some manual tests from java.awt.Desktop package. These tests should be fixed similar to [JDK-8352109](https://bugs.openjdk.org/browse/JDK-8352109) and jtreg.SkippedException should be used instead of PassFailJFrame.forcePass(). > Affected tests: > 1. https://github.com/openjdk/jdk/blob/master/test/jdk/java/awt/Desktop/BrowseTest.java > 2. https://github.com/openjdk/jdk/blob/master/test/jdk/java/awt/Desktop/OpenTest.java > 3. https://github.com/openjdk/jdk/blob/master/test/jdk/java/awt/Desktop/EditAndPrintTest/EditAndPrintTest.java > > I have opened this PR because my other PR https://github.com/openjdk/jdk/pull/24820 got accidentally closed. Marked as reviewed by honkar (Reviewer). ------------- PR Review: https://git.openjdk.org/jdk/pull/24853#pullrequestreview-2792493160 From duke at openjdk.org Fri Apr 25 01:46:57 2025 From: duke at openjdk.org (duke) Date: Fri, 25 Apr 2025 01:46:57 GMT Subject: RFR: 8355366: Fix the wrong usage of PassFailJFrame.forcePass() in some manual tests In-Reply-To: References: Message-ID: On Thu, 24 Apr 2025 16:36:56 GMT, Manukumar V S wrote: > Fix the wrong usage of PassFailJFrame.forcePass() in some manual tests from java.awt.Desktop package. These tests should be fixed similar to [JDK-8352109](https://bugs.openjdk.org/browse/JDK-8352109) and jtreg.SkippedException should be used instead of PassFailJFrame.forcePass(). > Affected tests: > 1. https://github.com/openjdk/jdk/blob/master/test/jdk/java/awt/Desktop/BrowseTest.java > 2. https://github.com/openjdk/jdk/blob/master/test/jdk/java/awt/Desktop/OpenTest.java > 3. https://github.com/openjdk/jdk/blob/master/test/jdk/java/awt/Desktop/EditAndPrintTest/EditAndPrintTest.java > > I have opened this PR because my other PR https://github.com/openjdk/jdk/pull/24820 got accidentally closed. @manukumarvs Your change (at version 959b4f7f53ea50f266da76c3747b9259b23c6c8e) is now ready to be sponsored by a Committer. ------------- PR Comment: https://git.openjdk.org/jdk/pull/24853#issuecomment-2829193218 From mvs at openjdk.org Fri Apr 25 02:08:04 2025 From: mvs at openjdk.org (Manukumar V S) Date: Fri, 25 Apr 2025 02:08:04 GMT Subject: RFR: 8355441: Remove antipattern from PassFailJFrame.forcePass javadoc [v3] In-Reply-To: References: Message-ID: <5tA4RewMdCVER-EP9QHq9bg9poTxRBIu9jow2QA8qyA=.611edf45-122a-4cdf-8113-2bb3e7dfd1db@github.com> > The javadoc for PassFailJFrame.forcePass suggests an anti-pattern of forcibly passing the test if a resource is unavailable. > > If a resource is unavailable or a feature isn't supported, the test should throw jtreg.SkippedException. > > PassFailJFrame.forcePass should be used in semi-automatic tests when the test determines that all the conditions for passing the test are met. > Please refer: JDK-8355366 and https://github.com/openjdk/jdk/pull/24820 > > Testing > This is a javadoc change, so not testing required. Manukumar V S has updated the pull request incrementally with one additional commit since the last revision: Updated the javadoc description ------------- Changes: - all: https://git.openjdk.org/jdk/pull/24837/files - new: https://git.openjdk.org/jdk/pull/24837/files/97b8b5a5..45601fc7 Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=24837&range=02 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=24837&range=01-02 Stats: 12 lines in 1 file changed: 5 ins; 4 del; 3 mod Patch: https://git.openjdk.org/jdk/pull/24837.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/24837/head:pull/24837 PR: https://git.openjdk.org/jdk/pull/24837 From mvs at openjdk.org Fri Apr 25 02:08:05 2025 From: mvs at openjdk.org (Manukumar V S) Date: Fri, 25 Apr 2025 02:08:05 GMT Subject: RFR: 8355441: Remove antipattern from PassFailJFrame.forcePass javadoc [v2] In-Reply-To: References: Message-ID: On Thu, 24 Apr 2025 16:32:11 GMT, Alexey Ivanov wrote: >> Manukumar V S has updated the pull request incrementally with one additional commit since the last revision: >> >> Review comments fixed : Formatting changes, added reference to a real test > > test/jdk/java/awt/regtesthelpers/PassFailJFrame.java line 1305: > >> 1303: *

A sample usage can be found in this test : >> 1304: * SaveFileNameOverrideTest.java >> 1305: * > > Suggestion: > > * Forcibly pass the test. > *

> * Use this method in semi-automatic tests when > * the test determines that all the conditions for passing the test are met. > *

> * Do not use this method in cases where a resource is unavailable or a > * feature isn't supported, throw {@code jtreg.SkippedException} instead. > * > *

A sample usage can be found in > * {@code > * SaveFileNameOverrideTest.java} > > This way looks better to me. > > You want a permanent link; the test could change in the future. Yea, the line number might change, so I just removed the line number in the link. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/24837#discussion_r2059456056 From prr at openjdk.org Fri Apr 25 04:13:51 2025 From: prr at openjdk.org (Phil Race) Date: Fri, 25 Apr 2025 04:13:51 GMT Subject: RFR: 4811995: BorderLayout does not respect minimum size of its components [v2] In-Reply-To: References: Message-ID: On Tue, 22 Apr 2025 21:09:58 GMT, Jeremy Wood wrote: >> This PR changes how the BorderLayout positions components when they don't fit inside a container. >> >> This should have no effect on BorderLayouts that match or exceed their preferred size. >> >> (The name of this PR/ticket is a little misleading: this in no way relates to `component.getMinimumSize()`.) >> >> Here is part of a comment in that ticket that sums up what this PR is trying to fix: >>> Instead of the South Component being placed partially offscreen as Windows does, it is often placed on top of the North Component. Indeed, BorderLayout.layoutContainer() always places the South Component flush with the bottom of the Container and does not check if the Container is smaller than the minimum size, or if the North and South Components overlap. >> >> Previously child components could: >> A. be assigned negative (x,y) coordinates >> B. be assigned negative widths or heights >> C. overlap other child components >> D. be assigned dimensions that don't fit inside the target container >> >> This PR will instead constrain certain values. Now child components may be given a width/height of zero pixels, but they should never show the 4 behaviors stated above. >> >> We encountered this basic problem last week at work (we could end up with a component with a negative height). Our work-around was more complex than this PR: we wrote a modified BorderLayout that would switch to using `component.getMinimumSize()` when the preferred size wouldn't fit. IMO that is a better option all-around, but it is dangerously invasive for an OpenJDK proposal. I'm happy to discuss that idea further, though, if anyone here disagrees. > > Jeremy Wood has updated the pull request incrementally with six additional commits since the last revision: > > - Update test/jdk/java/awt/BorderLayout/ConstrainedBorderLayoutChildrenTest.java > > Co-authored-by: Andrey Turbanov > - Update test/jdk/java/awt/BorderLayout/ConstrainedBorderLayoutChildrenTest.java > > Co-authored-by: Andrey Turbanov > - Update test/jdk/java/awt/BorderLayout/ConstrainedBorderLayoutChildrenTest.java > > Co-authored-by: Andrey Turbanov > - Update test/jdk/java/awt/BorderLayout/ConstrainedBorderLayoutChildrenTest.java > > Co-authored-by: Andrey Turbanov > - Update test/jdk/java/awt/BorderLayout/ConstrainedBorderLayoutChildrenTest.java > > Co-authored-by: Andrey Turbanov > - Update test/jdk/java/awt/BorderLayout/ConstrainedBorderLayoutChildrenTest.java > > Co-authored-by: Andrey Turbanov The client team spent some time discussing this today. There are a lot of concerns about this. It is well intentioned and the behaviour may be odd but - applications (of which there are tens of thousands) can be very sensitive to layout manager behaviour. BorderLayout is so widely used that probably every Java UI app worth using uses it. We think it almost certain that some applications will be broken, perhaps as a result of a bug in their code they didn't realise they had, such as attempts to compensate for this which will then behave differently. - how will we test it ? I ran all our automated tests and they pass, but they are toy apps and maybe aren't even going to fail even if the UI lays out wrong. Even if they did something that matters. We would need real world + manual testing. - The spec says preferred size is what layout uses. I don't know how unique that is but I didn't spot the same in the other basic layout managers - GridBagLayout explicitly says it looks at pref/min/max. BorderLayout only says preferred - - I also looked at the history. JDK 1.4.2 (2003 ?) is the release I looked at and I see no bug fixes in BorderLayout between then and now. Tweaks to conform to new policies and new API methods in 1.5 .. but that's all. So BorderLayout has behaved the same for a quarter of a century. Should we touch it now ? So I'd prefer to not do this, even if it is valid fix, and the bar for accepting it would be high - Lots of real world testing - from BIG apps, like Intellij, Netbeans - A way to disable the change for the likely broken apps. - A probable spec. change, so it will never be backported (should not happen regardless) ------------- PR Comment: https://git.openjdk.org/jdk/pull/24772#issuecomment-2829328797 From duke at openjdk.org Fri Apr 25 05:54:54 2025 From: duke at openjdk.org (Jeremy Wood) Date: Fri, 25 Apr 2025 05:54:54 GMT Subject: RFR: 4811995: BorderLayout does not respect minimum size of its components [v2] In-Reply-To: References: Message-ID: On Tue, 22 Apr 2025 21:09:58 GMT, Jeremy Wood wrote: >> This PR changes how the BorderLayout positions components when they don't fit inside a container. >> >> This should have no effect on BorderLayouts that match or exceed their preferred size. >> >> (The name of this PR/ticket is a little misleading: this in no way relates to `component.getMinimumSize()`.) >> >> Here is part of a comment in that ticket that sums up what this PR is trying to fix: >>> Instead of the South Component being placed partially offscreen as Windows does, it is often placed on top of the North Component. Indeed, BorderLayout.layoutContainer() always places the South Component flush with the bottom of the Container and does not check if the Container is smaller than the minimum size, or if the North and South Components overlap. >> >> Previously child components could: >> A. be assigned negative (x,y) coordinates >> B. be assigned negative widths or heights >> C. overlap other child components >> D. be assigned dimensions that don't fit inside the target container >> >> This PR will instead constrain certain values. Now child components may be given a width/height of zero pixels, but they should never show the 4 behaviors stated above. >> >> We encountered this basic problem last week at work (we could end up with a component with a negative height). Our work-around was more complex than this PR: we wrote a modified BorderLayout that would switch to using `component.getMinimumSize()` when the preferred size wouldn't fit. IMO that is a better option all-around, but it is dangerously invasive for an OpenJDK proposal. I'm happy to discuss that idea further, though, if anyone here disagrees. > > Jeremy Wood has updated the pull request incrementally with six additional commits since the last revision: > > - Update test/jdk/java/awt/BorderLayout/ConstrainedBorderLayoutChildrenTest.java > > Co-authored-by: Andrey Turbanov > - Update test/jdk/java/awt/BorderLayout/ConstrainedBorderLayoutChildrenTest.java > > Co-authored-by: Andrey Turbanov > - Update test/jdk/java/awt/BorderLayout/ConstrainedBorderLayoutChildrenTest.java > > Co-authored-by: Andrey Turbanov > - Update test/jdk/java/awt/BorderLayout/ConstrainedBorderLayoutChildrenTest.java > > Co-authored-by: Andrey Turbanov > - Update test/jdk/java/awt/BorderLayout/ConstrainedBorderLayoutChildrenTest.java > > Co-authored-by: Andrey Turbanov > - Update test/jdk/java/awt/BorderLayout/ConstrainedBorderLayoutChildrenTest.java > > Co-authored-by: Andrey Turbanov That makes sense. Before I close this PR: 1. Is there any response to JDK-4811995 that would be acceptable? 2. If not: should that ticket be closed as cant/won't fix? 3. Should we leave a comment in BorderLayout#layoutContainer to document this topic for future readers? ------------- PR Comment: https://git.openjdk.org/jdk/pull/24772#issuecomment-2829439025 From serb at openjdk.org Fri Apr 25 07:24:53 2025 From: serb at openjdk.org (Sergey Bylokhov) Date: Fri, 25 Apr 2025 07:24:53 GMT Subject: RFR: 8355203: [macos] AquaButtonUI and AquaRootPaneUI repaint default button unnecessarily [v2] In-Reply-To: <32mwQn83m5Xd9LrJnBN8iO92Ohfa-r2Wdc9vPqbM1NA=.73cabcf1-ad84-45d3-ad7d-97fd64d0b161@github.com> References: <32mwQn83m5Xd9LrJnBN8iO92Ohfa-r2Wdc9vPqbM1NA=.73cabcf1-ad84-45d3-ad7d-97fd64d0b161@github.com> Message-ID: On Wed, 23 Apr 2025 20:36:37 GMT, Jeremy Wood wrote: >> This removes the constant repainting of the AquaRootPaneUI's default button. >> >> A long time ago (before Mac OS Yosemite, around 2014) this was needed to match Aqua's native experience. But the default button no longer pulses, so we don't need to repaint ("pulse") the button continually. >> >> Here's a clip from a YouTube video I found demonstrating the pulsing effect that this PR removes (you may want to turn your volume off): >> >> https://github.com/user-attachments/assets/496bc003-ccba-4178-81bc-765e96d94316 >> >> This PR includes a test, but this test has never failed. (That is: this PR does not resolve a failing test.) This test would fail if the default button ever looked the same as a non-default button. >> >> My primary goal here was to remove the AquaButtonUI's AncestorListener, but while we're here we might as well remove the AquaRootPaneUI's timer and other cleanup. >> >> I tried and failed to rename the `private static final byte _pulsed` constant. (More details [here](https://github.com/openjdk/jdk/commit/89d0689f226b9e883df464e6f3e8c20074970499).) If anyone has suggestions for how to rename that without errors please let me know. > > Jeremy Wood has updated the pull request incrementally with one additional commit since the last revision: > > 8344697: use `PULSED` again, but add comment for future reference test/jdk/com/apple/laf/RootPane/RootPaneDefaultButtonTest.java line 116: > 114: } > 115: > 116: private static void test(Robot robot, AbstractButton buttonToClick, ButtonRenderingExpectation... expectations) throws Exception { please split the long lines to have 80 chars per line ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/24778#discussion_r2059701077 From duke at openjdk.org Fri Apr 25 07:49:54 2025 From: duke at openjdk.org (Jeremy Wood) Date: Fri, 25 Apr 2025 07:49:54 GMT Subject: RFR: 8355203: [macos] AquaButtonUI and AquaRootPaneUI repaint default button unnecessarily [v3] In-Reply-To: References: Message-ID: <2GPk9U_Lqyw0OtR2Fcfj15E4eV9JZWrh_8xFa0TzLBY=.8248c743-63ce-4719-b9e6-57f99c6626d6@github.com> > This removes the constant repainting of the AquaRootPaneUI's default button. > > A long time ago (before Mac OS Yosemite, around 2014) this was needed to match Aqua's native experience. But the default button no longer pulses, so we don't need to repaint ("pulse") the button continually. > > Here's a clip from a YouTube video I found demonstrating the pulsing effect that this PR removes (you may want to turn your volume off): > > https://github.com/user-attachments/assets/496bc003-ccba-4178-81bc-765e96d94316 > > This PR includes a test, but this test has never failed. (That is: this PR does not resolve a failing test.) This test would fail if the default button ever looked the same as a non-default button. > > My primary goal here was to remove the AquaButtonUI's AncestorListener, but while we're here we might as well remove the AquaRootPaneUI's timer and other cleanup. > > I tried and failed to rename the `private static final byte _pulsed` constant. (More details [here](https://github.com/openjdk/jdk/commit/89d0689f226b9e883df464e6f3e8c20074970499).) If anyone has suggestions for how to rename that without errors please let me know. Jeremy Wood has updated the pull request incrementally with two additional commits since the last revision: - 8355203: breaking up long line into multiple lines This is in response to: https://github.com/openjdk/jdk/pull/24778#discussion_r2059701077 - 8355203: breaking up long line into multiple lines This is in response to: https://github.com/openjdk/jdk/pull/24778#discussion_r2059701077 ------------- Changes: - all: https://git.openjdk.org/jdk/pull/24778/files - new: https://git.openjdk.org/jdk/pull/24778/files/60021fcc..562804e5 Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=24778&range=02 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=24778&range=01-02 Stats: 37 lines in 1 file changed: 15 ins; 0 del; 22 mod Patch: https://git.openjdk.org/jdk/pull/24778.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/24778/head:pull/24778 PR: https://git.openjdk.org/jdk/pull/24778 From serb at openjdk.org Fri Apr 25 08:16:56 2025 From: serb at openjdk.org (Sergey Bylokhov) Date: Fri, 25 Apr 2025 08:16:56 GMT Subject: RFR: 8355203: [macos] AquaButtonUI and AquaRootPaneUI repaint default button unnecessarily [v3] In-Reply-To: <2GPk9U_Lqyw0OtR2Fcfj15E4eV9JZWrh_8xFa0TzLBY=.8248c743-63ce-4719-b9e6-57f99c6626d6@github.com> References: <2GPk9U_Lqyw0OtR2Fcfj15E4eV9JZWrh_8xFa0TzLBY=.8248c743-63ce-4719-b9e6-57f99c6626d6@github.com> Message-ID: <-qcHQiqBw40zE1jvfWi8mDa79C9sxUTVMr4rePPS9pA=.509d64c7-4228-4ba9-a0cf-508617b35a0f@github.com> On Fri, 25 Apr 2025 07:49:54 GMT, Jeremy Wood wrote: >> This removes the constant repainting of the AquaRootPaneUI's default button. >> >> A long time ago (before Mac OS Yosemite, around 2014) this was needed to match Aqua's native experience. But the default button no longer pulses, so we don't need to repaint ("pulse") the button continually. >> >> Here's a clip from a YouTube video I found demonstrating the pulsing effect that this PR removes (you may want to turn your volume off): >> >> https://github.com/user-attachments/assets/496bc003-ccba-4178-81bc-765e96d94316 >> >> This PR includes a test, but this test has never failed. (That is: this PR does not resolve a failing test.) This test would fail if the default button ever looked the same as a non-default button. >> >> My primary goal here was to remove the AquaButtonUI's AncestorListener, but while we're here we might as well remove the AquaRootPaneUI's timer and other cleanup. >> >> I tried and failed to rename the `private static final byte _pulsed` constant. (More details [here](https://github.com/openjdk/jdk/commit/89d0689f226b9e883df464e6f3e8c20074970499).) If anyone has suggestions for how to rename that without errors please let me know. > > Jeremy Wood has updated the pull request incrementally with two additional commits since the last revision: > > - 8355203: breaking up long line into multiple lines > > This is in response to: > https://github.com/openjdk/jdk/pull/24778#discussion_r2059701077 > - 8355203: breaking up long line into multiple lines > > This is in response to: > https://github.com/openjdk/jdk/pull/24778#discussion_r2059701077 Marked as reviewed by serb (Reviewer). ------------- PR Review: https://git.openjdk.org/jdk/pull/24778#pullrequestreview-2793340174 From abhiscxk at openjdk.org Fri Apr 25 10:03:57 2025 From: abhiscxk at openjdk.org (Abhishek Kumar) Date: Fri, 25 Apr 2025 10:03:57 GMT Subject: RFR: 8352149: open/test/jdk/java/awt/Frame/MultiScreenTest.java fails [v2] In-Reply-To: References: <-t5iRw5c31W0E-mPWTvHk9PoP819SUA9xrAwMZfJEDc=.c61d9c20-5397-4ab2-89ac-dab4b50b2a0e@github.com> Message-ID: On Thu, 24 Apr 2025 12:51:09 GMT, Khalid Boulanouare wrote: >> Fixes issue in which the test fails when run on multi-screen machine. >> >> Tested on Ubuntu 24.04, MacOS 15 and Windows 11 >> >> JTREG >> >> runner starting test: java/awt/Frame/MultiScreenTest.java >> runner finished test: java/awt/Frame/MultiScreenTest.java >> Passed. Execution successful > > Khalid Boulanouare has updated the pull request incrementally with two additional commits since the last revision: > > - 8352149: open/test/jdk/java/awt/Frame/MultiScreenTest.java fails in MacOS > - Revert "8352149: open/test/jdk/java/awt/Frame/MultiScreenTest.java fails in MacOS" > > This reverts commit e938333b874342a6d0b3aa7d69263b97e5b3e17e. LGTM. ------------- Marked as reviewed by abhiscxk (Reviewer). PR Review: https://git.openjdk.org/jdk/pull/24752#pullrequestreview-2793625562 From ngubarkov at openjdk.org Fri Apr 25 13:36:28 2025 From: ngubarkov at openjdk.org (Nikita Gubarkov) Date: Fri, 25 Apr 2025 13:36:28 GMT Subject: RFR: 8355611: Get rid of SurfaceManagerFactory Message-ID: `SurfaceManagerFactory` just checks a given `GraphicsConfiguration` against multiple types via `instanceof`, it has 3 platform-specific implementations, which rely on an ugly injection process. There is no reason to have this class at all, we could just let `GraphicsConfiguration` create a compatible `SurfaceManager` instead. This would reduce coupling without having to collect all surface manager types in a single place (without real need to do so). And this would also remove dependency on the class initialization sequence by getting rid of the injection process. ------------- Commit messages: - 8355611: Get rid of SurfaceManagerFactory Changes: https://git.openjdk.org/jdk/pull/24875/files Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=24875&range=00 Issue: https://bugs.openjdk.org/browse/JDK-8355611 Stats: 383 lines in 17 files changed: 59 ins; 310 del; 14 mod Patch: https://git.openjdk.org/jdk/pull/24875.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/24875/head:pull/24875 PR: https://git.openjdk.org/jdk/pull/24875 From mirchord at gmail.com Fri Apr 25 14:01:39 2025 From: mirchord at gmail.com (Mirco Colletta) Date: Fri, 25 Apr 2025 16:01:39 +0200 Subject: [Java Sound API] Rendering audio waveforms from MIDI sequences using loaded Soundbanks Message-ID: Hello, this is my first post in this list and I hope it is the appropriate place to discuss the issue but in case it's not I express my apologies. I will try to describe in detail the needs and current limitations of the JDK in terms of public API. A common scenario in GUI MIDI applications consists in let the user choose some form of "resources" (e.g. soundfonts) to produce actual waveforms from the symbolic MIDI representation with the goal of both playback and saving to disk. While in the JDK the former is available, it seems that it lacks the second possibility. In my specific case the JavaFX application allows to load a (possibly high quality) .sf2 soundfonds file and playback midi sequences graphically in a pianoroll editor and common practice notation viewer. Unfortunately there isn't yet a "Save as .wav" functionality since at the moment (but let me know if I'm wrong) there is no way to render the midi sequence to audio wave using other than the default emergency Soundbank. (a low quality, DSP generated, sf2 ) github.com/openjdk/jdk/blob/master/src/java.desktop/share/classes/com/sun/media/sound/EmergencySoundbank.java In my opinion this is a severe lack of functionality in these cases and creates an inconsistent behaviour: what you actually hear during playback is not what you save. Currently, for what I know, the only way to render a midi sequence relies on the method: AudioSystem.getAudioInputStream that for MIDI files chooses as provider the SoftMidiAudioFileReader that creates an AudioSynthesizer (SoftSynthesizer) as the Receiver of time-stamped MIDI events and exploits its openStream method. github.com/openjdk/jdk/blob/master/src/java.desktop/share/classes/com/sun/media/sound/SoftMidiAudioFileReader.java#L64 Unfortunately to conform to the strict interface signature this implementation doesn't provide a way to pass a Soundbank as a parameter. Anyway in the original Gervill project there was also an illustrative example named Midi2WavRender with the added ability to select a custom Soundbank before processing the events. Now there is no way to circumvent this mechanism since the "key point" of the process is the openStream method of the AudioSynthesizer interface that surprisingly is not public. I've found two RF almost identical in scope (respectively from 2010 and 2016) that propose to make the interface public: Make the AudioSynthesizer interface public bugs.openjdk.org/browse/JDK-8170518 make public new synthesizer (gervill) functionality bugs.openjdk.org/browse/JDK-6938913 however since there is no real activities in more than a decade my expectations they move forward are quite low. The current architecture of java sound is nice to get resources based on the current hardware at hand, but often the desire of the developer it's just using the default software synthesizer implementation (present in all the JDKs regardless of specific hardware) with all the benefits it has to offer. Is there any real chance that in future releases of the JDK the AudioSynthesizer will finally find its way into the public API? Thanks in advance, Mirco P.S. forgive me but let me further express some feelings regarding parts of the java sound internal API. The Gervill software synthesizer (even before the integration of its code in the upstream branch of the JDK) has always had amazing capabilities. Using it's API it is possible to create virtual MIDI instruments using DSP (e.g. DoubleFM, Additive/Subtrative synthesis) with just few lines of code (thanks to the ModelAbstractOscillator class) or create .sf2 soundfonts files from scratch using only a bunch of wave files (using the classes SF2Soundbank, SF2Layer, SF2LayerRegion, SF2Instrument, SF2InstrumentRegion, SF2Sample). Not counting the usual utilities common in almost every audio library like FFT, iFFT, etc... Moreover most of these internal classes are pure software with no specific hardware requirements, pure math (DSP) and implement well established and stable standards (e.g. Soundfonts specification). After the JPMS it is possible to use them only with the usual hack: --add-exports=java.desktop/com.sun.media.sound=ALL-UNNAMED // or but of course this workaround is not advisable since later versions of the JDK could completely prevent their inclusion. It is really sad that such precious gems are concealed and not part of the public API. What a waste. -------------- next part -------------- An HTML attachment was scrubbed... URL: From ngubarkov at openjdk.org Fri Apr 25 14:19:54 2025 From: ngubarkov at openjdk.org (Nikita Gubarkov) Date: Fri, 25 Apr 2025 14:19:54 GMT Subject: RFR: 8355611: Get rid of SurfaceManagerFactory [v2] In-Reply-To: References: Message-ID: > `SurfaceManagerFactory` just checks a given `GraphicsConfiguration` against multiple types via `instanceof`, it has 3 platform-specific implementations, which rely on an ugly injection process. > > There is no reason to have this class at all, we could just let `GraphicsConfiguration` create a compatible `SurfaceManager` instead. > > This would reduce coupling without having to collect all surface manager types in a single place (without real need to do so). > And this would also remove dependency on the class initialization sequence by getting rid of the injection process. Nikita Gubarkov has updated the pull request incrementally with one additional commit since the last revision: fixup! 8355611: Get rid of SurfaceManagerFactory ------------- Changes: - all: https://git.openjdk.org/jdk/pull/24875/files - new: https://git.openjdk.org/jdk/pull/24875/files/1dd93bdf..c1e55120 Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=24875&range=01 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=24875&range=00-01 Stats: 2 lines in 2 files changed: 2 ins; 0 del; 0 mod Patch: https://git.openjdk.org/jdk/pull/24875.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/24875/head:pull/24875 PR: https://git.openjdk.org/jdk/pull/24875 From rmahajan at openjdk.org Fri Apr 25 16:55:40 2025 From: rmahajan at openjdk.org (Rajat Mahajan) Date: Fri, 25 Apr 2025 16:55:40 GMT Subject: RFR: 8351884: Refactor bug8033699.java test code [v3] In-Reply-To: References: Message-ID: > Details: > Refactored code as requested in the Bug description. > > Tested and verified the test passes. Rajat Mahajan has updated the pull request incrementally with one additional commit since the last revision: code changes as per code review ------------- Changes: - all: https://git.openjdk.org/jdk/pull/24384/files - new: https://git.openjdk.org/jdk/pull/24384/files/babefb8b..edb99cb6 Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=24384&range=02 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=24384&range=01-02 Stats: 16 lines in 1 file changed: 5 ins; 4 del; 7 mod Patch: https://git.openjdk.org/jdk/pull/24384.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/24384/head:pull/24384 PR: https://git.openjdk.org/jdk/pull/24384 From aivanov at openjdk.org Fri Apr 25 18:13:47 2025 From: aivanov at openjdk.org (Alexey Ivanov) Date: Fri, 25 Apr 2025 18:13:47 GMT Subject: RFR: 8355441: Remove antipattern from PassFailJFrame.forcePass javadoc [v3] In-Reply-To: <5tA4RewMdCVER-EP9QHq9bg9poTxRBIu9jow2QA8qyA=.611edf45-122a-4cdf-8113-2bb3e7dfd1db@github.com> References: <5tA4RewMdCVER-EP9QHq9bg9poTxRBIu9jow2QA8qyA=.611edf45-122a-4cdf-8113-2bb3e7dfd1db@github.com> Message-ID: On Fri, 25 Apr 2025 02:08:04 GMT, Manukumar V S wrote: >> The javadoc for PassFailJFrame.forcePass suggests an anti-pattern of forcibly passing the test if a resource is unavailable. >> >> If a resource is unavailable or a feature isn't supported, the test should throw jtreg.SkippedException. >> >> PassFailJFrame.forcePass should be used in semi-automatic tests when the test determines that all the conditions for passing the test are met. >> Please refer: JDK-8355366 and https://github.com/openjdk/jdk/pull/24820 >> >> Testing >> This is a javadoc change, so not testing required. > > Manukumar V S has updated the pull request incrementally with one additional commit since the last revision: > > Updated the javadoc description Add the link to the particular line number ? it's more helpful. `blob/7283c8b` refers the commit 7283c8b that can never change. ------------- Changes requested by aivanov (Reviewer). PR Review: https://git.openjdk.org/jdk/pull/24837#pullrequestreview-2794914236 From aivanov at openjdk.org Fri Apr 25 18:13:47 2025 From: aivanov at openjdk.org (Alexey Ivanov) Date: Fri, 25 Apr 2025 18:13:47 GMT Subject: RFR: 8355441: Remove antipattern from PassFailJFrame.forcePass javadoc [v2] In-Reply-To: References: Message-ID: On Fri, 25 Apr 2025 02:03:13 GMT, Manukumar V S wrote: > Yea, the line number might change, so I just removed the line number in the link. The link in my suggestion is tied to the particular revision, so the line number will never change. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/24837#discussion_r2060679506 From ngubarkov at openjdk.org Fri Apr 25 18:21:04 2025 From: ngubarkov at openjdk.org (Nikita Gubarkov) Date: Fri, 25 Apr 2025 18:21:04 GMT Subject: RFR: 8352407: PixelInterleavedSampleModel with unused components throws RasterFormatException: Incorrect pixel stride [v2] In-Reply-To: References: <0IkJpQYFv_3lUjxKvd1T0EqtOeO4wN5XYEX1pJFf6Pc=.0eac5063-1b53-461b-8bc8-ca1320147a5a@github.com> <7PoUZmVaNchLPzKKv-Y2Kb3K2iTCIwF_GBxWgYOeSj8=.7c57eb44-10de-4e95-9fea-07ea39ed53ee@github.com> <9t4GmM3f624NKzcRzc1I4m-jDABNjukX93uJiEge0Bs=.b3a8c0f9-cd9c-4f61-9d80-700e5d37fcc7@github.com> Message-ID: <8dCI6Y3gKiDufYZEKkqrUk7Fn3lz3cwHVyi2gS7-Qck=.e4d29c99-7cce-4aad-a635-31f199970b61@github.com> On Wed, 16 Apr 2025 22:10:53 GMT, Sergey Bylokhov wrote: >> I get the idea. Actually, my Vulkan blit routines know the component order (needed for swizzling anyway), so instead of copying `scanlineStride` or `width * pixelStride`, I can copy `(width - 1) * pixelStride + maxBandOffset + 1` (I don't like breaking the alignment at the end, but anyway). >> However, supporting the gap at the end of the pixel seems like a lot of burden to me - not all current code seems to consider this possibility and for the future code it's too easy to get wrong. >> >> Some side thoughts: I think we rely on predefined formats and loops too much. As I already mentioned, `SurfaceDataRasInfo` doesn't have info about its bands and doesn't even have a total size. We rely on specific loops registered for specific surface types, which only works well when we created those surfaces by ourselves. Example: >> I profiled Intellij IDEA to see which blit loops are often used there and noticed that icons are loaded as 4-byte RGBA images. See the issue? That's a `TYPE_CUSTOM` image with some generic `SurfaceType` - it doesn't have native raster ops initialized, so it can only go through a generic software loop! That's how I came to https://github.com/openjdk/jdk/pull/24378. So what I was trying to do with that Vulkan work is to make it more generic - register loops for more generic surface types and dynamically inspect their properties to see whether we can actually do an optimal blit. And given that 99% of the time those are 3/4-bytes per pixel RGBA/ARGB/BGR/etc., it's very easy to generalize, but we don't seem to have enough flexibility for that. > > There is no reason to change our current implementation of ComponentSampleModel, since a similar raster can be created manually and should be properly handled by accelerated pipelines. > > DataBuffer manualBuffer = new DataBufferByte( > scanlineStride * (SIZE - 1) + pixelStride * SIZE > ); > WritableRaster manualRaster = Raster.createWritableRaster(sampleModel, manualBuffer, null); > BufferedImage manualImage = new BufferedImage(colorModel, manualRaster, isAlphaPremultiplied, null); In your sample you provided an example, when raster fits whole pixels (`scanline * (height - 1) + pixelStride * width`), which, I agree, is a perfectly fine case and must be supported by accelerated pipelines. But the question is: should partial pixels be handled by our pipelines too (`scanline * (height - 1) + pixelStride * (width - 1) + maxBandOffset + 1` where `maxBandOffset + 1 < pixelStride`), or should whole pixels be enforced? I am for the latter. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/24111#discussion_r2060690975 From abaya at openjdk.org Fri Apr 25 18:38:37 2025 From: abaya at openjdk.org (Anass Baya) Date: Fri, 25 Apr 2025 18:38:37 GMT Subject: RFR: 8354219 : Automate javax/swing/JComboBox/ComboPopupBug.java [v7] In-Reply-To: References: Message-ID: > This test was designed to manually verify that clicking on the JComboBox when the frame containing it is about to close does not cause an IllegalStateException. > > The test allowed the tester extra time to click on the JComboBox when closing the frame by adding a Thread.sleep() in the close button handler. > > In this test, a JComboBox is displayed with a Close button at the bottom. The tester should click the Close button, then try to click the JComboBox arrow button to display the popup. > > In the automated test, we save the JComboBox location size before closing the frame. We then use this information to click on the JComboBox right before the frame is closed. Anass Baya has updated the pull request incrementally with three additional commits since the last revision: - Put the frame in the centre of the screen. Co-authored-by: Alexey Ivanov - library regtesthelpers is no more used - Alexey's proposed enhancement ------------- Changes: - all: https://git.openjdk.org/jdk/pull/24624/files - new: https://git.openjdk.org/jdk/pull/24624/files/35ad53ca..0098a81c Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=24624&range=06 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=24624&range=05-06 Stats: 53 lines in 1 file changed: 24 ins; 20 del; 9 mod Patch: https://git.openjdk.org/jdk/pull/24624.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/24624/head:pull/24624 PR: https://git.openjdk.org/jdk/pull/24624 From aivanov at openjdk.org Fri Apr 25 18:38:37 2025 From: aivanov at openjdk.org (Alexey Ivanov) Date: Fri, 25 Apr 2025 18:38:37 GMT Subject: RFR: 8354219 : Automate javax/swing/JComboBox/ComboPopupBug.java [v7] In-Reply-To: References: Message-ID: On Fri, 25 Apr 2025 18:35:09 GMT, Anass Baya wrote: >> This test was designed to manually verify that clicking on the JComboBox when the frame containing it is about to close does not cause an IllegalStateException. >> >> The test allowed the tester extra time to click on the JComboBox when closing the frame by adding a Thread.sleep() in the close button handler. >> >> In this test, a JComboBox is displayed with a Close button at the bottom. The tester should click the Close button, then try to click the JComboBox arrow button to display the popup. >> >> In the automated test, we save the JComboBox location size before closing the frame. We then use this information to click on the JComboBox right before the frame is closed. > > Anass Baya has updated the pull request incrementally with three additional commits since the last revision: > > - Put the frame in the centre of the screen. > > Co-authored-by: Alexey Ivanov > - library regtesthelpers is no more used > - Alexey's proposed enhancement Changes requested by aivanov (Reviewer). Changes requested by aivanov (Reviewer). test/jdk/javax/swing/JComboBox/ComboPopupBug.java line 38: > 36: * @key headful > 37: * @summary Verifies clicking JComboBox during frame closure causes Exception > 38: * @library /javax/swing/regtesthelpers The library isn't used any more. test/jdk/javax/swing/JComboBox/ComboPopupBug.java line 62: > 60: if (frame != null) { > 61: SwingUtilities.invokeAndWait(() -> frame.dispose()); > 62: } The null-check should be on EDT too. This comment is still not resolved. test/jdk/javax/swing/JComboBox/ComboPopupBug.java line 63: > 61: if (frame != null) { > 62: SwingUtilities.invokeAndWait(() -> frame.dispose()); > 63: } The null-check should be on EDT too, all the tests follow this pattern. Suggestion: SwingUtilities.invokeAndWait(() -> { if (frame != null) { frame.dispose(); } }); test/jdk/javax/swing/JComboBox/ComboPopupBug.java line 94: > 92: frame.getContentPane().add(closeButton, "South"); > 93: frame.setSize(200, 200); > 94: frame.setVisible(true); Suggestion: frame.setSize(200, 200); frame.setLocationRelativeTo(null); frame.setVisible(true); Put the frame in the centre of the screen. ------------- PR Review: https://git.openjdk.org/jdk/pull/24624#pullrequestreview-2791603059 PR Review: https://git.openjdk.org/jdk/pull/24624#pullrequestreview-2794945992 PR Review Comment: https://git.openjdk.org/jdk/pull/24624#discussion_r2058690451 PR Review Comment: https://git.openjdk.org/jdk/pull/24624#discussion_r2060699938 PR Review Comment: https://git.openjdk.org/jdk/pull/24624#discussion_r2058699525 PR Review Comment: https://git.openjdk.org/jdk/pull/24624#discussion_r2060704263 From abaya at openjdk.org Fri Apr 25 18:38:38 2025 From: abaya at openjdk.org (Anass Baya) Date: Fri, 25 Apr 2025 18:38:38 GMT Subject: RFR: 8354219 : Automate javax/swing/JComboBox/ComboPopupBug.java [v4] In-Reply-To: References: Message-ID: On Wed, 23 Apr 2025 10:07:52 GMT, Alexey Ivanov wrote: >> Anass Baya has updated the pull request incrementally with one additional commit since the last revision: >> >> Update Copyright > > Changes requested by aivanov (Reviewer). Hello @aivanov-jdk, Thank you for your review. The code changes have been made as requested. I ran the test again, and it is OK. It fails without the fix and succeeds with it. ------------- PR Comment: https://git.openjdk.org/jdk/pull/24624#issuecomment-2827968233 From aivanov at openjdk.org Fri Apr 25 18:38:38 2025 From: aivanov at openjdk.org (Alexey Ivanov) Date: Fri, 25 Apr 2025 18:38:38 GMT Subject: RFR: 8354219 : Automate javax/swing/JComboBox/ComboPopupBug.java [v6] In-Reply-To: <96HsRUw3FO3QGR-I4L2gB2lwuqFwYuDmJ17ZpvjAfEw=.3839e503-50a0-4549-b0fa-c52c2204b0e9@github.com> References: <96HsRUw3FO3QGR-I4L2gB2lwuqFwYuDmJ17ZpvjAfEw=.3839e503-50a0-4549-b0fa-c52c2204b0e9@github.com> Message-ID: <7IXVeJs60wA5HNLz-1rBVo5vD_wrFc6mKifu070b_Zc=.8cdbb76e-c6b9-4500-9428-a7d6e0deed4f@github.com> On Wed, 23 Apr 2025 21:05:06 GMT, Anass Baya wrote: >> This test was designed to manually verify that clicking on the JComboBox when the frame containing it is about to close does not cause an IllegalStateException. >> >> The test allowed the tester extra time to click on the JComboBox when closing the frame by adding a Thread.sleep() in the close button handler. >> >> In this test, a JComboBox is displayed with a Close button at the bottom. The tester should click the Close button, then try to click the JComboBox arrow button to display the popup. >> >> In the automated test, we save the JComboBox location size before closing the frame. We then use this information to click on the JComboBox right before the frame is closed. > > Anass Baya has updated the pull request incrementally with three additional commits since the last revision: > > - Adapt with JAVA code style > > Co-authored-by: Alexey Ivanov > - Make clickComboBox private > > Co-authored-by: Alexey Ivanov > - Reduce indentation. > > Co-authored-by: Alexey Ivanov Please, never force-push to branches that are on review. This invalidates all the review comments which become orphaned because the commit is now gone. This also makes impossible to pull the changes locally: + b50ae1a7aa8...87292a19bf0 JDK-8354219 -> anass/JDK-8354219 (forced update) ... fatal: Not possible to fast-forward, aborting. There should never be a situation where force-push is necessary. Don't use `git rebase` after you published your branch for review. Use `git merge` to merge changes from master. ------------- PR Comment: https://git.openjdk.org/jdk/pull/24624#issuecomment-2831107950 From aivanov at openjdk.org Fri Apr 25 18:38:39 2025 From: aivanov at openjdk.org (Alexey Ivanov) Date: Fri, 25 Apr 2025 18:38:39 GMT Subject: RFR: 8354219 : Automate javax/swing/JComboBox/ComboPopupBug.java [v7] In-Reply-To: References: Message-ID: On Thu, 24 Apr 2025 15:53:32 GMT, Anass Baya wrote: >> test/jdk/javax/swing/JComboBox/ComboPopupBug.java line 63: >> >>> 61: if (frame != null) { >>> 62: SwingUtilities.invokeAndWait(() -> frame.dispose()); >>> 63: } >> >> The null-check should be on EDT too, all the tests follow this pattern. >> Suggestion: >> >> SwingUtilities.invokeAndWait(() -> { >> if (frame != null) { >> frame.dispose(); >> } >> }); > > Thank you. I had doubt about it but i saw in a recent updated Test Test6827032.java that it is not done on the EDT thread. It shouldn't be a problem? `invokeAndWait` that creates the frame serves as a synchronisation barrier, and all the changes to fields done on EDT should be visible to the main thread after `invokeAndWait` returns. However, for the sake of consistency, it's easier to put the null-check into the body of `invokeAndWait` when disposing of the frame. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/24624#discussion_r2058813281 From abaya at openjdk.org Fri Apr 25 18:38:38 2025 From: abaya at openjdk.org (Anass Baya) Date: Fri, 25 Apr 2025 18:38:38 GMT Subject: RFR: 8354219 : Automate javax/swing/JComboBox/ComboPopupBug.java [v7] In-Reply-To: References: Message-ID: On Thu, 24 Apr 2025 15:20:08 GMT, Alexey Ivanov wrote: >> Anass Baya has updated the pull request incrementally with three additional commits since the last revision: >> >> - Put the frame in the centre of the screen. >> >> Co-authored-by: Alexey Ivanov >> - library regtesthelpers is no more used >> - Alexey's proposed enhancement > > test/jdk/javax/swing/JComboBox/ComboPopupBug.java line 63: > >> 61: if (frame != null) { >> 62: SwingUtilities.invokeAndWait(() -> frame.dispose()); >> 63: } > > The null-check should be on EDT too, all the tests follow this pattern. > Suggestion: > > SwingUtilities.invokeAndWait(() -> { > if (frame != null) { > frame.dispose(); > } > }); Thank you. I had doubt about it but i saw in a recent updated Test Test6827032.java that it is not done on the EDT thread. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/24624#discussion_r2058770367 From abaya at openjdk.org Fri Apr 25 18:59:35 2025 From: abaya at openjdk.org (Anass Baya) Date: Fri, 25 Apr 2025 18:59:35 GMT Subject: RFR: 8354219 : Automate javax/swing/JComboBox/ComboPopupBug.java [v8] In-Reply-To: References: Message-ID: <7XTF4f9iwcX1psynJR92yPfr2uL5BWv8l3_aDt-rSXU=.7c249a9f-f476-43f7-8602-2597e2953ce1@github.com> > This test was designed to manually verify that clicking on the JComboBox when the frame containing it is about to close does not cause an IllegalStateException. > > The test allowed the tester extra time to click on the JComboBox when closing the frame by adding a Thread.sleep() in the close button handler. > > In this test, a JComboBox is displayed with a Close button at the bottom. The tester should click the Close button, then try to click the JComboBox arrow button to display the popup. > > In the automated test, we save the JComboBox location size before closing the frame. We then use this information to click on the JComboBox right before the frame is closed. Anass Baya has updated the pull request incrementally with one additional commit since the last revision: Frame null-check before disposing the frame on the EDT ------------- Changes: - all: https://git.openjdk.org/jdk/pull/24624/files - new: https://git.openjdk.org/jdk/pull/24624/files/0098a81c..cc7b69dc Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=24624&range=07 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=24624&range=06-07 Stats: 5 lines in 1 file changed: 2 ins; 0 del; 3 mod Patch: https://git.openjdk.org/jdk/pull/24624.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/24624/head:pull/24624 PR: https://git.openjdk.org/jdk/pull/24624 From abaya at openjdk.org Fri Apr 25 19:03:52 2025 From: abaya at openjdk.org (Anass Baya) Date: Fri, 25 Apr 2025 19:03:52 GMT Subject: RFR: 8354219 : Automate javax/swing/JComboBox/ComboPopupBug.java [v8] In-Reply-To: References: Message-ID: On Fri, 25 Apr 2025 18:24:27 GMT, Alexey Ivanov wrote: >> Anass Baya has updated the pull request incrementally with one additional commit since the last revision: >> >> Frame null-check before disposing the frame on the EDT > > test/jdk/javax/swing/JComboBox/ComboPopupBug.java line 62: > >> 60: if (frame != null) { >> 61: SwingUtilities.invokeAndWait(() -> frame.dispose()); >> 62: } > > The null-check should be on EDT too. > > This comment is still not resolved. it's done now ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/24624#discussion_r2060751391 From kcr at openjdk.org Fri Apr 25 19:10:47 2025 From: kcr at openjdk.org (Kevin Rushforth) Date: Fri, 25 Apr 2025 19:10:47 GMT Subject: RFR: 8332947: [macos] java.awt.desktop.OpenURIHandler is not receiving events In-Reply-To: References: Message-ID: On Wed, 2 Apr 2025 14:15:28 GMT, Pabulaner IV wrote: > When trying to register an open URI handler when using JavaFX with a native menu, this task fails on Mac. > Either the native menu is not shown or the URIs are not received. > > This pull request fixes this issue if AWT is registered after JavaFX, so that AWT runs embedded inside JavaFX. > It fixes this by introducing a native event to AWT, which can be used by JavaFX to forward events such as an openURL event. > > JavaFX Pull Request: https://github.com/openjdk/jfx/pull/1755 > Co-Author: @FlorianKirmaier I discussed this with @honkar-jdk, who did the AWT side of the fix for [JDK-8318854](https://bugs.openjdk.org/browse/JDK-8318854) -- PR #16569 (I did the FX side of that fix) -- which ensured that only the first toolkit , AWT or JavaFX in this case, installs its `NSApplicationDelegate`. We can both review it, and @prrace will need to review / approve as well. We ought to be able to use the simple test program in your repo to reproduce the failure, although I will need to build it myself and package it up manually using jpackage (not running the setup or test script which needs to publish to use a local maven repo and then install in the system using "sudo ..."). Before I do that, I have a couple high-level questions: 1. Without the fixes, does this bug only happen in the "after" case, where JavaFX is initialized first (i.e., when AWT is running embedded)? I presume it currently works in the "before" case, where AWT is initialized first (and JavaFX is embedded)? 2. Presuming that the failing case is when JavaFX owns the NSApplication, I don't understand how this fix helps. In the case where AWT is running embedded, the `[ApplicationDelegate init]` receiver never gets called. At least not without setting the (undocumented, and certainly not recommended when running with JavaFX) `AWT_OVERRIDE_NSDELEGATE` env variable. So: how is this working for you? One thing that might help us understand it better, is for you to apply the following debug patch on top of this PR's patch, run the "AWT after" case (with both AWT and FX fixes applied), and post the output. [debug.patch](https://github.com/user-attachments/files/19914799/debug.patch) ------------- PR Review: https://git.openjdk.org/jdk/pull/24379#pullrequestreview-2794998328 From kcr at openjdk.org Fri Apr 25 19:10:48 2025 From: kcr at openjdk.org (Kevin Rushforth) Date: Fri, 25 Apr 2025 19:10:48 GMT Subject: RFR: 8332947: [macos] java.awt.desktop.OpenURIHandler is not receiving events In-Reply-To: References: <8_5DuAdY2okQ_NBdL64KKU_CxkAjtfRlXK78SExhuk0=.b3586b94-fb27-475d-a653-0e39d3424e73@github.com> Message-ID: On Sat, 19 Apr 2025 14:02:36 GMT, Pabulaner IV wrote: >> src/java.desktop/macosx/native/libawt_lwawt/awt/ApplicationDelegate.m line 200: >> >>> 198: if (!self) return self; >>> 199: >>> 200: // register for the finish launching and system power off notifications by default >> >> I assume there is a good reason that AWT only registered for these notifications if IT is the main toolkit. >> The implications of changing this might be that it will try to handle events that should be left to FX in the >> case that FX is the main toolkit. > > Exactly, it only installs the handlers if it doesn't run embedded. > But since JavaFX doesn't handle urls by itself, it still blocks AWT from receiving those events. > Therefore the only event for now that is forwarded to AWT is the url event. Moving this block up from the end of this method to here doesn't change anything if AWT is embedded. What it will do is allow the handlers to be run if the AWT Toolkit owns the NSApplication (i.e., is _not_ embedded), and the application is using a custom nib. The only short-circuit in the remainder of the `init` method is this: BOOL usingDefaultNib = YES; if ([NSApp isKindOfClass:[NSApplicationAWT class]]) { usingDefaultNib = [NSApp usingDefaultNib]; } if (!usingDefaultNib) return self; Presuming that adding the handler is needed (although I have a high-level question about that in my general review comments), it might be less intrusive to leave the initialization of the existing handlers where they are at the end of the method, and only add the one you need here. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/24379#discussion_r2060727798 From serb at openjdk.org Fri Apr 25 19:15:46 2025 From: serb at openjdk.org (Sergey Bylokhov) Date: Fri, 25 Apr 2025 19:15:46 GMT Subject: RFR: 8352407: PixelInterleavedSampleModel with unused components throws RasterFormatException: Incorrect pixel stride [v2] In-Reply-To: <8dCI6Y3gKiDufYZEKkqrUk7Fn3lz3cwHVyi2gS7-Qck=.e4d29c99-7cce-4aad-a635-31f199970b61@github.com> References: <0IkJpQYFv_3lUjxKvd1T0EqtOeO4wN5XYEX1pJFf6Pc=.0eac5063-1b53-461b-8bc8-ca1320147a5a@github.com> <7PoUZmVaNchLPzKKv-Y2Kb3K2iTCIwF_GBxWgYOeSj8=.7c57eb44-10de-4e95-9fea-07ea39ed53ee@github.com> <9t4GmM3f624NKzcRzc1I4m-jDABNjukX93uJiEge0Bs=.b3a8c0f9-cd9c-4f61-9d80-700e5d37fcc7@github.com> <8dCI6Y3gKiDufYZEKkqrUk7Fn3lz3cwHVyi2gS7-Qck=.e4d29c99-7cce-4aad-a635-31f199970b61@github.com> Message-ID: On Fri, 25 Apr 2025 18:18:00 GMT, Nikita Gubarkov wrote: >> There is no reason to change our current implementation of ComponentSampleModel, since a similar raster can be created manually and should be properly handled by accelerated pipelines. >> >> DataBuffer manualBuffer = new DataBufferByte( >> scanlineStride * (SIZE - 1) + pixelStride * SIZE >> ); >> WritableRaster manualRaster = Raster.createWritableRaster(sampleModel, manualBuffer, null); >> BufferedImage manualImage = new BufferedImage(colorModel, manualRaster, isAlphaPremultiplied, null); > > In your sample you provided an example, when raster fits whole pixels (`scanline * (height - 1) + pixelStride * width`), which, I agree, is a perfectly fine case and must be supported by accelerated pipelines. But the question is: should partial pixels be handled by our pipelines too (`scanline * (height - 1) + pixelStride * (width - 1) + maxBandOffset + 1` where `maxBandOffset + 1 < pixelStride`), or should whole pixels be enforced? I am for the latter. However, this is not a case of a "partial pixel"- the data for the pixel itself is present. Therefore, the user can still manually create a buffer that discards the tail of the image and it will be accepted: DataBuffer manualBuffer = new DataBufferByte( scanlineStride * (SIZE - 1) + pixelStride * (SIZE - 1) + 2/*maxBandOffset*/ + 1 /*size of last component*/ ); The current logic seems to imply that: * The scanline stride doesn't matter for a single-line image, or for the last line in the image. * The pixel stride is irrelevant if there's only one pixel in the image, or for the last pixel in a row. This behavior is validated in src/java.desktop/share/classes/sun/awt/image/ByteComponentRaster.java#verify, with the exception of the single-pixel image we mentioned earlier. I believe that exception for the 1-pixel image is a bug (pixelStride > data.length) that was overlooked during the work on commit [86104df](https://github.com/openjdk/jdk/commit/86104df#diff-f5003f18f0f4594a4859901ea950652467137fb1d07900208a84617036142746R891-L891), where a similar check for scanlineStride > data.length was fixed. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/24111#discussion_r2060763816 From aivanov at openjdk.org Fri Apr 25 19:19:50 2025 From: aivanov at openjdk.org (Alexey Ivanov) Date: Fri, 25 Apr 2025 19:19:50 GMT Subject: RFR: 8354219 : Automate javax/swing/JComboBox/ComboPopupBug.java [v8] In-Reply-To: <7XTF4f9iwcX1psynJR92yPfr2uL5BWv8l3_aDt-rSXU=.7c249a9f-f476-43f7-8602-2597e2953ce1@github.com> References: <7XTF4f9iwcX1psynJR92yPfr2uL5BWv8l3_aDt-rSXU=.7c249a9f-f476-43f7-8602-2597e2953ce1@github.com> Message-ID: On Fri, 25 Apr 2025 18:59:35 GMT, Anass Baya wrote: >> This test was designed to manually verify that clicking on the JComboBox when the frame containing it is about to close does not cause an IllegalStateException. >> >> The test allowed the tester extra time to click on the JComboBox when closing the frame by adding a Thread.sleep() in the close button handler. >> >> In this test, a JComboBox is displayed with a Close button at the bottom. The tester should click the Close button, then try to click the JComboBox arrow button to display the popup. >> >> In the automated test, we save the JComboBox location size before closing the frame. We then use this information to click on the JComboBox right before the frame is closed. > > Anass Baya has updated the pull request incrementally with one additional commit since the last revision: > > Frame null-check before disposing the frame on the EDT Looks good to me. I think @prsadhuk, as the original author of the test, should also take a look. ------------- Marked as reviewed by aivanov (Reviewer). PR Review: https://git.openjdk.org/jdk/pull/24624#pullrequestreview-2795059760 From aivanov at openjdk.org Fri Apr 25 19:24:50 2025 From: aivanov at openjdk.org (Alexey Ivanov) Date: Fri, 25 Apr 2025 19:24:50 GMT Subject: RFR: 8355366: Fix the wrong usage of PassFailJFrame.forcePass() in some manual tests In-Reply-To: References: Message-ID: On Thu, 24 Apr 2025 16:36:56 GMT, Manukumar V S wrote: > Fix the wrong usage of PassFailJFrame.forcePass() in some manual tests from java.awt.Desktop package. These tests should be fixed similar to [JDK-8352109](https://bugs.openjdk.org/browse/JDK-8352109) and jtreg.SkippedException should be used instead of PassFailJFrame.forcePass(). > Affected tests: > 1. https://github.com/openjdk/jdk/blob/master/test/jdk/java/awt/Desktop/BrowseTest.java > 2. https://github.com/openjdk/jdk/blob/master/test/jdk/java/awt/Desktop/OpenTest.java > 3. https://github.com/openjdk/jdk/blob/master/test/jdk/java/awt/Desktop/EditAndPrintTest/EditAndPrintTest.java > > I have opened this PR because my other PR https://github.com/openjdk/jdk/pull/24820 got accidentally closed. Looks good to me. ------------- Marked as reviewed by aivanov (Reviewer). PR Review: https://git.openjdk.org/jdk/pull/24853#pullrequestreview-2795070548 From aivanov at openjdk.org Fri Apr 25 19:27:50 2025 From: aivanov at openjdk.org (Alexey Ivanov) Date: Fri, 25 Apr 2025 19:27:50 GMT Subject: RFR: 8355366: Fix the wrong usage of PassFailJFrame.forcePass() in some manual tests In-Reply-To: References: Message-ID: On Thu, 24 Apr 2025 16:36:56 GMT, Manukumar V S wrote: > Fix the wrong usage of PassFailJFrame.forcePass() in some manual tests from java.awt.Desktop package. These tests should be fixed similar to [JDK-8352109](https://bugs.openjdk.org/browse/JDK-8352109) and jtreg.SkippedException should be used instead of PassFailJFrame.forcePass(). > Affected tests: > 1. https://github.com/openjdk/jdk/blob/master/test/jdk/java/awt/Desktop/BrowseTest.java > 2. https://github.com/openjdk/jdk/blob/master/test/jdk/java/awt/Desktop/OpenTest.java > 3. https://github.com/openjdk/jdk/blob/master/test/jdk/java/awt/Desktop/EditAndPrintTest/EditAndPrintTest.java > > I have opened this PR because my other PR https://github.com/openjdk/jdk/pull/24820 got accidentally closed. @prrace reviewed the first version of this PR in #24820. You can credit him using the [`/reviewer` command](https://wiki.openjdk.org/display/SKARA/Pull+Request+Commands#PullRequestCommands-/reviewer) (`/reviewer credit @edvbld`) if he doesn't approve this PR. ------------- PR Comment: https://git.openjdk.org/jdk/pull/24853#issuecomment-2831257643 From aivanov at openjdk.org Fri Apr 25 19:46:50 2025 From: aivanov at openjdk.org (Alexey Ivanov) Date: Fri, 25 Apr 2025 19:46:50 GMT Subject: RFR: 8351884: Refactor bug8033699.java test code [v3] In-Reply-To: References: Message-ID: On Fri, 25 Apr 2025 16:55:40 GMT, Rajat Mahajan wrote: >> Details: >> Refactored code as requested in the Bug description. >> >> Tested and verified the test passes. > > Rajat Mahajan has updated the pull request incrementally with one additional commit since the last revision: > > code changes as per code review Looks good to me, except for minor nits. test/jdk/javax/swing/JRadioButton/8033699/bug8033699.java line 62: > 60: public static void main(String[] args) throws Throwable { > 61: robot = new Robot(); > 62: SwingUtilities.invokeAndWait(() -> { I wonder why you removed the blank line, I'm strongly for restoring it here. test/jdk/javax/swing/JRadioButton/8033699/bug8033699.java line 64: > 62: SwingUtilities.invokeAndWait(() -> { > 63: focusManager = KeyboardFocusManager.getCurrentKeyboardFocusManager(); > 64: }); Suggestion: SwingUtilities.invokeAndWait(() -> focusManager = KeyboardFocusManager.getCurrentKeyboardFocusManager()); Braces are redundant for one statement (in lambdas), or _?Statement lambda can be replaced with expression lambda.?_ test/jdk/javax/swing/JRadioButton/8033699/bug8033699.java line 66: > 64: }); > 65: // Get all installed Look and Feels > 66: UIManager.LookAndFeelInfo[] lafs = UIManager.getInstalledLookAndFeels(); Suggestion: focusManager = KeyboardFocusManager.getCurrentKeyboardFocusManager(); }); UIManager.LookAndFeelInfo[] lafs = UIManager.getInstalledLookAndFeels(); I'd add a blank here, too, and remove the comment since `getInstalledLookAndFeels` is already self-documenting. test/jdk/javax/swing/JRadioButton/8033699/bug8033699.java line 170: > 168: > 169: // Create main vertical box > 170: Box mainBox = Box.createVerticalBox(); Suggestion: Box mainBox = Box.createVerticalBox(); The comment is redundant, it doesn't add anything to what one could infer from the statement. test/jdk/javax/swing/JRadioButton/8033699/bug8033699.java line 176: > 174: mainBox.add(btnEnd); > 175: > 176: mainFrame.getContentPane().add(mainBox); Suggestion: mainFrame.add(mainBox); At this point, @honkar-jdk's can be applied. I'll leave it to your discretion, either way is fine with me. ------------- Marked as reviewed by aivanov (Reviewer). PR Review: https://git.openjdk.org/jdk/pull/24384#pullrequestreview-2795116203 PR Review Comment: https://git.openjdk.org/jdk/pull/24384#discussion_r2060786756 PR Review Comment: https://git.openjdk.org/jdk/pull/24384#discussion_r2060798663 PR Review Comment: https://git.openjdk.org/jdk/pull/24384#discussion_r2060790607 PR Review Comment: https://git.openjdk.org/jdk/pull/24384#discussion_r2060792449 PR Review Comment: https://git.openjdk.org/jdk/pull/24384#discussion_r2060794078 From rmahajan at openjdk.org Fri Apr 25 19:52:06 2025 From: rmahajan at openjdk.org (Rajat Mahajan) Date: Fri, 25 Apr 2025 19:52:06 GMT Subject: RFR: 8351884: Refactor bug8033699.java test code [v4] In-Reply-To: References: Message-ID: > Details: > Refactored code as requested in the Bug description. > > Tested and verified the test passes. Rajat Mahajan has updated the pull request incrementally with five additional commits since the last revision: - Update test/jdk/javax/swing/JRadioButton/8033699/bug8033699.java Co-authored-by: Alexey Ivanov - Update test/jdk/javax/swing/JRadioButton/8033699/bug8033699.java Co-authored-by: Alexey Ivanov - Update test/jdk/javax/swing/JRadioButton/8033699/bug8033699.java Co-authored-by: Alexey Ivanov - Update test/jdk/javax/swing/JRadioButton/8033699/bug8033699.java Co-authored-by: Alexey Ivanov - Update test/jdk/javax/swing/JRadioButton/8033699/bug8033699.java Co-authored-by: Alexey Ivanov ------------- Changes: - all: https://git.openjdk.org/jdk/pull/24384/files - new: https://git.openjdk.org/jdk/pull/24384/files/edb99cb6..172d08f4 Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=24384&range=03 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=24384&range=02-03 Stats: 9 lines in 1 file changed: 0 ins; 5 del; 4 mod Patch: https://git.openjdk.org/jdk/pull/24384.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/24384/head:pull/24384 PR: https://git.openjdk.org/jdk/pull/24384 From aivanov at openjdk.org Fri Apr 25 19:52:06 2025 From: aivanov at openjdk.org (Alexey Ivanov) Date: Fri, 25 Apr 2025 19:52:06 GMT Subject: RFR: 8351884: Refactor bug8033699.java test code [v3] In-Reply-To: References: Message-ID: On Fri, 25 Apr 2025 16:55:40 GMT, Rajat Mahajan wrote: >> Details: >> Refactored code as requested in the Bug description. >> >> Tested and verified the test passes. > > Rajat Mahajan has updated the pull request incrementally with one additional commit since the last revision: > > code changes as per code review test/jdk/javax/swing/JRadioButton/8033699/bug8033699.java line 183: > 181: mainFrame.getContentPane() > 182: .setLayout(new BoxLayout(mainFrame.getContentPane(), > 183: BoxLayout.Y_AXIS)); Suggestion: This is no longer needed, as you put all those components into `mainBox` which uses `BoxLayout`. Thus, the content pane of `mainFrame` could remain the default `BorderLayout`. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/24384#discussion_r2060802074 From achung at openjdk.org Fri Apr 25 19:54:20 2025 From: achung at openjdk.org (Alisen Chung) Date: Fri, 25 Apr 2025 19:54:20 GMT Subject: RFR: 8343739: Test java/awt/event/KeyEvent/ExtendedKeyCode/ExtendedKeyCodeTest.java failed: Wrong extended key code Message-ID: Test was failing on Ubuntu, looks to be a synchronous error in the test so I rewrote it to improve stability. ------------- Commit messages: - update test and improve stability Changes: https://git.openjdk.org/jdk/pull/24885/files Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=24885&range=00 Issue: https://bugs.openjdk.org/browse/JDK-8343739 Stats: 75 lines in 1 file changed: 40 ins; 26 del; 9 mod Patch: https://git.openjdk.org/jdk/pull/24885.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/24885/head:pull/24885 PR: https://git.openjdk.org/jdk/pull/24885 From aivanov at openjdk.org Fri Apr 25 20:03:52 2025 From: aivanov at openjdk.org (Alexey Ivanov) Date: Fri, 25 Apr 2025 20:03:52 GMT Subject: RFR: 8351884: Refactor bug8033699.java test code [v4] In-Reply-To: References: Message-ID: On Fri, 25 Apr 2025 19:52:06 GMT, Rajat Mahajan wrote: >> Details: >> Refactored code as requested in the Bug description. >> >> Tested and verified the test passes. > > Rajat Mahajan has updated the pull request incrementally with five additional commits since the last revision: > > - Update test/jdk/javax/swing/JRadioButton/8033699/bug8033699.java > > Co-authored-by: Alexey Ivanov > - Update test/jdk/javax/swing/JRadioButton/8033699/bug8033699.java > > Co-authored-by: Alexey Ivanov > - Update test/jdk/javax/swing/JRadioButton/8033699/bug8033699.java > > Co-authored-by: Alexey Ivanov > - Update test/jdk/javax/swing/JRadioButton/8033699/bug8033699.java > > Co-authored-by: Alexey Ivanov > - Update test/jdk/javax/swing/JRadioButton/8033699/bug8033699.java > > Co-authored-by: Alexey Ivanov Changes requested by aivanov (Reviewer). test/jdk/javax/swing/JRadioButton/8033699/bug8033699.java line 62: > 60: robot = new Robot(); > 61: > 62: // Get all installed Look and Feels Huh, it was already there. Anyway. test/jdk/javax/swing/JRadioButton/8033699/bug8033699.java line 63: > 61: robot = new Robot(); > 62: SwingUtilities.invokeAndWait(() -> > 63: focusManager = KeyboardFocusManager.getCurrentKeyboardFocusManager()); Suggestion: robot = new Robot(); SwingUtilities.invokeAndWait(() -> focusManager = KeyboardFocusManager.getCurrentKeyboardFocusManager()); test/jdk/javax/swing/JRadioButton/8033699/bug8033699.java line 120: > 118: runTest9(); > 119: robot.delay(100); > 120: } catch (Exception e) { Let's make the error message more informative: } catch (Exception e) { Throwable cause = e.getCause(); throw new RuntimeException("Error testing LaF: " + laf.getName() + (cause != null ? " - " + cause.getMessage() : ""), e); } finally { GitHub wouldn't allow add this as suggestion as these lines aren't modified. This produces the following output which is more descriptive since it also includes the real error message. Testing LaF: Metal Radio Button Group Go To Next Component through Tab Key failed Exception in thread "main" java.lang.RuntimeException: Error testing LaF: Metal - Focus is not on Radio Button Single as Expected at bug8033699.testLaF(bug8033699.java:125) at bug8033699.main(bug8033699.java:67) Caused by: java.lang.reflect.InvocationTargetException at ? Caused by: java.lang.RuntimeException: Focus is not on Radio Button Single as Expected at bug8033699.lambda$runTest1$3(bug8033699.java:201) at ? ------------- PR Review: https://git.openjdk.org/jdk/pull/24384#pullrequestreview-2795152173 PR Review Comment: https://git.openjdk.org/jdk/pull/24384#discussion_r2060808469 PR Review Comment: https://git.openjdk.org/jdk/pull/24384#discussion_r2060807687 PR Review Comment: https://git.openjdk.org/jdk/pull/24384#discussion_r2060815567 From rmahajan at openjdk.org Fri Apr 25 20:09:18 2025 From: rmahajan at openjdk.org (Rajat Mahajan) Date: Fri, 25 Apr 2025 20:09:18 GMT Subject: RFR: 8351884: Refactor bug8033699.java test code [v5] In-Reply-To: References: Message-ID: > Details: > Refactored code as requested in the Bug description. > > Tested and verified the test passes. Rajat Mahajan has updated the pull request incrementally with one additional commit since the last revision: Update test/jdk/javax/swing/JRadioButton/8033699/bug8033699.java Co-authored-by: Alexey Ivanov ------------- Changes: - all: https://git.openjdk.org/jdk/pull/24384/files - new: https://git.openjdk.org/jdk/pull/24384/files/172d08f4..ca4b6739 Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=24384&range=04 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=24384&range=03-04 Stats: 1 line in 1 file changed: 1 ins; 0 del; 0 mod Patch: https://git.openjdk.org/jdk/pull/24384.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/24384/head:pull/24384 PR: https://git.openjdk.org/jdk/pull/24384 From rmahajan at openjdk.org Fri Apr 25 20:09:18 2025 From: rmahajan at openjdk.org (Rajat Mahajan) Date: Fri, 25 Apr 2025 20:09:18 GMT Subject: RFR: 8351884: Refactor bug8033699.java test code [v5] In-Reply-To: References: Message-ID: On Fri, 25 Apr 2025 19:53:20 GMT, Alexey Ivanov wrote: >> Rajat Mahajan has updated the pull request incrementally with one additional commit since the last revision: >> >> Update test/jdk/javax/swing/JRadioButton/8033699/bug8033699.java >> >> Co-authored-by: Alexey Ivanov > > test/jdk/javax/swing/JRadioButton/8033699/bug8033699.java line 62: > >> 60: robot = new Robot(); >> 61: >> 62: // Get all installed Look and Feels > > Huh, it was already there. Anyway. Sorry, I do not get this comment? ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/24384#discussion_r2060821179 From aivanov at openjdk.org Fri Apr 25 20:11:48 2025 From: aivanov at openjdk.org (Alexey Ivanov) Date: Fri, 25 Apr 2025 20:11:48 GMT Subject: RFR: 8351884: Refactor bug8033699.java test code [v5] In-Reply-To: References: Message-ID: On Fri, 25 Apr 2025 20:06:05 GMT, Rajat Mahajan wrote: >> test/jdk/javax/swing/JRadioButton/8033699/bug8033699.java line 62: >> >>> 60: robot = new Robot(); >>> 61: >>> 62: // Get all installed Look and Feels >> >> Huh, it was already there. Anyway. > > Sorry, I do not get this comment? The comment in the code had been added before this review started. It's cleaner without the comment, anyway. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/24384#discussion_r2060823677 From prr at openjdk.org Fri Apr 25 20:15:55 2025 From: prr at openjdk.org (Phil Race) Date: Fri, 25 Apr 2025 20:15:55 GMT Subject: RFR: 8355366: Fix the wrong usage of PassFailJFrame.forcePass() in some manual tests In-Reply-To: References: Message-ID: <6MIVUAN7DKy5DNVt3Fie_JMj_7AHcLW_-St_2v-LgI0=.698212f8-ba02-4161-8026-f7925c595c0d@github.com> On Thu, 24 Apr 2025 16:36:56 GMT, Manukumar V S wrote: > Fix the wrong usage of PassFailJFrame.forcePass() in some manual tests from java.awt.Desktop package. These tests should be fixed similar to [JDK-8352109](https://bugs.openjdk.org/browse/JDK-8352109) and jtreg.SkippedException should be used instead of PassFailJFrame.forcePass(). > Affected tests: > 1. https://github.com/openjdk/jdk/blob/master/test/jdk/java/awt/Desktop/BrowseTest.java > 2. https://github.com/openjdk/jdk/blob/master/test/jdk/java/awt/Desktop/OpenTest.java > 3. https://github.com/openjdk/jdk/blob/master/test/jdk/java/awt/Desktop/EditAndPrintTest/EditAndPrintTest.java > > I have opened this PR because my other PR https://github.com/openjdk/jdk/pull/24820 got accidentally closed. Marked as reviewed by prr (Reviewer). ------------- PR Review: https://git.openjdk.org/jdk/pull/24853#pullrequestreview-2795185103 From mvs at openjdk.org Fri Apr 25 20:15:56 2025 From: mvs at openjdk.org (Manukumar V S) Date: Fri, 25 Apr 2025 20:15:56 GMT Subject: Integrated: 8355366: Fix the wrong usage of PassFailJFrame.forcePass() in some manual tests In-Reply-To: References: Message-ID: <7MZ97nPak42wDX9SeMI_fjMnBbJaa1QjA6GjXrMrW2I=.39a3f938-8f30-4e99-9970-0a0e22173ab2@github.com> On Thu, 24 Apr 2025 16:36:56 GMT, Manukumar V S wrote: > Fix the wrong usage of PassFailJFrame.forcePass() in some manual tests from java.awt.Desktop package. These tests should be fixed similar to [JDK-8352109](https://bugs.openjdk.org/browse/JDK-8352109) and jtreg.SkippedException should be used instead of PassFailJFrame.forcePass(). > Affected tests: > 1. https://github.com/openjdk/jdk/blob/master/test/jdk/java/awt/Desktop/BrowseTest.java > 2. https://github.com/openjdk/jdk/blob/master/test/jdk/java/awt/Desktop/OpenTest.java > 3. https://github.com/openjdk/jdk/blob/master/test/jdk/java/awt/Desktop/EditAndPrintTest/EditAndPrintTest.java > > I have opened this PR because my other PR https://github.com/openjdk/jdk/pull/24820 got accidentally closed. This pull request has now been integrated. Changeset: 2785570f Author: Manukumar V S Committer: Phil Race URL: https://git.openjdk.org/jdk/commit/2785570f5620db08c0d31cd29839f92ffabd58b2 Stats: 63 lines in 3 files changed: 27 ins; 24 del; 12 mod 8355366: Fix the wrong usage of PassFailJFrame.forcePass() in some manual tests Reviewed-by: honkar, aivanov, prr ------------- PR: https://git.openjdk.org/jdk/pull/24853 From achung at openjdk.org Fri Apr 25 20:21:49 2025 From: achung at openjdk.org (Alisen Chung) Date: Fri, 25 Apr 2025 20:21:49 GMT Subject: RFR: 8354219 : Automate javax/swing/JComboBox/ComboPopupBug.java [v8] In-Reply-To: <7XTF4f9iwcX1psynJR92yPfr2uL5BWv8l3_aDt-rSXU=.7c249a9f-f476-43f7-8602-2597e2953ce1@github.com> References: <7XTF4f9iwcX1psynJR92yPfr2uL5BWv8l3_aDt-rSXU=.7c249a9f-f476-43f7-8602-2597e2953ce1@github.com> Message-ID: On Fri, 25 Apr 2025 18:59:35 GMT, Anass Baya wrote: >> This test was designed to manually verify that clicking on the JComboBox when the frame containing it is about to close does not cause an IllegalStateException. >> >> The test allowed the tester extra time to click on the JComboBox when closing the frame by adding a Thread.sleep() in the close button handler. >> >> In this test, a JComboBox is displayed with a Close button at the bottom. The tester should click the Close button, then try to click the JComboBox arrow button to display the popup. >> >> In the automated test, we save the JComboBox location size before closing the frame. We then use this information to click on the JComboBox right before the frame is closed. > > Anass Baya has updated the pull request incrementally with one additional commit since the last revision: > > Frame null-check before disposing the frame on the EDT Changes requested by achung (Committer). test/jdk/javax/swing/JComboBox/ComboPopupBug.java line 44: > 42: private static JFrame frame; > 43: private static JButton closeButton; > 44: private static JComboBox comboBox; can remove test/jdk/javax/swing/JComboBox/ComboPopupBug.java line 58: > 56: robot.delay(1000); > 57: > 58: SwingUtilities.invokeAndWait(() -> closeButton.doClick()); maybe add a waitForIdle after this call for stability test/jdk/javax/swing/JComboBox/ComboPopupBug.java line 81: > 79: frame = new JFrame("ComboPopup"); > 80: > 81: comboBox = new JComboBox<>(); comboBox = new JComboBox(); test/jdk/javax/swing/JComboBox/ComboPopupBug.java line 93: > 91: }); > 92: > 93: frame.getContentPane().add(comboBox, "North"); dont need .getContentPane() ------------- PR Review: https://git.openjdk.org/jdk/pull/24624#pullrequestreview-2795188809 PR Review Comment: https://git.openjdk.org/jdk/pull/24624#discussion_r2060835612 PR Review Comment: https://git.openjdk.org/jdk/pull/24624#discussion_r2060830432 PR Review Comment: https://git.openjdk.org/jdk/pull/24624#discussion_r2060836492 PR Review Comment: https://git.openjdk.org/jdk/pull/24624#discussion_r2060828659 From prr at openjdk.org Fri Apr 25 21:01:46 2025 From: prr at openjdk.org (Phil Race) Date: Fri, 25 Apr 2025 21:01:46 GMT Subject: RFR: 8355077: Compiler error at splashscreen_gif.c due to unterminated string initialization In-Reply-To: References: Message-ID: <0-bcNRDB9JC3O0luO4Dd3z1Hl91118zsKQg4cY_8S4U=.e70ccf7a-c535-43ed-9be5-0452ff506dd6@github.com> On Sun, 20 Apr 2025 02:16:50 GMT, Yasumasa Suenaga wrote: > I tried to build OpenJDK with GCC 15.0.1 on Fedora 42 x86_64, however I saw following error. > > > * For target support_native_java.desktop_libsplashscreen_splashscreen_gif.o: > /home/ysuenaga/github-forked/jdk/src/java.desktop/share/native/libsplashscreen/splashscreen_gif.c:51:41: error: initializer-string for array of ?char? truncates NUL terminator but destination lacks ?nonstring? attribute (12 chars into 11 available) [-Werror=unterminated-string-initialization] > 51 | static const char szNetscape20ext[11] = "NETSCAPE2.0"; > | ^~~~~~~~~~~~~ > cc1: all warnings being treated as errors > > > This constant seems to be used to detect Netscape 2.0 extension in GIF image. It should be used to compare with extension block without NUL char, but we should tweak initialization to avoid this error for safety code. Marked as reviewed by prr (Reviewer). hmm. yes, it looks like it is enabled by -Wextra https://gcc.gnu.org/pipermail/gcc-patches/2024-June/656014.html Ok. let's make the change as the easiest thing to do. ------------- PR Review: https://git.openjdk.org/jdk/pull/24770#pullrequestreview-2795266811 PR Comment: https://git.openjdk.org/jdk/pull/24770#issuecomment-2831420230 From prr at openjdk.org Fri Apr 25 21:07:47 2025 From: prr at openjdk.org (Phil Race) Date: Fri, 25 Apr 2025 21:07:47 GMT Subject: RFR: 8351913: ToolkitImage renders some gifs wrong [v2] In-Reply-To: <4MLiBt1VUPDfV0DwZN8bgPeaITltl5ZeEi12lTfz0bo=.47a17fe5-e68b-4116-a954-93c3cb562491@github.com> References: <74IJiA4t9MAOiGPCGuls0-KbIfGg9D2bNUXPapOx0Zs=.4cdf9b89-4007-4727-a07e-ac4eae84134e@github.com> <4MLiBt1VUPDfV0DwZN8bgPeaITltl5ZeEi12lTfz0bo=.47a17fe5-e68b-4116-a954-93c3cb562491@github.com> Message-ID: On Thu, 10 Apr 2025 07:20:06 GMT, Jeremy Wood wrote: >> I do not have much background in LZW compression or in C, but I'm reasonably confident this resolves the problem I'm observing. It looks like the GifImageDecoder was not always correctly handling compression codes after the table reached its limit of ~4096. If anyone has suggestions for improvements I'm happy to make adjustments. >> >> Luckily while debugging this: I was able to compare the flawed implementation (GifImageDecoder) with ImageIO's implementation (GIFImageReader) to help identify how the suffix/prefix tables are supposed to work. >> >> ImageIO's implementation may have suffered a similar bug (maybe https://bugs.openjdk.org/browse/JDK-7131823 ?), and that appears to have been backported. >> >> I have dozens of additional test cases for this problem, but unfortunately I don't have the rights to commit them to the OpenJDK repo. Feel free to email me for additional context/test cases. > > Jeremy Wood has updated the pull request incrementally with one additional commit since the last revision: > > 8351913: changing whitespace (PR review) I see this PR. Need someone to review it properly as it seems to require non-superficial understanding of what is going on. ------------- PR Comment: https://git.openjdk.org/jdk/pull/24271#issuecomment-2831430009 From prr at openjdk.org Fri Apr 25 21:09:46 2025 From: prr at openjdk.org (Phil Race) Date: Fri, 25 Apr 2025 21:09:46 GMT Subject: RFR: 8355611: Get rid of SurfaceManagerFactory [v2] In-Reply-To: References: Message-ID: On Fri, 25 Apr 2025 14:19:54 GMT, Nikita Gubarkov wrote: >> `SurfaceManagerFactory` just checks a given `GraphicsConfiguration` against multiple types via `instanceof`, it has 3 platform-specific implementations, which rely on an ugly injection process. >> >> There is no reason to have this class at all, we could just let `GraphicsConfiguration` create a compatible `SurfaceManager` instead. >> >> This would reduce coupling without having to collect all surface manager types in a single place (without real need to do so). >> And this would also remove dependency on the class initialization sequence by getting rid of the injection process. > > Nikita Gubarkov has updated the pull request incrementally with one additional commit since the last revision: > > fixup! 8355611: Get rid of SurfaceManagerFactory It seems like a nice simplification, but I'm running all our tests to make sure there are no unpleasant surprises. ------------- PR Comment: https://git.openjdk.org/jdk/pull/24875#issuecomment-2831432561 From duke at openjdk.org Fri Apr 25 21:41:47 2025 From: duke at openjdk.org (duke) Date: Fri, 25 Apr 2025 21:41:47 GMT Subject: RFR: 8355203: [macos] AquaButtonUI and AquaRootPaneUI repaint default button unnecessarily [v3] In-Reply-To: <2GPk9U_Lqyw0OtR2Fcfj15E4eV9JZWrh_8xFa0TzLBY=.8248c743-63ce-4719-b9e6-57f99c6626d6@github.com> References: <2GPk9U_Lqyw0OtR2Fcfj15E4eV9JZWrh_8xFa0TzLBY=.8248c743-63ce-4719-b9e6-57f99c6626d6@github.com> Message-ID: On Fri, 25 Apr 2025 07:49:54 GMT, Jeremy Wood wrote: >> This removes the constant repainting of the AquaRootPaneUI's default button. >> >> A long time ago (before Mac OS Yosemite, around 2014) this was needed to match Aqua's native experience. But the default button no longer pulses, so we don't need to repaint ("pulse") the button continually. >> >> Here's a clip from a YouTube video I found demonstrating the pulsing effect that this PR removes (you may want to turn your volume off): >> >> https://github.com/user-attachments/assets/496bc003-ccba-4178-81bc-765e96d94316 >> >> This PR includes a test, but this test has never failed. (That is: this PR does not resolve a failing test.) This test would fail if the default button ever looked the same as a non-default button. >> >> My primary goal here was to remove the AquaButtonUI's AncestorListener, but while we're here we might as well remove the AquaRootPaneUI's timer and other cleanup. >> >> I tried and failed to rename the `private static final byte _pulsed` constant. (More details [here](https://github.com/openjdk/jdk/commit/89d0689f226b9e883df464e6f3e8c20074970499).) If anyone has suggestions for how to rename that without errors please let me know. > > Jeremy Wood has updated the pull request incrementally with two additional commits since the last revision: > > - 8355203: breaking up long line into multiple lines > > This is in response to: > https://github.com/openjdk/jdk/pull/24778#discussion_r2059701077 > - 8355203: breaking up long line into multiple lines > > This is in response to: > https://github.com/openjdk/jdk/pull/24778#discussion_r2059701077 @mickleness Your change (at version 562804e5969b4981ebe5e88917eefb4da0956e8f) is now ready to be sponsored by a Committer. ------------- PR Comment: https://git.openjdk.org/jdk/pull/24778#issuecomment-2831476680 From mvs at openjdk.org Sat Apr 26 01:28:53 2025 From: mvs at openjdk.org (Manukumar V S) Date: Sat, 26 Apr 2025 01:28:53 GMT Subject: RFR: 8355441: Remove antipattern from PassFailJFrame.forcePass javadoc [v4] In-Reply-To: References: Message-ID: > The javadoc for PassFailJFrame.forcePass suggests an anti-pattern of forcibly passing the test if a resource is unavailable. > > If a resource is unavailable or a feature isn't supported, the test should throw jtreg.SkippedException. > > PassFailJFrame.forcePass should be used in semi-automatic tests when the test determines that all the conditions for passing the test are met. > Please refer: JDK-8355366 and https://github.com/openjdk/jdk/pull/24820 > > Testing > This is a javadoc change, so not testing required. Manukumar V S has updated the pull request incrementally with one additional commit since the last revision: Updated line number in code link ------------- Changes: - all: https://git.openjdk.org/jdk/pull/24837/files - new: https://git.openjdk.org/jdk/pull/24837/files/45601fc7..458d118e Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=24837&range=03 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=24837&range=02-03 Stats: 1 line in 1 file changed: 0 ins; 0 del; 1 mod Patch: https://git.openjdk.org/jdk/pull/24837.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/24837/head:pull/24837 PR: https://git.openjdk.org/jdk/pull/24837 From mvs at openjdk.org Sat Apr 26 01:34:45 2025 From: mvs at openjdk.org (Manukumar V S) Date: Sat, 26 Apr 2025 01:34:45 GMT Subject: RFR: 8288471: java/awt/ScrollPane/bug8077409Test.java is unstable and fails intermittently in CI [v3] In-Reply-To: References: Message-ID: On Fri, 11 Apr 2025 05:34:15 GMT, Manukumar V S wrote: >> java/awt/ScrollPane/bug8077409Test.java is unstable and fails intermittently in CI, especially in MacOS machines. >> Also the frame created in this test is not disposed which may interfere with other tests. >> >> Fix: >> Some stabilisations added and the frame is disposed properly. >> >> Testing: >> Tested 100 times per platform(macosx-x64,macosx-aarch64,windows-x64,linux-x64) and got all PASS. > > Manukumar V S has updated the pull request incrementally with one additional commit since the last revision: > > Review comments fixed : Code reformatting, changed the indentation to the standard four-space indentation Any reviewers? ------------- PR Comment: https://git.openjdk.org/jdk/pull/24292#issuecomment-2831716788 From prr at openjdk.org Sat Apr 26 01:49:48 2025 From: prr at openjdk.org (Phil Race) Date: Sat, 26 Apr 2025 01:49:48 GMT Subject: RFR: 8355611: Get rid of SurfaceManagerFactory [v2] In-Reply-To: References: Message-ID: <2NNwB4GzEED1-aPcvQQGjc9FDf-eKwxtmgjh9AXwOpg=.9dd794e0-60e8-4d62-b100-397430f0be7b@github.com> On Fri, 25 Apr 2025 14:19:54 GMT, Nikita Gubarkov wrote: >> `SurfaceManagerFactory` just checks a given `GraphicsConfiguration` against multiple types via `instanceof`, it has 3 platform-specific implementations, which rely on an ugly injection process. >> >> There is no reason to have this class at all, we could just let `GraphicsConfiguration` create a compatible `SurfaceManager` instead. >> >> This would reduce coupling without having to collect all surface manager types in a single place (without real need to do so). >> And this would also remove dependency on the class initialization sequence by getting rid of the injection process. > > Nikita Gubarkov has updated the pull request incrementally with one additional commit since the last revision: > > fixup! 8355611: Get rid of SurfaceManagerFactory Marked as reviewed by prr (Reviewer). ------------- PR Review: https://git.openjdk.org/jdk/pull/24875#pullrequestreview-2795635226 From serb at openjdk.org Sat Apr 26 02:59:47 2025 From: serb at openjdk.org (Sergey Bylokhov) Date: Sat, 26 Apr 2025 02:59:47 GMT Subject: RFR: 8288471: java/awt/ScrollPane/bug8077409Test.java is unstable and fails intermittently in CI [v3] In-Reply-To: References: Message-ID: On Fri, 11 Apr 2025 05:34:15 GMT, Manukumar V S wrote: >> java/awt/ScrollPane/bug8077409Test.java is unstable and fails intermittently in CI, especially in MacOS machines. >> Also the frame created in this test is not disposed which may interfere with other tests. >> >> Fix: >> Some stabilisations added and the frame is disposed properly. >> >> Testing: >> Tested 100 times per platform(macosx-x64,macosx-aarch64,windows-x64,linux-x64) and got all PASS. > > Manukumar V S has updated the pull request incrementally with one additional commit since the last revision: > > Review comments fixed : Code reformatting, changed the indentation to the standard four-space indentation test/jdk/java/awt/ScrollPane/bug8077409Test.java line 69: > 67: try { > 68: obj.setLocationRelativeTo(null); > 69: Toolkit.getDefaultToolkit().addAWTEventListener(e -> { This test is not manual and does not use a robot to click. How can this listener be called? test/jdk/java/awt/ScrollPane/bug8077409Test.java line 100: > 98: > 99: int y = obj.pane.getComponent(0).getLocation().y; > 100: robot.waitForIdle(); Why do you need to wait in this line? ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/24292#discussion_r2061129952 PR Review Comment: https://git.openjdk.org/jdk/pull/24292#discussion_r2061129478 From serb at openjdk.org Sat Apr 26 03:12:50 2025 From: serb at openjdk.org (Sergey Bylokhov) Date: Sat, 26 Apr 2025 03:12:50 GMT Subject: RFR: 8343739: Test java/awt/event/KeyEvent/ExtendedKeyCode/ExtendedKeyCodeTest.java failed: Wrong extended key code In-Reply-To: References: Message-ID: On Fri, 25 Apr 2025 19:49:02 GMT, Alisen Chung wrote: > Test was failing on Ubuntu, looks to be a synchronous error in the test so I rewrote it to improve stability. test/jdk/java/awt/event/KeyEvent/ExtendedKeyCode/ExtendedKeyCodeTest.java line 48: > 46: > 47: try { > 48: SwingUtilities.invokeAndWait(() -> createTestGUI()); It should be EventQueue.invokeAndWait. and it actually is not needed since only awt components are used. There are no obvious issues related to stability, proper use of synchronization+waitForIdle+setAutoDelay. test/jdk/java/awt/event/KeyEvent/ExtendedKeyCode/ExtendedKeyCodeTest.java line 72: > 70: robot.waitForIdle(); > 71: > 72: if (eventsCount != 2 || !setExtendedKeyCode) { I suggest to add logging here and rerun it many-many times to reproduce the bug to find out if the problem is in the wrong number of events or in the wrong extended state. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/24885#discussion_r2061130401 PR Review Comment: https://git.openjdk.org/jdk/pull/24885#discussion_r2061133409 From serb at openjdk.org Sat Apr 26 03:26:49 2025 From: serb at openjdk.org (Sergey Bylokhov) Date: Sat, 26 Apr 2025 03:26:49 GMT Subject: RFR: 8355611: Get rid of SurfaceManagerFactory [v2] In-Reply-To: References: Message-ID: On Fri, 25 Apr 2025 14:19:54 GMT, Nikita Gubarkov wrote: >> `SurfaceManagerFactory` just checks a given `GraphicsConfiguration` against multiple types via `instanceof`, it has 3 platform-specific implementations, which rely on an ugly injection process. >> >> There is no reason to have this class at all, we could just let `GraphicsConfiguration` create a compatible `SurfaceManager` instead. >> >> This would reduce coupling without having to collect all surface manager types in a single place (without real need to do so). >> And this would also remove dependency on the class initialization sequence by getting rid of the injection process. > > Nikita Gubarkov has updated the pull request incrementally with one additional commit since the last revision: > > fixup! 8355611: Get rid of SurfaceManagerFactory src/java.desktop/windows/classes/sun/java2d/opengl/WGLGraphicsConfig.java line 440: > 438: public VolatileSurfaceManager createVolatileManager(SunVolatileImage image, Object context) { > 439: return new WGLVolatileSurfaceManager(image, context); > 440: } Please split long lines to have 80 chars per line, it will be good to split surfaceDataProxyCache line added by the 8339341 as well. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/24875#discussion_r2061137119 From prr at openjdk.org Sat Apr 26 03:29:46 2025 From: prr at openjdk.org (Phil Race) Date: Sat, 26 Apr 2025 03:29:46 GMT Subject: RFR: 4811995: BorderLayout does not respect minimum size of its components [v2] In-Reply-To: References: Message-ID: <5aThgFDmRKMI0uLbQJ494C4gSQHyjifFidAaeJ13SU8=.dc310b4a-8409-40c7-b037-0c2b780c6b65@github.com> On Tue, 22 Apr 2025 21:09:58 GMT, Jeremy Wood wrote: >> This PR changes how the BorderLayout positions components when they don't fit inside a container. >> >> This should have no effect on BorderLayouts that match or exceed their preferred size. >> >> (The name of this PR/ticket is a little misleading: this in no way relates to `component.getMinimumSize()`.) >> >> Here is part of a comment in that ticket that sums up what this PR is trying to fix: >>> Instead of the South Component being placed partially offscreen as Windows does, it is often placed on top of the North Component. Indeed, BorderLayout.layoutContainer() always places the South Component flush with the bottom of the Container and does not check if the Container is smaller than the minimum size, or if the North and South Components overlap. >> >> Previously child components could: >> A. be assigned negative (x,y) coordinates >> B. be assigned negative widths or heights >> C. overlap other child components >> D. be assigned dimensions that don't fit inside the target container >> >> This PR will instead constrain certain values. Now child components may be given a width/height of zero pixels, but they should never show the 4 behaviors stated above. >> >> We encountered this basic problem last week at work (we could end up with a component with a negative height). Our work-around was more complex than this PR: we wrote a modified BorderLayout that would switch to using `component.getMinimumSize()` when the preferred size wouldn't fit. IMO that is a better option all-around, but it is dangerously invasive for an OpenJDK proposal. I'm happy to discuss that idea further, though, if anyone here disagrees. > > Jeremy Wood has updated the pull request incrementally with six additional commits since the last revision: > > - Update test/jdk/java/awt/BorderLayout/ConstrainedBorderLayoutChildrenTest.java > > Co-authored-by: Andrey Turbanov > - Update test/jdk/java/awt/BorderLayout/ConstrainedBorderLayoutChildrenTest.java > > Co-authored-by: Andrey Turbanov > - Update test/jdk/java/awt/BorderLayout/ConstrainedBorderLayoutChildrenTest.java > > Co-authored-by: Andrey Turbanov > - Update test/jdk/java/awt/BorderLayout/ConstrainedBorderLayoutChildrenTest.java > > Co-authored-by: Andrey Turbanov > - Update test/jdk/java/awt/BorderLayout/ConstrainedBorderLayoutChildrenTest.java > > Co-authored-by: Andrey Turbanov > - Update test/jdk/java/awt/BorderLayout/ConstrainedBorderLayoutChildrenTest.java > > Co-authored-by: Andrey Turbanov For (1) I don't know other than "too risky". I considered doing it behind a system property so there is no effect unless you opt in by setting that property. But if it means setting the property is a way to contravene the Java SE spec, we'd not be able to do that. So that seems out too, at least without more analysis to disprove any spec. issues. We should definitely do (2). I don't think (3) is necessary. ------------- PR Comment: https://git.openjdk.org/jdk/pull/24772#issuecomment-2831797680 From duke at openjdk.org Sat Apr 26 03:48:51 2025 From: duke at openjdk.org (Jeremy Wood) Date: Sat, 26 Apr 2025 03:48:51 GMT Subject: Withdrawn: 4811995: BorderLayout does not respect minimum size of its components In-Reply-To: References: Message-ID: On Sun, 20 Apr 2025 08:19:15 GMT, Jeremy Wood wrote: > This PR changes how the BorderLayout positions components when they don't fit inside a container. > > This should have no effect on BorderLayouts that match or exceed their preferred size. > > (The name of this PR/ticket is a little misleading: this in no way relates to `component.getMinimumSize()`.) > > Here is part of a comment in that ticket that sums up what this PR is trying to fix: >> Instead of the South Component being placed partially offscreen as Windows does, it is often placed on top of the North Component. Indeed, BorderLayout.layoutContainer() always places the South Component flush with the bottom of the Container and does not check if the Container is smaller than the minimum size, or if the North and South Components overlap. > > Previously child components could: > A. be assigned negative (x,y) coordinates > B. be assigned negative widths or heights > C. overlap other child components > D. be assigned dimensions that don't fit inside the target container > > This PR will instead constrain certain values. Now child components may be given a width/height of zero pixels, but they should never show the 4 behaviors stated above. > > We encountered this basic problem last week at work (we could end up with a component with a negative height). Our work-around was more complex than this PR: we wrote a modified BorderLayout that would switch to using `component.getMinimumSize()` when the preferred size wouldn't fit. IMO that is a better option all-around, but it is dangerously invasive for an OpenJDK proposal. I'm happy to discuss that idea further, though, if anyone here disagrees. This pull request has been closed without being integrated. ------------- PR: https://git.openjdk.org/jdk/pull/24772 From serb at openjdk.org Sat Apr 26 03:49:46 2025 From: serb at openjdk.org (Sergey Bylokhov) Date: Sat, 26 Apr 2025 03:49:46 GMT Subject: RFR: 8355611: Get rid of SurfaceManagerFactory [v2] In-Reply-To: References: Message-ID: <8rStzqB5su1peUuu59TYwGpC00ggXabtGMYNUtAK3VE=.3a3de075-9673-48f0-9777-fd18c1f5799e@github.com> On Fri, 25 Apr 2025 14:19:54 GMT, Nikita Gubarkov wrote: >> `SurfaceManagerFactory` just checks a given `GraphicsConfiguration` against multiple types via `instanceof`, it has 3 platform-specific implementations, which rely on an ugly injection process. >> >> There is no reason to have this class at all, we could just let `GraphicsConfiguration` create a compatible `SurfaceManager` instead. >> >> This would reduce coupling without having to collect all surface manager types in a single place (without real need to do so). >> And this would also remove dependency on the class initialization sequence by getting rid of the injection process. > > Nikita Gubarkov has updated the pull request incrementally with one additional commit since the last revision: > > fixup! 8355611: Get rid of SurfaceManagerFactory src/java.desktop/unix/classes/sun/java2d/xr/XRGraphicsConfig.java line 38: > 36: > 37: public class XRGraphicsConfig extends X11GraphicsConfig implements > 38: SurfaceManager.ProxiedGraphicsConfig, SurfaceManager.Factory { Note that we have inconsistency here: * For X11 the SurfaceManager.Factory is added to the parent X11GraphicsConfig and to the child XRGraphicsConfig. * For glx the SurfaceManager.Factory is added to the parent OGLGraphicsConfig and is not added to the child CGLGraphicsConfig/GLXGraphicsConfig. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/24875#discussion_r2061141505 From ngubarkov at openjdk.org Sat Apr 26 11:07:04 2025 From: ngubarkov at openjdk.org (Nikita Gubarkov) Date: Sat, 26 Apr 2025 11:07:04 GMT Subject: RFR: 8355611: Get rid of SurfaceManagerFactory [v3] In-Reply-To: References: Message-ID: > `SurfaceManagerFactory` just checks a given `GraphicsConfiguration` against multiple types via `instanceof`, it has 3 platform-specific implementations, which rely on an ugly injection process. > > There is no reason to have this class at all, we could just let `GraphicsConfiguration` create a compatible `SurfaceManager` instead. > > This would reduce coupling without having to collect all surface manager types in a single place (without real need to do so). > And this would also remove dependency on the class initialization sequence by getting rid of the injection process. Nikita Gubarkov has updated the pull request incrementally with three additional commits since the last revision: - fixup! 8355611: Get rid of SurfaceManagerFactory Remove SurfaceManager.Factory interface from XRGraphicsConfig. - fixup! 8355611: Get rid of SurfaceManagerFactory Split long lines (8339341) - fixup! 8355611: Get rid of SurfaceManagerFactory Split long lines ------------- Changes: - all: https://git.openjdk.org/jdk/pull/24875/files - new: https://git.openjdk.org/jdk/pull/24875/files/c1e55120..3741484e Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=24875&range=02 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=24875&range=01-02 Stats: 46 lines in 12 files changed: 20 ins; 0 del; 26 mod Patch: https://git.openjdk.org/jdk/pull/24875.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/24875/head:pull/24875 PR: https://git.openjdk.org/jdk/pull/24875 From aivanov at openjdk.org Sat Apr 26 20:37:51 2025 From: aivanov at openjdk.org (Alexey Ivanov) Date: Sat, 26 Apr 2025 20:37:51 GMT Subject: RFR: 8352149: open/test/jdk/java/awt/Frame/MultiScreenTest.java fails [v2] In-Reply-To: References: <-t5iRw5c31W0E-mPWTvHk9PoP819SUA9xrAwMZfJEDc=.c61d9c20-5397-4ab2-89ac-dab4b50b2a0e@github.com> Message-ID: On Thu, 24 Apr 2025 12:51:09 GMT, Khalid Boulanouare wrote: >> Fixes issue in which the test fails when run on multi-screen machine. >> >> Tested on Ubuntu 24.04, MacOS 15 and Windows 11 >> >> JTREG >> >> runner starting test: java/awt/Frame/MultiScreenTest.java >> runner finished test: java/awt/Frame/MultiScreenTest.java >> Passed. Execution successful > > Khalid Boulanouare has updated the pull request incrementally with two additional commits since the last revision: > > - 8352149: open/test/jdk/java/awt/Frame/MultiScreenTest.java fails in MacOS > - Revert "8352149: open/test/jdk/java/awt/Frame/MultiScreenTest.java fails in MacOS" > > This reverts commit e938333b874342a6d0b3aa7d69263b97e5b3e17e. The test doesn't work on Linux either. The problem on Linux is that there are too many graphics configurations are returned. On my Fedora Linux 42 with two monitors, `gs[j].getConfigurations()` returns an array of length **176**. It could be the reason why the loop divides the number of configurations: `gc.length / 2`. In the end, this loop creates **176** window and a thread for each of the windows. This hangs GNOME shell completely. A few times, I was able to kill the `java` process via SSH connection, but it doesn't always help, and it still takes quite a while to get back to responsive UI. I'm sure this problem was discussed somewhere? (I'll search for that discussion later.) We should limit testing to default configurations only. As for Windows, the test could be usable on Windows and macOS if you remove replace `< gc.length / 2` with `< gc.length` as @kboulanou suggested initially. On Windows and macOS, there's usually only one configuration returned from `gs[j].getConfigurations()` for each screen. ------------- PR Comment: https://git.openjdk.org/jdk/pull/24752#issuecomment-2832601336 From ysuenaga at openjdk.org Sun Apr 27 02:32:49 2025 From: ysuenaga at openjdk.org (Yasumasa Suenaga) Date: Sun, 27 Apr 2025 02:32:49 GMT Subject: Integrated: 8355077: Compiler error at splashscreen_gif.c due to unterminated string initialization In-Reply-To: References: Message-ID: <7C49ppt60oKA7ChqUh9Pu2fXtEMisvZNehrTeaeeG34=.e43b2411-90f3-4215-8e4b-21e599f4fa6e@github.com> On Sun, 20 Apr 2025 02:16:50 GMT, Yasumasa Suenaga wrote: > I tried to build OpenJDK with GCC 15.0.1 on Fedora 42 x86_64, however I saw following error. > > > * For target support_native_java.desktop_libsplashscreen_splashscreen_gif.o: > /home/ysuenaga/github-forked/jdk/src/java.desktop/share/native/libsplashscreen/splashscreen_gif.c:51:41: error: initializer-string for array of ?char? truncates NUL terminator but destination lacks ?nonstring? attribute (12 chars into 11 available) [-Werror=unterminated-string-initialization] > 51 | static const char szNetscape20ext[11] = "NETSCAPE2.0"; > | ^~~~~~~~~~~~~ > cc1: all warnings being treated as errors > > > This constant seems to be used to detect Netscape 2.0 extension in GIF image. It should be used to compare with extension block without NUL char, but we should tweak initialization to avoid this error for safety code. This pull request has now been integrated. Changeset: 898d4798 Author: Yasumasa Suenaga URL: https://git.openjdk.org/jdk/commit/898d4798003d7b9cd54ef3a149eb037998a39887 Stats: 3 lines in 1 file changed: 0 ins; 0 del; 3 mod 8355077: Compiler error at splashscreen_gif.c due to unterminated string initialization Reviewed-by: prr ------------- PR: https://git.openjdk.org/jdk/pull/24770 From serb at openjdk.org Sun Apr 27 03:34:45 2025 From: serb at openjdk.org (Sergey Bylokhov) Date: Sun, 27 Apr 2025 03:34:45 GMT Subject: RFR: 8355611: Get rid of SurfaceManagerFactory [v3] In-Reply-To: References: Message-ID: On Sat, 26 Apr 2025 11:07:04 GMT, Nikita Gubarkov wrote: >> `SurfaceManagerFactory` just checks a given `GraphicsConfiguration` against multiple types via `instanceof`, it has 3 platform-specific implementations, which rely on an ugly injection process. >> >> There is no reason to have this class at all, we could just let `GraphicsConfiguration` create a compatible `SurfaceManager` instead. >> >> This would reduce coupling without having to collect all surface manager types in a single place (without real need to do so). >> And this would also remove dependency on the class initialization sequence by getting rid of the injection process. > > Nikita Gubarkov has updated the pull request incrementally with three additional commits since the last revision: > > - fixup! 8355611: Get rid of SurfaceManagerFactory > > Remove SurfaceManager.Factory interface from XRGraphicsConfig. > - fixup! 8355611: Get rid of SurfaceManagerFactory > > Split long lines (8339341) > - fixup! 8355611: Get rid of SurfaceManagerFactory > > Split long lines Marked as reviewed by serb (Reviewer). ------------- PR Review: https://git.openjdk.org/jdk/pull/24875#pullrequestreview-2796904707 From duke at openjdk.org Sun Apr 27 04:10:12 2025 From: duke at openjdk.org (Jeremy Wood) Date: Sun, 27 Apr 2025 04:10:12 GMT Subject: RFR: 8351913: ToolkitImage renders some gifs wrong [v3] In-Reply-To: <74IJiA4t9MAOiGPCGuls0-KbIfGg9D2bNUXPapOx0Zs=.4cdf9b89-4007-4727-a07e-ac4eae84134e@github.com> References: <74IJiA4t9MAOiGPCGuls0-KbIfGg9D2bNUXPapOx0Zs=.4cdf9b89-4007-4727-a07e-ac4eae84134e@github.com> Message-ID: > I do not have much background in LZW compression or in C, but I'm reasonably confident this resolves the problem I'm observing. It looks like the GifImageDecoder was not always correctly handling compression codes after the table reached its limit of ~4096. If anyone has suggestions for improvements I'm happy to make adjustments. > > Luckily while debugging this: I was able to compare the flawed implementation (GifImageDecoder) with ImageIO's implementation (GIFImageReader) to help identify how the suffix/prefix tables are supposed to work. > > ImageIO's implementation may have suffered a similar bug (maybe https://bugs.openjdk.org/browse/JDK-7131823 ?), and that appears to have been backported. > > I have dozens of additional test cases for this problem, but unfortunately I don't have the rights to commit them to the OpenJDK repo. Feel free to email me for additional context/test cases. Jeremy Wood 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 17 additional commits since the last revision: - Merge branch 'master' into JDK-8351913 - Merge branch 'master' of https://github.com/mickleness/jdk - Merge branch 'master' of https://github.com/mickleness/jdk - 8351913: changing whitespace (PR review) - 8351913: changing whitespace These are flagged as "Whitespace errors" by an automated OpenJDK script https://github.com/openjdk/jdk/pull/24271/checks?check_run_id=39489913895 - Merge branch 'master' into JDK-8351913 - Merge branch 'master' of https://github.com/mickleness/jdk - 8351913: code cleanup - 8351913: support decoding LZW image data with 4095 entries - Merge branch 'openjdk:master' into master - ... and 7 more: https://git.openjdk.org/jdk/compare/ad29194c...d555631c ------------- Changes: - all: https://git.openjdk.org/jdk/pull/24271/files - new: https://git.openjdk.org/jdk/pull/24271/files/e2ab9492..d555631c Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=24271&range=02 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=24271&range=01-02 Stats: 271008 lines in 2137 files changed: 70273 ins; 193504 del; 7231 mod Patch: https://git.openjdk.org/jdk/pull/24271.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/24271/head:pull/24271 PR: https://git.openjdk.org/jdk/pull/24271 From serb at openjdk.org Sun Apr 27 07:06:45 2025 From: serb at openjdk.org (Sergey Bylokhov) Date: Sun, 27 Apr 2025 07:06:45 GMT Subject: RFR: 8354944: Remove unnecessary PartiallyOrderedSet.nodes In-Reply-To: <11dR4gRM1RWgmx8FloFzy3dfZOwn3zIPjiD0690ZdEw=.2662d35c-e7bf-400f-a224-df53967202eb@github.com> References: <11dR4gRM1RWgmx8FloFzy3dfZOwn3zIPjiD0690ZdEw=.2662d35c-e7bf-400f-a224-df53967202eb@github.com> Message-ID: <0Be8L_KmGWwMWOhf1y-qD_6yy0JzHh2Oae56mP5shrY=.eec3702d-a5ec-4409-a4ca-294f70f29bfe@github.com> On Wed, 16 Apr 2025 20:50:24 GMT, Andrey Turbanov wrote: > We can use `javax.imageio.spi.PartiallyOrderedSet#poNodes` directly Marked as reviewed by serb (Reviewer). ------------- PR Review: https://git.openjdk.org/jdk/pull/24699#pullrequestreview-2797471107 From duke at openjdk.org Sun Apr 27 11:08:47 2025 From: duke at openjdk.org (duke) Date: Sun, 27 Apr 2025 11:08:47 GMT Subject: RFR: 8355611: Get rid of SurfaceManagerFactory [v3] In-Reply-To: References: Message-ID: <9HalpB8sOjYkoK5CtnyM1k8Bd9lpR6jbRgW3Yxb2H1E=.3ce91fab-1fed-435b-af87-f37065cf3f99@github.com> On Sat, 26 Apr 2025 11:07:04 GMT, Nikita Gubarkov wrote: >> `SurfaceManagerFactory` just checks a given `GraphicsConfiguration` against multiple types via `instanceof`, it has 3 platform-specific implementations, which rely on an ugly injection process. >> >> There is no reason to have this class at all, we could just let `GraphicsConfiguration` create a compatible `SurfaceManager` instead. >> >> This would reduce coupling without having to collect all surface manager types in a single place (without real need to do so). >> And this would also remove dependency on the class initialization sequence by getting rid of the injection process. > > Nikita Gubarkov has updated the pull request incrementally with three additional commits since the last revision: > > - fixup! 8355611: Get rid of SurfaceManagerFactory > > Remove SurfaceManager.Factory interface from XRGraphicsConfig. > - fixup! 8355611: Get rid of SurfaceManagerFactory > > Split long lines (8339341) > - fixup! 8355611: Get rid of SurfaceManagerFactory > > Split long lines @YaaZ Your change (at version 3741484e1ace996556d5fece05b7d7f6511c3b2e) is now ready to be sponsored by a Committer. ------------- PR Comment: https://git.openjdk.org/jdk/pull/24875#issuecomment-2833390943 From duke at openjdk.org Sun Apr 27 11:26:54 2025 From: duke at openjdk.org (Jeremy Wood) Date: Sun, 27 Apr 2025 11:26:54 GMT Subject: Integrated: 8355203: [macos] AquaButtonUI and AquaRootPaneUI repaint default button unnecessarily In-Reply-To: References: Message-ID: On Mon, 21 Apr 2025 19:52:18 GMT, Jeremy Wood wrote: > This removes the constant repainting of the AquaRootPaneUI's default button. > > A long time ago (before Mac OS Yosemite, around 2014) this was needed to match Aqua's native experience. But the default button no longer pulses, so we don't need to repaint ("pulse") the button continually. > > Here's a clip from a YouTube video I found demonstrating the pulsing effect that this PR removes (you may want to turn your volume off): > > https://github.com/user-attachments/assets/496bc003-ccba-4178-81bc-765e96d94316 > > This PR includes a test, but this test has never failed. (That is: this PR does not resolve a failing test.) This test would fail if the default button ever looked the same as a non-default button. > > My primary goal here was to remove the AquaButtonUI's AncestorListener, but while we're here we might as well remove the AquaRootPaneUI's timer and other cleanup. > > I tried and failed to rename the `private static final byte _pulsed` constant. (More details [here](https://github.com/openjdk/jdk/commit/89d0689f226b9e883df464e6f3e8c20074970499).) If anyone has suggestions for how to rename that without errors please let me know. This pull request has now been integrated. Changeset: 04bb5dcf Author: jeremy Committer: SendaoYan URL: https://git.openjdk.org/jdk/commit/04bb5dcf5759509e0239a6049db9ae2b97880aa9 Stats: 389 lines in 5 files changed: 257 ins; 127 del; 5 mod 8355203: [macos] AquaButtonUI and AquaRootPaneUI repaint default button unnecessarily Reviewed-by: serb, prr ------------- PR: https://git.openjdk.org/jdk/pull/24778 From tr at openjdk.org Sun Apr 27 11:47:52 2025 From: tr at openjdk.org (Tejesh R) Date: Sun, 27 Apr 2025 11:47:52 GMT Subject: Integrated: 8354495: Open source several AWT DataTransfer tests In-Reply-To: References: Message-ID: On Thu, 24 Apr 2025 13:09:42 GMT, Tejesh R wrote: > Open source these AWT DataTransfer tests: > > java/awt/datatransfer/ImageTransferCrashTest.java > java/awt/datatransfer/ClipboardPerformanceTest.java > java/awt/datatransfer/HTMLTransferConsoleOutputTest.java This pull request has now been integrated. Changeset: 9c86ac27 Author: Tejesh R URL: https://git.openjdk.org/jdk/commit/9c86ac27236a67ff7d84447821d89772b993f7e1 Stats: 465 lines in 4 files changed: 465 ins; 0 del; 0 mod 8354495: Open source several AWT DataTransfer tests Reviewed-by: azvegint ------------- PR: https://git.openjdk.org/jdk/pull/24850 From rmahajan at openjdk.org Mon Apr 28 04:44:33 2025 From: rmahajan at openjdk.org (Rajat Mahajan) Date: Mon, 28 Apr 2025 04:44:33 GMT Subject: RFR: 8351884: Refactor bug8033699.java test code [v6] In-Reply-To: References: Message-ID: > Details: > Refactored code as requested in the Bug description. > > Tested and verified the test passes. Rajat Mahajan has updated the pull request incrementally with one additional commit since the last revision: code review suggestions ------------- Changes: - all: https://git.openjdk.org/jdk/pull/24384/files - new: https://git.openjdk.org/jdk/pull/24384/files/ca4b6739..d5391420 Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=24384&range=05 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=24384&range=04-05 Stats: 4 lines in 1 file changed: 3 ins; 0 del; 1 mod Patch: https://git.openjdk.org/jdk/pull/24384.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/24384/head:pull/24384 PR: https://git.openjdk.org/jdk/pull/24384 From abhiscxk at openjdk.org Mon Apr 28 05:23:45 2025 From: abhiscxk at openjdk.org (Abhishek Kumar) Date: Mon, 28 Apr 2025 05:23:45 GMT Subject: RFR: 8352149: open/test/jdk/java/awt/Frame/MultiScreenTest.java fails [v2] In-Reply-To: References: <-t5iRw5c31W0E-mPWTvHk9PoP819SUA9xrAwMZfJEDc=.c61d9c20-5397-4ab2-89ac-dab4b50b2a0e@github.com> Message-ID: On Sat, 26 Apr 2025 20:34:43 GMT, Alexey Ivanov wrote: > The test doesn't work on Linux either. The problem on Linux is that there are too many graphics configurations are returned. > > On my Fedora Linux 42 with two monitors, `gs[j].getConfigurations()` returns an array of length **176**. > > It could be the reason why the loop divides the number of configurations: `gc.length / 2`. > > In the end, this loop creates **176** window and a thread for each of the windows. This hangs GNOME shell completely. A few times, I was able to kill the `java` process via SSH connection, but it doesn't always help, and it still takes quite a while to get back to responsive UI. > > I'm sure this problem was discussed somewhere? (I'll search for that discussion later.) We should limit testing to default configurations only. > > As for Windows, the test could be usable on Windows and macOS if you remove replace `< gc.length / 2` with `< gc.length` as @kboulanou suggested initially. On Windows and macOS, there's usually only one configuration returned from `gs[j].getConfigurations()` for each screen. I tested on Ubuntu 22.04 and don't find any issues. `gs[j].getConfigurations()` returns an array of length **120**, it took sometime to get back to responsive UI but the waiting time is not that much. Seems creating another **38** windows and a thread for each window causing more overhead in your case. I agree that `gc.length/2` is to reduce the number of frames created on the screen to avoid the hang. If the testing doesn't require so many frames to create then it can be reduced for linux as well (may be 5 or something based on the `gc.length` returned from `gs[j].getConfigurations(). Since the original bug was raised for Solaris, I suggested to drop the testing for Windows and Mac. As per the bug description, `The picture is: No images or few images showed up on the second screen, but the first screen is messed up with images and text strings everywhere.`, my assumption is **creating multiple frames with images and text strings may be the requirement (although it's not clearly mentioned)**. @aivanov-jdk If we replace `< gc.length / 2` with `< gc.length` on Windows and Mac, we will have less frames to test. I agree this will make the test to run but will it add any value to it ? ------------- PR Comment: https://git.openjdk.org/jdk/pull/24752#issuecomment-2834011543 From ngubarkov at openjdk.org Mon Apr 28 06:46:55 2025 From: ngubarkov at openjdk.org (Nikita Gubarkov) Date: Mon, 28 Apr 2025 06:46:55 GMT Subject: Integrated: 8355611: Get rid of SurfaceManagerFactory In-Reply-To: References: Message-ID: On Fri, 25 Apr 2025 13:30:02 GMT, Nikita Gubarkov wrote: > `SurfaceManagerFactory` just checks a given `GraphicsConfiguration` against multiple types via `instanceof`, it has 3 platform-specific implementations, which rely on an ugly injection process. > > There is no reason to have this class at all, we could just let `GraphicsConfiguration` create a compatible `SurfaceManager` instead. > > This would reduce coupling without having to collect all surface manager types in a single place (without real need to do so). > And this would also remove dependency on the class initialization sequence by getting rid of the injection process. This pull request has now been integrated. Changeset: 40e7986c Author: Nikita Gubarkov Committer: Alexey Ushakov URL: https://git.openjdk.org/jdk/commit/40e7986c412797323f721212d5f375ffe15accb3 Stats: 411 lines in 20 files changed: 79 ins; 308 del; 24 mod 8355611: Get rid of SurfaceManagerFactory Reviewed-by: serb, prr ------------- PR: https://git.openjdk.org/jdk/pull/24875 From mickleness at gmail.com Mon Apr 28 08:10:41 2025 From: mickleness at gmail.com (Jeremy Wood) Date: Mon, 28 Apr 2025 08:10:41 +0000 Subject: Help with GifImageDecoder.java bug Message-ID: Is anyone here good at (and available to help with) creating gifs with specific properties? I identified a bug in GifImageDecoder that has to do with mixing different disposal methods and transparent pixel indices. If you create a ToolkitImage to render these gifs, it displays some bad background rectangles: https://drive.google.com/file/d/15j8Qb7N7orKNWL2_pCh5ZJxwwbH0gBfu/view?usp=sharing I have a 1-line proposal for a solution ready to go, but to proceed with an OpenJDK ticket I need to create a gif file that I can legally share. So I want to mimic their basic data structure, but not their visual content. Maybe I can figure this out in a couple of hours, but I suspect there are some smart people out there who can do it in less than 10 minutes. Regards - Jeremy -------------- next part -------------- An HTML attachment was scrubbed... URL: From mvs at openjdk.org Mon Apr 28 09:32:26 2025 From: mvs at openjdk.org (Manukumar V S) Date: Mon, 28 Apr 2025 09:32:26 GMT Subject: RFR: 8288471: java/awt/ScrollPane/bug8077409Test.java is unstable and fails intermittently in CI [v4] In-Reply-To: References: Message-ID: > java/awt/ScrollPane/bug8077409Test.java is unstable and fails intermittently in CI, especially in MacOS machines. > Also the frame created in this test is not disposed which may interfere with other tests. > > Fix: > Some stabilisations added and the frame is disposed properly. > > Testing: > Tested 100 times per platform(macosx-x64,macosx-aarch64,windows-x64,linux-x64) and got all PASS. Manukumar V S has updated the pull request incrementally with one additional commit since the last revision: Review comments fixed : Removed unwanted code and updated copyright year ------------- Changes: - all: https://git.openjdk.org/jdk/pull/24292/files - new: https://git.openjdk.org/jdk/pull/24292/files/0af15c59..13d1deeb Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=24292&range=03 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=24292&range=02-03 Stats: 34 lines in 1 file changed: 0 ins; 33 del; 1 mod Patch: https://git.openjdk.org/jdk/pull/24292.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/24292/head:pull/24292 PR: https://git.openjdk.org/jdk/pull/24292 From mvs at openjdk.org Mon Apr 28 09:35:49 2025 From: mvs at openjdk.org (Manukumar V S) Date: Mon, 28 Apr 2025 09:35:49 GMT Subject: RFR: 8288471: java/awt/ScrollPane/bug8077409Test.java is unstable and fails intermittently in CI [v3] In-Reply-To: References: Message-ID: On Sat, 26 Apr 2025 02:54:58 GMT, Sergey Bylokhov wrote: >> Manukumar V S has updated the pull request incrementally with one additional commit since the last revision: >> >> Review comments fixed : Code reformatting, changed the indentation to the standard four-space indentation > > test/jdk/java/awt/ScrollPane/bug8077409Test.java line 100: > >> 98: >> 99: int y = obj.pane.getComponent(0).getLocation().y; >> 100: robot.waitForIdle(); > > Why do you need to wait in this line? Removed it. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/24292#discussion_r2063289130 From mvs at openjdk.org Mon Apr 28 09:41:50 2025 From: mvs at openjdk.org (Manukumar V S) Date: Mon, 28 Apr 2025 09:41:50 GMT Subject: RFR: 8288471: java/awt/ScrollPane/bug8077409Test.java is unstable and fails intermittently in CI [v3] In-Reply-To: References: Message-ID: On Sat, 26 Apr 2025 02:56:55 GMT, Sergey Bylokhov wrote: >> Manukumar V S has updated the pull request incrementally with one additional commit since the last revision: >> >> Review comments fixed : Code reformatting, changed the indentation to the standard four-space indentation > > test/jdk/java/awt/ScrollPane/bug8077409Test.java line 69: > >> 67: try { >> 68: obj.setLocationRelativeTo(null); >> 69: Toolkit.getDefaultToolkit().addAWTEventListener(e -> { > > This test is not manual and does not use a robot to click. How can this listener be called? Yea, that code piece was unwanted, I have removed it and kept it in a clean way. I have also tested this with the latest changes on Windows-x64 with JDK 8u60_b04 and JDK 8u60_b20 as the original issue related to this test(JDK-8077409) was raised for Windows-x64 and was fixed in JDK 8u60b20. Results: With JDK 8u60b04: Exception in thread "main" java.lang.RuntimeException: Wrong position of component in ScrollPane at bug8077409Test.main(bug8077409Test.java:142) With JDK 8u60b20: Passed..... ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/24292#discussion_r2063300548 From tr at openjdk.org Mon Apr 28 12:51:50 2025 From: tr at openjdk.org (Tejesh R) Date: Mon, 28 Apr 2025 12:51:50 GMT Subject: RFR: 8139228: JFileChooser renders file names as HTML document In-Reply-To: References: Message-ID: On Wed, 23 Apr 2025 11:23:05 GMT, Alexey Ivanov wrote: >> When we are unable to create a folder with special characters in windows OS, why do we need to test it using custom `FileSystemView` ? My point is will any developer do this in windows? > > Because the problem is still there, and there are virtual folders on Windows. If a custom `FileSystemView` can return file names with `""` in their name, `JFileChooser` in Windows Look and Feel will render the file name as HTML. > > Isn't it the problem that you're trying to fix? @aivanov-jdk @mrserb I tried with virtual file system, using custom FileSystemView. On windows and windowsCalssic L&F, the JFileChooser doesn't show up, rather throws and exception which I mentioned below. Exception in thread "AWT-EventQueue-0" java.nio.file.InvalidPathException: Illegal char <<> at index 0:

SWING ROCKS!!!111 at java.base/sun.nio.fs.WindowsPathParser.normalize(WindowsPathParser.java:191) at java.base/sun.nio.fs.WindowsPathParser.parse(WindowsPathParser.java:142) at java.base/sun.nio.fs.WindowsPathParser.parse(WindowsPathParser.java:46) at java.base/sun.nio.fs.WindowsPath.parse(WindowsPath.java:92) at java.base/sun.nio.fs.WindowsFileSystem.getPath(WindowsFileSystem.java:203) at java.base/java.nio.file.Path.of(Path.java:148) at java.base/java.nio.file.Paths.get(Paths.java:69) at java.desktop/sun.awt.shell.ShellFolder.getShellFolder(ShellFolder.java:260) at java.desktop/javax.swing.filechooser.FileSystemView.getShellFolder(FileSystemView.java:724) at java.desktop/javax.swing.filechooser.FileSystemView.getSystemIcon(FileSystemView.java:242) at java.desktop/com.sun.java.swing.plaf.windows.WindowsFileChooserUI$WindowsFileView.getIcon(WindowsFileChooserUI.java:1398) at java.desktop/javax.swing.JFileChooser.getIcon(JFileChooser.java:1614) ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/24439#discussion_r2063587671 From aivanov at openjdk.org Mon Apr 28 14:41:15 2025 From: aivanov at openjdk.org (Alexey Ivanov) Date: Mon, 28 Apr 2025 14:41:15 GMT Subject: RFR: 8351884: Refactor bug8033699.java test code [v6] In-Reply-To: References: Message-ID: On Mon, 28 Apr 2025 04:44:33 GMT, Rajat Mahajan wrote: >> Details: >> Refactored code as requested in the Bug description. >> >> Tested and verified the test passes. > > Rajat Mahajan has updated the pull request incrementally with one additional commit since the last revision: > > code review suggestions Remove the unused import. Otherwise, looks good to me. test/jdk/javax/swing/JRadioButton/8033699/bug8033699.java line 39: > 37: import javax.swing.BorderFactory; > 38: import javax.swing.Box; > 39: import javax.swing.BoxLayout; Now, `BoxLayout` is unused. ------------- Marked as reviewed by aivanov (Reviewer). PR Review: https://git.openjdk.org/jdk/pull/24384#pullrequestreview-2799542238 PR Review Comment: https://git.openjdk.org/jdk/pull/24384#discussion_r2063803027 From aivanov at openjdk.org Mon Apr 28 14:45:51 2025 From: aivanov at openjdk.org (Alexey Ivanov) Date: Mon, 28 Apr 2025 14:45:51 GMT Subject: RFR: 8355441: Remove antipattern from PassFailJFrame.forcePass javadoc [v4] In-Reply-To: References: Message-ID: On Sat, 26 Apr 2025 01:28:53 GMT, Manukumar V S wrote: >> The javadoc for PassFailJFrame.forcePass suggests an anti-pattern of forcibly passing the test if a resource is unavailable. >> >> If a resource is unavailable or a feature isn't supported, the test should throw jtreg.SkippedException. >> >> PassFailJFrame.forcePass should be used in semi-automatic tests when the test determines that all the conditions for passing the test are met. >> Please refer: JDK-8355366 and https://github.com/openjdk/jdk/pull/24820 >> >> Testing >> This is a javadoc change, so not testing required. > > Manukumar V S has updated the pull request incrementally with one additional commit since the last revision: > > Updated line number in code link Marked as reviewed by aivanov (Reviewer). ------------- PR Review: https://git.openjdk.org/jdk/pull/24837#pullrequestreview-2799566304 From aivanov at openjdk.org Mon Apr 28 14:47:56 2025 From: aivanov at openjdk.org (Alexey Ivanov) Date: Mon, 28 Apr 2025 14:47:56 GMT Subject: RFR: 8354219 : Automate javax/swing/JComboBox/ComboPopupBug.java [v8] In-Reply-To: References: <7XTF4f9iwcX1psynJR92yPfr2uL5BWv8l3_aDt-rSXU=.7c249a9f-f476-43f7-8602-2597e2953ce1@github.com> Message-ID: On Fri, 25 Apr 2025 20:18:27 GMT, Alisen Chung wrote: >> Anass Baya has updated the pull request incrementally with one additional commit since the last revision: >> >> Frame null-check before disposing the frame on the EDT > > test/jdk/javax/swing/JComboBox/ComboPopupBug.java line 44: > >> 42: private static JFrame frame; >> 43: private static JButton closeButton; >> 44: private static JComboBox comboBox; > > can remove No, `JComboBox` is the correct type, you shouldn't use plain `JComboBox` without declaring which elements are stored there. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/24624#discussion_r2063823809 From duke at openjdk.org Mon Apr 28 14:53:47 2025 From: duke at openjdk.org (duke) Date: Mon, 28 Apr 2025 14:53:47 GMT Subject: RFR: 8355441: Remove antipattern from PassFailJFrame.forcePass javadoc [v4] In-Reply-To: References: Message-ID: <54P23qbACRlhR1x5RAX5RZp12bxBNl4EPjOfaMN_w20=.c8ea26ea-252f-46af-9ab9-e11c21a026a2@github.com> On Sat, 26 Apr 2025 01:28:53 GMT, Manukumar V S wrote: >> The javadoc for PassFailJFrame.forcePass suggests an anti-pattern of forcibly passing the test if a resource is unavailable. >> >> If a resource is unavailable or a feature isn't supported, the test should throw jtreg.SkippedException. >> >> PassFailJFrame.forcePass should be used in semi-automatic tests when the test determines that all the conditions for passing the test are met. >> Please refer: JDK-8355366 and https://github.com/openjdk/jdk/pull/24820 >> >> Testing >> This is a javadoc change, so not testing required. > > Manukumar V S has updated the pull request incrementally with one additional commit since the last revision: > > Updated line number in code link @manukumarvs Your change (at version 458d118efbddcdc8b974912d4d82656e8497278f) is now ready to be sponsored by a Committer. ------------- PR Comment: https://git.openjdk.org/jdk/pull/24837#issuecomment-2835517299 From aivanov at openjdk.org Mon Apr 28 14:53:49 2025 From: aivanov at openjdk.org (Alexey Ivanov) Date: Mon, 28 Apr 2025 14:53:49 GMT Subject: RFR: 8354219 : Automate javax/swing/JComboBox/ComboPopupBug.java [v8] In-Reply-To: References: <7XTF4f9iwcX1psynJR92yPfr2uL5BWv8l3_aDt-rSXU=.7c249a9f-f476-43f7-8602-2597e2953ce1@github.com> Message-ID: On Fri, 25 Apr 2025 20:15:04 GMT, Alisen Chung wrote: >> Anass Baya has updated the pull request incrementally with one additional commit since the last revision: >> >> Frame null-check before disposing the frame on the EDT > > test/jdk/javax/swing/JComboBox/ComboPopupBug.java line 58: > >> 56: robot.delay(1000); >> 57: >> 58: SwingUtilities.invokeAndWait(() -> closeButton.doClick()); > > maybe add a waitForIdle after this call for stability I think `waitForIdle ` wouldn't hurt. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/24624#discussion_r2063837550 From aivanov at openjdk.org Mon Apr 28 14:56:48 2025 From: aivanov at openjdk.org (Alexey Ivanov) Date: Mon, 28 Apr 2025 14:56:48 GMT Subject: RFR: 8354219 : Automate javax/swing/JComboBox/ComboPopupBug.java [v8] In-Reply-To: References: <7XTF4f9iwcX1psynJR92yPfr2uL5BWv8l3_aDt-rSXU=.7c249a9f-f476-43f7-8602-2597e2953ce1@github.com> Message-ID: <8Idd0SRHE-uDSiehRZLRmpZK_1ErOtH_O6xseerpxGk=.5cbae463-a8ba-409a-acb5-2519c55dfeba@github.com> On Fri, 25 Apr 2025 20:13:31 GMT, Alisen Chung wrote: >> Anass Baya has updated the pull request incrementally with one additional commit since the last revision: >> >> Frame null-check before disposing the frame on the EDT > > test/jdk/javax/swing/JComboBox/ComboPopupBug.java line 93: > >> 91: }); >> 92: >> 93: frame.getContentPane().add(comboBox, "North"); > > dont need .getContentPane() It's not wrong to use `.getContentPane()`, it was the only correct way for a long time. Removing `.getContentPane()` doesn't change much, and it was there. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/24624#discussion_r2063846216 From rmahajan at openjdk.org Mon Apr 28 17:29:30 2025 From: rmahajan at openjdk.org (Rajat Mahajan) Date: Mon, 28 Apr 2025 17:29:30 GMT Subject: RFR: 8351884: Refactor bug8033699.java test code [v7] In-Reply-To: References: Message-ID: <_pmoMlsjvU3lvngw0nQq7xGrEECuHnWUXl7X6BP3wjA=.3f88f910-0835-43f4-bd83-599d67811c42@github.com> > Details: > Refactored code as requested in the Bug description. > > Tested and verified the test passes. Rajat Mahajan has updated the pull request incrementally with one additional commit since the last revision: code review suggestions ------------- Changes: - all: https://git.openjdk.org/jdk/pull/24384/files - new: https://git.openjdk.org/jdk/pull/24384/files/d5391420..c0ad2894 Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=24384&range=06 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=24384&range=05-06 Stats: 1 line in 1 file changed: 0 ins; 1 del; 0 mod Patch: https://git.openjdk.org/jdk/pull/24384.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/24384/head:pull/24384 PR: https://git.openjdk.org/jdk/pull/24384 From aivanov at openjdk.org Mon Apr 28 17:34:50 2025 From: aivanov at openjdk.org (Alexey Ivanov) Date: Mon, 28 Apr 2025 17:34:50 GMT Subject: RFR: 8352149: open/test/jdk/java/awt/Frame/MultiScreenTest.java fails [v2] In-Reply-To: References: <-t5iRw5c31W0E-mPWTvHk9PoP819SUA9xrAwMZfJEDc=.c61d9c20-5397-4ab2-89ac-dab4b50b2a0e@github.com> Message-ID: On Mon, 28 Apr 2025 05:21:03 GMT, Abhishek Kumar wrote: > I tested on Ubuntu 22.04 and don't find any issues. `gs[j].getConfigurations()` returns an array of length **120**, it took sometime to get back to responsive UI but the waiting time is not that much. Seems creating another **38** windows and a thread for each window causing more overhead in your case. I'm pretty sure it depends on hardware: how many configurations are returned and how easy the OS and CPU can handle lots of threads. > I agree that `gc.length/2` is to reduce the number of frames created on the screen to avoid the hang. If the testing doesn't require so many frames to create then it can be reduced for linux as well (may be 5 or something based on the `gc.length` returned from `gs[j].getConfigurations(). I don't see how such a huge number of windows can possibly improve testing. I'd say testing the default configuration which is the current one for the screen should be enough. > Since the original bug was raised for Solaris, I suggested to drop the testing for Windows and Mac. > > As per the bug description, `The picture is: No images or few images showed up on the second screen, but the first screen is messed up with images and text strings everywhere.`, my assumption is **creating multiple frames with images and text strings may be the requirement (although it's not clearly mentioned)**. I do not think so. > @aivanov-jdk If we replace `< gc.length / 2` with `< gc.length` on Windows and Mac, we will have less frames to test. I agree this will make the test to run but will it add any value to it ? As it looks, the test isn't valuable in its current state either way. I don't think we'll be able to reproduce the original problem, yet it may be possible. [The bug description](https://bugs.openjdk.org/browse/JDK-4312921#descriptionmodule) states, > No images or few images showed up on the second screen, but the first screen is messed up with images and text strings everywhere. Those wrong text strings and images stay on the first screen even after the screenTest application terminated. It seems not like the repaint problem since the images were drawn to the wrong place at the first beginning. Then [Phil says in his comment](https://bugs.openjdk.org/browse/JDK-4312921?focusedId=12554259&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-12554259), > The DGA docs are VERY misleading ? indicate that the file descriptor returned from `dga_draw_devfd` is per device. This is not always so as we discovered. This could indicate that the issue is for Solaris only. However, `dga_draw_devfd` seems to be an X Server API, thus it may be applicable to Linux. So, it's unclear whether the test could reproduce the original problem on Solaris. If it doesn't, removing the test is the solution. ------------- PR Comment: https://git.openjdk.org/jdk/pull/24752#issuecomment-2835986581 From aivanov at openjdk.org Mon Apr 28 17:37:01 2025 From: aivanov at openjdk.org (Alexey Ivanov) Date: Mon, 28 Apr 2025 17:37:01 GMT Subject: RFR: 8351884: Refactor bug8033699.java test code [v7] In-Reply-To: <_pmoMlsjvU3lvngw0nQq7xGrEECuHnWUXl7X6BP3wjA=.3f88f910-0835-43f4-bd83-599d67811c42@github.com> References: <_pmoMlsjvU3lvngw0nQq7xGrEECuHnWUXl7X6BP3wjA=.3f88f910-0835-43f4-bd83-599d67811c42@github.com> Message-ID: On Mon, 28 Apr 2025 17:29:30 GMT, Rajat Mahajan wrote: >> Details: >> Refactored code as requested in the Bug description. >> >> Tested and verified the test passes. > > Rajat Mahajan has updated the pull request incrementally with one additional commit since the last revision: > > code review suggestions Marked as reviewed by aivanov (Reviewer). ------------- PR Review: https://git.openjdk.org/jdk/pull/24384#pullrequestreview-2800129159 From duke at openjdk.org Mon Apr 28 20:15:57 2025 From: duke at openjdk.org (duke) Date: Mon, 28 Apr 2025 20:15:57 GMT Subject: RFR: 8351884: Refactor bug8033699.java test code [v7] In-Reply-To: <_pmoMlsjvU3lvngw0nQq7xGrEECuHnWUXl7X6BP3wjA=.3f88f910-0835-43f4-bd83-599d67811c42@github.com> References: <_pmoMlsjvU3lvngw0nQq7xGrEECuHnWUXl7X6BP3wjA=.3f88f910-0835-43f4-bd83-599d67811c42@github.com> Message-ID: On Mon, 28 Apr 2025 17:29:30 GMT, Rajat Mahajan wrote: >> Details: >> Refactored code as requested in the Bug description. >> >> Tested and verified the test passes. > > Rajat Mahajan has updated the pull request incrementally with one additional commit since the last revision: > > code review suggestions @rajamah Your change (at version c0ad28945648fd9a70b25333785a7b5e35b840c6) is now ready to be sponsored by a Committer. ------------- PR Comment: https://git.openjdk.org/jdk/pull/24384#issuecomment-2836411225 From honkar at openjdk.org Mon Apr 28 21:02:45 2025 From: honkar at openjdk.org (Harshitha Onkar) Date: Mon, 28 Apr 2025 21:02:45 GMT Subject: RFR: 8355441: Remove antipattern from PassFailJFrame.forcePass javadoc [v4] In-Reply-To: References: Message-ID: On Sat, 26 Apr 2025 01:28:53 GMT, Manukumar V S wrote: >> The javadoc for PassFailJFrame.forcePass suggests an anti-pattern of forcibly passing the test if a resource is unavailable. >> >> If a resource is unavailable or a feature isn't supported, the test should throw jtreg.SkippedException. >> >> PassFailJFrame.forcePass should be used in semi-automatic tests when the test determines that all the conditions for passing the test are met. >> Please refer: JDK-8355366 and https://github.com/openjdk/jdk/pull/24820 >> >> Testing >> This is a javadoc change, so not testing required. > > Manukumar V S has updated the pull request incrementally with one additional commit since the last revision: > > Updated line number in code link test/jdk/java/awt/regtesthelpers/PassFailJFrame.java line 1306: > 1304: *

A sample usage can be found in > 1305: * {@code > 1306: * SaveFileNameOverrideTest.java} Javadoc update LGTM. Maybe the doc for forceFail() can be updated similarly? @aivanov-jdk What do you suggest? It can be done as a part of this PR change or a separate PR. Since it is a similar doc change, I think it can be done as part of this PR by the changing the JBS title appropriately - _Update javadocs for PassFailJFrame's forcePass() & forceFail() methods_ ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/24837#discussion_r2064692150 From achung at openjdk.org Mon Apr 28 21:19:05 2025 From: achung at openjdk.org (Alisen Chung) Date: Mon, 28 Apr 2025 21:19:05 GMT Subject: RFR: 8343739: Test java/awt/event/KeyEvent/ExtendedKeyCode/ExtendedKeyCodeTest.java failed: Wrong extended key code [v2] In-Reply-To: References: Message-ID: > Test was failing on Ubuntu, looks to be a synchronous error in the test so I rewrote it to improve stability. Alisen Chung has updated the pull request incrementally with one additional commit since the last revision: EventQueue, added logging to track test failure ------------- Changes: - all: https://git.openjdk.org/jdk/pull/24885/files - new: https://git.openjdk.org/jdk/pull/24885/files/283f48d8..2199d038 Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=24885&range=01 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=24885&range=00-01 Stats: 15 lines in 1 file changed: 5 ins; 1 del; 9 mod Patch: https://git.openjdk.org/jdk/pull/24885.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/24885/head:pull/24885 PR: https://git.openjdk.org/jdk/pull/24885 From serb at openjdk.org Mon Apr 28 21:55:19 2025 From: serb at openjdk.org (Sergey Bylokhov) Date: Mon, 28 Apr 2025 21:55:19 GMT Subject: RFR: 8355561: [macos] Build failure with Xcode 16.3 Message-ID: Multiple similar issues detected in PLATFORM_API_MacOSX_Ports.cpp more info about https://github.com/llvm/llvm-project/issues/62836 jdk/src/java.desktop/macosx/native/libjsound/PLATFORM_API_MacOSX_Ports.cpp:127:39: error: variable length arrays in C++ are a Clang extension [-Werror,-Wvla-cxx-extension] 127 | AudioDeviceID devices[count]; | ^~~~~ jdk/src/java.desktop/macosx/native/libjsound/PLATFORM_API_MacOSX_Ports.cpp:127:39: note: read of non-const variable 'count' is not allowed in a constant expression jdk/src/java.desktop/macosx/native/libjsound/PLATFORM_API_MacOSX_Ports.cpp:126:21: note: declared here 126 | int count = size/sizeof(AudioDeviceID); The usage of VLA has been replaced with malloc/calloc and free, which are already used in this file. Note that while this patch adds some validation, I am pretty sure it is still possible to crash these code paths if they are executed concurrently. Access to the native pointers being passed around is not properly synchronized. ------------- Commit messages: - Update PLATFORM_API_MacOSX_Ports.cpp Changes: https://git.openjdk.org/jdk/pull/24937/files Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=24937&range=00 Issue: https://bugs.openjdk.org/browse/JDK-8355561 Stats: 60 lines in 1 file changed: 37 ins; 0 del; 23 mod Patch: https://git.openjdk.org/jdk/pull/24937.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/24937/head:pull/24937 PR: https://git.openjdk.org/jdk/pull/24937 From serb at openjdk.org Mon Apr 28 21:55:19 2025 From: serb at openjdk.org (Sergey Bylokhov) Date: Mon, 28 Apr 2025 21:55:19 GMT Subject: RFR: 8355561: [macos] Build failure with Xcode 16.3 In-Reply-To: References: Message-ID: <-xSK2ssiPf2uDnx7xv2bg1XTK6DwZMqioukDN_Y-X-Y=.afd59e53-d276-41ea-8458-39d93cce72e3@github.com> On Mon, 28 Apr 2025 19:47:03 GMT, Sergey Bylokhov wrote: > Multiple similar issues detected in PLATFORM_API_MacOSX_Ports.cpp more info about https://github.com/llvm/llvm-project/issues/62836 > > jdk/src/java.desktop/macosx/native/libjsound/PLATFORM_API_MacOSX_Ports.cpp:127:39: error: variable length arrays in C++ are a Clang extension [-Werror,-Wvla-cxx-extension] > 127 | AudioDeviceID devices[count]; > | ^~~~~ > jdk/src/java.desktop/macosx/native/libjsound/PLATFORM_API_MacOSX_Ports.cpp:127:39: note: read of non-const variable 'count' is not allowed in a constant expression > jdk/src/java.desktop/macosx/native/libjsound/PLATFORM_API_MacOSX_Ports.cpp:126:21: note: declared here > 126 | int count = size/sizeof(AudioDeviceID); > > The usage of VLA has been replaced with malloc/calloc and free, which are already used in this file. > > Note that while this patch adds some validation, I am pretty sure it is still possible to crash these code paths if they are executed concurrently. Access to the native pointers being passed around is not properly synchronized. src/java.desktop/macosx/native/libjsound/PLATFORM_API_MacOSX_Ports.cpp line 242: > 240: if (!mixer) { > 241: return nullptr; > 242: } This is a pre-existing bug; the caller code is already prepared to handle null. https://github.com/openjdk/jdk/blob/62d165d0e4e5ab1bcef35d5031554a354052c6d5/src/java.desktop/share/classes/com/sun/media/sound/PortMixer.java#L76 -> https://github.com/openjdk/jdk/blob/62d165d0e4e5ab1bcef35d5031554a354052c6d5/src/java.desktop/share/native/libjsound/PortMixer.c#L45 -> PORT_Open ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/24937#discussion_r2064842332 From serb at openjdk.org Mon Apr 28 22:02:49 2025 From: serb at openjdk.org (Sergey Bylokhov) Date: Mon, 28 Apr 2025 22:02:49 GMT Subject: RFR: 8355561: [macos] Build failure with Xcode 16.3 In-Reply-To: References: Message-ID: <8lltKZL8H4JrwmB53SzX_Tp2MJl6n3sGYXlhfr1hBtg=.bceffdad-93e8-4e6b-8b39-3c03213109e1@github.com> On Mon, 28 Apr 2025 19:47:03 GMT, Sergey Bylokhov wrote: > Multiple similar issues detected in PLATFORM_API_MacOSX_Ports.cpp more info about https://github.com/llvm/llvm-project/issues/62836 > > jdk/src/java.desktop/macosx/native/libjsound/PLATFORM_API_MacOSX_Ports.cpp:127:39: error: variable length arrays in C++ are a Clang extension [-Werror,-Wvla-cxx-extension] > 127 | AudioDeviceID devices[count]; > | ^~~~~ > jdk/src/java.desktop/macosx/native/libjsound/PLATFORM_API_MacOSX_Ports.cpp:127:39: note: read of non-const variable 'count' is not allowed in a constant expression > jdk/src/java.desktop/macosx/native/libjsound/PLATFORM_API_MacOSX_Ports.cpp:126:21: note: declared here > 126 | int count = size/sizeof(AudioDeviceID); > > The usage of VLA has been replaced with malloc/calloc and free, which are already used in this file. > > Note that while this patch adds some validation, I am pretty sure it is still possible to crash these code paths if they are executed concurrently. Access to the native pointers being passed around is not properly synchronized. Note that the build is broken not only due to this issue, but also due to another recently introduced problem, which is mentioned in the following link: https://github.com/openjdk/jdk/pull/24608#issuecomment-2833849941. ------------- PR Comment: https://git.openjdk.org/jdk/pull/24937#issuecomment-2836827606 From serb at openjdk.org Mon Apr 28 23:43:49 2025 From: serb at openjdk.org (Sergey Bylokhov) Date: Mon, 28 Apr 2025 23:43:49 GMT Subject: RFR: 8354791: Use Hashtable.putIfAbsent in CSS constructor In-Reply-To: References: Message-ID: On Tue, 12 Nov 2024 09:13:07 GMT, Andrey Turbanov wrote: > We can use Hashtable.putIfAbsent instead of pair `get`/`put` methods. > It's faster and cleaner. src/java.desktop/share/classes/javax/swing/text/html/CSS.java line 737: > 735: valueMapper); > 736: Object generic = new CssValue(); > 737: for (Attribute key : Attribute.allAttributes) { It seems that the entire method references the Attribute class via the CSS prefix. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/22032#discussion_r2065032068 From abaya at openjdk.org Tue Apr 29 01:23:00 2025 From: abaya at openjdk.org (Anass Baya) Date: Tue, 29 Apr 2025 01:23:00 GMT Subject: RFR: 8354219 : Automate javax/swing/JComboBox/ComboPopupBug.java [v9] In-Reply-To: References: Message-ID: > This test was designed to manually verify that clicking on the JComboBox when the frame containing it is about to close does not cause an IllegalStateException. > > The test allowed the tester extra time to click on the JComboBox when closing the frame by adding a Thread.sleep() in the close button handler. > > In this test, a JComboBox is displayed with a Close button at the bottom. The tester should click the Close button, then try to click the JComboBox arrow button to display the popup. > > In the automated test, we save the JComboBox location size before closing the frame. We then use this information to click on the JComboBox right before the frame is closed. Anass Baya has updated the pull request incrementally with one additional commit since the last revision: Add waitforidle ------------- Changes: - all: https://git.openjdk.org/jdk/pull/24624/files - new: https://git.openjdk.org/jdk/pull/24624/files/cc7b69dc..ae836194 Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=24624&range=08 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=24624&range=07-08 Stats: 2 lines in 1 file changed: 2 ins; 0 del; 0 mod Patch: https://git.openjdk.org/jdk/pull/24624.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/24624/head:pull/24624 PR: https://git.openjdk.org/jdk/pull/24624 From abhiscxk at openjdk.org Tue Apr 29 08:03:46 2025 From: abhiscxk at openjdk.org (Abhishek Kumar) Date: Tue, 29 Apr 2025 08:03:46 GMT Subject: RFR: 8352149: open/test/jdk/java/awt/Frame/MultiScreenTest.java fails [v2] In-Reply-To: References: <-t5iRw5c31W0E-mPWTvHk9PoP819SUA9xrAwMZfJEDc=.c61d9c20-5397-4ab2-89ac-dab4b50b2a0e@github.com> Message-ID: <19TZ4DZknsTIw-PFXeiyO_MEWSV4wgxtmjBwJYzStfs=.03628556-8ce3-4369-8948-a92802e720ef@github.com> On Mon, 28 Apr 2025 17:32:09 GMT, Alexey Ivanov wrote: > So, it's unclear whether the test could reproduce the original problem on Solaris. If it doesn't, removing the test is the solution. I removed the test initially but later on added as it was suggested to test it for Linux. ------------- PR Comment: https://git.openjdk.org/jdk/pull/24752#issuecomment-2837862368 From abhiscxk at openjdk.org Tue Apr 29 08:06:49 2025 From: abhiscxk at openjdk.org (Abhishek Kumar) Date: Tue, 29 Apr 2025 08:06:49 GMT Subject: RFR: 8352149: open/test/jdk/java/awt/Frame/MultiScreenTest.java fails [v2] In-Reply-To: References: <-t5iRw5c31W0E-mPWTvHk9PoP819SUA9xrAwMZfJEDc=.c61d9c20-5397-4ab2-89ac-dab4b50b2a0e@github.com> Message-ID: On Mon, 28 Apr 2025 17:32:09 GMT, Alexey Ivanov wrote: >>> The test doesn't work on Linux either. The problem on Linux is that there are too many graphics configurations are returned. >>> >>> On my Fedora Linux 42 with two monitors, `gs[j].getConfigurations()` returns an array of length **176**. >>> >>> It could be the reason why the loop divides the number of configurations: `gc.length / 2`. >>> >>> In the end, this loop creates **176** window and a thread for each of the windows. This hangs GNOME shell completely. A few times, I was able to kill the `java` process via SSH connection, but it doesn't always help, and it still takes quite a while to get back to responsive UI. >>> >>> I'm sure this problem was discussed somewhere? (I'll search for that discussion later.) We should limit testing to default configurations only. >>> >>> As for Windows, the test could be usable on Windows and macOS if you remove replace `< gc.length / 2` with `< gc.length` as @kboulanou suggested initially. On Windows and macOS, there's usually only one configuration returned from `gs[j].getConfigurations()` for each screen. >> >> >> I tested on Ubuntu 22.04 and don't find any issues. `gs[j].getConfigurations()` returns an array of length **120**, it took sometime to get back to responsive UI but the waiting time is not that much. >> Seems creating another **38** windows and a thread for each window causing more overhead in your case. >> >> I agree that `gc.length/2` is to reduce the number of frames created on the screen to avoid the hang. >> If the testing doesn't require so many frames to create then it can be reduced for linux as well (may be 5 or something based on the `gc.length` returned from `gs[j].getConfigurations(). >> >> Since the original bug was raised for Solaris, I suggested to drop the testing for Windows and Mac. >> >> As per the bug description, `The picture is: No images or few images showed up on the second screen, but the first screen is messed up with images and text strings everywhere.`, my assumption is **creating multiple frames with images and text strings may be the requirement (although it's not clearly mentioned)**. >> >> @aivanov-jdk If we replace `< gc.length / 2` with `< gc.length` on Windows and Mac, we will have less frames to test. I agree this will make the test to run but will it add any value to it ? > >> I tested on Ubuntu 22.04 and don't find any issues. `gs[j].getConfigurations()` returns an array of length **120**, it took sometime to get back to responsive UI but the waiting time is not that much. Seems creating another **38** windows and a thread for each window causing more overhead in your case. > > I'm pretty sure it depends on hardware: how many configurations are returned and how easy the OS and CPU can handle lots of threads. > >> I agree that `gc.length/2` is to reduce the number of frames created on the screen to avoid the hang. If the testing doesn't require so many frames to create then it can be reduced for linux as well (may be 5 or something based on the `gc.length` returned from `gs[j].getConfigurations(). > > I don't see how such a huge number of windows can possibly improve testing. > > I'd say testing the default configuration which is the current one for the screen should be enough. > >> Since the original bug was raised for Solaris, I suggested to drop the testing for Windows and Mac. >> >> As per the bug description, `The picture is: No images or few images showed up on the second screen, but the first screen is messed up with images and text strings everywhere.`, my assumption is **creating multiple frames with images and text strings may be the requirement (although it's not clearly mentioned)**. > > I do not think so. > >> @aivanov-jdk If we replace `< gc.length / 2` with `< gc.length` on Windows and Mac, we will have less frames to test. I agree this will make the test to run but will it add any value to it ? > > As it looks, the test isn't valuable in its current state either way. > > I don't think we'll be able to reproduce the original problem, yet it may be possible. > > [The bug description](https://bugs.openjdk.org/browse/JDK-4312921#descriptionmodule) states, > >> No images or few images showed up on the second screen, but the first screen is messed up with images and text strings everywhere. Those wrong text strings and images stay on the first screen even after the screenTest application terminated. It seems not like the repaint problem since the images were drawn to the wrong place at the first beginning. > > Then [Phil says in his comment](https://bugs.openjdk.org/browse/JDK-4312921?focusedId=12554259&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-12554259), > >> The DGA docs are VERY misleading ? indicate that the file descriptor returned from `dga_draw_devfd` is per device. This is not always so as we discovered. > > Th... @aivanov-jdk In that case, test can be modified to run for default configuration for all platforms. ------------- PR Comment: https://git.openjdk.org/jdk/pull/24752#issuecomment-2837868859 From duke at openjdk.org Tue Apr 29 09:41:57 2025 From: duke at openjdk.org (Pabulaner IV) Date: Tue, 29 Apr 2025 09:41:57 GMT Subject: RFR: 8332947: [macos] java.awt.desktop.OpenURIHandler is not receiving events [v2] In-Reply-To: References: Message-ID: > When trying to register an open URI handler when using JavaFX with a native menu, this task fails on Mac. > Either the native menu is not shown or the URIs are not received. > > This pull request fixes this issue if AWT is registered after JavaFX, so that AWT runs embedded inside JavaFX. > It fixes this by introducing a native event to AWT, which can be used by JavaFX to forward events such as an openURL event. > > JavaFX Pull Request: https://github.com/openjdk/jfx/pull/1755 > Co-Author: @FlorianKirmaier Pabulaner IV has updated the pull request incrementally with one additional commit since the last revision: 8332947: [macos] java.awt.desktop.OpenURIHandler is not receiving events ------------- Changes: - all: https://git.openjdk.org/jdk/pull/24379/files - new: https://git.openjdk.org/jdk/pull/24379/files/15e53396..65deb15b Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=24379&range=01 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=24379&range=00-01 Stats: 22 lines in 1 file changed: 11 ins; 11 del; 0 mod Patch: https://git.openjdk.org/jdk/pull/24379.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/24379/head:pull/24379 PR: https://git.openjdk.org/jdk/pull/24379 From duke at openjdk.org Tue Apr 29 09:47:49 2025 From: duke at openjdk.org (Pabulaner IV) Date: Tue, 29 Apr 2025 09:47:49 GMT Subject: RFR: 8332947: [macos] java.awt.desktop.OpenURIHandler is not receiving events [v2] In-Reply-To: References: Message-ID: On Tue, 29 Apr 2025 09:41:57 GMT, Pabulaner IV wrote: >> When trying to register an open URI handler when using JavaFX with a native menu, this task fails on Mac. >> Either the native menu is not shown or the URIs are not received. >> >> This pull request fixes this issue if AWT is registered after JavaFX, so that AWT runs embedded inside JavaFX. >> It fixes this by introducing a native event to AWT, which can be used by JavaFX to forward events such as an openURL event. >> >> JavaFX Pull Request: https://github.com/openjdk/jfx/pull/1755 >> Co-Author: @FlorianKirmaier > > Pabulaner IV has updated the pull request incrementally with one additional commit since the last revision: > > 8332947: [macos] java.awt.desktop.OpenURIHandler is not receiving events As far as I tested it without the fix only one of the following two things works: the native menu bar or the open url handler. Because if JFX is installed first, the native menu bar works, but since AWT is then running embedded, the url handler doesn't work. If JDK / AWT is installed first the open url handler works, but not the native menu bar, since JFX is then running embedded. My fix works for the first issue, as it lets JFX send the OpenURL event to AWT and therefore fixes the issue. So I hope this answers You two questions. ------------- PR Comment: https://git.openjdk.org/jdk/pull/24379#issuecomment-2838141813 From ngubarkov at openjdk.org Tue Apr 29 09:58:46 2025 From: ngubarkov at openjdk.org (Nikita Gubarkov) Date: Tue, 29 Apr 2025 09:58:46 GMT Subject: RFR: 8353230: Emoji rendering regression after JDK-8208377 In-Reply-To: <-N8_d2SHcl-h9yG8t6-WKGF_nGLJZQTu4ymMD2oPGrg=.651c8251-b235-4681-b82a-4ee680eb6593@github.com> References: <-N8_d2SHcl-h9yG8t6-WKGF_nGLJZQTu4ymMD2oPGrg=.651c8251-b235-4681-b82a-4ee680eb6593@github.com> Message-ID: On Thu, 3 Apr 2025 11:23:42 GMT, Daniel Gredler wrote: > It looks like this regression actually fits into a longer series of fixes / regressions in this area: > > - [JDK-4517298](https://bugs.openjdk.org/browse/JDK-4517298) fixed metrics for zero-width characters, but broke some ligatures / glyph substitutions > - [JDK-7017058](https://bugs.openjdk.org/browse/JDK-7017058) fixed the ligatures / glyph substitutions, but broke some zero-width metrics > - [JDK-8208377](https://bugs.openjdk.org/browse/JDK-8208377) fixed some metrics and rendering for zero-width characters, but broke some ligatures / glyph substitutions > - Now, with this PR, we aim to fix the ligatures without re-breaking zero-width metrics and display > > We have two different types of use cases pulling `CharToGlyphMapper` in two different directions: the users who need raw, untransformed glyph info, and the users who need normalized / transformed glyph info. > > It looks to me like, in the current code base, the only `CharToGlyphMapper` user which requires raw font data is HarfBuzz (explicitly confirmed with the HarfBuzz team here: https://github.com/harfbuzz/harfbuzz/discussions/5234). > > The regression mechanism at play here is that the HarfBuzz font callbacks are currently providing HarfBuzz with transformed glyph info (e.g. ZWJ -> INVISIBLE_GLYPH_ID), which prevents HarfBuzz from recognizing and applying the correct font GSUB substitutions (which involve ZWJ). > > In order to fix this without (yet again) breaking metrics and display behavior elsewhere, I've added two methods to `CharToGlyphMapper` which provide access to raw glyph info, to be used by the HarfBuzz font callbacks: `charToGlyphRaw(int)` and `charToVariationGlyphRaw(int)`. > > Note two intricacies related to `CompositeGlyphMapper`: > 1. We need to be careful to only cache raw (untransformed) values, to avoid conflicts between requests for a raw version of a glyph and a transformed version of the same glyph. Another option would have been two separate caches, but I don't think that's necessary. > 2. Consumers who are using `CompositeGlyphMapper.SLOTMASK` to check glyph slots (e.g. `FontRunIterator` and `CTextPipe`) will "see" invisible glyphs as having come from slot 0. This isn't new, and I think it's OK, but something to be aware of. > > The glyph cache handling in `CCharToGlyphMapper` (for macOS) also requires care to avoid mixing value types. > > Please also note that I'm not sure if the tweak to `sunFont.c` is being tested, since FFM is being used by default for HarfBuzz integration. (Is there a plan to remove... By the way, I see that in each implementation, both `charToGlyph` and `charToGlyphRaw` call a common method, like `getGlyph(int uniciode, boolean raw)`. At first there was just `charToGlyph`, then `charToVariationGlyph` was added and now you added a "raw" version for each of them, I see that in the future we will need other variants and how it's already starting an exponential explosion. Overriding all of those methods in each implementation brings quite a bit of boilerplate, and it becomes easier to miss something. Maybe take a step back and refactor this into a single `charToGlyph(int unicode, int variationSelector, boolean raw)` version? Also, this `raw` parameter only really controls `isDefaultIgnorable` check in the end of each method. Maybe we could factor this out without bringing it separately into each mapper implementation? ------------- PR Comment: https://git.openjdk.org/jdk/pull/24412#issuecomment-2838175747 From mvs at openjdk.org Tue Apr 29 11:47:47 2025 From: mvs at openjdk.org (Manukumar V S) Date: Tue, 29 Apr 2025 11:47:47 GMT Subject: RFR: 8355441: Remove antipattern from PassFailJFrame.forcePass javadoc [v4] In-Reply-To: References: Message-ID: On Mon, 28 Apr 2025 20:58:41 GMT, Harshitha Onkar wrote: >> Manukumar V S has updated the pull request incrementally with one additional commit since the last revision: >> >> Updated line number in code link > > test/jdk/java/awt/regtesthelpers/PassFailJFrame.java line 1306: > >> 1304: *

A sample usage can be found in >> 1305: * {@code >> 1306: * SaveFileNameOverrideTest.java} > > Javadoc update LGTM. Maybe the doc for forceFail() can be updated similarly? > @aivanov-jdk What do you suggest? > > It can be done as a part of this PR change or a separate PR. Since it is a similar doc change, I think it can be done as part of this PR by the changing the JBS title appropriately - _Update javadocs for PassFailJFrame's forcePass() & forceFail() methods_ @honkar-jdk @aivanov-jdk Can I do it as part of [JDK-8355515](https://bugs.openjdk.org/browse/JDK-8355515)?. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/24837#discussion_r2066143887 From aivanov at openjdk.org Tue Apr 29 12:40:46 2025 From: aivanov at openjdk.org (Alexey Ivanov) Date: Tue, 29 Apr 2025 12:40:46 GMT Subject: RFR: 8355441: Remove antipattern from PassFailJFrame.forcePass javadoc [v4] In-Reply-To: References: Message-ID: <9xFxGRTe4LoQbWYRvsc1m1lQZJiEY6KCsLbDVsEpms0=.e3664b3a-cc15-41ea-b8cb-5485d137401e@github.com> On Tue, 29 Apr 2025 11:45:17 GMT, Manukumar V S wrote: >> test/jdk/java/awt/regtesthelpers/PassFailJFrame.java line 1306: >> >>> 1304: *

A sample usage can be found in >>> 1305: * {@code >>> 1306: * SaveFileNameOverrideTest.java} >> >> Javadoc update LGTM. Maybe the doc for forceFail() can be updated similarly? >> @aivanov-jdk What do you suggest? >> >> It can be done as a part of this PR change or a separate PR. Since it is a similar doc change, I think it can be done as part of this PR by the changing the JBS title appropriately - _Update javadocs for PassFailJFrame's forcePass() & forceFail() methods_ > > @honkar-jdk @aivanov-jdk Can I do it as part of [JDK-8355515](https://bugs.openjdk.org/browse/JDK-8355515)?. Absolutely! I don't want to include any changes for `forceFail` here because they're unrelated to the problem we're addressing. [The description](https://bugs.openjdk.org/browse/JDK-8355515#description) of JDK-8355515 explicitly mentions the intent: > The description of `forceFail()` should be expanded, too. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/24837#discussion_r2066231116 From aivanov at openjdk.org Tue Apr 29 12:44:50 2025 From: aivanov at openjdk.org (Alexey Ivanov) Date: Tue, 29 Apr 2025 12:44:50 GMT Subject: RFR: 8355441: Remove antipattern from PassFailJFrame.forcePass javadoc [v4] In-Reply-To: References: Message-ID: On Mon, 28 Apr 2025 20:58:41 GMT, Harshitha Onkar wrote: >> Manukumar V S has updated the pull request incrementally with one additional commit since the last revision: >> >> Updated line number in code link > > test/jdk/java/awt/regtesthelpers/PassFailJFrame.java line 1306: > >> 1304: *

A sample usage can be found in >> 1305: * {@code >> 1306: * SaveFileNameOverrideTest.java} > > Javadoc update LGTM. Maybe the doc for forceFail() can be updated similarly? > @aivanov-jdk What do you suggest? > > It can be done as a part of this PR change or a separate PR. Since it is a similar doc change, I think it can be done as part of this PR by the changing the JBS title appropriately - _Update javadocs for PassFailJFrame's forcePass() & forceFail() methods_ @honkar-jdk JBS title could be updated? I'm still against doing so. Currently, `forcePass` provides an example that shouldn't be followed. It's a problem. Expanding the docs for `forcePass` and `forceFail` would be a good addition, and I've submitted [JDK-8355515](https://bugs.openjdk.org/browse/JDK-8355515) to track this work. As I mentioned in the description of JDK-8355515, adding a section in the main javadoc of `PassFailJFrame` would be even better. Although a new section doesn't eliminate expanding documentation for the methods themselves. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/24837#discussion_r2066243311 From ngubarkov at openjdk.org Tue Apr 29 13:11:57 2025 From: ngubarkov at openjdk.org (Nikita Gubarkov) Date: Tue, 29 Apr 2025 13:11:57 GMT Subject: RFR: 8355904: Use variadic macros for J2dTrace Message-ID: <-9CAObCkXrOQCQ85CXnMswvDaWWA4OmBy699xKF2qpI=.c081bd7e-1a31-4e36-99d7-97bb2e005d83@github.com> J2dTrace macros have multiple overloads specifying number of arguments, making it less convent to change number of arguments. There were cases when existing macros were not enough and people had to add new variants with even more arguments. We could simply use variadic macros instead. Also, currently those macros expand to a { code block }, which doesn't require a semicolon at the end, so it can sometimes be missed, leading to an inconsistent code style. We could expand it directly to the function, forcing user to insert a semicolon after that, in a function-like style. ------------- Commit messages: - 8355904: Use variadic macros for J2dTrace Changes: https://git.openjdk.org/jdk/pull/24949/files Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=24949&range=00 Issue: https://bugs.openjdk.org/browse/JDK-8355904 Stats: 511 lines in 64 files changed: 0 ins; 99 del; 412 mod Patch: https://git.openjdk.org/jdk/pull/24949.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/24949/head:pull/24949 PR: https://git.openjdk.org/jdk/pull/24949 From aivanov at openjdk.org Tue Apr 29 13:32:47 2025 From: aivanov at openjdk.org (Alexey Ivanov) Date: Tue, 29 Apr 2025 13:32:47 GMT Subject: RFR: 8352149: open/test/jdk/java/awt/Frame/MultiScreenTest.java fails [v2] In-Reply-To: References: <-t5iRw5c31W0E-mPWTvHk9PoP819SUA9xrAwMZfJEDc=.c61d9c20-5397-4ab2-89ac-dab4b50b2a0e@github.com> Message-ID: On Mon, 28 Apr 2025 05:21:03 GMT, Abhishek Kumar wrote: > I'm sure this problem was discussed somewhere? (I'll search for that discussion later.) We should limit testing to default configurations only. It was in #21942, its description reads > 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 to test 300 of them The updated code reduces the number of tested graphics configurations to 10: https://github.com/openjdk/jdk/blob/edf8ce8db10521037045115f4cb9569a1477a40a/test/jdk/java/awt/Graphics2D/ScaledTransform/ScaledTransform.java#L58-L62 ------------- PR Comment: https://git.openjdk.org/jdk/pull/24752#issuecomment-2838926948 From aturbanov at openjdk.org Tue Apr 29 13:51:38 2025 From: aturbanov at openjdk.org (Andrey Turbanov) Date: Tue, 29 Apr 2025 13:51:38 GMT Subject: RFR: 8354791: Use Hashtable.putIfAbsent in CSS constructor [v2] In-Reply-To: References: Message-ID: > We can use Hashtable.putIfAbsent instead of pair `get`/`put` methods. > It's faster and cleaner. Andrey Turbanov has updated the pull request incrementally with one additional commit since the last revision: add CSS. prefix ------------- Changes: - all: https://git.openjdk.org/jdk/pull/22032/files - new: https://git.openjdk.org/jdk/pull/22032/files/64cf26d9..5de8c8f7 Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=22032&range=01 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=22032&range=00-01 Stats: 1 line in 1 file changed: 0 ins; 0 del; 1 mod Patch: https://git.openjdk.org/jdk/pull/22032.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/22032/head:pull/22032 PR: https://git.openjdk.org/jdk/pull/22032 From aturbanov at openjdk.org Tue Apr 29 13:51:40 2025 From: aturbanov at openjdk.org (Andrey Turbanov) Date: Tue, 29 Apr 2025 13:51:40 GMT Subject: RFR: 8354791: Use Hashtable.putIfAbsent in CSS constructor [v2] In-Reply-To: References: Message-ID: On Mon, 28 Apr 2025 23:40:29 GMT, Sergey Bylokhov wrote: >> Andrey Turbanov has updated the pull request incrementally with one additional commit since the last revision: >> >> add CSS. prefix > > src/java.desktop/share/classes/javax/swing/text/html/CSS.java line 737: > >> 735: valueMapper); >> 736: Object generic = new CssValue(); >> 737: for (Attribute key : Attribute.allAttributes) { > > It seems that the entire method references the Attribute class via the CSS prefix. Good catch. Updated ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/22032#discussion_r2066513730 From ngubarkov at openjdk.org Tue Apr 29 14:04:07 2025 From: ngubarkov at openjdk.org (Nikita Gubarkov) Date: Tue, 29 Apr 2025 14:04:07 GMT Subject: RFR: 8355904: Use variadic macros for J2dTrace [v2] In-Reply-To: <-9CAObCkXrOQCQ85CXnMswvDaWWA4OmBy699xKF2qpI=.c081bd7e-1a31-4e36-99d7-97bb2e005d83@github.com> References: <-9CAObCkXrOQCQ85CXnMswvDaWWA4OmBy699xKF2qpI=.c081bd7e-1a31-4e36-99d7-97bb2e005d83@github.com> Message-ID: > J2dTrace macros have multiple overloads specifying number of arguments, making it less convent to change number of arguments. There were cases when existing macros were not enough and people had to add new variants with even more arguments. We could simply use variadic macros instead. > > Also, currently those macros expand to a { code block }, which doesn't require a semicolon at the end, so it can sometimes be missed, leading to an inconsistent code style. We could expand it directly to the function, forcing user to insert a semicolon after that, in a function-like style. Nikita Gubarkov has updated the pull request incrementally with one additional commit since the last revision: fixup! 8355904: Use variadic macros for J2dTrace ------------- Changes: - all: https://git.openjdk.org/jdk/pull/24949/files - new: https://git.openjdk.org/jdk/pull/24949/files/c17d3c94..867aee60 Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=24949&range=01 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=24949&range=00-01 Stats: 1 line in 1 file changed: 0 ins; 0 del; 1 mod Patch: https://git.openjdk.org/jdk/pull/24949.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/24949/head:pull/24949 PR: https://git.openjdk.org/jdk/pull/24949 From abhiscxk at openjdk.org Tue Apr 29 14:18:48 2025 From: abhiscxk at openjdk.org (Abhishek Kumar) Date: Tue, 29 Apr 2025 14:18:48 GMT Subject: RFR: 8352149: open/test/jdk/java/awt/Frame/MultiScreenTest.java fails [v2] In-Reply-To: References: <-t5iRw5c31W0E-mPWTvHk9PoP819SUA9xrAwMZfJEDc=.c61d9c20-5397-4ab2-89ac-dab4b50b2a0e@github.com> Message-ID: On Tue, 29 Apr 2025 13:30:00 GMT, Alexey Ivanov wrote: > #21942 Thanks @aivanov-jdk for suggesting the correct route. @kboulanou Please modify the test to run for all platforms and you can limit the number of graphics configuration to 10 for linux. ------------- PR Comment: https://git.openjdk.org/jdk/pull/24752#issuecomment-2839101309 From honkar at openjdk.org Tue Apr 29 16:28:45 2025 From: honkar at openjdk.org (Harshitha Onkar) Date: Tue, 29 Apr 2025 16:28:45 GMT Subject: RFR: 8355441: Remove antipattern from PassFailJFrame.forcePass javadoc [v4] In-Reply-To: References: Message-ID: <320ICTED3FWO-FWn6YneVJFsSXf36Tv1AoyWon-8Sx4=.1597af65-4e60-4559-8a85-661f14ac4631@github.com> On Sat, 26 Apr 2025 01:28:53 GMT, Manukumar V S wrote: >> The javadoc for PassFailJFrame.forcePass suggests an anti-pattern of forcibly passing the test if a resource is unavailable. >> >> If a resource is unavailable or a feature isn't supported, the test should throw jtreg.SkippedException. >> >> PassFailJFrame.forcePass should be used in semi-automatic tests when the test determines that all the conditions for passing the test are met. >> Please refer: JDK-8355366 and https://github.com/openjdk/jdk/pull/24820 >> >> Testing >> This is a javadoc change, so not testing required. > > Manukumar V S has updated the pull request incrementally with one additional commit since the last revision: > > Updated line number in code link Marked as reviewed by honkar (Reviewer). ------------- PR Review: https://git.openjdk.org/jdk/pull/24837#pullrequestreview-2804297916 From honkar at openjdk.org Tue Apr 29 16:28:46 2025 From: honkar at openjdk.org (Harshitha Onkar) Date: Tue, 29 Apr 2025 16:28:46 GMT Subject: RFR: 8355441: Remove antipattern from PassFailJFrame.forcePass javadoc [v4] In-Reply-To: References: Message-ID: <55key3JJ-fjVSqJRnsRGXimhlQSOceBurCu4OVEqkZQ=.4e759336-cbb0-49f1-af90-420f239a9db8@github.com> On Tue, 29 Apr 2025 12:42:28 GMT, Alexey Ivanov wrote: >> test/jdk/java/awt/regtesthelpers/PassFailJFrame.java line 1306: >> >>> 1304: *

A sample usage can be found in >>> 1305: * {@code >>> 1306: * SaveFileNameOverrideTest.java} >> >> Javadoc update LGTM. Maybe the doc for forceFail() can be updated similarly? >> @aivanov-jdk What do you suggest? >> >> It can be done as a part of this PR change or a separate PR. Since it is a similar doc change, I think it can be done as part of this PR by the changing the JBS title appropriately - _Update javadocs for PassFailJFrame's forcePass() & forceFail() methods_ > > @honkar-jdk JBS title could be updated? I'm still against doing so. > > Currently, `forcePass` provides an example that shouldn't be followed. It's a problem. > > Expanding the docs for `forcePass` and `forceFail` would be a good addition, but it's not such a big issue. I've submitted [JDK-8355515](https://bugs.openjdk.org/browse/JDK-8355515) to track this work. > > As I mentioned in the description of JDK-8355515, adding a section in the main javadoc of `PassFailJFrame` would be even better. Although a new section doesn't eliminate expanding documentation for the methods themselves. Sounds good to me if forceFail() docs is going to be handled as separate issue. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/24837#discussion_r2066927589 From duke at openjdk.org Tue Apr 29 16:32:33 2025 From: duke at openjdk.org (Pabulaner IV) Date: Tue, 29 Apr 2025 16:32:33 GMT Subject: RFR: 8332947: [macos] java.awt.desktop.OpenURIHandler is not receiving events [v3] In-Reply-To: References: Message-ID: > When trying to register an open URI handler when using JavaFX with a native menu, this task fails on Mac. > Either the native menu is not shown or the URIs are not received. > > This pull request fixes this issue if AWT is registered after JavaFX, so that AWT runs embedded inside JavaFX. > It fixes this by introducing a native event to AWT, which can be used by JavaFX to forward events such as an openURL event. > > JavaFX Pull Request: https://github.com/openjdk/jfx/pull/1755 > Co-Author: @FlorianKirmaier Pabulaner IV has updated the pull request incrementally with one additional commit since the last revision: Applied debug.patch ------------- Changes: - all: https://git.openjdk.org/jdk/pull/24379/files - new: https://git.openjdk.org/jdk/pull/24379/files/65deb15b..9e7924b3 Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=24379&range=02 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=24379&range=01-02 Stats: 16 lines in 1 file changed: 16 ins; 0 del; 0 mod Patch: https://git.openjdk.org/jdk/pull/24379.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/24379/head:pull/24379 PR: https://git.openjdk.org/jdk/pull/24379 From duke at openjdk.org Tue Apr 29 16:38:02 2025 From: duke at openjdk.org (Pabulaner IV) Date: Tue, 29 Apr 2025 16:38:02 GMT Subject: RFR: 8332947: [macos] java.awt.desktop.OpenURIHandler is not receiving events [v4] In-Reply-To: References: Message-ID: <1VCEm8Fdk5fz8ZdMzukWow8GCw1y9ajZBdFNCbrtm8U=.e44d8c73-55d6-4aef-91b8-6ca9a0ecc4f0@github.com> > When trying to register an open URI handler when using JavaFX with a native menu, this task fails on Mac. > Either the native menu is not shown or the URIs are not received. > > This pull request fixes this issue if AWT is registered after JavaFX, so that AWT runs embedded inside JavaFX. > It fixes this by introducing a native event to AWT, which can be used by JavaFX to forward events such as an openURL event. > > JavaFX Pull Request: https://github.com/openjdk/jfx/pull/1755 > Co-Author: @FlorianKirmaier Pabulaner IV has updated the pull request incrementally with one additional commit since the last revision: 8332947: [macos] java.awt.desktop.OpenURIHandler is not receiving events ------------- Changes: - all: https://git.openjdk.org/jdk/pull/24379/files - new: https://git.openjdk.org/jdk/pull/24379/files/9e7924b3..5e5b87df Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=24379&range=03 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=24379&range=02-03 Stats: 16 lines in 1 file changed: 0 ins; 16 del; 0 mod Patch: https://git.openjdk.org/jdk/pull/24379.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/24379/head:pull/24379 PR: https://git.openjdk.org/jdk/pull/24379 From mvs at openjdk.org Tue Apr 29 16:45:51 2025 From: mvs at openjdk.org (Manukumar V S) Date: Tue, 29 Apr 2025 16:45:51 GMT Subject: Integrated: 8355441: Remove antipattern from PassFailJFrame.forcePass javadoc In-Reply-To: References: Message-ID: <6O0F9bRl1MVIksybrZ9Vz58sLLExs_arbxibdVJ5crk=.29a7b7a7-9722-467d-98c0-7045650c13ba@github.com> On Wed, 23 Apr 2025 23:50:06 GMT, Manukumar V S wrote: > The javadoc for PassFailJFrame.forcePass suggests an anti-pattern of forcibly passing the test if a resource is unavailable. > > If a resource is unavailable or a feature isn't supported, the test should throw jtreg.SkippedException. > > PassFailJFrame.forcePass should be used in semi-automatic tests when the test determines that all the conditions for passing the test are met. > Please refer: JDK-8355366 and https://github.com/openjdk/jdk/pull/24820 > > Testing > This is a javadoc change, so not testing required. This pull request has now been integrated. Changeset: bd7561c3 Author: Manukumar V S Committer: Harshitha Onkar URL: https://git.openjdk.org/jdk/commit/bd7561c315e8fd80e32cb154998bd28745c98682 Stats: 10 lines in 1 file changed: 2 ins; 0 del; 8 mod 8355441: Remove antipattern from PassFailJFrame.forcePass javadoc Reviewed-by: aivanov, honkar ------------- PR: https://git.openjdk.org/jdk/pull/24837 From kcr at openjdk.org Tue Apr 29 20:16:47 2025 From: kcr at openjdk.org (Kevin Rushforth) Date: Tue, 29 Apr 2025 20:16:47 GMT Subject: RFR: 8332947: [macos] java.awt.desktop.OpenURIHandler is not receiving events [v2] In-Reply-To: References: Message-ID: On Tue, 29 Apr 2025 09:45:37 GMT, Pabulaner IV wrote: > As far as I tested it without the fix only one of the following two things works: the native menu bar or the open url handler. When you say "native menu bar" I presume you mean the JavaFX SystemMenuBar feature, right? > Because if JFX is installed first, the native menu bar works, but since AWT is then running embedded, the url handler doesn't work. If JDK / AWT is installed first the open url handler works, but not the native menu bar, since JFX is then running embedded. This is what I expected, and answers question 1: the OpenURIHandler feature doesn't work when JavaFX is initialized first and AWT is running embedded. > My fix works for the first issue, as it lets JFX send the OpenURL event to AWT and therefore fixes it. This doesn't answer question 2, which was _how_ this fixes the problem. As I said above: "In the case where AWT is running embedded, the `[ApplicationDelegate init]` receiver never gets called." So the code you moved / added in `ApplicationDelegate::init` shouldn't ever be executed in the case you are trying to make work. So I don't understand how this PR, which is the AWT portion of the fix, can possibly make any difference in the failing case. That's why I provided the debug patch and asked if you could do a test run, adding the log output as a comment or attachment. ------------- PR Comment: https://git.openjdk.org/jdk/pull/24379#issuecomment-2840131193 From serb at openjdk.org Tue Apr 29 20:30:50 2025 From: serb at openjdk.org (Sergey Bylokhov) Date: Tue, 29 Apr 2025 20:30:50 GMT Subject: RFR: 8288471: java/awt/ScrollPane/bug8077409Test.java is unstable and fails intermittently in CI [v4] In-Reply-To: References: Message-ID: On Mon, 28 Apr 2025 09:32:26 GMT, Manukumar V S wrote: >> java/awt/ScrollPane/bug8077409Test.java is unstable and fails intermittently in CI, especially in MacOS machines. >> Also the frame created in this test is not disposed which may interfere with other tests. >> >> Fix: >> Some stabilisations added and the frame is disposed properly. >> >> Testing: >> Tested 100 times per platform(macosx-x64,macosx-aarch64,windows-x64,linux-x64) and got all PASS. >> I have also tested this on Windows-x64 with JDK 8u60b04 and JDK 8u60b20 as the original issue related to this test(JDK-8077409) was fixed in JDK 8u60b20. >> With JDK 8u60b04: >> Exception in thread "main" java.lang.RuntimeException: Wrong position of component in ScrollPane >> at bug8077409Test.main(bug8077409Test.java:142) >> >> With JDK 8u60b20: >> Passed..... > > Manukumar V S has updated the pull request incrementally with one additional commit since the last revision: > > Review comments fixed : Removed unwanted code and updated copyright year Marked as reviewed by serb (Reviewer). ------------- PR Review: https://git.openjdk.org/jdk/pull/24292#pullrequestreview-2804989563 From achung at openjdk.org Tue Apr 29 20:31:51 2025 From: achung at openjdk.org (Alisen Chung) Date: Tue, 29 Apr 2025 20:31:51 GMT Subject: RFR: 8345538: Robot.mouseMove doesn't clamp bounds on macOS when trying to move mouse off screen [v11] In-Reply-To: References: Message-ID: <5eX-W4QVC3rAl-stH-geqadwoXIuYNR02tcNnY93I-8=.de2a402f-675e-48ac-ad29-b40f3b894f96@github.com> On Thu, 13 Mar 2025 16:27:48 GMT, Alexander Zvegintsev wrote: >> src/java.desktop/share/classes/java/awt/Robot.java line 258: >> >>> 256: >>> 257: if (leastXDiff > leastYDiff) { >>> 258: peer.mouseMove(finX2, finY2); >> >> Let's say I have the following display configuration on Linux. Since it uses Xinerama, it shares the same coordinate system. >> >> java.awt.Rectangle[x=0,y=0,width=3440,height=1440] >> java.awt.Rectangle[x=3440,y=0,width=1440,height=2560] >> >> ![image](https://github.com/user-attachments/assets/1953442c-fa18-49a0-99eb-b633152d83f6) >> >> When I try to move the mouse to `x=20000,y=200`, I see that it clamps to `x=3439,y=200` (a point between 2 screens), while before it was `x=4879,y=200`(a rightmost point). >> >> The old behavior seems more logical to me. > > Here are a few cases where it still seems to fail after the update: > > > Title: secondary above the primary > Cmd: xrandr --output DP-0 --primary --pos 0x1440 --rotate normal --preferred --output DP-2 --pos 0x0 --rotate normal --preferred > > screen #0 java.awt.Rectangle[x=0,y=1440,width=3440,height=1440] > screen #1 java.awt.Rectangle[x=0,y=0,width=2560,height=1440] > > > > x 20000 y 200 [moving to] > - x 2559 y 200 [actual location] # before fix > + x 3439 y 1440 [actual location] # after fix > > > --- > > > Title: primary above the secondary, right side aligned > Cmd: xrandr --output DP-0 --primary --pos 0x0 --rotate normal --preferred --output DP-2 --pos 880x1440 --rotate normal --preferred > > screen #0 java.awt.Rectangle[x=0,y=0,width=3440,height=1440] > screen #1 java.awt.Rectangle[x=880,y=1440,width=2560,height=1440] > > > > x 200 y 20000 [moving to] > - x 200 y 1439 [actual location] > + x 880 y 2879 [actual location] > > > --- > > > Title: secondary above the primary, right side aligned > Cmd: xrandr --output DP-0 --primary --pos 0x1440 --rotate normal --preferred --output DP-2 --pos 880x0 --rotate normal --preferred > > screen #0 java.awt.Rectangle[x=0,y=1440,width=3440,height=1440] > screen #1 java.awt.Rectangle[x=880,y=0,width=2560,height=1440] > > > > x -20000 y 200 [moving to] > - x 880 y 200 [actual location] > + x 0 y 1440 [actual location] > > x 200 y -20000 [moving to] > - x 200 y 1440 [actual location] > + x 880 y 0 [actual location] These failures when moving to the offscreen point are actually because the new onscreen point being moved to is closer distance-wise than the onscreen point it would have moved to before the fix. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/22781#discussion_r2067372976 From duke at openjdk.org Tue Apr 29 22:43:03 2025 From: duke at openjdk.org (Pabulaner IV) Date: Tue, 29 Apr 2025 22:43:03 GMT Subject: RFR: 8332947: [macos] java.awt.desktop.OpenURIHandler is not receiving events [v5] In-Reply-To: References: Message-ID: > When trying to register an open URI handler when using JavaFX with a native menu, this task fails on Mac. > Either the native menu is not shown or the URIs are not received. > > This pull request fixes this issue if AWT is registered after JavaFX, so that AWT runs embedded inside JavaFX. > It fixes this by introducing a native event to AWT, which can be used by JavaFX to forward events such as an openURL event. > > JavaFX Pull Request: https://github.com/openjdk/jfx/pull/1755 > Co-Author: @FlorianKirmaier Pabulaner IV has updated the pull request incrementally with three additional commits since the last revision: - 8332947: [macos] java.awt.desktop.OpenURIHandler is not receiving events - 8332947: [macos] java.awt.desktop.OpenURIHandler is not receiving events - 8332947: [macos] java.awt.desktop.OpenURIHandler is not receiving events ------------- Changes: - all: https://git.openjdk.org/jdk/pull/24379/files - new: https://git.openjdk.org/jdk/pull/24379/files/5e5b87df..1aa1831d Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=24379&range=04 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=24379&range=03-04 Stats: 7 lines in 1 file changed: 6 ins; 1 del; 0 mod Patch: https://git.openjdk.org/jdk/pull/24379.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/24379/head:pull/24379 PR: https://git.openjdk.org/jdk/pull/24379 From duke at openjdk.org Tue Apr 29 22:47:48 2025 From: duke at openjdk.org (Pabulaner IV) Date: Tue, 29 Apr 2025 22:47:48 GMT Subject: RFR: 8332947: [macos] java.awt.desktop.OpenURIHandler is not receiving events [v5] In-Reply-To: References: Message-ID: On Tue, 29 Apr 2025 22:43:03 GMT, Pabulaner IV wrote: >> When trying to register an open URI handler when using JavaFX with a native menu, this task fails on Mac. >> Either the native menu is not shown or the URIs are not received. >> >> This pull request fixes this issue if AWT is registered after JavaFX, so that AWT runs embedded inside JavaFX. >> It fixes this by introducing a native event to AWT, which can be used by JavaFX to forward events such as an openURL event. >> >> JavaFX Pull Request: https://github.com/openjdk/jfx/pull/1755 >> Co-Author: @FlorianKirmaier > > Pabulaner IV has updated the pull request incrementally with three additional commits since the last revision: > > - 8332947: [macos] java.awt.desktop.OpenURIHandler is not receiving events > - 8332947: [macos] java.awt.desktop.OpenURIHandler is not receiving events > - 8332947: [macos] java.awt.desktop.OpenURIHandler is not receiving events Answer to question 2: I found the issue and moved the registration of the embedded event handler up. This way the embedded events can be received, even if AWT runs embedded. This would be the output for the after mode: 2025-04-30 00:34:18.757 OpenUriFxApp[68480:1192435] sharedDelegate 2025-04-30 00:34:18.757 OpenUriFxApp[68480:1192435] ApplicationDelegate::sharedDelegate: shouldInstall=0, isApplicationOwner=0, overrideDelegate=0 Apr 30, 2025 12:34:19 AM de.pabulaner.openurifx.OpenUriFxApp log INFO: Menu: true 2025-04-30 00:34:19.587 OpenUriFxApp[68480:1192435] sharedDelegate 2025-04-30 00:34:19.654 OpenUriFxApp[68480:1192435] +[IMKClient subclass]: chose IMKClient_Modern 2025-04-30 00:34:19.654 OpenUriFxApp[68480:1192435] +[IMKInputSession subclass]: chose IMKInputSession_Modern 2025-04-30 00:34:23.862 OpenUriFxApp[68480:1192435] AWT: ApplicationDelegate::_embeddedEvent 2025-04-30 00:34:23.862 OpenUriFxApp[68480:1192435] AWT: ApplicationDelegate::_openURL: openurifx://hello Apr 30, 2025 12:34:23 AM de.pabulaner.openurifx.OpenUriFxApp log ------------- PR Comment: https://git.openjdk.org/jdk/pull/24379#issuecomment-2840397615 PR Comment: https://git.openjdk.org/jdk/pull/24379#issuecomment-2840399384 From serb at openjdk.org Tue Apr 29 23:25:52 2025 From: serb at openjdk.org (Sergey Bylokhov) Date: Tue, 29 Apr 2025 23:25:52 GMT Subject: RFR: 8354791: Use Hashtable.putIfAbsent in CSS constructor [v2] In-Reply-To: References: Message-ID: <_clDszdb3FJDAOecN6F5b9lE0jZSpXnec7A80Rpa0UQ=.9ffa5497-deb3-4c16-836f-1bf791b9ca35@github.com> On Tue, 29 Apr 2025 13:51:38 GMT, Andrey Turbanov wrote: >> We can use Hashtable.putIfAbsent instead of pair `get`/`put` methods. >> It's faster and cleaner. > > Andrey Turbanov has updated the pull request incrementally with one additional commit since the last revision: > > add CSS. prefix Marked as reviewed by serb (Reviewer). ------------- PR Review: https://git.openjdk.org/jdk/pull/22032#pullrequestreview-2805304709 From duke at openjdk.org Wed Apr 30 03:15:47 2025 From: duke at openjdk.org (duke) Date: Wed, 30 Apr 2025 03:15:47 GMT Subject: RFR: 8288471: java/awt/ScrollPane/bug8077409Test.java is unstable and fails intermittently in CI [v4] In-Reply-To: References: Message-ID: On Mon, 28 Apr 2025 09:32:26 GMT, Manukumar V S wrote: >> java/awt/ScrollPane/bug8077409Test.java is unstable and fails intermittently in CI, especially in MacOS machines. >> Also the frame created in this test is not disposed which may interfere with other tests. >> >> Fix: >> Some stabilisations added and the frame is disposed properly. >> >> Testing: >> Tested 100 times per platform(macosx-x64,macosx-aarch64,windows-x64,linux-x64) and got all PASS. >> I have also tested this on Windows-x64 with JDK 8u60b04 and JDK 8u60b20 as the original issue related to this test(JDK-8077409) was fixed in JDK 8u60b20. >> With JDK 8u60b04: >> Exception in thread "main" java.lang.RuntimeException: Wrong position of component in ScrollPane >> at bug8077409Test.main(bug8077409Test.java:142) >> >> With JDK 8u60b20: >> Passed..... > > Manukumar V S has updated the pull request incrementally with one additional commit since the last revision: > > Review comments fixed : Removed unwanted code and updated copyright year @manukumarvs Your change (at version 13d1deebe20adb7b2e477ffb806f8179cbb7e99c) is now ready to be sponsored by a Committer. ------------- PR Comment: https://git.openjdk.org/jdk/pull/24292#issuecomment-2840692921 From serb at openjdk.org Wed Apr 30 03:19:46 2025 From: serb at openjdk.org (Sergey Bylokhov) Date: Wed, 30 Apr 2025 03:19:46 GMT Subject: RFR: 8355904: Use variadic macros for J2dTrace [v2] In-Reply-To: References: <-9CAObCkXrOQCQ85CXnMswvDaWWA4OmBy699xKF2qpI=.c081bd7e-1a31-4e36-99d7-97bb2e005d83@github.com> Message-ID: On Tue, 29 Apr 2025 14:04:07 GMT, Nikita Gubarkov wrote: >> J2dTrace macros have multiple overloads specifying number of arguments, making it less convent to change number of arguments. There were cases when existing macros were not enough and people had to add new variants with even more arguments. We could simply use variadic macros instead. >> >> Also, currently those macros expand to a { code block }, which doesn't require a semicolon at the end, so it can sometimes be missed, leading to an inconsistent code style. We could expand it directly to the function, forcing user to insert a semicolon after that, in a function-like style. > > Nikita Gubarkov has updated the pull request incrementally with one additional commit since the last revision: > > fixup! 8355904: Use variadic macros for J2dTrace src/java.desktop/share/native/libawt/java2d/Trace.h line 58: > 56: #ifndef DEBUG > 57: #define J2dTrace(level, ...) > 58: #define J2dTraceLn(level, ...) This looks fine, but maybe the string argument could be included as a parameter? Would that improve usability, like better error messages when no arguments are provided, or enhance auto-completion in the IDE?" ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/24949#discussion_r2067790343 From ngubarkov at openjdk.org Wed Apr 30 06:17:50 2025 From: ngubarkov at openjdk.org (Nikita Gubarkov) Date: Wed, 30 Apr 2025 06:17:50 GMT Subject: RFR: 8355904: Use variadic macros for J2dTrace [v2] In-Reply-To: References: <-9CAObCkXrOQCQ85CXnMswvDaWWA4OmBy699xKF2qpI=.c081bd7e-1a31-4e36-99d7-97bb2e005d83@github.com> Message-ID: On Wed, 30 Apr 2025 03:16:49 GMT, Sergey Bylokhov wrote: >> Nikita Gubarkov has updated the pull request incrementally with one additional commit since the last revision: >> >> fixup! 8355904: Use variadic macros for J2dTrace > > src/java.desktop/share/native/libawt/java2d/Trace.h line 58: > >> 56: #ifndef DEBUG >> 57: #define J2dTrace(level, ...) >> 58: #define J2dTraceLn(level, ...) > > This looks fine, but maybe the string argument could be included as a parameter? Would that improve usability, like better error messages when no arguments are provided, or enhance auto-completion in the IDE?" There is a trailing comma problem when passing no extra args. I didn't figure out how to solve it without `__VA_OPT__` or compiler-specific tricks, so I moved the string into variadic part, so that it always has at least one parameter. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/24949#discussion_r2067922150 From jwaters at openjdk.org Wed Apr 30 10:31:50 2025 From: jwaters at openjdk.org (Julian Waters) Date: Wed, 30 Apr 2025 10:31:50 GMT Subject: RFR: 8355561: [macos] Build failure with Xcode 16.3 In-Reply-To: References: Message-ID: On Mon, 28 Apr 2025 19:47:03 GMT, Sergey Bylokhov wrote: > Multiple similar issues detected in PLATFORM_API_MacOSX_Ports.cpp more info about https://github.com/llvm/llvm-project/issues/62836 > > jdk/src/java.desktop/macosx/native/libjsound/PLATFORM_API_MacOSX_Ports.cpp:127:39: error: variable length arrays in C++ are a Clang extension [-Werror,-Wvla-cxx-extension] > 127 | AudioDeviceID devices[count]; > | ^~~~~ > jdk/src/java.desktop/macosx/native/libjsound/PLATFORM_API_MacOSX_Ports.cpp:127:39: note: read of non-const variable 'count' is not allowed in a constant expression > jdk/src/java.desktop/macosx/native/libjsound/PLATFORM_API_MacOSX_Ports.cpp:126:21: note: declared here > 126 | int count = size/sizeof(AudioDeviceID); > > The usage of VLA has been replaced with malloc/calloc and free, which are already used in this file. > > Note that while this patch adds some validation, I am pretty sure it is still possible to crash these code paths if they are executed concurrently. Access to the native pointers being passed around is not properly synchronized. Why not new and delete? ------------- PR Comment: https://git.openjdk.org/jdk/pull/24937#issuecomment-2841530732 From aturbanov at openjdk.org Wed Apr 30 11:31:55 2025 From: aturbanov at openjdk.org (Andrey Turbanov) Date: Wed, 30 Apr 2025 11:31:55 GMT Subject: Integrated: 8354791: Use Hashtable.putIfAbsent in CSS constructor In-Reply-To: References: Message-ID: On Tue, 12 Nov 2024 09:13:07 GMT, Andrey Turbanov wrote: > We can use Hashtable.putIfAbsent instead of pair `get`/`put` methods. > It's faster and cleaner. This pull request has now been integrated. Changeset: 0110acaa Author: Andrey Turbanov URL: https://git.openjdk.org/jdk/commit/0110acaa9086e5adb49be4fff06d66f96b821119 Stats: 6 lines in 1 file changed: 0 ins; 4 del; 2 mod 8354791: Use Hashtable.putIfAbsent in CSS constructor Reviewed-by: serb, aivanov ------------- PR: https://git.openjdk.org/jdk/pull/22032 From aivanov at openjdk.org Wed Apr 30 11:34:56 2025 From: aivanov at openjdk.org (Alexey Ivanov) Date: Wed, 30 Apr 2025 11:34:56 GMT Subject: RFR: 8354791: Use Hashtable.putIfAbsent in CSS constructor [v2] In-Reply-To: References: Message-ID: On Tue, 29 Apr 2025 13:51:38 GMT, Andrey Turbanov wrote: >> We can use Hashtable.putIfAbsent instead of pair `get`/`put` methods. >> It's faster and cleaner. > > Andrey Turbanov has updated the pull request incrementally with one additional commit since the last revision: > > add CSS. prefix I ran the client tests again two days ago, the CI was green. ------------- PR Comment: https://git.openjdk.org/jdk/pull/22032#issuecomment-2841687654 From rmahajan at openjdk.org Wed Apr 30 12:26:02 2025 From: rmahajan at openjdk.org (Rajat Mahajan) Date: Wed, 30 Apr 2025 12:26:02 GMT Subject: Integrated: 8351884: Refactor bug8033699.java test code In-Reply-To: References: Message-ID: On Wed, 2 Apr 2025 17:34:34 GMT, Rajat Mahajan wrote: > Details: > Refactored code as requested in the Bug description. > > Tested and verified the test passes. This pull request has now been integrated. Changeset: 482538b1 Author: Rajat Mahajan Committer: Alexey Ivanov URL: https://git.openjdk.org/jdk/commit/482538b100856afe2252395d47e576e6c6d885ce Stats: 89 lines in 1 file changed: 37 ins; 3 del; 49 mod 8351884: Refactor bug8033699.java test code Reviewed-by: aivanov, honkar, dmarkov ------------- PR: https://git.openjdk.org/jdk/pull/24384 From aivanov at openjdk.org Wed Apr 30 12:28:55 2025 From: aivanov at openjdk.org (Alexey Ivanov) Date: Wed, 30 Apr 2025 12:28:55 GMT Subject: RFR: 8347826: Introspector shows wrong method list after 8071693 [v12] In-Reply-To: References: <0645YLoDLjcLbjQxBs3QFCFVvenQjAeJlZANZ0hay_8=.e50b8551-4a2f-4cc5-b910-5f5544beb1f7@github.com> Message-ID: On Wed, 23 Apr 2025 00:25:20 GMT, Alexander Zvegintsev wrote: > FYI, one of the JCK introspector tests fails because of this change. The test is quite complicated, so I am not able to provide a simple reproducer right away. But I'll post it later. Indeed, there are some failures of JCK Introspector tests. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/23443#discussion_r2068557678 From azvegint at openjdk.org Wed Apr 30 15:09:51 2025 From: azvegint at openjdk.org (Alexander Zvegintsev) Date: Wed, 30 Apr 2025 15:09:51 GMT Subject: RFR: 8345538: Robot.mouseMove doesn't clamp bounds on macOS when trying to move mouse off screen [v11] In-Reply-To: <5eX-W4QVC3rAl-stH-geqadwoXIuYNR02tcNnY93I-8=.de2a402f-675e-48ac-ad29-b40f3b894f96@github.com> References: <5eX-W4QVC3rAl-stH-geqadwoXIuYNR02tcNnY93I-8=.de2a402f-675e-48ac-ad29-b40f3b894f96@github.com> Message-ID: On Tue, 29 Apr 2025 20:28:57 GMT, Alisen Chung wrote: >> Here are a few cases where it still seems to fail after the update: >> >> >> Title: secondary above the primary >> Cmd: xrandr --output DP-0 --primary --pos 0x1440 --rotate normal --preferred --output DP-2 --pos 0x0 --rotate normal --preferred >> >> screen #0 java.awt.Rectangle[x=0,y=1440,width=3440,height=1440] >> screen #1 java.awt.Rectangle[x=0,y=0,width=2560,height=1440] >> >> >> >> x 20000 y 200 [moving to] >> - x 2559 y 200 [actual location] # before fix >> + x 3439 y 1440 [actual location] # after fix >> >> >> --- >> >> >> Title: primary above the secondary, right side aligned >> Cmd: xrandr --output DP-0 --primary --pos 0x0 --rotate normal --preferred --output DP-2 --pos 880x1440 --rotate normal --preferred >> >> screen #0 java.awt.Rectangle[x=0,y=0,width=3440,height=1440] >> screen #1 java.awt.Rectangle[x=880,y=1440,width=2560,height=1440] >> >> >> >> x 200 y 20000 [moving to] >> - x 200 y 1439 [actual location] >> + x 880 y 2879 [actual location] >> >> >> --- >> >> >> Title: secondary above the primary, right side aligned >> Cmd: xrandr --output DP-0 --primary --pos 0x1440 --rotate normal --preferred --output DP-2 --pos 880x0 --rotate normal --preferred >> >> screen #0 java.awt.Rectangle[x=0,y=1440,width=3440,height=1440] >> screen #1 java.awt.Rectangle[x=880,y=0,width=2560,height=1440] >> >> >> >> x -20000 y 200 [moving to] >> - x 880 y 200 [actual location] >> + x 0 y 1440 [actual location] >> >> x 200 y -20000 [moving to] >> - x 200 y 1440 [actual location] >> + x 880 y 0 [actual location] > > These failures when moving to the offscreen point are actually because the new onscreen point being moved to is closer distance-wise than the onscreen point it would have moved to before the fix. I think it doesn't look like expected behavior anyway, the pre-clamping one seems more reasonable to me (as for Linux, haven't tested other platforms). Anyway, if the we are only having issues getting the mouse pointer coordinates after moving it off-screen on macos, I guess the fix shouldn't change shared code and other platforms. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/22781#discussion_r2068877072 From duke at openjdk.org Wed Apr 30 16:36:47 2025 From: duke at openjdk.org (Khalid Boulanouare) Date: Wed, 30 Apr 2025 16:36:47 GMT Subject: RFR: 8352149: open/test/jdk/java/awt/Frame/MultiScreenTest.java fails [v2] In-Reply-To: References: <-t5iRw5c31W0E-mPWTvHk9PoP819SUA9xrAwMZfJEDc=.c61d9c20-5397-4ab2-89ac-dab4b50b2a0e@github.com> Message-ID: On Tue, 29 Apr 2025 14:15:40 GMT, Abhishek Kumar wrote: >>> I'm sure this problem was discussed somewhere? (I'll search for that discussion later.) We should limit testing to default configurations only. >> >> It was in #21942, its description reads >> >>> 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 to test 300 of them >> >> The updated code reduces the number of tested graphics configurations to 10: >> >> https://github.com/openjdk/jdk/blob/edf8ce8db10521037045115f4cb9569a1477a40a/test/jdk/java/awt/Graphics2D/ScaledTransform/ScaledTransform.java#L58-L62 > >> #21942 > > Thanks @aivanov-jdk for suggesting the correct route. > > @kboulanou Please modify the test to run for all platforms and you can limit the number of graphics configuration to 10 for linux. @kumarabhi006 Changes done and tested on MacOS. Will test on Linux and Windows next. ------------- PR Comment: https://git.openjdk.org/jdk/pull/24752#issuecomment-2842585897 From duke at openjdk.org Wed Apr 30 17:05:54 2025 From: duke at openjdk.org (Khalid Boulanouare) Date: Wed, 30 Apr 2025 17:05:54 GMT Subject: RFR: 8352149: open/test/jdk/java/awt/Frame/MultiScreenTest.java fails [v3] In-Reply-To: <-t5iRw5c31W0E-mPWTvHk9PoP819SUA9xrAwMZfJEDc=.c61d9c20-5397-4ab2-89ac-dab4b50b2a0e@github.com> References: <-t5iRw5c31W0E-mPWTvHk9PoP819SUA9xrAwMZfJEDc=.c61d9c20-5397-4ab2-89ac-dab4b50b2a0e@github.com> Message-ID: > Fixes issue in which the test fails when run on multi-screen machine. > > Tested on Ubuntu 24.04, MacOS 15 and Windows 11 > > JTREG > > runner starting test: java/awt/Frame/MultiScreenTest.java > runner finished test: java/awt/Frame/MultiScreenTest.java > Passed. Execution successful Khalid Boulanouare has updated the pull request incrementally with 205 additional commits since the last revision: - 8352149: open/test/jdk/java/awt/Frame/MultiScreenTest.java fails in MacOS - 8342886: Update MET timezone in TimeZoneNames files Reviewed-by: naoto - 8351565: Implement JEP 502: Stable Values (Preview) Co-authored-by: Maurizio Cimadamore Reviewed-by: vklang, jvernee, alanb, liach - 8351000: StringBuilder getChar and putChar robustness Reviewed-by: liach, lancea, rgiulietti, pminborg - 8351884: Refactor bug8033699.java test code Reviewed-by: aivanov, honkar, dmarkov - 8354791: Use Hashtable.putIfAbsent in CSS constructor Reviewed-by: serb, aivanov - 8354145: G1: UseCompressedOops boundary is calculated on maximum heap region size instead of maxiumum ergonomic heap region size Reviewed-by: tschatzl, ayang - 8355878: RISC-V: jdk/incubator/vector/DoubleMaxVectorTests.java fails when using RVV Reviewed-by: fyang, dzhang - 8352422: [ubsan] Out-of-range reported in ciMethod.cpp:917:20: runtime error: 2.68435e+09 is outside the range of representable values of type 'int' Reviewed-by: epeter, dlong - 8355370: Include server name in HTTP test server thread names to improve diagnostics Reviewed-by: dfuchs, jpai - ... and 195 more: https://git.openjdk.org/jdk/compare/0c26af8a...b78429de ------------- Changes: - all: https://git.openjdk.org/jdk/pull/24752/files - new: https://git.openjdk.org/jdk/pull/24752/files/0c26af8a..b78429de Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=24752&range=02 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=24752&range=01-02 Stats: 54262 lines in 1395 files changed: 42175 ins; 7692 del; 4395 mod Patch: https://git.openjdk.org/jdk/pull/24752.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/24752/head:pull/24752 PR: https://git.openjdk.org/jdk/pull/24752 From duke at openjdk.org Wed Apr 30 17:06:39 2025 From: duke at openjdk.org (Khalid Boulanouare) Date: Wed, 30 Apr 2025 17:06:39 GMT Subject: RFR: 8352149: open/test/jdk/java/awt/Frame/MultiScreenTest.java fails [v4] In-Reply-To: <-t5iRw5c31W0E-mPWTvHk9PoP819SUA9xrAwMZfJEDc=.c61d9c20-5397-4ab2-89ac-dab4b50b2a0e@github.com> References: <-t5iRw5c31W0E-mPWTvHk9PoP819SUA9xrAwMZfJEDc=.c61d9c20-5397-4ab2-89ac-dab4b50b2a0e@github.com> Message-ID: > Fixes issue in which the test fails when run on multi-screen machine. > > Tested on Ubuntu 24.04, MacOS 15 and Windows 11 > > JTREG > > runner starting test: java/awt/Frame/MultiScreenTest.java > runner finished test: java/awt/Frame/MultiScreenTest.java > Passed. Execution successful Khalid Boulanouare has updated the pull request with a new target base due to a merge or a rebase. The pull request now contains one commit: 8352149: test/jdk/java/awt/Frame/MultiScreenTest.java fails in MacOS ------------- Changes: https://git.openjdk.org/jdk/pull/24752/files Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=24752&range=03 Stats: 2 lines in 1 file changed: 0 ins; 0 del; 2 mod Patch: https://git.openjdk.org/jdk/pull/24752.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/24752/head:pull/24752 PR: https://git.openjdk.org/jdk/pull/24752 From duke at openjdk.org Wed Apr 30 17:08:46 2025 From: duke at openjdk.org (Khalid Boulanouare) Date: Wed, 30 Apr 2025 17:08:46 GMT Subject: RFR: 8352149: open/test/jdk/java/awt/Frame/MultiScreenTest.java fails [v2] In-Reply-To: References: <-t5iRw5c31W0E-mPWTvHk9PoP819SUA9xrAwMZfJEDc=.c61d9c20-5397-4ab2-89ac-dab4b50b2a0e@github.com> Message-ID: On Tue, 29 Apr 2025 14:15:40 GMT, Abhishek Kumar wrote: >>> I'm sure this problem was discussed somewhere? (I'll search for that discussion later.) We should limit testing to default configurations only. >> >> It was in #21942, its description reads >> >>> 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 to test 300 of them >> >> The updated code reduces the number of tested graphics configurations to 10: >> >> https://github.com/openjdk/jdk/blob/edf8ce8db10521037045115f4cb9569a1477a40a/test/jdk/java/awt/Graphics2D/ScaledTransform/ScaledTransform.java#L58-L62 > >> #21942 > > Thanks @aivanov-jdk for suggesting the correct route. > > @kboulanou Please modify the test to run for all platforms and you can limit the number of graphics configuration to 10 for linux. @kumarabhi006 I am aware that I should not force push to PR. But, I made the mistake of pushing updates (sync) from master to this PR so it added 200 commits to this PR, which will make the PR confusing. I should have updated master and fork and rebased my branch on it and then push to PR. I will be more careful in the future. Please suggest if this is OK. Thanks. ------------- PR Comment: https://git.openjdk.org/jdk/pull/24752#issuecomment-2842672649 From aivanov at openjdk.org Wed Apr 30 17:24:46 2025 From: aivanov at openjdk.org (Alexey Ivanov) Date: Wed, 30 Apr 2025 17:24:46 GMT Subject: RFR: 8352149: open/test/jdk/java/awt/Frame/MultiScreenTest.java fails [v2] In-Reply-To: References: <-t5iRw5c31W0E-mPWTvHk9PoP819SUA9xrAwMZfJEDc=.c61d9c20-5397-4ab2-89ac-dab4b50b2a0e@github.com> Message-ID: On Tue, 29 Apr 2025 14:15:40 GMT, Abhishek Kumar wrote: >>> I'm sure this problem was discussed somewhere? (I'll search for that discussion later.) We should limit testing to default configurations only. >> >> It was in #21942, its description reads >> >>> 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 to test 300 of them >> >> The updated code reduces the number of tested graphics configurations to 10: >> >> https://github.com/openjdk/jdk/blob/edf8ce8db10521037045115f4cb9569a1477a40a/test/jdk/java/awt/Graphics2D/ScaledTransform/ScaledTransform.java#L58-L62 > >> #21942 > > Thanks @aivanov-jdk for suggesting the correct route. > > @kboulanou Please modify the test to run for all platforms and you can limit the number of graphics configuration to 10 for linux. > @kumarabhi006 I am aware that I should not force push to PR. But, I made the mistake of pushing updates (sync) from master to this PR so it added 200 commits to this PR, which will make the PR confusing. I should have updated master and fork and rebased my branch on it and then push to PR. I will be more careful in the future. Please suggest if this is OK. Thanks. @kboulanou Merging master is safe. **Don't use `git rebase`**, though. Never use `git rebase` after you published your branch for PR. If you merge (sync) changes from master, Git won't show them as differences. The PR compares your branch to master. By merging, you add more commits that already exist in master, which means no changes between master and your branch are added. ------------- PR Comment: https://git.openjdk.org/jdk/pull/24752#issuecomment-2842733768 From serb at openjdk.org Wed Apr 30 18:14:47 2025 From: serb at openjdk.org (Sergey Bylokhov) Date: Wed, 30 Apr 2025 18:14:47 GMT Subject: RFR: 8355561: [macos] Build failure with Xcode 16.3 In-Reply-To: References: Message-ID: On Wed, 30 Apr 2025 10:29:36 GMT, Julian Waters wrote: > Why not new and delete? In most cases, we allocate raw buffers that are filled by macOS. We could use "std::vector+try/catch" instead, but since malloc/free is already used in this code, I followed the same pattern for consistency. ------------- PR Comment: https://git.openjdk.org/jdk/pull/24937#issuecomment-2842886004 From honkar at openjdk.org Wed Apr 30 19:42:10 2025 From: honkar at openjdk.org (Harshitha Onkar) Date: Wed, 30 Apr 2025 19:42:10 GMT Subject: RFR: JDK-8355528 : Update HarfBuzz to 11.2.0 Message-ID: HarfBuzz upgraded to 11.2.0 4 newly added files and 99 modified files. ------------- Commit messages: - .md file - updated files - newly added files Changes: https://git.openjdk.org/jdk/pull/24973/files Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=24973&range=00 Issue: https://bugs.openjdk.org/browse/JDK-8355528 Stats: 7130 lines in 104 files changed: 3723 ins; 2257 del; 1150 mod Patch: https://git.openjdk.org/jdk/pull/24973.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/24973/head:pull/24973 PR: https://git.openjdk.org/jdk/pull/24973 From duke at openjdk.org Wed Apr 30 19:51:55 2025 From: duke at openjdk.org (ScientificWare) Date: Wed, 30 Apr 2025 19:51:55 GMT Subject: RFR: JDK-8314731 : Add support for the alt attribute in the image type input HTML tag [v10] In-Reply-To: References: Message-ID: On Mon, 9 Dec 2024 09:56:15 GMT, ScientificWare wrote: >> This is referenced in Java Bug Database as >> - [JDK-8314731 : Adds support for the alt attribute in the image type input HTML tag.](https://bugs.java.com/bugdatabase/view_bug?bug_id=8314731) >> >> This is tracked in JBS as >> - [JDK-8314731 : Add support for the alt attribute in the image type input HTML tag](https://bugs.openjdk.java.net/browse/JDK-8314731) >> >> According [HTML 3.2 specification](https://www.w3.org/TR/2018/SPSD-html32-20180315/#input) >> >> `alt` is not an attribute of the `input` element. >> >> According [HTML 4.01 specifications](https://www.w3.org/TR/html4/interact/forms.html#h-17.4) : >> >>> ... For accessibility reasons, authors should provide [alternate text](https://www.w3.org/TR/html4/struct/objects.html#alternate-text) for the image via the [alt](https://www.w3.org/TR/html4/struct/objects.html#adef-alt) attribute. ... >> >> This feature is not implemented in `FormView.java`. >> >> ?? ~~This also affects the HTML 32 DTD~~ >> >> ![Screenshot_20230817_025316](https://github.com/openjdk/jdk/assets/19194678/8e580574-d842-4a65-884b-26e33cd12138) >> >> Left before the patch and right after the patch. >> >> >> import java.awt.BorderLayout; >> import java.awt.Dimension; >> import javax.swing.JEditorPane; >> import javax.swing.JFrame; >> import javax.swing.JScrollPane; >> import javax.swing.SwingUtilities; >> import javax.swing.text.Document; >> import javax.swing.text.html.HTMLEditorKit; >> import javax.swing.text.html.StyleSheet; >> >> public class HTMLAddsSupportAltInputTag { >> public static void main(String[] args) { >> new HTMLAddsSupportAltInputTag(); >> } >> >> public HTMLAddsSupportAltInputTag() { >> SwingUtilities.invokeLater(new Runnable(){ >> public void run(){ >> JEditorPane jEditorPane = new JEditorPane(); >> jEditorPane.setEditable(false); >> JScrollPane scrollPane = new JScrollPane(jEditorPane); >> HTMLEditorKit kit = new HTMLEditorKit(); >> jEditorPane.setEditorKit(kit); >> StyleSheet styleSheet = kit.getStyleSheet(); >> styleSheet.addRule(""" >> body { >> color: #000; >> font-family:times; >> margin: 4px; >> } >> """); >> String htmlString = """ >> >> >> >>

>> - Merge master > - Replaces this title with "alt attribute test in HTML image type input". > > Moves this test to /jdk/test/jdk/javax/swing/text/html. > - bug8314731.java : Corrects the CopyRight date. > - FormView.java : > Removes a whitespace > > bug8314731.java : > Adds a newline at end of file. > - getMaximumSpan(int axis) method > doc -> Not used > > mouseReleased(MouseEvent evt) method > elem and hdoc -> not used > return -> could be removed, method returns void > > loadElementDataIntoBuffer(Element elem, StringBuilder buffer) method > value != null -> name can't be null at this point > > getInputElementData(AttributeSet attr) method > value = null -> Already set at null > - ... and 15 more: https://git.openjdk.org/jdk/compare/69e664de...9b423808 Awaiting review. ------------- PR Comment: https://git.openjdk.org/jdk/pull/15319#issuecomment-2843109700 From duke at openjdk.org Wed Apr 30 20:59:49 2025 From: duke at openjdk.org (Khalid Boulanouare) Date: Wed, 30 Apr 2025 20:59:49 GMT Subject: RFR: 8352149: open/test/jdk/java/awt/Frame/MultiScreenTest.java fails [v2] In-Reply-To: References: <-t5iRw5c31W0E-mPWTvHk9PoP819SUA9xrAwMZfJEDc=.c61d9c20-5397-4ab2-89ac-dab4b50b2a0e@github.com> Message-ID: On Wed, 30 Apr 2025 17:21:21 GMT, Alexey Ivanov wrote: >>> #21942 >> >> Thanks @aivanov-jdk for suggesting the correct route. >> >> @kboulanou Please modify the test to run for all platforms and you can limit the number of graphics configuration to 10 for linux. > >> @kumarabhi006 I am aware that I should not force push to PR. But, I made the mistake of pushing updates (sync) from master to this PR so it added 200 commits to this PR, which will make the PR confusing. I should have updated master and fork and rebased my branch on it and then push to PR. I will be more careful in the future. Please suggest if this is OK. Thanks. > > @kboulanou Merging master is safe. > > **Don't use `git rebase`**, though. Never use `git rebase` after you published your branch for PR. > > If you merge (sync) changes from master, Git won't show them as differences. The PR compares your branch to master. By merging, you add more commits that already exist in master, which means no changes between master and your branch are added. @aivanov-jdk Thank you for explaining how to include new master branch changes to PR, the right way. I will stick to this in the future and make sure PR respect history from master branch. Thank you again. ------------- PR Comment: https://git.openjdk.org/jdk/pull/24752#issuecomment-2843263633 From achung at openjdk.org Wed Apr 30 21:13:12 2025 From: achung at openjdk.org (Alisen Chung) Date: Wed, 30 Apr 2025 21:13:12 GMT Subject: RFR: 8345538: Robot.mouseMove doesn't clamp bounds on macOS when trying to move mouse off screen [v13] In-Reply-To: References: Message-ID: <9AGmijUihfKByG0s85OTZWydgd_Njke32gzQ4CgYI_g=.343e3960-d0c5-419a-9baa-2e031da66665@github.com> > 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.getPointerInfo().getLocation() you will get the value of the offscreen point. > > Windows and linux do this clamping and coordinate handling for us, but new distributions may not necessarily handle clamping the same way, so Robot should be checking for clamping rather than delegating it to native. > > This fix updates shared code to cache the screen bounds and adds a check to not exceed the bounds in mouseMove. The caching is done in the Robot constructor, so if the screen bounds changes the constructor must be called again to update to the new bounds. Alisen Chung has updated the pull request with a new target base due to a merge or a rebase. The pull request now contains 17 commits: - Merge branch 'master' of https://github.com/openjdk/jdk into 8345538 - move clamping code into macos - use absolute distance to choose correct screen for offscreen clamping - helper function - grab screen data on mouseMove - fix bounds - peer.mouseMove - fix implementation - robot update - Revert "robot multimonitor fix" This reverts commit 5734165881a66dc48d5a9f19e02bf63fac57cdc9. - ... and 7 more: https://git.openjdk.org/jdk/compare/8b16897b...e0a5c872 ------------- Changes: https://git.openjdk.org/jdk/pull/22781/files Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=22781&range=12 Stats: 119 lines in 2 files changed: 117 ins; 0 del; 2 mod Patch: https://git.openjdk.org/jdk/pull/22781.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/22781/head:pull/22781 PR: https://git.openjdk.org/jdk/pull/22781 From serb at openjdk.org Wed Apr 30 21:13:31 2025 From: serb at openjdk.org (Sergey Bylokhov) Date: Wed, 30 Apr 2025 21:13:31 GMT Subject: RFR: 8339561: The test/jdk/java/awt/Paint/ListRepaint.java may fail after JDK-8327401 [v8] In-Reply-To: References: Message-ID: <921TX92Dnccn7l-fJaYtCFKTS75DFx53RjyAgMDgeWs=.898b73b2-703b-4c9a-827b-562bdfc513e7@github.com> > Several tests modified by https://github.com/openjdk/jdk/pull/19339 have been tweaked, see inline comments. > > Notes: > * We have a few XXXRepaint.java tests and in this patch, I updated all of them to follow the change added to the ListRepaint.java > > @azvegint @aivanov-jdk please take a look. Sergey Bylokhov has updated the pull request with a new target base due to a merge or a rebase. The pull request now contains 16 commits: - Merge branch 'openjdk:master' into JDK-8339561 - Merge branch 'openjdk:master' into JDK-8339561 - drop null check - copyright - Merge branch 'openjdk:master' into JDK-8339561 - more volatiles - revert change reported in JDK-8339791 - trigger github for new content - trigger github for new content - Merge branch 'master' into JDK-8339561 - ... and 6 more: https://git.openjdk.org/jdk/compare/4cc19ba5...c7648d0c ------------- Changes: https://git.openjdk.org/jdk/pull/20861/files Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=20861&range=07 Stats: 174 lines in 7 files changed: 48 ins; 45 del; 81 mod Patch: https://git.openjdk.org/jdk/pull/20861.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/20861/head:pull/20861 PR: https://git.openjdk.org/jdk/pull/20861 From dnguyen at openjdk.org Wed Apr 30 21:20:48 2025 From: dnguyen at openjdk.org (Damon Nguyen) Date: Wed, 30 Apr 2025 21:20:48 GMT Subject: RFR: JDK-8355528 : Update HarfBuzz to 11.2.0 In-Reply-To: References: Message-ID: On Wed, 30 Apr 2025 19:37:29 GMT, Harshitha Onkar wrote: > HarfBuzz upgraded to 11.2.0 > > 4 newly added files and 99 modified files. Marked as reviewed by dnguyen (Committer). ------------- PR Review: https://git.openjdk.org/jdk/pull/24973#pullrequestreview-2808475596 From serb at openjdk.org Wed Apr 30 21:20:50 2025 From: serb at openjdk.org (Sergey Bylokhov) Date: Wed, 30 Apr 2025 21:20:50 GMT Subject: RFR: 8345538: Robot.mouseMove doesn't clamp bounds on macOS when trying to move mouse off screen [v11] In-Reply-To: References: <741DjI-uVAuf4pjN9MqVaKz2iEI-qr-L9c6KCbP7IlY=.e46c1d54-4b0f-4cc3-b572-043923972212@github.com> Message-ID: <6A6RT3ZqccBhAhdhEaSDc3Ri0yUWw61Alc2xbYHtXfI=.24af6c9c-b6b8-4f3e-a4c6-61143685eef2@github.com> On Tue, 25 Mar 2025 15:36:40 GMT, Sergey Bylokhov wrote: > So this seems to be a bug in macOS, as the reported mouse location is incorrect while it is actually positioned at the edge? > > Probably, there are other macOS APIs that could be used to implement Java_sun_lwawt_macosx_CCursorManager_nativeGetCursorPosition. Or perhaps the methods within it should be called on the appkit thread - I see a potential race, since the mouse is moved asynchronously on appkit, but the coordinates are fetched on the current thread. Did you have a chance to check our implementation of setting and getting the cursor? ------------- PR Comment: https://git.openjdk.org/jdk/pull/22781#issuecomment-2843306094