From honkar at openjdk.org Fri Sep 1 00:04:18 2023 From: honkar at openjdk.org (Harshitha Onkar) Date: Fri, 1 Sep 2023 00:04:18 GMT Subject: RFR: JDK-8311113: Remove invalid pointer cast and clean up setLabel() in awt_MenuItem.cpp [v4] In-Reply-To: <-UpmI9X_txepgRxGnsfSTtjwmqPQgtjeA5gqo-wmuGk=.3c84af65-e29e-4eeb-b393-efa9c990e721@github.com> References: <-UpmI9X_txepgRxGnsfSTtjwmqPQgtjeA5gqo-wmuGk=.3c84af65-e29e-4eeb-b393-efa9c990e721@github.com> Message-ID: > In awt_MenuItem.cpp (712,22): ` mii.dwTypeData = (LPTSTR)(*sb)` produces invalid pointer cast warning when complied on clang and moreover this is a no-op. > > `mii.dwTypeData` is used only when **MIIM_STRING** flag is set in the fMask (as per [Docs](https://learn.microsoft.com/en-us/windows/win32/api/winuser/ns-winuser-menuiteminfoa)), which is not the case in JDK [Ln#705](https://github.com/openjdk/jdk/blob/e56d3bc2dab3d32453b6eda66e8434953c436084/src/java.desktop/windows/native/libawt/windows/awt_MenuItem.cpp#L706). Hence the assignment ` mii.dwTypeData = (LPTSTR)(*sb)` is not required and so is the label parameter. Additionally necessary cleanup is done at the following places - > > - WMenuItemPeer.java - to the native function call > - awt_MenuItem.cpp - `WMenuItemPeer__1setLabel() ,_SetLabel(), SetLabel()` > - awt_MenuItem.h > > Added a test which checks setLabel() functionality on Menu, MenuItem and PopupMenu. 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/15276/files - new: https://git.openjdk.org/jdk/pull/15276/files/47b4a0c6..5222cca7 Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=15276&range=03 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=15276&range=02-03 Stats: 2 lines in 1 file changed: 0 ins; 0 del; 2 mod Patch: https://git.openjdk.org/jdk/pull/15276.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/15276/head:pull/15276 PR: https://git.openjdk.org/jdk/pull/15276 From psadhukhan at openjdk.org Fri Sep 1 04:22:50 2023 From: psadhukhan at openjdk.org (Prasanta Sadhukhan) Date: Fri, 1 Sep 2023 04:22:50 GMT Subject: RFR: 8258970: Disabled JPasswordField foreground color is wrong with GTK LAF [v2] In-Reply-To: References: Message-ID: On Mon, 21 Aug 2023 10:42:07 GMT, Abhishek Kumar wrote: >> Disabled JPasswordField foreground color was not grayed out in GTK LAF. >> >> The foreground color in disabled state was close to black color (RGB 0,0,0) for password field which is not differentiable from enabled state foreground color. >> >> To fix for this problem, the widget type is changed to `TEXT_AREA `for disable password field which returns the foreground color as gray. Checked with Oracle linux as well and fix worked fine. >> >> An automated test case has been added and checked in CI, link is added in JBS. Test mentioned in JBS also works fine with the fix. > > Abhishek Kumar has updated the pull request incrementally with one additional commit since the last revision: > > Fix extended for TextField, FormattedTextField, Spinner src/java.desktop/unix/native/libawt_xawt/awt/gtk3_interface.c line 2413: > 2411: && state_type == GTK_STATE_INSENSITIVE && color_type == TEXT_FOREGROUND) { > 2412: widget_type = TEXT_AREA; > 2413: } I guess l2403 has same checks which can be clubbed together if (widget_type == TEXT_FIELD || widget_type == PASSWORD_FIELD || widget_type == SPINNER_TEXT_FIELD || widget_type == FORMATTED_TEXT_FIELD) { if (state_type == GTK_STATE_SELECTED && color_type == TEXT_BACKGROUND} || state_type == GTK_STATE_INSENSITIVE && color_type == TEXT_FOREGROUND) { widget_type = TEXT_AREA; } } What do you think? test/jdk/javax/swing/JPasswordField/TestDisabledPasswordFieldForegroundColor.java line 67: > 65: boolean testFail = false; > 66: robot = new Robot(); > 67: robot.setAutoDelay(1000); autoDelay normally is 100ms ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/15263#discussion_r1312520289 PR Review Comment: https://git.openjdk.org/jdk/pull/15263#discussion_r1312520363 From serb at openjdk.org Fri Sep 1 05:43:18 2023 From: serb at openjdk.org (Sergey Bylokhov) Date: Fri, 1 Sep 2023 05:43:18 GMT Subject: RFR: 8313220: Remove Windows specific workaround in LCMS.c for _snprintf Message-ID: This patch addresses two issues: * For Windows: The snprintf is available with Visual Studio 2015 and above, so we do not need to use the windows speciific "_snprintf". We also do not need to set a zero at the end of the string since the "new" snprintf works according c99: see this [link](https://learn.microsoft.com/en-us/cpp/c-runtime-library/reference/snprintf-snprintf-snprintf-l-snwprintf-snwprintf-l?view=msvc-170#behavior-summary) for details. * For unix: It seems the standard snprintf does not guaratier that the zero is set at the start of the string if error is occured and the negative value is returned. It could be fixed by checking the return value and set zero manually, but I just decided to memset the whole array to zero, that is shorte and should not affect the performance in this error handler. See some discussin at the end of [this](https://github.com/openjdk/jdk/pull/10625) PR The new test just covered the changed code path and verifies that it works as expected. ------------- Commit messages: - better compression - save some space - test - 8313220: Remove Windows specific workaround in LCMS.c for _snprintf Changes: https://git.openjdk.org/jdk/pull/15396/files Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=15396&range=00 Issue: https://bugs.openjdk.org/browse/JDK-8313220 Stats: 94 lines in 3 files changed: 80 ins; 11 del; 3 mod Patch: https://git.openjdk.org/jdk/pull/15396.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/15396/head:pull/15396 PR: https://git.openjdk.org/jdk/pull/15396 From kizune at openjdk.org Fri Sep 1 06:07:48 2023 From: kizune at openjdk.org (Alexander Zuev) Date: Fri, 1 Sep 2023 06:07:48 GMT Subject: RFR: 8283214: [macos] Screen magnifier does not show the magnified text for JcomboBox [v7] In-Reply-To: References: Message-ID: On Tue, 25 Jul 2023 11:59:20 GMT, Abhishek Kumar wrote: >> The issue exist only for non-editable combobox and the root cause is accessible object is not created due to incorrect index returned from component class which results in no a11y API invoked. >> >> Proposed solution is to return the correct accessible child from getAccessibleChild method which is AquaComboBoxButton (arrowButton) instance and that results in invoking the a11y APIs to return the current selected item in combobox. >> >> Further when the application comes up first time the accessible name is not set for current displayed item in JCombobox that is handled in AquaComboBoxButton which will take care for the current selected item as well as if user modifies the selection by drop-down list. >> >> CI link is posted in JBS. > > Abhishek Kumar has updated the pull request incrementally with one additional commit since the last revision: > > Revert BasicComboBoxUI fix and update review comment src/java.desktop/macosx/classes/com/apple/laf/AquaComboBoxButton.java line 253: > 251: > 252: // set the accessible name to the displayed text in JComboBox. > 253: // screen magnifier queries to get the accessible name to display magnified text. I still do not think that setting accessible name in paint is a good idea. Setting it during the initialization and adding a property change listener to the accessible context to track changes seems like a better way to do it. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/14497#discussion_r1312608188 From abhiscxk at openjdk.org Fri Sep 1 08:00:28 2023 From: abhiscxk at openjdk.org (Abhishek Kumar) Date: Fri, 1 Sep 2023 08:00:28 GMT Subject: RFR: 8258970: Disabled JPasswordField foreground color is wrong with GTK LAF [v3] In-Reply-To: References: Message-ID: > Disabled JPasswordField foreground color was not grayed out in GTK LAF. > > The foreground color in disabled state was close to black color (RGB 0,0,0) for password field which is not differentiable from enabled state foreground color. > > To fix for this problem, the widget type is changed to `TEXT_AREA `for disable password field which returns the foreground color as gray. Checked with Oracle linux as well and fix worked fine. > > An automated test case has been added and checked in CI, link is added in JBS. Test mentioned in JBS also works fine with the fix. Abhishek Kumar has updated the pull request incrementally with one additional commit since the last revision: review comment update ------------- Changes: - all: https://git.openjdk.org/jdk/pull/15263/files - new: https://git.openjdk.org/jdk/pull/15263/files/cbe5816a..25591d1d Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=15263&range=02 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=15263&range=01-02 Stats: 12 lines in 2 files changed: 4 ins; 4 del; 4 mod Patch: https://git.openjdk.org/jdk/pull/15263.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/15263/head:pull/15263 PR: https://git.openjdk.org/jdk/pull/15263 From abhiscxk at openjdk.org Fri Sep 1 08:00:33 2023 From: abhiscxk at openjdk.org (Abhishek Kumar) Date: Fri, 1 Sep 2023 08:00:33 GMT Subject: RFR: 8258970: Disabled JPasswordField foreground color is wrong with GTK LAF [v2] In-Reply-To: References: Message-ID: <4MwgNzJlXJ6_JQnckHJzdBHbosDnq8GJZ2b4TKle54k=.2d708a30-ffd6-4991-a65c-3216015bce95@github.com> On Fri, 1 Sep 2023 04:17:04 GMT, Prasanta Sadhukhan wrote: >> Abhishek Kumar has updated the pull request incrementally with one additional commit since the last revision: >> >> Fix extended for TextField, FormattedTextField, Spinner > > src/java.desktop/unix/native/libawt_xawt/awt/gtk3_interface.c line 2413: > >> 2411: && state_type == GTK_STATE_INSENSITIVE && color_type == TEXT_FOREGROUND) { >> 2412: widget_type = TEXT_AREA; >> 2413: } > > I guess l2403 has same checks which can be clubbed together > > if (widget_type == TEXT_FIELD || widget_type == PASSWORD_FIELD > || widget_type == SPINNER_TEXT_FIELD || widget_type == FORMATTED_TEXT_FIELD) { > if (state_type == GTK_STATE_SELECTED && color_type == TEXT_BACKGROUND} > || state_type == GTK_STATE_INSENSITIVE && color_type == TEXT_FOREGROUND) { > widget_type = TEXT_AREA; > } > } > > > What do you think? I think it's better to clubbed them, updated as per suggestion. > test/jdk/javax/swing/JPasswordField/TestDisabledPasswordFieldForegroundColor.java line 67: > >> 65: boolean testFail = false; >> 66: robot = new Robot(); >> 67: robot.setAutoDelay(1000); > > autoDelay normally is 100ms Done. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/15263#discussion_r1312697730 PR Review Comment: https://git.openjdk.org/jdk/pull/15263#discussion_r1312697914 From abhiscxk at openjdk.org Fri Sep 1 09:20:51 2023 From: abhiscxk at openjdk.org (Abhishek Kumar) Date: Fri, 1 Sep 2023 09:20:51 GMT Subject: RFR: 8283214: [macos] Screen magnifier does not show the magnified text for JcomboBox [v7] In-Reply-To: References: Message-ID: On Fri, 1 Sep 2023 06:05:09 GMT, Alexander Zuev wrote: >> Abhishek Kumar has updated the pull request incrementally with one additional commit since the last revision: >> >> Revert BasicComboBoxUI fix and update review comment > > src/java.desktop/macosx/classes/com/apple/laf/AquaComboBoxButton.java line 253: > >> 251: >> 252: // set the accessible name to the displayed text in JComboBox. >> 253: // screen magnifier queries to get the accessible name to display magnified text. > > I still do not think that setting accessible name in paint is a good idea. Setting it during the initialization and adding a property change listener to the accessible context to track changes seems like a better way to do it. Ok, I will check this. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/14497#discussion_r1312790194 From aivanov at openjdk.org Fri Sep 1 10:22:49 2023 From: aivanov at openjdk.org (Alexey Ivanov) Date: Fri, 1 Sep 2023 10:22:49 GMT Subject: RFR: 8283214: [macos] Screen magnifier does not show the magnified text for JcomboBox [v7] In-Reply-To: References: Message-ID: On Fri, 1 Sep 2023 09:18:09 GMT, Abhishek Kumar wrote: >> src/java.desktop/macosx/classes/com/apple/laf/AquaComboBoxButton.java line 253: >> >>> 251: >>> 252: // set the accessible name to the displayed text in JComboBox. >>> 253: // screen magnifier queries to get the accessible name to display magnified text. >> >> I still do not think that setting accessible name in paint is a good idea. Setting it during the initialization and adding a property change listener to the accessible context to track changes seems like a better way to do it. > > Ok, I will check this. > I still do not think that setting accessible name in paint is a good idea. It's been my biggest concern. But I didn't even think about it this way. The problem is that the displayed value is known only when the component is painted. Other components seem to handle it? somehow. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/14497#discussion_r1312851560 From mbaesken at openjdk.org Fri Sep 1 11:10:02 2023 From: mbaesken at openjdk.org (Matthias Baesken) Date: Fri, 1 Sep 2023 11:10:02 GMT Subject: RFR: JDK-8315499: build using devkit on Linux ppc64le RHEL puts path to devkit into libsplashscreen Message-ID: <_s3s_wxEckaR0nFvdyRDSaBCTU2IA9k9yCh7JZC7AHM=.9a472847-9bc4-437e-8829-a2da354aa3b2@github.com> After looking at the build results of a jdk22 build on RHEL 8.4 Linux ppc64le that uses a ppc64le-linux-gnu-to-ppc64le-linux-gnu-fedora27-gcc11.3.0 devkit we observed those unwanted paths in libsplashscreen.so . See those objdump and ldd output : objdump -x ./lib/libsplashscreen.so | grep PATH RUNPATH /mydevkitsfolder/devkits/ppc64le-linux-gnu-to-ppc64le-linux-gnu-fedora27-gcc11.3.0/ppc64le-linux-gnu/sysroot/usr/lib64:$ORIGIN ldd ./lib/libsplashscreen.so ldd: warning: you do not have execution permission for `./lib/libsplashscreen.so' . . . libX11.so.6 => /mydevkitsfolder/devkits/ppc64le-linux-gnu-to-ppc64le-linux-gnu-fedora27-gcc11.3.0/ppc64le-linux-gnu/sysroot/usr/lib64/libX11.so.6 (0x00007fffa3920000) libXext.so.6 => /mydevkitsfolder/devkits/ppc64le-linux-gnu-to-ppc64le-linux-gnu-fedora27-gcc11.3.0/ppc64le-linux-gnu/sysroot/usr/lib64/libXext.so.6 (0x00007fffa38e0000) . . . These paths were introduced by the '-R' setting, but it seems to be highly dependent on the environment. But the '-R' setting should better be avoided anyway when the devkit is used. ------------- Commit messages: - JDK-8315499 Changes: https://git.openjdk.org/jdk/pull/15534/files Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=15534&range=00 Issue: https://bugs.openjdk.org/browse/JDK-8315499 Stats: 5 lines in 1 file changed: 4 ins; 0 del; 1 mod Patch: https://git.openjdk.org/jdk/pull/15534.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/15534/head:pull/15534 PR: https://git.openjdk.org/jdk/pull/15534 From psadhukhan at openjdk.org Fri Sep 1 11:23:40 2023 From: psadhukhan at openjdk.org (Prasanta Sadhukhan) Date: Fri, 1 Sep 2023 11:23:40 GMT Subject: RFR: 8258970: Disabled JPasswordField foreground color is wrong with GTK LAF [v3] In-Reply-To: References: Message-ID: <_rZ_RWopYrkAFsJR1PpieKZtv5p-S5MiPX24JuU5RGI=.0a64b584-fe6c-42ec-b4cc-bcd4be7297be@github.com> On Fri, 1 Sep 2023 08:00:28 GMT, Abhishek Kumar wrote: >> Disabled JPasswordField foreground color was not grayed out in GTK LAF. >> >> The foreground color in disabled state was close to black color (RGB 0,0,0) for password field which is not differentiable from enabled state foreground color. >> >> To fix for this problem, the widget type is changed to `TEXT_AREA `for disable password field which returns the foreground color as gray. Checked with Oracle linux as well and fix worked fine. >> >> An automated test case has been added and checked in CI, link is added in JBS. Test mentioned in JBS also works fine with the fix. > > Abhishek Kumar has updated the pull request incrementally with one additional commit since the last revision: > > review comment update src/java.desktop/unix/native/libawt_xawt/awt/gtk3_interface.c line 2409: > 2407: } else if (state_type == GTK_STATE_INSENSITIVE && color_type == TEXT_FOREGROUND) { > 2408: widget_type = TEXT_AREA; > 2409: } I think there's no need of another else if It can be just if ((state_type == GTK_STATE_SELECTED && color_type == TEXT_BACKGROUND)) || (state_type == GTK_STATE_INSENSITIVE && color_type == TEXT_FOREGROUND)) { widget_type =TEXT_AREA: ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/15263#discussion_r1312905129 From abhiscxk at openjdk.org Fri Sep 1 11:39:45 2023 From: abhiscxk at openjdk.org (Abhishek Kumar) Date: Fri, 1 Sep 2023 11:39:45 GMT Subject: RFR: 8258970: Disabled JPasswordField foreground color is wrong with GTK LAF [v4] In-Reply-To: References: Message-ID: > Disabled JPasswordField foreground color was not grayed out in GTK LAF. > > The foreground color in disabled state was close to black color (RGB 0,0,0) for password field which is not differentiable from enabled state foreground color. > > To fix for this problem, the widget type is changed to `TEXT_AREA `for disable password field which returns the foreground color as gray. Checked with Oracle linux as well and fix worked fine. > > An automated test case has been added and checked in CI, link is added in JBS. Test mentioned in JBS also works fine with the fix. Abhishek Kumar has updated the pull request incrementally with one additional commit since the last revision: condition clubbed together ------------- Changes: - all: https://git.openjdk.org/jdk/pull/15263/files - new: https://git.openjdk.org/jdk/pull/15263/files/25591d1d..c48eed64 Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=15263&range=03 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=15263&range=02-03 Stats: 5 lines in 1 file changed: 0 ins; 1 del; 4 mod Patch: https://git.openjdk.org/jdk/pull/15263.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/15263/head:pull/15263 PR: https://git.openjdk.org/jdk/pull/15263 From abhiscxk at openjdk.org Fri Sep 1 11:39:47 2023 From: abhiscxk at openjdk.org (Abhishek Kumar) Date: Fri, 1 Sep 2023 11:39:47 GMT Subject: RFR: 8258970: Disabled JPasswordField foreground color is wrong with GTK LAF [v3] In-Reply-To: <_rZ_RWopYrkAFsJR1PpieKZtv5p-S5MiPX24JuU5RGI=.0a64b584-fe6c-42ec-b4cc-bcd4be7297be@github.com> References: <_rZ_RWopYrkAFsJR1PpieKZtv5p-S5MiPX24JuU5RGI=.0a64b584-fe6c-42ec-b4cc-bcd4be7297be@github.com> Message-ID: On Fri, 1 Sep 2023 11:21:07 GMT, Prasanta Sadhukhan wrote: >> Abhishek Kumar has updated the pull request incrementally with one additional commit since the last revision: >> >> review comment update > > src/java.desktop/unix/native/libawt_xawt/awt/gtk3_interface.c line 2409: > >> 2407: } else if (state_type == GTK_STATE_INSENSITIVE && color_type == TEXT_FOREGROUND) { >> 2408: widget_type = TEXT_AREA; >> 2409: } > > I think there's no need of another else if > It can be just > > if ((state_type == GTK_STATE_SELECTED && color_type == TEXT_BACKGROUND)) || > (state_type == GTK_STATE_INSENSITIVE && color_type == TEXT_FOREGROUND)) { > widget_type =TEXT_AREA: > Yeah, that's correct. Updated. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/15263#discussion_r1312915885 From psadhukhan at openjdk.org Fri Sep 1 12:00:42 2023 From: psadhukhan at openjdk.org (Prasanta Sadhukhan) Date: Fri, 1 Sep 2023 12:00:42 GMT Subject: RFR: 8258970: Disabled JPasswordField foreground color is wrong with GTK LAF [v4] In-Reply-To: References: Message-ID: On Fri, 1 Sep 2023 11:39:45 GMT, Abhishek Kumar wrote: >> Disabled JPasswordField foreground color was not grayed out in GTK LAF. >> >> The foreground color in disabled state was close to black color (RGB 0,0,0) for password field which is not differentiable from enabled state foreground color. >> >> To fix for this problem, the widget type is changed to `TEXT_AREA `for disable password field which returns the foreground color as gray. Checked with Oracle linux as well and fix worked fine. >> >> An automated test case has been added and checked in CI, link is added in JBS. Test mentioned in JBS also works fine with the fix. > > Abhishek Kumar has updated the pull request incrementally with one additional commit since the last revision: > > condition clubbed together Marked as reviewed by psadhukhan (Reviewer). ------------- PR Review: https://git.openjdk.org/jdk/pull/15263#pullrequestreview-1606808123 From aivanov at openjdk.org Fri Sep 1 12:07:42 2023 From: aivanov at openjdk.org (Alexey Ivanov) Date: Fri, 1 Sep 2023 12:07:42 GMT Subject: RFR: 8312075: FileChooser.win32.newFolder is not updated when changing Locale [v6] In-Reply-To: References: <_XawiMouFRVn_letIBC3AceK-hMGomSenF5c-MjFCic=.a14a5114-0619-4456-8d89-29665d6623e5@github.com> Message-ID: On Thu, 31 Aug 2023 15:09:05 GMT, Tejesh R wrote: >> On `NewFolderAction`, plain String is added `Action.ACTION_COMMAND_KEY`. Converting the `String `to `locale` before adding as command key fix the issue. >> I have verified the test in all other platforms and Look and Feel which has option to create New Folder, results were fine. No regressions found on CI system with the fix. Added manual test to verify the fix. > > Tejesh R has updated the pull request incrementally with one additional commit since the last revision: > > Review fix Changes requested by aivanov (Reviewer). test/jdk/javax/swing/JFileChooser/FileChooserNewFolderLocaleTest.java line 36: > 34: */ > 35: public class FileChooserNewFolderLocaleTest { > 36: static String FRENCH_NEW_FOLDER = "Nouveau dossier"; Suggestion: static final String FRENCH_NEW_FOLDER = "Nouveau dossier"; test/jdk/javax/swing/JFileChooser/FileChooserNewFolderLocaleTest.java line 51: > 49: newFolderKey = "FileChooser.other.newFolder"; > 50: ENGLISH_NEW_FOLDER = "NewFolder"; > 51: } Suggestion: if (IS_WINDOWS) { newFolderKey = "FileChooser.win32.newFolder"; } else { newFolderKey = "FileChooser.other.newFolder"; } String englishNewFolder = UIManager.getString(newFolderKey); `ENGLISH_NEW_FOLDER` is not a constant, it should be declared here. You should also use the value from `UIManager`, otherwise the test may fail. Neither is `IS_WINDOWS` a constant, it should be in camel case: `isWindows`. ------------- PR Review: https://git.openjdk.org/jdk/pull/15069#pullrequestreview-1606811056 PR Review Comment: https://git.openjdk.org/jdk/pull/15069#discussion_r1312942427 PR Review Comment: https://git.openjdk.org/jdk/pull/15069#discussion_r1312938113 From aivanov at openjdk.org Fri Sep 1 12:13:43 2023 From: aivanov at openjdk.org (Alexey Ivanov) Date: Fri, 1 Sep 2023 12:13:43 GMT Subject: RFR: 8312165: Fix typos in java.desktop Swing [v4] In-Reply-To: References: Message-ID: On Thu, 31 Aug 2023 20:11:42 GMT, Andrey Turbanov wrote: >> Found many typos in java.desktop by IDEA's inspection `Proofreading | Typo` > > Andrey Turbanov has updated the pull request incrementally with one additional commit since the last revision: > > 8312165: Fix typos in java.desktop Swing > > apply suggestions from review The second ?short-circuit? in `JLayeredPane` at line 558 is still with the space: https://github.com/openjdk/jdk/pull/14847/files#diff-ccb2c8aa4e9d637576d0e386625f6ec0f3fc04f481277f994af23542ecc11d7fL558 even though you marked the comment as resolved. ------------- Changes requested by aivanov (Reviewer). PR Review: https://git.openjdk.org/jdk/pull/14847#pullrequestreview-1606826682 From aivanov at openjdk.org Fri Sep 1 12:14:42 2023 From: aivanov at openjdk.org (Alexey Ivanov) Date: Fri, 1 Sep 2023 12:14:42 GMT Subject: RFR: JDK-8311113: Remove invalid pointer cast and clean up setLabel() in awt_MenuItem.cpp [v4] In-Reply-To: References: <-UpmI9X_txepgRxGnsfSTtjwmqPQgtjeA5gqo-wmuGk=.3c84af65-e29e-4eeb-b393-efa9c990e721@github.com> Message-ID: On Fri, 1 Sep 2023 00:04:18 GMT, Harshitha Onkar wrote: >> In awt_MenuItem.cpp (712,22): ` mii.dwTypeData = (LPTSTR)(*sb)` produces invalid pointer cast warning when complied on clang and moreover this is a no-op. >> >> `mii.dwTypeData` is used only when **MIIM_STRING** flag is set in the fMask (as per [Docs](https://learn.microsoft.com/en-us/windows/win32/api/winuser/ns-winuser-menuiteminfoa)), which is not the case in JDK [Ln#705](https://github.com/openjdk/jdk/blob/e56d3bc2dab3d32453b6eda66e8434953c436084/src/java.desktop/windows/native/libawt/windows/awt_MenuItem.cpp#L706). Hence the assignment ` mii.dwTypeData = (LPTSTR)(*sb)` is not required and so is the label parameter. Additionally necessary cleanup is done at the following places - >> >> - WMenuItemPeer.java - to the native function call >> - awt_MenuItem.cpp - `WMenuItemPeer__1setLabel() ,_SetLabel(), SetLabel()` >> - awt_MenuItem.h >> >> Added a test which checks setLabel() functionality on Menu, MenuItem and PopupMenu. > > Harshitha Onkar has updated the pull request incrementally with one additional commit since the last revision: > > review changes Marked as reviewed by aivanov (Reviewer). ------------- PR Review: https://git.openjdk.org/jdk/pull/15276#pullrequestreview-1606829301 From aturbanov at openjdk.org Fri Sep 1 12:26:26 2023 From: aturbanov at openjdk.org (Andrey Turbanov) Date: Fri, 1 Sep 2023 12:26:26 GMT Subject: RFR: 8312165: Fix typos in java.desktop Swing [v5] In-Reply-To: References: Message-ID: > Found many typos in java.desktop by IDEA's inspection `Proofreading | Typo` Andrey Turbanov has updated the pull request incrementally with one additional commit since the last revision: 8312165: Fix typos in java.desktop Swing apply suggestions from review ------------- Changes: - all: https://git.openjdk.org/jdk/pull/14847/files - new: https://git.openjdk.org/jdk/pull/14847/files/9e65ef06..9cacf8c5 Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=14847&range=04 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=14847&range=03-04 Stats: 2 lines in 1 file changed: 0 ins; 0 del; 2 mod Patch: https://git.openjdk.org/jdk/pull/14847.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/14847/head:pull/14847 PR: https://git.openjdk.org/jdk/pull/14847 From aturbanov at openjdk.org Fri Sep 1 12:26:28 2023 From: aturbanov at openjdk.org (Andrey Turbanov) Date: Fri, 1 Sep 2023 12:26:28 GMT Subject: RFR: 8312165: Fix typos in java.desktop Swing [v4] In-Reply-To: References: Message-ID: On Fri, 1 Sep 2023 12:10:37 GMT, Alexey Ivanov wrote: >even though you marked the comment as resolved. Ooops. Sorry for that. Somehow I forgot to commit changes in this file. ------------- PR Comment: https://git.openjdk.org/jdk/pull/14847#issuecomment-1702659396 From erikj at openjdk.org Fri Sep 1 12:57:38 2023 From: erikj at openjdk.org (Erik Joelsson) Date: Fri, 1 Sep 2023 12:57:38 GMT Subject: RFR: JDK-8315499: build using devkit on Linux ppc64le RHEL puts path to devkit into libsplashscreen In-Reply-To: <_s3s_wxEckaR0nFvdyRDSaBCTU2IA9k9yCh7JZC7AHM=.9a472847-9bc4-437e-8829-a2da354aa3b2@github.com> References: <_s3s_wxEckaR0nFvdyRDSaBCTU2IA9k9yCh7JZC7AHM=.9a472847-9bc4-437e-8829-a2da354aa3b2@github.com> Message-ID: On Fri, 1 Sep 2023 11:02:36 GMT, Matthias Baesken wrote: > After looking at the build results of a jdk22 build on RHEL 8.4 Linux ppc64le that uses a ppc64le-linux-gnu-to-ppc64le-linux-gnu-fedora27-gcc11.3.0 > devkit we observed those unwanted paths in libsplashscreen.so . > See those objdump and ldd output : > > objdump -x ./lib/libsplashscreen.so | grep PATH > RUNPATH /mydevkitsfolder/devkits/ppc64le-linux-gnu-to-ppc64le-linux-gnu-fedora27-gcc11.3.0/ppc64le-linux-gnu/sysroot/usr/lib64:$ORIGIN > > > ldd ./lib/libsplashscreen.so > ldd: warning: you do not have execution permission for `./lib/libsplashscreen.so' > . . . > libX11.so.6 => /mydevkitsfolder/devkits/ppc64le-linux-gnu-to-ppc64le-linux-gnu-fedora27-gcc11.3.0/ppc64le-linux-gnu/sysroot/usr/lib64/libX11.so.6 (0x00007fffa3920000) > libXext.so.6 => /mydevkitsfolder/devkits/ppc64le-linux-gnu-to-ppc64le-linux-gnu-fedora27-gcc11.3.0/ppc64le-linux-gnu/sysroot/usr/lib64/libXext.so.6 (0x00007fffa38e0000) > . . . > > These paths were introduced by the '-R' setting, but it seems to be highly dependent on the environment. But the '-R' setting should better be avoided anyway when the devkit is used. make/autoconf/lib-x11.m4 line 90: > 88: fi > 89: # Also remove the -R setting for devkit usage > 90: if test "x$with_devkit" != "x" && test "x$with_devkit" != "xno"; then This should rather check if `$SYSROOT` has a value and should also check that `$x_libraries` is `NONE` (see how it's done on line 64). A sysroot can be configured without a devkit, and if we find the X libraries in the sysroot, then we shouldn't add an -R path. If however a user needs to specifically point out the x libraries, I think we need to trust the built in macros as the user may have them in a non standard place. Can we combine the conditionals to avoid having to repeat the if body? ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/15534#discussion_r1312991450 From tr at openjdk.org Fri Sep 1 13:03:40 2023 From: tr at openjdk.org (Tejesh R) Date: Fri, 1 Sep 2023 13:03:40 GMT Subject: RFR: 8312075: FileChooser.win32.newFolder is not updated when changing Locale [v7] In-Reply-To: <_XawiMouFRVn_letIBC3AceK-hMGomSenF5c-MjFCic=.a14a5114-0619-4456-8d89-29665d6623e5@github.com> References: <_XawiMouFRVn_letIBC3AceK-hMGomSenF5c-MjFCic=.a14a5114-0619-4456-8d89-29665d6623e5@github.com> Message-ID: > On `NewFolderAction`, plain String is added `Action.ACTION_COMMAND_KEY`. Converting the `String `to `locale` before adding as command key fix the issue. > I have verified the test in all other platforms and Look and Feel which has option to create New Folder, results were fine. No regressions found on CI system with the fix. Added manual test to verify the fix. Tejesh R has updated the pull request incrementally with one additional commit since the last revision: Review fix ------------- Changes: - all: https://git.openjdk.org/jdk/pull/15069/files - new: https://git.openjdk.org/jdk/pull/15069/files/0cc524cb..67c545e4 Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=15069&range=06 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=15069&range=05-06 Stats: 7 lines in 1 file changed: 1 ins; 2 del; 4 mod Patch: https://git.openjdk.org/jdk/pull/15069.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/15069/head:pull/15069 PR: https://git.openjdk.org/jdk/pull/15069 From tr at openjdk.org Fri Sep 1 13:03:42 2023 From: tr at openjdk.org (Tejesh R) Date: Fri, 1 Sep 2023 13:03:42 GMT Subject: RFR: 8312075: FileChooser.win32.newFolder is not updated when changing Locale [v6] In-Reply-To: References: <_XawiMouFRVn_letIBC3AceK-hMGomSenF5c-MjFCic=.a14a5114-0619-4456-8d89-29665d6623e5@github.com> Message-ID: On Fri, 1 Sep 2023 12:04:32 GMT, Alexey Ivanov wrote: >> Tejesh R has updated the pull request incrementally with one additional commit since the last revision: >> >> Review fix > > test/jdk/javax/swing/JFileChooser/FileChooserNewFolderLocaleTest.java line 36: > >> 34: */ >> 35: public class FileChooserNewFolderLocaleTest { >> 36: static String FRENCH_NEW_FOLDER = "Nouveau dossier"; > > Suggestion: > > static final String FRENCH_NEW_FOLDER = "Nouveau dossier"; Updated both the review comments. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/15069#discussion_r1312994742 From aivanov at openjdk.org Fri Sep 1 13:16:45 2023 From: aivanov at openjdk.org (Alexey Ivanov) Date: Fri, 1 Sep 2023 13:16:45 GMT Subject: RFR: 8312165: Fix typos in java.desktop Swing [v5] In-Reply-To: References: Message-ID: On Fri, 1 Sep 2023 12:26:26 GMT, Andrey Turbanov wrote: >> Found many typos in java.desktop by IDEA's inspection `Proofreading | Typo` > > Andrey Turbanov has updated the pull request incrementally with one additional commit since the last revision: > > 8312165: Fix typos in java.desktop Swing > > apply suggestions from review Looks good to me except for the minor comment. src/java.desktop/share/classes/javax/swing/text/DefaultCaret.java line 1295: > 1293: // ab[B. I'd actually prefer abB]. But, if I implement that > 1294: // a delete at abBA] would result in aBA] vs a[BA which I > 1295: // think is totally wrong. To get this right we need to know what Suggestion: // ab[B. I'd actually prefer abB]. But, if I implement that, // a delete at abBA] would result in aBA] vs a[BA which, I // think, is totally wrong. To get this right we need to know what Let's drop some more commas to separate the complex sentences. Especially, the one on the first line where ?that? could be interpreted as a conjunction otherwise. I've been looking over all the changes, and again I struggled to parse the comment. ------------- Changes requested by aivanov (Reviewer). PR Review: https://git.openjdk.org/jdk/pull/14847#pullrequestreview-1606891522 PR Review Comment: https://git.openjdk.org/jdk/pull/14847#discussion_r1312989311 From aivanov at openjdk.org Fri Sep 1 13:17:42 2023 From: aivanov at openjdk.org (Alexey Ivanov) Date: Fri, 1 Sep 2023 13:17:42 GMT Subject: RFR: 8312075: FileChooser.win32.newFolder is not updated when changing Locale [v7] In-Reply-To: References: <_XawiMouFRVn_letIBC3AceK-hMGomSenF5c-MjFCic=.a14a5114-0619-4456-8d89-29665d6623e5@github.com> Message-ID: On Fri, 1 Sep 2023 13:03:40 GMT, Tejesh R wrote: >> On `NewFolderAction`, plain String is added `Action.ACTION_COMMAND_KEY`. Converting the `String `to `locale` before adding as command key fix the issue. >> I have verified the test in all other platforms and Look and Feel which has option to create New Folder, results were fine. No regressions found on CI system with the fix. Added manual test to verify the fix. > > Tejesh R has updated the pull request incrementally with one additional commit since the last revision: > > Review fix Looks good to me. ------------- Marked as reviewed by aivanov (Reviewer). PR Review: https://git.openjdk.org/jdk/pull/15069#pullrequestreview-1606930631 From mbaesken at openjdk.org Fri Sep 1 13:42:45 2023 From: mbaesken at openjdk.org (Matthias Baesken) Date: Fri, 1 Sep 2023 13:42:45 GMT Subject: RFR: JDK-8315499: build using devkit on Linux ppc64le RHEL puts path to devkit into libsplashscreen In-Reply-To: References: <_s3s_wxEckaR0nFvdyRDSaBCTU2IA9k9yCh7JZC7AHM=.9a472847-9bc4-437e-8829-a2da354aa3b2@github.com> Message-ID: On Fri, 1 Sep 2023 12:54:45 GMT, Erik Joelsson wrote: >> After looking at the build results of a jdk22 build on RHEL 8.4 Linux ppc64le that uses a ppc64le-linux-gnu-to-ppc64le-linux-gnu-fedora27-gcc11.3.0 >> devkit we observed those unwanted paths in libsplashscreen.so . >> See those objdump and ldd output : >> >> objdump -x ./lib/libsplashscreen.so | grep PATH >> RUNPATH /mydevkitsfolder/devkits/ppc64le-linux-gnu-to-ppc64le-linux-gnu-fedora27-gcc11.3.0/ppc64le-linux-gnu/sysroot/usr/lib64:$ORIGIN >> >> >> ldd ./lib/libsplashscreen.so >> ldd: warning: you do not have execution permission for `./lib/libsplashscreen.so' >> . . . >> libX11.so.6 => /mydevkitsfolder/devkits/ppc64le-linux-gnu-to-ppc64le-linux-gnu-fedora27-gcc11.3.0/ppc64le-linux-gnu/sysroot/usr/lib64/libX11.so.6 (0x00007fffa3920000) >> libXext.so.6 => /mydevkitsfolder/devkits/ppc64le-linux-gnu-to-ppc64le-linux-gnu-fedora27-gcc11.3.0/ppc64le-linux-gnu/sysroot/usr/lib64/libXext.so.6 (0x00007fffa38e0000) >> . . . >> >> These paths were introduced by the '-R' setting, but it seems to be highly dependent on the environment. But the '-R' setting should better be avoided anyway when the devkit is used. > > make/autoconf/lib-x11.m4 line 90: > >> 88: fi >> 89: # Also remove the -R setting for devkit usage >> 90: if test "x$with_devkit" != "x" && test "x$with_devkit" != "xno"; then > > This should rather check if `$SYSROOT` has a value and should also check that `$x_libraries` is `NONE` (see how it's done on line 64). A sysroot can be configured without a devkit, and if we find the X libraries in the sysroot, then we shouldn't add an -R path. If however a user needs to specifically point out the x libraries, I think we need to trust the built in macros as the user may have them in a non standard place. > > Can we combine the conditionals to avoid having to repeat the if body? Hi Erik, unfortunately `x_libraries` is already modified in the SYSROOT cases (see line 64 and below) , so can I check that `$x_libraries` is `NONE` or should I cache somehow the original value ? ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/15534#discussion_r1313043724 From erikj at openjdk.org Fri Sep 1 14:25:40 2023 From: erikj at openjdk.org (Erik Joelsson) Date: Fri, 1 Sep 2023 14:25:40 GMT Subject: RFR: JDK-8315499: build using devkit on Linux ppc64le RHEL puts path to devkit into libsplashscreen In-Reply-To: References: <_s3s_wxEckaR0nFvdyRDSaBCTU2IA9k9yCh7JZC7AHM=.9a472847-9bc4-437e-8829-a2da354aa3b2@github.com> Message-ID: On Fri, 1 Sep 2023 13:39:58 GMT, Matthias Baesken wrote: >> make/autoconf/lib-x11.m4 line 90: >> >>> 88: fi >>> 89: # Also remove the -R setting for devkit usage >>> 90: if test "x$with_devkit" != "x" && test "x$with_devkit" != "xno"; then >> >> This should rather check if `$SYSROOT` has a value and should also check that `$x_libraries` is `NONE` (see how it's done on line 64). A sysroot can be configured without a devkit, and if we find the X libraries in the sysroot, then we shouldn't add an -R path. If however a user needs to specifically point out the x libraries, I think we need to trust the built in macros as the user may have them in a non standard place. >> >> Can we combine the conditionals to avoid having to repeat the if body? > > Hi Erik, unfortunately `x_libraries` is already modified in the SYSROOT cases (see line 64 and below) , so can I check that `$x_libraries` is `NONE` or should I cache somehow the original value ? Ah you are right. Yes, we will need a local variable expressing if x_libraries was set by the user (as opposed to based on the sysroot). ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/15534#discussion_r1313094169 From mbaesken at openjdk.org Fri Sep 1 15:11:17 2023 From: mbaesken at openjdk.org (Matthias Baesken) Date: Fri, 1 Sep 2023 15:11:17 GMT Subject: RFR: JDK-8315499: build using devkit on Linux ppc64le RHEL puts path to devkit into libsplashscreen [v2] In-Reply-To: <_s3s_wxEckaR0nFvdyRDSaBCTU2IA9k9yCh7JZC7AHM=.9a472847-9bc4-437e-8829-a2da354aa3b2@github.com> References: <_s3s_wxEckaR0nFvdyRDSaBCTU2IA9k9yCh7JZC7AHM=.9a472847-9bc4-437e-8829-a2da354aa3b2@github.com> Message-ID: > After looking at the build results of a jdk22 build on RHEL 8.4 Linux ppc64le that uses a ppc64le-linux-gnu-to-ppc64le-linux-gnu-fedora27-gcc11.3.0 > devkit we observed those unwanted paths in libsplashscreen.so . > See those objdump and ldd output : > > objdump -x ./lib/libsplashscreen.so | grep PATH > RUNPATH /mydevkitsfolder/devkits/ppc64le-linux-gnu-to-ppc64le-linux-gnu-fedora27-gcc11.3.0/ppc64le-linux-gnu/sysroot/usr/lib64:$ORIGIN > > > ldd ./lib/libsplashscreen.so > ldd: warning: you do not have execution permission for `./lib/libsplashscreen.so' > . . . > libX11.so.6 => /mydevkitsfolder/devkits/ppc64le-linux-gnu-to-ppc64le-linux-gnu-fedora27-gcc11.3.0/ppc64le-linux-gnu/sysroot/usr/lib64/libX11.so.6 (0x00007fffa3920000) > libXext.so.6 => /mydevkitsfolder/devkits/ppc64le-linux-gnu-to-ppc64le-linux-gnu-fedora27-gcc11.3.0/ppc64le-linux-gnu/sysroot/usr/lib64/libXext.so.6 (0x00007fffa38e0000) > . . . > > These paths were introduced by the '-R' setting, but it seems to be highly dependent on the environment. But the '-R' setting should better be avoided anyway when the devkit is used. Matthias Baesken has updated the pull request incrementally with one additional commit since the last revision: check for SYSROOT and xlib-setting ------------- Changes: - all: https://git.openjdk.org/jdk/pull/15534/files - new: https://git.openjdk.org/jdk/pull/15534/files/1d722756..9eb03929 Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=15534&range=01 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=15534&range=00-01 Stats: 7 lines in 1 file changed: 1 ins; 4 del; 2 mod Patch: https://git.openjdk.org/jdk/pull/15534.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/15534/head:pull/15534 PR: https://git.openjdk.org/jdk/pull/15534 From tr at openjdk.org Fri Sep 1 15:26:42 2023 From: tr at openjdk.org (Tejesh R) Date: Fri, 1 Sep 2023 15:26:42 GMT Subject: RFR: 8258970: Disabled JPasswordField foreground color is wrong with GTK LAF [v4] In-Reply-To: References: Message-ID: <-C5KnO1RKwPkmrq9G9H5O5oVJX70i0desMFFg6jdz00=.09c1b46b-3dd7-4de5-b66e-0d3c18e21ee0@github.com> On Fri, 1 Sep 2023 11:39:45 GMT, Abhishek Kumar wrote: >> Disabled JPasswordField foreground color was not grayed out in GTK LAF. >> >> The foreground color in disabled state was close to black color (RGB 0,0,0) for password field which is not differentiable from enabled state foreground color. >> >> To fix for this problem, the widget type is changed to `TEXT_AREA `for disable password field which returns the foreground color as gray. Checked with Oracle linux as well and fix worked fine. >> >> An automated test case has been added and checked in CI, link is added in JBS. Test mentioned in JBS also works fine with the fix. > > Abhishek Kumar has updated the pull request incrementally with one additional commit since the last revision: > > condition clubbed together Looks Good to Me. ------------- Marked as reviewed by tr (Committer). PR Review: https://git.openjdk.org/jdk/pull/15263#pullrequestreview-1607173968 From abhiscxk at openjdk.org Fri Sep 1 15:29:55 2023 From: abhiscxk at openjdk.org (Abhishek Kumar) Date: Fri, 1 Sep 2023 15:29:55 GMT Subject: Integrated: 8258970: Disabled JPasswordField foreground color is wrong with GTK LAF In-Reply-To: References: Message-ID: On Mon, 14 Aug 2023 03:31:37 GMT, Abhishek Kumar wrote: > Disabled JPasswordField foreground color was not grayed out in GTK LAF. > > The foreground color in disabled state was close to black color (RGB 0,0,0) for password field which is not differentiable from enabled state foreground color. > > To fix for this problem, the widget type is changed to `TEXT_AREA `for disable password field which returns the foreground color as gray. Checked with Oracle linux as well and fix worked fine. > > An automated test case has been added and checked in CI, link is added in JBS. Test mentioned in JBS also works fine with the fix. This pull request has now been integrated. Changeset: 56b8db11 Author: Abhishek Kumar URL: https://git.openjdk.org/jdk/commit/56b8db11c35c0ef04fdc7e3bdcb0f360ae2b2e4b Stats: 186 lines in 2 files changed: 183 ins; 0 del; 3 mod 8258970: Disabled JPasswordField foreground color is wrong with GTK LAF Reviewed-by: tr, dnguyen, psadhukhan ------------- PR: https://git.openjdk.org/jdk/pull/15263 From erikj at openjdk.org Fri Sep 1 16:58:38 2023 From: erikj at openjdk.org (Erik Joelsson) Date: Fri, 1 Sep 2023 16:58:38 GMT Subject: RFR: JDK-8315499: build using devkit on Linux ppc64le RHEL puts path to devkit into libsplashscreen [v2] In-Reply-To: References: <_s3s_wxEckaR0nFvdyRDSaBCTU2IA9k9yCh7JZC7AHM=.9a472847-9bc4-437e-8829-a2da354aa3b2@github.com> Message-ID: On Fri, 1 Sep 2023 15:11:17 GMT, Matthias Baesken wrote: >> After looking at the build results of a jdk22 build on RHEL 8.4 Linux ppc64le that uses a ppc64le-linux-gnu-to-ppc64le-linux-gnu-fedora27-gcc11.3.0 >> devkit we observed those unwanted paths in libsplashscreen.so . >> See those objdump and ldd output : >> >> objdump -x ./lib/libsplashscreen.so | grep PATH >> RUNPATH /mydevkitsfolder/devkits/ppc64le-linux-gnu-to-ppc64le-linux-gnu-fedora27-gcc11.3.0/ppc64le-linux-gnu/sysroot/usr/lib64:$ORIGIN >> >> >> ldd ./lib/libsplashscreen.so >> ldd: warning: you do not have execution permission for `./lib/libsplashscreen.so' >> . . . >> libX11.so.6 => /mydevkitsfolder/devkits/ppc64le-linux-gnu-to-ppc64le-linux-gnu-fedora27-gcc11.3.0/ppc64le-linux-gnu/sysroot/usr/lib64/libX11.so.6 (0x00007fffa3920000) >> libXext.so.6 => /mydevkitsfolder/devkits/ppc64le-linux-gnu-to-ppc64le-linux-gnu-fedora27-gcc11.3.0/ppc64le-linux-gnu/sysroot/usr/lib64/libXext.so.6 (0x00007fffa38e0000) >> . . . >> >> These paths were introduced by the '-R' setting, but it seems to be highly dependent on the environment. But the '-R' setting should better be avoided anyway when the devkit is used. > > Matthias Baesken has updated the pull request incrementally with one additional commit since the last revision: > > check for SYSROOT and xlib-setting make/autoconf/lib-x11.m4 line 38: > 36: X_LIBS= > 37: else > 38: x_libraries_orig="$x_libraries" This needs to capture the value from `with_x` as well. Both are variants of user input. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/15534#discussion_r1313285908 From aivanov at openjdk.org Fri Sep 1 18:18:44 2023 From: aivanov at openjdk.org (Alexey Ivanov) Date: Fri, 1 Sep 2023 18:18:44 GMT Subject: RFR: JDK-8311113: Remove invalid pointer cast and clean up setLabel() in awt_MenuItem.cpp [v3] In-Reply-To: <9hQfDAYttupi0zwJo_QA_0lofRMPcby6cl5_lXoFZgE=.71f22139-8059-4cfc-971e-6aab3cee0e9c@github.com> References: <-UpmI9X_txepgRxGnsfSTtjwmqPQgtjeA5gqo-wmuGk=.3c84af65-e29e-4eeb-b393-efa9c990e721@github.com> <9hQfDAYttupi0zwJo_QA_0lofRMPcby6cl5_lXoFZgE=.71f22139-8059-4cfc-971e-6aab3cee0e9c@github.com> Message-ID: On Thu, 31 Aug 2023 22:42:11 GMT, Phil Race wrote: > > This proves _what's done in `_SetLabel` is **dead code**_: it's not used by us, it's not used by the OS. Removing more than 100 lines which essentially do nothing is a good thing in my opinion. > > OK. So it doesn't pull it because we don't tell it it is there to be read. It's a limitation of Windows Menu API: the system doesn't store any additional data for owner drawn menu items. We tell the system, here's the label, but it ignores it. It seems there's nothing we can do about it. I tried setting `MIIM_FTYPE | MIIM_STRING` in `fMask` which explicitly tells the system the `dwTypeData` member is valid. The system ignores it all the same, the label cannot be retrieved. > Which does make it sound very much like JAWS is getting the data from somewhere else. There's no other way? > Hmm, I didn't know the AWT heavyweights participated in that. Only the Swing components. It is also my understanding, so I was surprised JAWS can read AWT menus. It is not a surprise Narrator can't read menus (or anything else in a Java app) since Java doesn't implement native Windows accessibility APIs. ------------- PR Comment: https://git.openjdk.org/jdk/pull/15276#issuecomment-1703154735 From aivanov at openjdk.org Fri Sep 1 18:25:47 2023 From: aivanov at openjdk.org (Alexey Ivanov) Date: Fri, 1 Sep 2023 18:25:47 GMT Subject: RFR: JDK-8311113: Remove invalid pointer cast and clean up setLabel() in awt_MenuItem.cpp [v3] In-Reply-To: References: <-UpmI9X_txepgRxGnsfSTtjwmqPQgtjeA5gqo-wmuGk=.3c84af65-e29e-4eeb-b393-efa9c990e721@github.com> <9hQfDAYttupi0zwJo_QA_0lofRMPcby6cl5_lXoFZgE=.71f22139-8059-4cfc-971e-6aab3cee0e9c@github.com> Message-ID: On Fri, 1 Sep 2023 18:15:37 GMT, Alexey Ivanov wrote: > > Which does make it sound very much like JAWS is getting the data from somewhere else. > > There's no other way? > > > Hmm, I didn't know the AWT heavyweights participated in that. Only the Swing components. > > It is also my understanding, so I was surprised JAWS can read AWT menus. `Menu.java` and `MenuItem.java` have *Accessibility support* sections where `AccessibleAWTMenu` and `AccessibleAWTMenuItem` classes are defined. https://github.com/openjdk/jdk/blob/2f7c65ec48dc35d75eed8af411d482ba40de70dc/src/java.desktop/share/classes/java/awt/Menu.java#L618-L628 https://github.com/openjdk/jdk/blob/2f7c65ec48dc35d75eed8af411d482ba40de70dc/src/java.desktop/share/classes/java/awt/MenuItem.java#L815-L825 Thus AWT components implement the same accessibility interfaces that Swing components do. JAWS uses these interfaces. Mystery solved. ------------- PR Comment: https://git.openjdk.org/jdk/pull/15276#issuecomment-1703162996 From aturbanov at openjdk.org Fri Sep 1 20:32:42 2023 From: aturbanov at openjdk.org (Andrey Turbanov) Date: Fri, 1 Sep 2023 20:32:42 GMT Subject: RFR: 8312165: Fix typos in java.desktop Swing [v6] In-Reply-To: References: Message-ID: > Found many typos in java.desktop by IDEA's inspection `Proofreading | Typo` Andrey Turbanov has updated the pull request incrementally with one additional commit since the last revision: 8312165: Fix typos in java.desktop Swing last fixes ------------- Changes: - all: https://git.openjdk.org/jdk/pull/14847/files - new: https://git.openjdk.org/jdk/pull/14847/files/9cacf8c5..fc931d45 Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=14847&range=05 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=14847&range=04-05 Stats: 4 lines in 1 file changed: 0 ins; 0 del; 4 mod Patch: https://git.openjdk.org/jdk/pull/14847.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/14847/head:pull/14847 PR: https://git.openjdk.org/jdk/pull/14847 From aivanov at openjdk.org Fri Sep 1 20:32:42 2023 From: aivanov at openjdk.org (Alexey Ivanov) Date: Fri, 1 Sep 2023 20:32:42 GMT Subject: RFR: 8312165: Fix typos in java.desktop Swing [v6] In-Reply-To: References: Message-ID: On Fri, 1 Sep 2023 20:26:51 GMT, Andrey Turbanov wrote: >> Found many typos in java.desktop by IDEA's inspection `Proofreading | Typo` > > Andrey Turbanov has updated the pull request incrementally with one additional commit since the last revision: > > 8312165: Fix typos in java.desktop Swing > > last fixes Marked as reviewed by aivanov (Reviewer). ------------- PR Review: https://git.openjdk.org/jdk/pull/14847#pullrequestreview-1607633466 From aturbanov at openjdk.org Fri Sep 1 20:32:46 2023 From: aturbanov at openjdk.org (Andrey Turbanov) Date: Fri, 1 Sep 2023 20:32:46 GMT Subject: RFR: 8312165: Fix typos in java.desktop Swing [v5] In-Reply-To: References: Message-ID: <-jarwzqcCsmd2y8Vz7tJwdnsYKV2eCgbwWVtdcbVRAs=.6ee9ab9e-ffe9-43f7-afa5-92132eb73c4a@github.com> On Fri, 1 Sep 2023 12:52:43 GMT, Alexey Ivanov wrote: >> Andrey Turbanov has updated the pull request incrementally with one additional commit since the last revision: >> >> 8312165: Fix typos in java.desktop Swing >> >> apply suggestions from review > > src/java.desktop/share/classes/javax/swing/text/DefaultCaret.java line 1295: > >> 1293: // ab[B. I'd actually prefer abB]. But, if I implement that >> 1294: // a delete at abBA] would result in aBA] vs a[BA which I >> 1295: // think is totally wrong. To get this right we need to know what > > Suggestion: > > // ab[B. I'd actually prefer abB]. But, if I implement that, > // a delete at abBA] would result in aBA] vs a[BA which, I > // think, is totally wrong. To get this right we need to know what > > Let's drop some more commas to separate the complex sentences. Especially, the one on the first line where ?that? could be interpreted as a conjunction otherwise. > > I've been looking over all the changes, and again I struggled to parse the comment. Thanks. Applied. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/14847#discussion_r1313484963 From rmahajan at openjdk.org Fri Sep 1 20:44:03 2023 From: rmahajan at openjdk.org (Rajat Mahajan) Date: Fri, 1 Sep 2023 20:44:03 GMT Subject: RFR: 8311585: Add JRadioButtonMenuItem to bug8031573.java [v6] In-Reply-To: References: Message-ID: > I have made the test changes to include radio button in menu and tested the same and it works fine. Rajat Mahajan has updated the pull request incrementally with one additional commit since the last revision: Update instructions for clarity ------------- Changes: - all: https://git.openjdk.org/jdk/pull/15441/files - new: https://git.openjdk.org/jdk/pull/15441/files/767f57ed..5944fe0d Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=15441&range=05 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=15441&range=04-05 Stats: 14 lines in 1 file changed: 3 ins; 0 del; 11 mod Patch: https://git.openjdk.org/jdk/pull/15441.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/15441/head:pull/15441 PR: https://git.openjdk.org/jdk/pull/15441 From aivanov at openjdk.org Fri Sep 1 20:57:39 2023 From: aivanov at openjdk.org (Alexey Ivanov) Date: Fri, 1 Sep 2023 20:57:39 GMT Subject: RFR: 8311585: Add JRadioButtonMenuItem to bug8031573.java [v6] In-Reply-To: References: Message-ID: <_5gZQDWWO66kkF24G0sWPt4nUXkJ6LHiL8DQCHiFaFA=.d7770890-1993-484c-8031-51832e8084d1@github.com> On Fri, 1 Sep 2023 20:44:03 GMT, Rajat Mahajan wrote: >> I have made the test changes to include radio button in menu and tested the same and it works fine. > > Rajat Mahajan has updated the pull request incrementally with one additional commit since the last revision: > > Update instructions for clarity Looks good to me. ------------- Marked as reviewed by aivanov (Reviewer). PR Review: https://git.openjdk.org/jdk/pull/15441#pullrequestreview-1607657991 From honkar at openjdk.org Fri Sep 1 21:00:39 2023 From: honkar at openjdk.org (Harshitha Onkar) Date: Fri, 1 Sep 2023 21:00:39 GMT Subject: RFR: 8311585: Add JRadioButtonMenuItem to bug8031573.java [v6] In-Reply-To: References: Message-ID: On Fri, 1 Sep 2023 20:44:03 GMT, Rajat Mahajan wrote: >> I have made the test changes to include radio button in menu and tested the same and it works fine. > > Rajat Mahajan has updated the pull request incrementally with one additional commit since the last revision: > > Update instructions for clarity Marked as reviewed by honkar (Committer). ------------- PR Review: https://git.openjdk.org/jdk/pull/15441#pullrequestreview-1607660457 From dnguyen at openjdk.org Fri Sep 1 21:06:44 2023 From: dnguyen at openjdk.org (Damon Nguyen) Date: Fri, 1 Sep 2023 21:06:44 GMT Subject: RFR: 6450193: After the first Serialization, JTableHeader does not uninstall its UI In-Reply-To: References: Message-ID: On Thu, 31 Aug 2023 08:02:35 GMT, Prasanta Sadhukhan wrote: > After the first time a JTableHeader is serialized, it no longer will uninstall its UI upon subsequent serializations. > This happens for classes that use the BasicTableHeaderUI class. Any LAF that extends the BasicTableHeaderUI like SynthTableHeaderUI and WindowsTableHeaderUI will get an NotSerializableException thrown > > Each time an JComponent instance is Serialized, a [counter ](https://github.com/openjdk/jdk/blob/218829e0a2a3ae5599b81733df53557966392033/src/java.desktop/share/classes/javax/swing/JComponent.java#L5644-L5645) for the instance is incremented. It is de-incremented in JComponent's writeObject or a class that implements it the same way, like JButton, JScrollPane etc.. > With JTableHeader it does not deincrement the counter. The uninstall mechanism will not uninstall a UI if the counter is not 0 on the first pass..It is not possible to call JComponent.setWriteObjectCounter in JTableHeader as it is not in the same package so the fix is to remove the writeObject implementation and rely on JComponent writeObject implementation to make sure uninstallation of UI happens and also NotSerializableException does not happen for Synth Does the copyright year in JTableHeader.java need to be updated to 2023 as well? test/jdk/javax/swing/JTableHeader/SerializeJTableHeader.java line 39: > 37: import java.io.ObjectOutputStream; > 38: > 39: public class SerializeJTableHeader implements Runnable{ Suggestion: public class SerializeJTableHeader implements Runnable { test/jdk/javax/swing/JTableHeader/SerializeJTableHeader.java line 44: > 42: JTableHeader jth = new JTableHeader(); > 43: try { > 44: for(int i = 0; i < 10; i ++){ Suggestion: for(int i = 0; i < 10; i++) { test/jdk/javax/swing/JTableHeader/SerializeJTableHeader.java line 68: > 66: } > 67: > 68: public static void main(String ... args) throws Exception{ Suggestion: public static void main(String ... args) throws Exception { ------------- PR Review: https://git.openjdk.org/jdk/pull/15507#pullrequestreview-1607662850 PR Review Comment: https://git.openjdk.org/jdk/pull/15507#discussion_r1313519001 PR Review Comment: https://git.openjdk.org/jdk/pull/15507#discussion_r1313520520 PR Review Comment: https://git.openjdk.org/jdk/pull/15507#discussion_r1313519686 From rmahajan at openjdk.org Fri Sep 1 21:52:48 2023 From: rmahajan at openjdk.org (Rajat Mahajan) Date: Fri, 1 Sep 2023 21:52:48 GMT Subject: Integrated: 8311585: Add JRadioButtonMenuItem to bug8031573.java In-Reply-To: References: Message-ID: On Sun, 27 Aug 2023 21:41:43 GMT, Rajat Mahajan wrote: > I have made the test changes to include radio button in menu and tested the same and it works fine. This pull request has now been integrated. Changeset: 4f90abaf Author: Rajat Mahajan Committer: Harshitha Onkar URL: https://git.openjdk.org/jdk/commit/4f90abaf17716493bad740dcef76d49f16d69379 Stats: 24 lines in 1 file changed: 12 ins; 2 del; 10 mod 8311585: Add JRadioButtonMenuItem to bug8031573.java Reviewed-by: honkar, aivanov ------------- PR: https://git.openjdk.org/jdk/pull/15441 From duke at openjdk.org Sun Sep 3 22:19:02 2023 From: duke at openjdk.org (lawrence.andrews) Date: Sun, 3 Sep 2023 22:19:02 GMT Subject: RFR: 8315584 : java/awt/print/Dialog/DialogType.java fails with option not supported: yesno Message-ID: Test was failing with "test result: Error. Parse Exception: Arguments to `manual' option not supported: yesno" Following are fixed 1) Removed yesno 2) Added test PassFailJFrame manual framework 3) Added SkippedException in case Printer is not configured on the test host. 4) Updated the instruction how can the print dialog to be closed 5) Added an extra line to the file that was missing. ------------- Commit messages: - 8315584 : java/awt/print/Dialog/DialogType.java fails with option not supported: yesno Changes: https://git.openjdk.org/jdk/pull/15554/files Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=15554&range=00 Issue: https://bugs.openjdk.org/browse/JDK-8315584 Stats: 61 lines in 1 file changed: 22 ins; 8 del; 31 mod Patch: https://git.openjdk.org/jdk/pull/15554.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/15554/head:pull/15554 PR: https://git.openjdk.org/jdk/pull/15554 From jwaters at openjdk.org Mon Sep 4 04:26:52 2023 From: jwaters at openjdk.org (Julian Waters) Date: Mon, 4 Sep 2023 04:26:52 GMT Subject: RFR: 8307160: [REDO] Enable the permissive- flag on the Microsoft Visual C compiler [v4] In-Reply-To: References: <7piLRto5nNbhYYYfENCr5ecm4M2xNtMkjkE8XhrLLQ0=.8fd1ac3a-46f8-47a8-ae37-a4abbf7757d9@github.com> Message-ID: <7ZF55XhZ0rnp3kL1VVR73r7_FINgAixdnoWg-xX0T8E=.8f6282f0-3de7-4ba3-8fa8-08bf2e190a7a@github.com> On Thu, 17 Aug 2023 08:38:01 GMT, Julian Waters wrote: >> We should set the -permissive- flag for the Microsoft Visual C compiler, as was requested by the now backed out [JDK-8241499](https://bugs.openjdk.org/browse/JDK-8241499). Doing so makes the Visual C compiler much less accepting of ill formed code, which will improve code quality on Windows in the future. It can be done with some effort, given that the significantly stricter gcc can now compile an experimental Windows JDK as of 2023, and will serve to significantly cut down on monstrosities in ancient Windows code > > Julian Waters has updated the pull request incrementally with one additional commit since the last revision: > > Document changes in awt_DnDDS.cpp Bumping? ------------- PR Comment: https://git.openjdk.org/jdk/pull/15096#issuecomment-1704589862 From abhiscxk at openjdk.org Mon Sep 4 04:43:42 2023 From: abhiscxk at openjdk.org (Abhishek Kumar) Date: Mon, 4 Sep 2023 04:43:42 GMT Subject: RFR: 8312075: FileChooser.win32.newFolder is not updated when changing Locale [v7] In-Reply-To: References: <_XawiMouFRVn_letIBC3AceK-hMGomSenF5c-MjFCic=.a14a5114-0619-4456-8d89-29665d6623e5@github.com> Message-ID: On Fri, 1 Sep 2023 13:03:40 GMT, Tejesh R wrote: >> On `NewFolderAction`, plain String is added `Action.ACTION_COMMAND_KEY`. Converting the `String `to `locale` before adding as command key fix the issue. >> I have verified the test in all other platforms and Look and Feel which has option to create New Folder, results were fine. No regressions found on CI system with the fix. Added manual test to verify the fix. > > Tejesh R has updated the pull request incrementally with one additional commit since the last revision: > > Review fix Test verified, looks good to me. ------------- Marked as reviewed by abhiscxk (Committer). PR Review: https://git.openjdk.org/jdk/pull/15069#pullrequestreview-1608747777 From mbaesken at openjdk.org Mon Sep 4 07:40:11 2023 From: mbaesken at openjdk.org (Matthias Baesken) Date: Mon, 4 Sep 2023 07:40:11 GMT Subject: RFR: JDK-8315499: build using devkit on Linux ppc64le RHEL puts path to devkit into libsplashscreen [v3] In-Reply-To: <_s3s_wxEckaR0nFvdyRDSaBCTU2IA9k9yCh7JZC7AHM=.9a472847-9bc4-437e-8829-a2da354aa3b2@github.com> References: <_s3s_wxEckaR0nFvdyRDSaBCTU2IA9k9yCh7JZC7AHM=.9a472847-9bc4-437e-8829-a2da354aa3b2@github.com> Message-ID: > After looking at the build results of a jdk22 build on RHEL 8.4 Linux ppc64le that uses a ppc64le-linux-gnu-to-ppc64le-linux-gnu-fedora27-gcc11.3.0 > devkit we observed those unwanted paths in libsplashscreen.so . > See those objdump and ldd output : > > objdump -x ./lib/libsplashscreen.so | grep PATH > RUNPATH /mydevkitsfolder/devkits/ppc64le-linux-gnu-to-ppc64le-linux-gnu-fedora27-gcc11.3.0/ppc64le-linux-gnu/sysroot/usr/lib64:$ORIGIN > > > ldd ./lib/libsplashscreen.so > ldd: warning: you do not have execution permission for `./lib/libsplashscreen.so' > . . . > libX11.so.6 => /mydevkitsfolder/devkits/ppc64le-linux-gnu-to-ppc64le-linux-gnu-fedora27-gcc11.3.0/ppc64le-linux-gnu/sysroot/usr/lib64/libX11.so.6 (0x00007fffa3920000) > libXext.so.6 => /mydevkitsfolder/devkits/ppc64le-linux-gnu-to-ppc64le-linux-gnu-fedora27-gcc11.3.0/ppc64le-linux-gnu/sysroot/usr/lib64/libXext.so.6 (0x00007fffa38e0000) > . . . > > These paths were introduced by the '-R' setting, but it seems to be highly dependent on the environment. But the '-R' setting should better be avoided anyway when the devkit is used. Matthias Baesken has updated the pull request incrementally with one additional commit since the last revision: with_x case needs to be handled ------------- Changes: - all: https://git.openjdk.org/jdk/pull/15534/files - new: https://git.openjdk.org/jdk/pull/15534/files/9eb03929..1bed7a2e Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=15534&range=02 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=15534&range=01-02 Stats: 1 line in 1 file changed: 1 ins; 0 del; 0 mod Patch: https://git.openjdk.org/jdk/pull/15534.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/15534/head:pull/15534 PR: https://git.openjdk.org/jdk/pull/15534 From mbaesken at openjdk.org Mon Sep 4 07:58:39 2023 From: mbaesken at openjdk.org (Matthias Baesken) Date: Mon, 4 Sep 2023 07:58:39 GMT Subject: RFR: JDK-8315499: build using devkit on Linux ppc64le RHEL puts path to devkit into libsplashscreen [v2] In-Reply-To: References: <_s3s_wxEckaR0nFvdyRDSaBCTU2IA9k9yCh7JZC7AHM=.9a472847-9bc4-437e-8829-a2da354aa3b2@github.com> Message-ID: On Fri, 1 Sep 2023 16:55:21 GMT, Erik Joelsson wrote: >> Matthias Baesken has updated the pull request incrementally with one additional commit since the last revision: >> >> check for SYSROOT and xlib-setting > > make/autoconf/lib-x11.m4 line 38: > >> 36: X_LIBS= >> 37: else >> 38: x_libraries_orig="$x_libraries" > > This needs to capture the value from `with_x` as well. Both are variants of user input. Hi Erik, I added a check in the with_x case. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/15534#discussion_r1314568197 From lkorinth at openjdk.org Mon Sep 4 11:04:44 2023 From: lkorinth at openjdk.org (Leo Korinth) Date: Mon, 4 Sep 2023 11:04:44 GMT Subject: RFR: 8315097: Rename createJavaProcessBuilder [v3] In-Reply-To: References: Message-ID: <5o5B7LbCQN_C9xzd1EvrvTp04-6Atr0gih5WH69LeK4=.3a977034-8fe9-4da8-a167-f5dad3a97d75@github.com> On Wed, 30 Aug 2023 09:23:55 GMT, Leo Korinth wrote: >> Rename createJavaProcessBuilder so that it is not used by mistake instead of createTestJvm. >> >> I have used the following sed script: `find -name "*.java" | xargs -n 1 sed -i -e "s/createJavaProcessBuilder(/createJavaProcessBuilderIgnoreTestJavaOpts(/g"` >> >> Then I have manually modified ProcessTools.java. In that file I have moved one version of createJavaProcessBuilder so that it is close to the other version. Then I have added a javadoc comment in bold telling: >> >> /** >> * Create ProcessBuilder using the java launcher from the jdk to >> * be tested. >> * >> *

Please observe that you likely should use >> * createTestJvm() instead of this method because createTestJvm() >> * will add JVM options from "test.vm.opts" and "test.java.opts" >> * and this method will not do that. >> * >> * @param command Arguments to pass to the java command. >> * @return The ProcessBuilder instance representing the java command. >> */ >> >> >> I have used the name createJavaProcessBuilderIgnoreTestJavaOpts because of the name of Utils.prependTestJavaOpts that adds those VM flags. If you have a better name I could do a rename of the method. I kind of like that it is long and clumsy, that makes it harder to use... >> >> I have run tier 1 testing, and I have started more exhaustive testing. > > Leo Korinth has updated the pull request incrementally with one additional commit since the last revision: > > fix static import I have created an alternative that uses enums to force the user to make a decision: https://github.com/openjdk/jdk/compare/master...lkorinth:jdk:+process_tools . Another alternative is to do the same but instead using an enum (I think it is not as good). A third alternative is to use the current pull request with a better name. What do you prefer? Do you have a better alternative? Do someone still think the current code is good? I think what we have today is inferior to all these improvements, and I would like to make it harder to develop bad test cases. ------------- PR Comment: https://git.openjdk.org/jdk/pull/15452#issuecomment-1705068700 From mbaesken at openjdk.org Tue Sep 5 07:39:38 2023 From: mbaesken at openjdk.org (Matthias Baesken) Date: Tue, 5 Sep 2023 07:39:38 GMT Subject: RFR: JDK-8315499: build using devkit on Linux ppc64le RHEL puts path to devkit into libsplashscreen [v3] In-Reply-To: References: <_s3s_wxEckaR0nFvdyRDSaBCTU2IA9k9yCh7JZC7AHM=.9a472847-9bc4-437e-8829-a2da354aa3b2@github.com> Message-ID: On Mon, 4 Sep 2023 07:40:11 GMT, Matthias Baesken wrote: >> After looking at the build results of a jdk22 build on RHEL 8.4 Linux ppc64le that uses a ppc64le-linux-gnu-to-ppc64le-linux-gnu-fedora27-gcc11.3.0 >> devkit we observed those unwanted paths in libsplashscreen.so . >> See those objdump and ldd output : >> >> objdump -x ./lib/libsplashscreen.so | grep PATH >> RUNPATH /mydevkitsfolder/devkits/ppc64le-linux-gnu-to-ppc64le-linux-gnu-fedora27-gcc11.3.0/ppc64le-linux-gnu/sysroot/usr/lib64:$ORIGIN >> >> >> ldd ./lib/libsplashscreen.so >> ldd: warning: you do not have execution permission for `./lib/libsplashscreen.so' >> . . . >> libX11.so.6 => /mydevkitsfolder/devkits/ppc64le-linux-gnu-to-ppc64le-linux-gnu-fedora27-gcc11.3.0/ppc64le-linux-gnu/sysroot/usr/lib64/libX11.so.6 (0x00007fffa3920000) >> libXext.so.6 => /mydevkitsfolder/devkits/ppc64le-linux-gnu-to-ppc64le-linux-gnu-fedora27-gcc11.3.0/ppc64le-linux-gnu/sysroot/usr/lib64/libXext.so.6 (0x00007fffa38e0000) >> . . . >> >> These paths were introduced by the '-R' setting, but it seems to be highly dependent on the environment. But the '-R' setting should better be avoided anyway when the devkit is used. > > Matthias Baesken has updated the pull request incrementally with one additional commit since the last revision: > > with_x case needs to be handled Hi Erik, are you fine with the latest revision ? ------------- PR Comment: https://git.openjdk.org/jdk/pull/15534#issuecomment-1706097969 From aivanov at openjdk.org Tue Sep 5 11:53:18 2023 From: aivanov at openjdk.org (Alexey Ivanov) Date: Tue, 5 Sep 2023 11:53:18 GMT Subject: RFR: 8313348: Fix typo in JFormattedTextField: 'it self' [v2] In-Reply-To: References: Message-ID: > A trivial change: ?it self? ? ?itself?. > > In addition to it, I added a comma after ?Similarly? where it starts a sentence. Alexey Ivanov has updated the pull request incrementally with two additional commits since the last revision: - Update the copyright and organise imports in BasicTreeUI - BasicTreeUI: it self -> itself ------------- Changes: - all: https://git.openjdk.org/jdk/pull/15087/files - new: https://git.openjdk.org/jdk/pull/15087/files/c5fa16a1..fedb0da0 Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=15087&range=01 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=15087&range=00-01 Stats: 76 lines in 1 file changed: 61 ins; 2 del; 13 mod Patch: https://git.openjdk.org/jdk/pull/15087.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/15087/head:pull/15087 PR: https://git.openjdk.org/jdk/pull/15087 From erikj at openjdk.org Tue Sep 5 12:45:41 2023 From: erikj at openjdk.org (Erik Joelsson) Date: Tue, 5 Sep 2023 12:45:41 GMT Subject: RFR: JDK-8315499: build using devkit on Linux ppc64le RHEL puts path to devkit into libsplashscreen [v3] In-Reply-To: References: <_s3s_wxEckaR0nFvdyRDSaBCTU2IA9k9yCh7JZC7AHM=.9a472847-9bc4-437e-8829-a2da354aa3b2@github.com> Message-ID: On Mon, 4 Sep 2023 07:40:11 GMT, Matthias Baesken wrote: >> After looking at the build results of a jdk22 build on RHEL 8.4 Linux ppc64le that uses a ppc64le-linux-gnu-to-ppc64le-linux-gnu-fedora27-gcc11.3.0 >> devkit we observed those unwanted paths in libsplashscreen.so . >> See those objdump and ldd output : >> >> objdump -x ./lib/libsplashscreen.so | grep PATH >> RUNPATH /mydevkitsfolder/devkits/ppc64le-linux-gnu-to-ppc64le-linux-gnu-fedora27-gcc11.3.0/ppc64le-linux-gnu/sysroot/usr/lib64:$ORIGIN >> >> >> ldd ./lib/libsplashscreen.so >> ldd: warning: you do not have execution permission for `./lib/libsplashscreen.so' >> . . . >> libX11.so.6 => /mydevkitsfolder/devkits/ppc64le-linux-gnu-to-ppc64le-linux-gnu-fedora27-gcc11.3.0/ppc64le-linux-gnu/sysroot/usr/lib64/libX11.so.6 (0x00007fffa3920000) >> libXext.so.6 => /mydevkitsfolder/devkits/ppc64le-linux-gnu-to-ppc64le-linux-gnu-fedora27-gcc11.3.0/ppc64le-linux-gnu/sysroot/usr/lib64/libXext.so.6 (0x00007fffa38e0000) >> . . . >> >> These paths were introduced by the '-R' setting, but it seems to be highly dependent on the environment. But the '-R' setting should better be avoided anyway when the devkit is used. > > Matthias Baesken has updated the pull request incrementally with one additional commit since the last revision: > > with_x case needs to be handled Marked as reviewed by erikj (Reviewer). ------------- PR Review: https://git.openjdk.org/jdk/pull/15534#pullrequestreview-1610965702 From mbaesken at openjdk.org Tue Sep 5 12:50:48 2023 From: mbaesken at openjdk.org (Matthias Baesken) Date: Tue, 5 Sep 2023 12:50:48 GMT Subject: RFR: JDK-8315499: build using devkit on Linux ppc64le RHEL puts path to devkit into libsplashscreen [v3] In-Reply-To: References: <_s3s_wxEckaR0nFvdyRDSaBCTU2IA9k9yCh7JZC7AHM=.9a472847-9bc4-437e-8829-a2da354aa3b2@github.com> Message-ID: On Mon, 4 Sep 2023 07:40:11 GMT, Matthias Baesken wrote: >> After looking at the build results of a jdk22 build on RHEL 8.4 Linux ppc64le that uses a ppc64le-linux-gnu-to-ppc64le-linux-gnu-fedora27-gcc11.3.0 >> devkit we observed those unwanted paths in libsplashscreen.so . >> See those objdump and ldd output : >> >> objdump -x ./lib/libsplashscreen.so | grep PATH >> RUNPATH /mydevkitsfolder/devkits/ppc64le-linux-gnu-to-ppc64le-linux-gnu-fedora27-gcc11.3.0/ppc64le-linux-gnu/sysroot/usr/lib64:$ORIGIN >> >> >> ldd ./lib/libsplashscreen.so >> ldd: warning: you do not have execution permission for `./lib/libsplashscreen.so' >> . . . >> libX11.so.6 => /mydevkitsfolder/devkits/ppc64le-linux-gnu-to-ppc64le-linux-gnu-fedora27-gcc11.3.0/ppc64le-linux-gnu/sysroot/usr/lib64/libX11.so.6 (0x00007fffa3920000) >> libXext.so.6 => /mydevkitsfolder/devkits/ppc64le-linux-gnu-to-ppc64le-linux-gnu-fedora27-gcc11.3.0/ppc64le-linux-gnu/sysroot/usr/lib64/libXext.so.6 (0x00007fffa38e0000) >> . . . >> >> These paths were introduced by the '-R' setting, but it seems to be highly dependent on the environment. But the '-R' setting should better be avoided anyway when the devkit is used. > > Matthias Baesken has updated the pull request incrementally with one additional commit since the last revision: > > with_x case needs to be handled Hi Erik, thanks for the review ! ------------- PR Comment: https://git.openjdk.org/jdk/pull/15534#issuecomment-1706556893 From mbaesken at openjdk.org Tue Sep 5 12:50:50 2023 From: mbaesken at openjdk.org (Matthias Baesken) Date: Tue, 5 Sep 2023 12:50:50 GMT Subject: Integrated: JDK-8315499: build using devkit on Linux ppc64le RHEL puts path to devkit into libsplashscreen In-Reply-To: <_s3s_wxEckaR0nFvdyRDSaBCTU2IA9k9yCh7JZC7AHM=.9a472847-9bc4-437e-8829-a2da354aa3b2@github.com> References: <_s3s_wxEckaR0nFvdyRDSaBCTU2IA9k9yCh7JZC7AHM=.9a472847-9bc4-437e-8829-a2da354aa3b2@github.com> Message-ID: On Fri, 1 Sep 2023 11:02:36 GMT, Matthias Baesken wrote: > After looking at the build results of a jdk22 build on RHEL 8.4 Linux ppc64le that uses a ppc64le-linux-gnu-to-ppc64le-linux-gnu-fedora27-gcc11.3.0 > devkit we observed those unwanted paths in libsplashscreen.so . > See those objdump and ldd output : > > objdump -x ./lib/libsplashscreen.so | grep PATH > RUNPATH /mydevkitsfolder/devkits/ppc64le-linux-gnu-to-ppc64le-linux-gnu-fedora27-gcc11.3.0/ppc64le-linux-gnu/sysroot/usr/lib64:$ORIGIN > > > ldd ./lib/libsplashscreen.so > ldd: warning: you do not have execution permission for `./lib/libsplashscreen.so' > . . . > libX11.so.6 => /mydevkitsfolder/devkits/ppc64le-linux-gnu-to-ppc64le-linux-gnu-fedora27-gcc11.3.0/ppc64le-linux-gnu/sysroot/usr/lib64/libX11.so.6 (0x00007fffa3920000) > libXext.so.6 => /mydevkitsfolder/devkits/ppc64le-linux-gnu-to-ppc64le-linux-gnu-fedora27-gcc11.3.0/ppc64le-linux-gnu/sysroot/usr/lib64/libXext.so.6 (0x00007fffa38e0000) > . . . > > These paths were introduced by the '-R' setting, but it seems to be highly dependent on the environment. But the '-R' setting should better be avoided anyway when the devkit is used. This pull request has now been integrated. Changeset: ed2b4673 Author: Matthias Baesken URL: https://git.openjdk.org/jdk/commit/ed2b4673de6893047407c61f82b5e68741459876 Stats: 5 lines in 1 file changed: 2 ins; 0 del; 3 mod 8315499: build using devkit on Linux ppc64le RHEL puts path to devkit into libsplashscreen Reviewed-by: erikj ------------- PR: https://git.openjdk.org/jdk/pull/15534 From aivanov at openjdk.org Tue Sep 5 12:57:52 2023 From: aivanov at openjdk.org (Alexey Ivanov) Date: Tue, 5 Sep 2023 12:57:52 GMT Subject: RFR: 8297923: java.awt.ScrollPane broken after multiple scroll up/down In-Reply-To: References: Message-ID: On Tue, 6 Jun 2023 16:07:53 GMT, Alexey Ivanov wrote: > **Problem description** > > If you grab the thumb of the scroll bar of `ScrollPane` and drag it slowly and continuously up and down, you'll notice the UI stops rendering correctly: the child component of the scroll pane will render on the left of the frame itself, the inside of the scroll pane will be filled with the background color of its child component. > > **Root cause** > > AWT calls the [`::SetScrollInfo`](https://learn.microsoft.com/en-us/windows/win32/api/winuser/nf-winuser-setscrollinfo) function on EDT when AWT processes scroll bar tracking events. This Windows API is not thread-safe, calling this function on an incorrect thread leads to leaking GDI objects. > > When the process reaches the limit on the number of GDI objects, it cannot create new GDI objects, which results in rendering issues. > > **Fix** > > To resolve the problem, I modified the code so that `::SetScrollInfo` and [`::GetScrollInfo`](https://learn.microsoft.com/en-us/windows/win32/api/winuser/nf-winuser-getscrollinfo) are always called on the toolkit thread, all AWT components are created on the toolkit thread. > > An automatic test is provided. The test scrolls the vertical scroll bar up and down. Then the test takes a screenshot. When the bug is reproduced, the robot cannot create new GDI objects to capture the screenshot and it throws `OutOfMemoryError`. I have submitted the follow-up bugs. > Probably we should update the Java_sun_awt_windows_WScrollbarPeer_setValues as well? it calls the SetScrollInfo. [?](https://github.com/openjdk/jdk/pull/14338#issuecomment-1579851933) [JDK-8315690](https://bugs.openjdk.org/browse/JDK-8315690): Call ::SetScrollInfo on toolkit thread in awt.ScrollBar > In addition to that, `WScrollPanePeer.getScrollOffset` is unused, so it's never called. [?](https://github.com/openjdk/jdk/pull/14338#discussion_r1220111236) [JDK-8315691](https://bugs.openjdk.org/browse/JDK-8315691): Remove unused WScrollPanePeer.getScrollOffset method > There's also a specific `WM_AWT_SET_SCROLL_INFO` message to call `::SetScrollInfo`. This message is never used, it can also be removed. [?](https://github.com/openjdk/jdk/pull/14338#discussion_r1221395024) [JDK-8315693](https://bugs.openjdk.org/browse/JDK-8315693): Remove WM_AWT_SET_SCROLL_INFO message ------------- PR Comment: https://git.openjdk.org/jdk/pull/14338#issuecomment-1706567768 From aivanov at openjdk.org Tue Sep 5 13:14:05 2023 From: aivanov at openjdk.org (Alexey Ivanov) Date: Tue, 5 Sep 2023 13:14:05 GMT Subject: RFR: 8297923: java.awt.ScrollPane broken after multiple scroll up/down In-Reply-To: References: Message-ID: On Tue, 6 Jun 2023 21:00:20 GMT, Phil Race wrote: > I wonder if we have any other leaks due to similar thread mis-usage ? Seems possible since this one went un-detected for a long time and its probably one of the easier ones to get to run out of GDI objects. @prrace Potentially, all the usages of `SyncCall` are at risk. https://github.com/openjdk/jdk/blob/ed2b4673de6893047407c61f82b5e68741459876/src/java.desktop/windows/native/libawt/windows/awt_Toolkit.cpp#L1870-L1878 It does not even synchronise the threads. So, there could be other leaks or issues with memory visibility. I think this scenario led to leaks because it also modified the position of the horizontal scroll bar, which started animation provided by visual styles. The animation never got a change to complete before another update came. The issue wasn't reproducible if there was only vertical scroll bar which was being dragged. ------------- PR Comment: https://git.openjdk.org/jdk/pull/14338#issuecomment-1706593274 From rriggs at openjdk.org Tue Sep 5 18:08:39 2023 From: rriggs at openjdk.org (Roger Riggs) Date: Tue, 5 Sep 2023 18:08:39 GMT Subject: RFR: 8315097: Rename createJavaProcessBuilder [v3] In-Reply-To: <5o5B7LbCQN_C9xzd1EvrvTp04-6Atr0gih5WH69LeK4=.3a977034-8fe9-4da8-a167-f5dad3a97d75@github.com> References: <5o5B7LbCQN_C9xzd1EvrvTp04-6Atr0gih5WH69LeK4=.3a977034-8fe9-4da8-a167-f5dad3a97d75@github.com> Message-ID: On Mon, 4 Sep 2023 11:01:23 GMT, Leo Korinth wrote: > What do you prefer? Do you have a better alternative? Do someone still think the current code is good? I think what we have today is inferior to all these improvements, and I would like to make it harder to develop bad test ca The current API (name) is fine and fit for purpose; it does not promise or hide extra functionality under a simple name. There needs to be an explicit intention in the test(s) to support after the fact that arbitrary flags can be added. @AlanBateman's proposal for naming [above](https://github.com/openjdk/jdk/pull/15452#issuecomment-1700459277) (or similar) would capture more clearly that test options are propagated to the child process. Every test writer should be aware that additional command line options may be mixed in. There are many cases in which the ProcessTools APIs are not used to create child processes and do not need to be used in writing tests. They provide some convenience but also add a dependency and another API layer to work through in the case of failures. As far as I'm aware, there is no general guidance or design pattern outside of hotspot tests to propagate flags or use ProcessTools. Adding that as a requirement will need a different level of communication and change. ------------- PR Comment: https://git.openjdk.org/jdk/pull/15452#issuecomment-1707072375 From msheppar at openjdk.org Tue Sep 5 22:25:39 2023 From: msheppar at openjdk.org (Mark Sheppard) Date: Tue, 5 Sep 2023 22:25:39 GMT Subject: RFR: 8315097: Rename createJavaProcessBuilder [v3] In-Reply-To: References: Message-ID: On Wed, 30 Aug 2023 09:23:55 GMT, Leo Korinth wrote: >> Rename createJavaProcessBuilder so that it is not used by mistake instead of createTestJvm. >> >> I have used the following sed script: `find -name "*.java" | xargs -n 1 sed -i -e "s/createJavaProcessBuilder(/createJavaProcessBuilderIgnoreTestJavaOpts(/g"` >> >> Then I have manually modified ProcessTools.java. In that file I have moved one version of createJavaProcessBuilder so that it is close to the other version. Then I have added a javadoc comment in bold telling: >> >> /** >> * Create ProcessBuilder using the java launcher from the jdk to >> * be tested. >> * >> *

Please observe that you likely should use >> * createTestJvm() instead of this method because createTestJvm() >> * will add JVM options from "test.vm.opts" and "test.java.opts" >> * and this method will not do that. >> * >> * @param command Arguments to pass to the java command. >> * @return The ProcessBuilder instance representing the java command. >> */ >> >> >> I have used the name createJavaProcessBuilderIgnoreTestJavaOpts because of the name of Utils.prependTestJavaOpts that adds those VM flags. If you have a better name I could do a rename of the method. I kind of like that it is long and clumsy, that makes it harder to use... >> >> I have run tier 1 testing, and I have started more exhaustive testing. > > Leo Korinth has updated the pull request incrementally with one additional commit since the last revision: > > fix static import > From talking to other HotSpot devs it is quite clear that the different names lead to mistakes when writing (copy-n-pasting) tests, so I'm happy that we try to figure out some way to make it more obvious when we prepend the extra test options and when we don't. > > I agree with @msheppar that `createTestJvm` isn't a good name and I wouldn't be opposed to changing that name instead of `createJavaProcessBuilder`. However, if we do rename that function I strongly urge us to also rename the corresponding `executeTestJvm` function. > > I also think it is too obscure that functions with _Test_ in the name prepend the extra test options, and those without _Test_ don't, so I'd like to get rid of that convention. > > I wouldn't be opposed to a change that: > > * Keeps the `createJavaProcessBuilder` name > > * Renames `createTestJvm` to `createJavaProcessBuilderPrependTestOpts` > > * Renames `executeTestJvm` to `executeJavaPrependTestOpts` > > * Removes `createTestJava` > > * Removes `executeTestJava` I think @stefank made a reasonable suggestion which was endorsed by @AlanBateman which would remove the misconception hurdle ------------- PR Comment: https://git.openjdk.org/jdk/pull/15452#issuecomment-1707391042 From erikj at openjdk.org Tue Sep 5 22:58:17 2023 From: erikj at openjdk.org (Erik Joelsson) Date: Tue, 5 Sep 2023 22:58:17 GMT Subject: RFR: 8267174: Many test files have the wrong Copyright header Message-ID: There are a number of files in the `test` directory that have an incorrect copyright header, which includes the "classpath" exception text. This patch removes that text from all test files that I could find it in. I did this using a combination of `sed` and `grep`. Reviewing this patch is probably easier using the raw patch file or a suitable webrev format. It's my assumption that these headers were introduced by mistake as it's quite easy to copy the wrong template when creating new files. ------------- Commit messages: - JDK-8267174 Changes: https://git.openjdk.org/jdk/pull/15573/files Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=15573&range=00 Issue: https://bugs.openjdk.org/browse/JDK-8267174 Stats: 1944 lines in 648 files changed: 0 ins; 1296 del; 648 mod Patch: https://git.openjdk.org/jdk/pull/15573.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/15573/head:pull/15573 PR: https://git.openjdk.org/jdk/pull/15573 From cjplummer at openjdk.org Tue Sep 5 23:15:36 2023 From: cjplummer at openjdk.org (Chris Plummer) Date: Tue, 5 Sep 2023 23:15:36 GMT Subject: RFR: 8267174: Many test files have the wrong Copyright header In-Reply-To: References: Message-ID: On Tue, 5 Sep 2023 22:49:41 GMT, Erik Joelsson wrote: > There are a number of files in the `test` directory that have an incorrect copyright header, which includes the "classpath" exception text. This patch removes that text from all test files that I could find it in. I did this using a combination of `sed` and `grep`. Reviewing this patch is probably easier using the raw patch file or a suitable webrev format. > > It's my assumption that these headers were introduced by mistake as it's quite easy to copy the wrong template when creating new files. I wonder if this is the right thing to do for the hprof files. I believe they originated from some hprof tools that we no longer ship. 3rd parties might choose to integrate them into their own tools. ------------- PR Comment: https://git.openjdk.org/jdk/pull/15573#issuecomment-1707426607 From jjg at openjdk.org Tue Sep 5 23:18:39 2023 From: jjg at openjdk.org (Jonathan Gibbons) Date: Tue, 5 Sep 2023 23:18:39 GMT Subject: RFR: 8267174: Many test files have the wrong Copyright header In-Reply-To: References: Message-ID: On Tue, 5 Sep 2023 22:49:41 GMT, Erik Joelsson wrote: > There are a number of files in the `test` directory that have an incorrect copyright header, which includes the "classpath" exception text. This patch removes that text from all test files that I could find it in. I did this using a combination of `sed` and `grep`. Reviewing this patch is probably easier using the raw patch file or a suitable webrev format. > > It's my assumption that these headers were introduced by mistake as it's quite easy to copy the wrong template when creating new files. One has to wonder about the `**/*_OLD.java` files, but that would be a different cleanup ------------- PR Review: https://git.openjdk.org/jdk/pull/15573#pullrequestreview-1612069262 From valeriep at openjdk.org Tue Sep 5 23:37:37 2023 From: valeriep at openjdk.org (Valerie Peng) Date: Tue, 5 Sep 2023 23:37:37 GMT Subject: RFR: 8267174: Many test files have the wrong Copyright header In-Reply-To: References: Message-ID: On Tue, 5 Sep 2023 22:49:41 GMT, Erik Joelsson wrote: > There are a number of files in the `test` directory that have an incorrect copyright header, which includes the "classpath" exception text. This patch removes that text from all test files that I could find it in. I did this using a combination of `sed` and `grep`. Reviewing this patch is probably easier using the raw patch file or a suitable webrev format. > > It's my assumption that these headers were introduced by mistake as it's quite easy to copy the wrong template when creating new files. Security area looks good. ------------- Marked as reviewed by valeriep (Reviewer). PR Review: https://git.openjdk.org/jdk/pull/15573#pullrequestreview-1612089791 From honkar at openjdk.org Wed Sep 6 00:48:51 2023 From: honkar at openjdk.org (Harshitha Onkar) Date: Wed, 6 Sep 2023 00:48:51 GMT Subject: RFR: 8315584 : java/awt/print/Dialog/DialogType.java fails with option not supported: yesno In-Reply-To: References: Message-ID: On Sun, 3 Sep 2023 22:12:49 GMT, lawrence.andrews wrote: > Test was failing with "test result: Error. Parse Exception: Arguments to `manual' option not supported: yesno" > Following are fixed > 1) Removed yesno > 2) Used PassFailJFrame manual test framework to show the test instruction & allow the user to decide test execution result. > 3) Added SkippedException in case Printer is not configured on the test host. > 4) Updated the instruction how to close the print dialog that test is showing to the user. > 5) Added an extra line to the file that was missing. test/jdk/java/awt/print/Dialog/DialogType.java line 26: > 24: import java.awt.print.PrinterJob; > 25: import java.lang.reflect.InvocationTargetException; > 26: import javax.print.attribute.Attribute; Unused imports can be removed test/jdk/java/awt/print/Dialog/DialogType.java line 52: > 50: Two dialogs are shown in succession., > 51: The test passes as long as no exceptions are thrown, *AND*, > 52: if running on Windows only, the first dialog is a native windows, comma is not necessary at certain places in the instructions section and can be removed here - "when using new API," "native windows," and "are shown in succession.," ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/15554#discussion_r1316557563 PR Review Comment: https://git.openjdk.org/jdk/pull/15554#discussion_r1316557073 From duke at openjdk.org Wed Sep 6 01:00:17 2023 From: duke at openjdk.org (lawrence.andrews) Date: Wed, 6 Sep 2023 01:00:17 GMT Subject: RFR: 8315584 : java/awt/print/Dialog/DialogType.java fails with option not supported: yesno [v2] In-Reply-To: References: Message-ID: > Test was failing with "test result: Error. Parse Exception: Arguments to `manual' option not supported: yesno" > Following are fixed > 1) Removed yesno > 2) Used PassFailJFrame manual test framework to show the test instruction & allow the user to decide test execution result. > 3) Added SkippedException in case Printer is not configured on the test host. > 4) Updated the instruction how to close the print dialog that test is showing to the user. > 5) Added an extra line to the file that was missing. lawrence.andrews has updated the pull request incrementally with one additional commit since the last revision: Removed the unused import statement and comma ------------- Changes: - all: https://git.openjdk.org/jdk/pull/15554/files - new: https://git.openjdk.org/jdk/pull/15554/files/e175b1de..db04551d Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=15554&range=01 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=15554&range=00-01 Stats: 4 lines in 1 file changed: 0 ins; 1 del; 3 mod Patch: https://git.openjdk.org/jdk/pull/15554.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/15554/head:pull/15554 PR: https://git.openjdk.org/jdk/pull/15554 From psadhukhan at openjdk.org Wed Sep 6 06:15:17 2023 From: psadhukhan at openjdk.org (Prasanta Sadhukhan) Date: Wed, 6 Sep 2023 06:15:17 GMT Subject: RFR: 8315594: Open source few headless Swing misc tests Message-ID: Few closed swing tests are open sourced ------------- Commit messages: - 8315594:Open source few headless Swing misc tests Changes: https://git.openjdk.org/jdk/pull/15577/files Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=15577&range=00 Issue: https://bugs.openjdk.org/browse/JDK-8315594 Stats: 256 lines in 4 files changed: 256 ins; 0 del; 0 mod Patch: https://git.openjdk.org/jdk/pull/15577.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/15577/head:pull/15577 PR: https://git.openjdk.org/jdk/pull/15577 From psadhukhan at openjdk.org Wed Sep 6 06:54:24 2023 From: psadhukhan at openjdk.org (Prasanta Sadhukhan) Date: Wed, 6 Sep 2023 06:54:24 GMT Subject: RFR: 8315606: Open source few swing text/html tests Message-ID: Few closed swing text/html tests are opensourced ------------- Commit messages: - 8315606: Open source few swing text/html tests Changes: https://git.openjdk.org/jdk/pull/15580/files Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=15580&range=00 Issue: https://bugs.openjdk.org/browse/JDK-8315606 Stats: 398 lines in 4 files changed: 398 ins; 0 del; 0 mod Patch: https://git.openjdk.org/jdk/pull/15580.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/15580/head:pull/15580 PR: https://git.openjdk.org/jdk/pull/15580 From psadhukhan at openjdk.org Wed Sep 6 07:21:04 2023 From: psadhukhan at openjdk.org (Prasanta Sadhukhan) Date: Wed, 6 Sep 2023 07:21:04 GMT Subject: RFR: 8315600: Open source few more headless Swing misc tests Message-ID: Few more closed swing headless tests are opensourced ------------- Commit messages: - 8315600: Open source few more headless Swing misc tests Changes: https://git.openjdk.org/jdk/pull/15582/files Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=15582&range=00 Issue: https://bugs.openjdk.org/browse/JDK-8315600 Stats: 209 lines in 3 files changed: 209 ins; 0 del; 0 mod Patch: https://git.openjdk.org/jdk/pull/15582.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/15582/head:pull/15582 PR: https://git.openjdk.org/jdk/pull/15582 From alanb at openjdk.org Wed Sep 6 07:53:36 2023 From: alanb at openjdk.org (Alan Bateman) Date: Wed, 6 Sep 2023 07:53:36 GMT Subject: RFR: 8267174: Many test files have the wrong Copyright header In-Reply-To: References: Message-ID: On Tue, 5 Sep 2023 23:15:53 GMT, Jonathan Gibbons wrote: > One has to wonder about the `**/*_OLD.java` files, but that would be a different cleanup The IBM double byte charsets were re-implemented in JDK 7. I think the old implementations moved to the test tree so it could be used to test the new/replacement implementations. ------------- PR Comment: https://git.openjdk.org/jdk/pull/15573#issuecomment-1707845577 From aturbanov at openjdk.org Wed Sep 6 09:15:44 2023 From: aturbanov at openjdk.org (Andrey Turbanov) Date: Wed, 6 Sep 2023 09:15:44 GMT Subject: RFR: 8315594: Open source few headless Swing misc tests In-Reply-To: References: Message-ID: On Wed, 6 Sep 2023 06:05:59 GMT, Prasanta Sadhukhan wrote: > Few closed swing tests are open sourced test/jdk/javax/swing/text/html/HTMLEditorKit/bug4267840.java line 39: > 37: public static void main(String[] args) throws Exception { > 38: SwingUtilities.invokeAndWait(() -> { > 39: final JTextPane textpane = new JTextPane (); Suggestion: final JTextPane textpane = new JTextPane(); test/jdk/javax/swing/text/html/HTMLEditorKit/bug4267840.java line 40: > 38: SwingUtilities.invokeAndWait(() -> { > 39: final JTextPane textpane = new JTextPane (); > 40: textpane.setContentType ("text/html"); Suggestion: textpane.setContentType("text/html"); test/jdk/javax/swing/text/html/HTMLEditorKit/bug4267840.java line 41: > 39: final JTextPane textpane = new JTextPane (); > 40: textpane.setContentType ("text/html"); > 41: final EditorKit kit = textpane.getEditorKit (); Suggestion: final EditorKit kit = textpane.getEditorKit(); test/jdk/javax/swing/text/html/HTMLEditorKit/bug4267840.java line 49: > 47: kit.write(out, textpane.getDocument(), 0, > 48: textpane.getDocument().getLength()); > 49: out.close (); Suggestion: out.close(); test/jdk/javax/swing/text/html/HTMLEditorKit/bug4267840.java line 52: > 50: } catch (Exception e) {} > 51: try { > 52: if (file.length() < 6 ) { // simply can't be Suggestion: if (file.length() < 6) { // simply can't be ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/15577#discussion_r1316989038 PR Review Comment: https://git.openjdk.org/jdk/pull/15577#discussion_r1316989404 PR Review Comment: https://git.openjdk.org/jdk/pull/15577#discussion_r1316989243 PR Review Comment: https://git.openjdk.org/jdk/pull/15577#discussion_r1316987297 PR Review Comment: https://git.openjdk.org/jdk/pull/15577#discussion_r1316987478 From psadhukhan at openjdk.org Wed Sep 6 09:28:12 2023 From: psadhukhan at openjdk.org (Prasanta Sadhukhan) Date: Wed, 6 Sep 2023 09:28:12 GMT Subject: RFR: 8315594: Open source few headless Swing misc tests [v2] In-Reply-To: References: Message-ID: > Few closed swing tests are open sourced Prasanta Sadhukhan has updated the pull request incrementally with one additional commit since the last revision: Spacing issue ------------- Changes: - all: https://git.openjdk.org/jdk/pull/15577/files - new: https://git.openjdk.org/jdk/pull/15577/files/51e9731c..2a309750 Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=15577&range=01 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=15577&range=00-01 Stats: 5 lines in 1 file changed: 0 ins; 0 del; 5 mod Patch: https://git.openjdk.org/jdk/pull/15577.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/15577/head:pull/15577 PR: https://git.openjdk.org/jdk/pull/15577 From aturbanov at openjdk.org Wed Sep 6 09:48:42 2023 From: aturbanov at openjdk.org (Andrey Turbanov) Date: Wed, 6 Sep 2023 09:48:42 GMT Subject: RFR: 8315600: Open source few more headless Swing misc tests In-Reply-To: References: Message-ID: On Wed, 6 Sep 2023 07:12:55 GMT, Prasanta Sadhukhan wrote: > Few more closed swing headless tests are opensourced test/jdk/javax/swing/tree/FixedHeightLayoutCache/bug4210354.java line 80: > 78: throw new RuntimeException("Test failed"); > 79: } > 80: } catch(Exception e) { Suggestion: } catch (Exception e) { ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/15582#discussion_r1317030144 From psadhukhan at openjdk.org Wed Sep 6 10:05:41 2023 From: psadhukhan at openjdk.org (Prasanta Sadhukhan) Date: Wed, 6 Sep 2023 10:05:41 GMT Subject: RFR: 8315600: Open source few more headless Swing misc tests [v2] In-Reply-To: References: Message-ID: > Few more closed swing headless tests are opensourced Prasanta Sadhukhan has updated the pull request incrementally with one additional commit since the last revision: Space issue ------------- Changes: - all: https://git.openjdk.org/jdk/pull/15582/files - new: https://git.openjdk.org/jdk/pull/15582/files/51b12e83..0c7c44b9 Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=15582&range=01 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=15582&range=00-01 Stats: 1 line in 1 file changed: 0 ins; 0 del; 1 mod Patch: https://git.openjdk.org/jdk/pull/15582.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/15582/head:pull/15582 PR: https://git.openjdk.org/jdk/pull/15582 From psadhukhan at openjdk.org Wed Sep 6 10:25:27 2023 From: psadhukhan at openjdk.org (Prasanta Sadhukhan) Date: Wed, 6 Sep 2023 10:25:27 GMT Subject: RFR: 8315606: Open source few swing text/html tests [v2] In-Reply-To: References: Message-ID: > Few closed swing text/html tests are opensourced Prasanta Sadhukhan has updated the pull request incrementally with one additional commit since the last revision: Review comment fix ------------- Changes: - all: https://git.openjdk.org/jdk/pull/15580/files - new: https://git.openjdk.org/jdk/pull/15580/files/fd341a5f..2b531b0b Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=15580&range=01 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=15580&range=00-01 Stats: 13 lines in 4 files changed: 1 ins; 2 del; 10 mod Patch: https://git.openjdk.org/jdk/pull/15580.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/15580/head:pull/15580 PR: https://git.openjdk.org/jdk/pull/15580 From dfuchs at openjdk.org Wed Sep 6 11:54:38 2023 From: dfuchs at openjdk.org (Daniel Fuchs) Date: Wed, 6 Sep 2023 11:54:38 GMT Subject: RFR: 8267174: Many test files have the wrong Copyright header In-Reply-To: References: Message-ID: On Tue, 5 Sep 2023 22:49:41 GMT, Erik Joelsson wrote: > There are a number of files in the `test` directory that have an incorrect copyright header, which includes the "classpath" exception text. This patch removes that text from all test files that I could find it in. I did this using a combination of `sed` and `grep`. Reviewing this patch is probably easier using the raw patch file or a suitable webrev format. > > It's my assumption that these headers were introduced by mistake as it's quite easy to copy the wrong template when creating new files. jmx, jndi, and net changes LGTM ------------- PR Review: https://git.openjdk.org/jdk/pull/15573#pullrequestreview-1613147541 From aivanov at openjdk.org Wed Sep 6 12:32:39 2023 From: aivanov at openjdk.org (Alexey Ivanov) Date: Wed, 6 Sep 2023 12:32:39 GMT Subject: RFR: 8315606: Open source few swing text/html tests [v2] In-Reply-To: References: Message-ID: On Wed, 6 Sep 2023 10:25:27 GMT, Prasanta Sadhukhan wrote: >> Few closed swing text/html tests are opensourced > > Prasanta Sadhukhan has updated the pull request incrementally with one additional commit since the last revision: > > Review comment fix Except for the minor formatting. test/jdk/javax/swing/text/html/ImageView/bug4329185.java line 30: > 28: * @key headful > 29: * @run main bug4329185 > 30: */ Suggestion: * @run main bug4329185 */ test/jdk/javax/swing/text/html/InlineView/bug4623342.java line 29: > 27: @key headful > 28: @run main bug4623342 > 29: */ Suggestion: /* * @test * @bug 4623342 * @summary Tests if InlineView causes extra spacing around images in JTable * @key headful * @run main bug4623342 */ To be consistent with other tests. ------------- Marked as reviewed by aivanov (Reviewer). PR Review: https://git.openjdk.org/jdk/pull/15580#pullrequestreview-1613209653 PR Review Comment: https://git.openjdk.org/jdk/pull/15580#discussion_r1317202880 PR Review Comment: https://git.openjdk.org/jdk/pull/15580#discussion_r1317205662 From aivanov at openjdk.org Wed Sep 6 13:09:38 2023 From: aivanov at openjdk.org (Alexey Ivanov) Date: Wed, 6 Sep 2023 13:09:38 GMT Subject: RFR: 8267174: Many test files have the wrong Copyright header In-Reply-To: References: Message-ID: On Tue, 5 Sep 2023 22:49:41 GMT, Erik Joelsson wrote: > There are a number of files in the `test` directory that have an incorrect copyright header, which includes the "classpath" exception text. This patch removes that text from all test files that I could find it in. I did this using a combination of `sed` and `grep`. Reviewing this patch is probably easier using the raw patch file or a suitable webrev format. > > It's my assumption that these headers were introduced by mistake as it's quite easy to copy the wrong template when creating new files. Client changes look good. I've looked through all the files, other files look good too. ------------- Marked as reviewed by aivanov (Reviewer). PR Review: https://git.openjdk.org/jdk/pull/15573#pullrequestreview-1613295743 From psadhukhan at openjdk.org Wed Sep 6 13:28:29 2023 From: psadhukhan at openjdk.org (Prasanta Sadhukhan) Date: Wed, 6 Sep 2023 13:28:29 GMT Subject: RFR: 8315600: Open source few more headless Swing misc tests [v3] In-Reply-To: References: Message-ID: > Few more closed swing headless tests are opensourced Prasanta Sadhukhan has updated the pull request incrementally with one additional commit since the last revision: Minor optimization ------------- Changes: - all: https://git.openjdk.org/jdk/pull/15582/files - new: https://git.openjdk.org/jdk/pull/15582/files/0c7c44b9..fccec782 Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=15582&range=02 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=15582&range=01-02 Stats: 27 lines in 3 files changed: 8 ins; 7 del; 12 mod Patch: https://git.openjdk.org/jdk/pull/15582.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/15582/head:pull/15582 PR: https://git.openjdk.org/jdk/pull/15582 From psadhukhan at openjdk.org Wed Sep 6 13:34:10 2023 From: psadhukhan at openjdk.org (Prasanta Sadhukhan) Date: Wed, 6 Sep 2023 13:34:10 GMT Subject: RFR: 8315600: Open source few more headless Swing misc tests [v4] In-Reply-To: References: Message-ID: > Few more closed swing headless tests are opensourced Prasanta Sadhukhan has updated the pull request incrementally with one additional commit since the last revision: Sort imports ------------- Changes: - all: https://git.openjdk.org/jdk/pull/15582/files - new: https://git.openjdk.org/jdk/pull/15582/files/fccec782..a1c72b8e Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=15582&range=03 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=15582&range=02-03 Stats: 7 lines in 2 files changed: 3 ins; 4 del; 0 mod Patch: https://git.openjdk.org/jdk/pull/15582.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/15582/head:pull/15582 PR: https://git.openjdk.org/jdk/pull/15582 From aivanov at openjdk.org Wed Sep 6 14:54:39 2023 From: aivanov at openjdk.org (Alexey Ivanov) Date: Wed, 6 Sep 2023 14:54:39 GMT Subject: RFR: 8313810: BoxLayout uses

instead of list for layout options In-Reply-To: References: Message-ID: On Mon, 7 Aug 2023 19:43:38 GMT, Alexey Ivanov wrote: > A clean-up of documentation for [`BoxLayout`](https://docs.oracle.com/en/java/javase/17/docs/api/java.desktop/javax/swing/BoxLayout.html#class-description): > > 1. Use the `
    ` element instead of `
    ` to list layout options or axes. > 2. Add links to `GridBagLayout` and `Box` classes. > 3. Markup references to classes, mostly `BoxLayout` itself, with `{@code}`. > 4. Separate the introduction to layout description from the description of horizontal layout. They're now in different paragraphs for easier scanning. > 5. Add the missing ?a? articles. > 6. Organise imports, including expanding the wildcard import. > > The updated version: [**`BoxLayout.html`**](https://cr.openjdk.org/~aivanov/8313810/api/java.desktop/javax/swing/BoxLayout.html#class-description) (without the CSS). Anyone else? Or may I integrate with one reviewer only? ------------- PR Comment: https://git.openjdk.org/jdk/pull/15182#issuecomment-1708526538 From psadhukhan at openjdk.org Wed Sep 6 15:41:47 2023 From: psadhukhan at openjdk.org (Prasanta Sadhukhan) Date: Wed, 6 Sep 2023 15:41:47 GMT Subject: RFR: 8315600: Open source few more headless Swing misc tests [v5] In-Reply-To: References: Message-ID: > Few more closed swing headless tests are opensourced Prasanta Sadhukhan has updated the pull request incrementally with one additional commit since the last revision: Indent ------------- Changes: - all: https://git.openjdk.org/jdk/pull/15582/files - new: https://git.openjdk.org/jdk/pull/15582/files/a1c72b8e..f4cf50c7 Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=15582&range=04 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=15582&range=03-04 Stats: 1 line in 1 file changed: 0 ins; 0 del; 1 mod Patch: https://git.openjdk.org/jdk/pull/15582.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/15582/head:pull/15582 PR: https://git.openjdk.org/jdk/pull/15582 From psadhukhan at openjdk.org Wed Sep 6 15:47:09 2023 From: psadhukhan at openjdk.org (Prasanta Sadhukhan) Date: Wed, 6 Sep 2023 15:47:09 GMT Subject: RFR: 8315602: Open source swing security manager test Message-ID: A security manager swing test is open sourced ------------- Commit messages: - 8315602: Open source swing security manager test Changes: https://git.openjdk.org/jdk/pull/15597/files Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=15597&range=00 Issue: https://bugs.openjdk.org/browse/JDK-8315602 Stats: 55 lines in 1 file changed: 55 ins; 0 del; 0 mod Patch: https://git.openjdk.org/jdk/pull/15597.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/15597/head:pull/15597 PR: https://git.openjdk.org/jdk/pull/15597 From aivanov at openjdk.org Wed Sep 6 15:49:40 2023 From: aivanov at openjdk.org (Alexey Ivanov) Date: Wed, 6 Sep 2023 15:49:40 GMT Subject: RFR: 8315600: Open source few more headless Swing misc tests [v5] In-Reply-To: References: Message-ID: On Wed, 6 Sep 2023 15:41:47 GMT, Prasanta Sadhukhan wrote: >> Few more closed swing headless tests are opensourced > > Prasanta Sadhukhan has updated the pull request incrementally with one additional commit since the last revision: > > Indent Marked as reviewed by aivanov (Reviewer). ------------- PR Review: https://git.openjdk.org/jdk/pull/15582#pullrequestreview-1613678486 From aivanov at openjdk.org Wed Sep 6 15:55:41 2023 From: aivanov at openjdk.org (Alexey Ivanov) Date: Wed, 6 Sep 2023 15:55:41 GMT Subject: RFR: 8315600: Open source few more headless Swing misc tests [v5] In-Reply-To: References: Message-ID: On Wed, 6 Sep 2023 09:45:41 GMT, Andrey Turbanov wrote: >> Prasanta Sadhukhan has updated the pull request incrementally with one additional commit since the last revision: >> >> Indent > > test/jdk/javax/swing/tree/FixedHeightLayoutCache/bug4210354.java line 80: > >> 78: throw new RuntimeException("Test failed"); >> 79: } >> 80: } catch(Exception e) { > > Suggestion: > > } catch (Exception e) { This line is gone in the latest version. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/15582#discussion_r1317503773 From aivanov at openjdk.org Wed Sep 6 15:55:42 2023 From: aivanov at openjdk.org (Alexey Ivanov) Date: Wed, 6 Sep 2023 15:55:42 GMT Subject: RFR: 8315600: Open source few more headless Swing misc tests [v5] In-Reply-To: References: Message-ID: On Wed, 6 Sep 2023 15:41:47 GMT, Prasanta Sadhukhan wrote: >> Few more closed swing headless tests are opensourced > > Prasanta Sadhukhan has updated the pull request incrementally with one additional commit since the last revision: > > Indent test/jdk/javax/swing/undo/bug4992178.java line 1: > 1: /* Perhaps, this file, `bug4992178.java`, can be moved into `UndoManager` folder where `bug4706533.java` is put. These two tests are closely related, they test the functionality of `UndoManager.setLimit`. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/15582#discussion_r1317503013 From iris at openjdk.org Wed Sep 6 16:02:41 2023 From: iris at openjdk.org (Iris Clark) Date: Wed, 6 Sep 2023 16:02:41 GMT Subject: RFR: 8267174: Many test files have the wrong Copyright header In-Reply-To: References: Message-ID: On Tue, 5 Sep 2023 22:49:41 GMT, Erik Joelsson wrote: > There are a number of files in the `test` directory that have an incorrect copyright header, which includes the "classpath" exception text. This patch removes that text from all test files that I could find it in. I did this using a combination of `sed` and `grep`. Reviewing this patch is probably easier using the raw patch file or a suitable webrev format. > > It's my assumption that these headers were introduced by mistake as it's quite easy to copy the wrong template when creating new files. Thanks for fixing! ------------- Marked as reviewed by iris (Reviewer). PR Review: https://git.openjdk.org/jdk/pull/15573#pullrequestreview-1613704179 From erikj at openjdk.org Wed Sep 6 16:09:41 2023 From: erikj at openjdk.org (Erik Joelsson) Date: Wed, 6 Sep 2023 16:09:41 GMT Subject: RFR: 8267174: Many test files have the wrong Copyright header In-Reply-To: References: Message-ID: On Tue, 5 Sep 2023 23:12:51 GMT, Chris Plummer wrote: > I wonder if this is the right thing to do for the hprof files. I believe they originated from some hprof tools that we no longer ship. 3rd parties might choose to integrate them into their own tools. Do you think I should revert them? ------------- PR Comment: https://git.openjdk.org/jdk/pull/15573#issuecomment-1708676439 From lkorinth at openjdk.org Wed Sep 6 16:24:45 2023 From: lkorinth at openjdk.org (Leo Korinth) Date: Wed, 6 Sep 2023 16:24:45 GMT Subject: RFR: 8315097: Rename createJavaProcessBuilder [v3] In-Reply-To: References: Message-ID: On Wed, 30 Aug 2023 09:23:55 GMT, Leo Korinth wrote: >> Rename createJavaProcessBuilder so that it is not used by mistake instead of createTestJvm. >> >> I have used the following sed script: `find -name "*.java" | xargs -n 1 sed -i -e "s/createJavaProcessBuilder(/createJavaProcessBuilderIgnoreTestJavaOpts(/g"` >> >> Then I have manually modified ProcessTools.java. In that file I have moved one version of createJavaProcessBuilder so that it is close to the other version. Then I have added a javadoc comment in bold telling: >> >> /** >> * Create ProcessBuilder using the java launcher from the jdk to >> * be tested. >> * >> *

    Please observe that you likely should use >> * createTestJvm() instead of this method because createTestJvm() >> * will add JVM options from "test.vm.opts" and "test.java.opts" >> * and this method will not do that. >> * >> * @param command Arguments to pass to the java command. >> * @return The ProcessBuilder instance representing the java command. >> */ >> >> >> I have used the name createJavaProcessBuilderIgnoreTestJavaOpts because of the name of Utils.prependTestJavaOpts that adds those VM flags. If you have a better name I could do a rename of the method. I kind of like that it is long and clumsy, that makes it harder to use... >> >> I have run tier 1 testing, and I have started more exhaustive testing. > > Leo Korinth has updated the pull request incrementally with one additional commit since the last revision: > > fix static import I think you are missing the point. If you take a look at [the parent bug of the sub task](https://bugs.openjdk.org/browse/JDK-8314823) you can see that the problem described is *not* that people are using `createTestJvm` in error. The problem is that they are (or possibly are) using `createJavaProcessBuilder` in error. Thus renaming `createTestJvm` might help a little at most for this specific problem. Renaming `createJavaProcessBuilder` most probably helps *more*. I guess the alternative of forcing the user to make a choice using an enum value will help even more. ------------- PR Comment: https://git.openjdk.org/jdk/pull/15452#issuecomment-1708705105 From honkar at openjdk.org Wed Sep 6 16:42:40 2023 From: honkar at openjdk.org (Harshitha Onkar) Date: Wed, 6 Sep 2023 16:42:40 GMT Subject: RFR: 8315584 : java/awt/print/Dialog/DialogType.java fails with option not supported: yesno [v2] In-Reply-To: References: Message-ID: <71_kopFHmGMweY-vJYPf8g9i1dNq4l_2zpEHPVJ-P4Q=.0b23c25b-3c69-4af4-9732-c342f3f6f753@github.com> On Wed, 6 Sep 2023 01:00:17 GMT, lawrence.andrews wrote: >> Test was failing with "test result: Error. Parse Exception: Arguments to `manual' option not supported: yesno" >> Following are fixed >> 1) Removed yesno >> 2) Used PassFailJFrame manual test framework to show the test instruction & allow the user to decide test execution result. >> 3) Added SkippedException in case Printer is not configured on the test host. >> 4) Updated the instruction how to close the print dialog that test is showing to the user. >> 5) Added an extra line to the file that was missing. > > lawrence.andrews has updated the pull request incrementally with one additional commit since the last revision: > > Removed the unused import statement and comma LGTM ------------- Marked as reviewed by honkar (Committer). PR Review: https://git.openjdk.org/jdk/pull/15554#pullrequestreview-1613781820 From cjplummer at openjdk.org Wed Sep 6 16:52:42 2023 From: cjplummer at openjdk.org (Chris Plummer) Date: Wed, 6 Sep 2023 16:52:42 GMT Subject: RFR: 8267174: Many test files have the wrong Copyright header In-Reply-To: References: Message-ID: On Wed, 6 Sep 2023 16:06:29 GMT, Erik Joelsson wrote: > > I wonder if this is the right thing to do for the hprof files. I believe they originated from some hprof tools that we no longer ship. 3rd parties might choose to integrate them into their own tools. > > Do you think I should revert them? I'm not sure. I think you need to consult someone with expertise in this area. ------------- PR Comment: https://git.openjdk.org/jdk/pull/15573#issuecomment-1708757719 From alanb at openjdk.org Wed Sep 6 17:45:41 2023 From: alanb at openjdk.org (Alan Bateman) Date: Wed, 6 Sep 2023 17:45:41 GMT Subject: RFR: 8267174: Many test files have the wrong Copyright header In-Reply-To: References: Message-ID: On Wed, 6 Sep 2023 16:49:39 GMT, Chris Plummer wrote: > > I wonder if this is the right thing to do for the hprof files. I believe they originated from some hprof tools that we no longer ship. 3rd parties might choose to integrate them into their own tools. > > Do you think I should revert them? They are test classes now. If someone does want to copy them into their own repo then I assume they can take it from an old repo, maybe from when the "hat" tool existed. ------------- PR Comment: https://git.openjdk.org/jdk/pull/15573#issuecomment-1708828207 From aturbanov at openjdk.org Wed Sep 6 18:02:41 2023 From: aturbanov at openjdk.org (Andrey Turbanov) Date: Wed, 6 Sep 2023 18:02:41 GMT Subject: RFR: 8315606: Open source few swing text/html tests [v2] In-Reply-To: References: Message-ID: On Wed, 6 Sep 2023 10:25:27 GMT, Prasanta Sadhukhan wrote: >> Few closed swing text/html tests are opensourced > > Prasanta Sadhukhan has updated the pull request incrementally with one additional commit since the last revision: > > Review comment fix test/jdk/javax/swing/text/html/InlineView/bug4623342.java line 96: > 94: while (!(v instanceof javax.swing.text.html.ParagraphView)) { > 95: int n = v.getViewCount(); > 96: Shape sh = v.getChildAllocation(n - 1, r); Suggestion: Shape sh = v.getChildAllocation(n - 1, r); ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/15580#discussion_r1317646755 From aivanov at openjdk.org Wed Sep 6 19:23:39 2023 From: aivanov at openjdk.org (Alexey Ivanov) Date: Wed, 6 Sep 2023 19:23:39 GMT Subject: RFR: 8315584 : java/awt/print/Dialog/DialogType.java fails with option not supported: yesno [v2] In-Reply-To: References: Message-ID: On Wed, 6 Sep 2023 01:00:17 GMT, lawrence.andrews wrote: >> Test was failing with "test result: Error. Parse Exception: Arguments to `manual' option not supported: yesno" >> Following are fixed >> 1) Removed yesno >> 2) Used PassFailJFrame manual test framework to show the test instruction & allow the user to decide test execution result. >> 3) Added SkippedException in case Printer is not configured on the test host. >> 4) Updated the instruction how to close the print dialog that test is showing to the user. >> 5) Added an extra line to the file that was missing. > > lawrence.andrews has updated the pull request incrementally with one additional commit since the last revision: > > Removed the unused import statement and comma test/jdk/java/awt/print/Dialog/DialogType.java line 54: > 52: control which differs in appearance from the second dialog. > 53: Note: You can either press 'ESCAPE' button or click on the 'Cancel' > 54: to close print dialog. Basically, the only thing that's required from the user is to close the dialogs shown by pressing Esc or clicking Cancel? Once they're dismissed, the test could finish automatically. If it's the case, it's better to explain it in the instructions. If an exception is thrown, the test will finish automatically. --- It looks such a scenario is not covered by PassFailJFrame well: the instructions need to be shown for a short while before the test starts. After the user reads the instructions, the user clicks **Start** button. Then the instructions can be hidden or left on the screen (it depends on how long and complex the instructions are), and the test continues with its execution. As soon as the test logic finishes, the test dismisses the instructions if they're still visible, and exits. I know about at least three cases where a reduced functionality is required. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/15554#discussion_r1317721473 From achung at openjdk.org Wed Sep 6 23:27:05 2023 From: achung at openjdk.org (Alisen Chung) Date: Wed, 6 Sep 2023 23:27:05 GMT Subject: RFR: 8315825: Open some swing tests Message-ID: Opening some closed swing tests ------------- Commit messages: - init commit Changes: https://git.openjdk.org/jdk/pull/15606/files Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=15606&range=00 Issue: https://bugs.openjdk.org/browse/JDK-8315825 Stats: 403 lines in 4 files changed: 403 ins; 0 del; 0 mod Patch: https://git.openjdk.org/jdk/pull/15606.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/15606/head:pull/15606 PR: https://git.openjdk.org/jdk/pull/15606 From psadhukhan at openjdk.org Thu Sep 7 03:41:45 2023 From: psadhukhan at openjdk.org (Prasanta Sadhukhan) Date: Thu, 7 Sep 2023 03:41:45 GMT Subject: RFR: 8315606: Open source few swing text/html tests [v3] In-Reply-To: References: Message-ID: > Few closed swing text/html tests are opensourced Prasanta Sadhukhan has updated the pull request incrementally with one additional commit since the last revision: Spacing,indent ------------- Changes: - all: https://git.openjdk.org/jdk/pull/15580/files - new: https://git.openjdk.org/jdk/pull/15580/files/2b531b0b..88c38ba7 Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=15580&range=02 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=15580&range=01-02 Stats: 9 lines in 2 files changed: 1 ins; 0 del; 8 mod Patch: https://git.openjdk.org/jdk/pull/15580.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/15580/head:pull/15580 PR: https://git.openjdk.org/jdk/pull/15580 From psadhukhan at openjdk.org Thu Sep 7 03:44:50 2023 From: psadhukhan at openjdk.org (Prasanta Sadhukhan) Date: Thu, 7 Sep 2023 03:44:50 GMT Subject: Integrated: 8315606: Open source few swing text/html tests In-Reply-To: References: Message-ID: <23YTyvh33SlU9R0uC7L5GLW8xfzE227f8itc-upkJps=.59678e87-1cd7-4323-9678-f81a25d75543@github.com> On Wed, 6 Sep 2023 06:46:49 GMT, Prasanta Sadhukhan wrote: > Few closed swing text/html tests are opensourced This pull request has now been integrated. Changeset: 4127fbb9 Author: Prasanta Sadhukhan URL: https://git.openjdk.org/jdk/commit/4127fbb9ed6ca3c3e82da599dbf9cee54de5da31 Stats: 398 lines in 4 files changed: 398 ins; 0 del; 0 mod 8315606: Open source few swing text/html tests Reviewed-by: aivanov ------------- PR: https://git.openjdk.org/jdk/pull/15580 From psadhukhan at openjdk.org Thu Sep 7 03:52:55 2023 From: psadhukhan at openjdk.org (Prasanta Sadhukhan) Date: Thu, 7 Sep 2023 03:52:55 GMT Subject: Integrated: 8315600: Open source few more headless Swing misc tests In-Reply-To: References: Message-ID: On Wed, 6 Sep 2023 07:12:55 GMT, Prasanta Sadhukhan wrote: > Few more closed swing headless tests are opensourced This pull request has now been integrated. Changeset: b05198a4 Author: Prasanta Sadhukhan URL: https://git.openjdk.org/jdk/commit/b05198a4f354934bc344fe9cbc19d98fd8bc3977 Stats: 209 lines in 3 files changed: 209 ins; 0 del; 0 mod 8315600: Open source few more headless Swing misc tests Reviewed-by: aivanov ------------- PR: https://git.openjdk.org/jdk/pull/15582 From psadhukhan at openjdk.org Thu Sep 7 04:30:25 2023 From: psadhukhan at openjdk.org (Prasanta Sadhukhan) Date: Thu, 7 Sep 2023 04:30:25 GMT Subject: RFR: 8315609: Open source few more swing text/html tests Message-ID: Few closed swing text/html tests are open sourced ------------- Commit messages: - 8315609: Open source few more swing text/html tests Changes: https://git.openjdk.org/jdk/pull/15607/files Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=15607&range=00 Issue: https://bugs.openjdk.org/browse/JDK-8315609 Stats: 422 lines in 4 files changed: 422 ins; 0 del; 0 mod Patch: https://git.openjdk.org/jdk/pull/15607.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/15607/head:pull/15607 PR: https://git.openjdk.org/jdk/pull/15607 From psadhukhan at openjdk.org Thu Sep 7 04:55:07 2023 From: psadhukhan at openjdk.org (Prasanta Sadhukhan) Date: Thu, 7 Sep 2023 04:55:07 GMT Subject: RFR: 8315611: Open source swing text/html and tree test Message-ID: Few closed swing text/html and tree tests are opensourced ------------- Commit messages: - 8315611: Open source swing text/html and tree test Changes: https://git.openjdk.org/jdk/pull/15608/files Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=15608&range=00 Issue: https://bugs.openjdk.org/browse/JDK-8315611 Stats: 469 lines in 4 files changed: 469 ins; 0 del; 0 mod Patch: https://git.openjdk.org/jdk/pull/15608.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/15608/head:pull/15608 PR: https://git.openjdk.org/jdk/pull/15608 From kizune at openjdk.org Thu Sep 7 08:31:47 2023 From: kizune at openjdk.org (Alexander Zuev) Date: Thu, 7 Sep 2023 08:31:47 GMT Subject: RFR: 8315602: Open source swing security manager test In-Reply-To: References: Message-ID: On Wed, 6 Sep 2023 15:39:16 GMT, Prasanta Sadhukhan wrote: > A security manager swing test is open sourced Marked as reviewed by kizune (Reviewer). ------------- PR Review: https://git.openjdk.org/jdk/pull/15597#pullrequestreview-1614866212 From aturbanov at openjdk.org Thu Sep 7 08:49:46 2023 From: aturbanov at openjdk.org (Andrey Turbanov) Date: Thu, 7 Sep 2023 08:49:46 GMT Subject: RFR: 8315611: Open source swing text/html and tree test In-Reply-To: References: Message-ID: <-nLxsb7X8aIG8cbNckqcXkJ83uiVEhStm_ubJviEea0=.aca1de8d-e8f7-4be0-a382-33349207a164@github.com> On Thu, 7 Sep 2023 04:45:47 GMT, Prasanta Sadhukhan wrote: > Few closed swing text/html and tree tests are opensourced test/jdk/javax/swing/text/html/TableView/bug4813831.java line 85: > 83: do { > 84: int n = v.getViewCount(); > 85: Shape sh = v.getChildAllocation(n - 1, r); Suggestion: Shape sh = v.getChildAllocation(n - 1, r); test/jdk/javax/swing/tree/FixedHeightLayoutCache/bug4745001.java line 139: > 137: tree.collapseRow(row); > 138: } > 139: } catch(Exception ex) { Suggestion: } catch (Exception ex) { test/jdk/javax/swing/tree/FixedHeightLayoutCache/bug4745001.java line 149: > 147: } > 148: } > 149: } catch(Throwable t) { Suggestion: } catch (Throwable t) { ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/15608#discussion_r1318289851 PR Review Comment: https://git.openjdk.org/jdk/pull/15608#discussion_r1318290223 PR Review Comment: https://git.openjdk.org/jdk/pull/15608#discussion_r1318290408 From aturbanov at openjdk.org Thu Sep 7 08:49:47 2023 From: aturbanov at openjdk.org (Andrey Turbanov) Date: Thu, 7 Sep 2023 08:49:47 GMT Subject: RFR: 8315609: Open source few more swing text/html tests In-Reply-To: References: Message-ID: On Thu, 7 Sep 2023 04:22:59 GMT, Prasanta Sadhukhan wrote: > Few closed swing text/html tests are open sourced test/jdk/javax/swing/text/html/TableView/bug4412522.java line 87: > 85: > 86: int n = v.getViewCount(); > 87: Shape sh = v.getChildAllocation(n - 1, r); Suggestion: Shape sh = v.getChildAllocation(n - 1, r); test/jdk/javax/swing/text/html/TableView/bug4690812.java line 82: > 80: while (!(v instanceof javax.swing.text.html.ParagraphView)) { > 81: int n = v.getViewCount(); > 82: Shape sh = v.getChildAllocation(n - 1, r); Suggestion: Shape sh = v.getChildAllocation(n - 1, r); ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/15607#discussion_r1318290936 PR Review Comment: https://git.openjdk.org/jdk/pull/15607#discussion_r1318291199 From aivanov at openjdk.org Thu Sep 7 10:06:38 2023 From: aivanov at openjdk.org (Alexey Ivanov) Date: Thu, 7 Sep 2023 10:06:38 GMT Subject: RFR: 8315602: Open source swing security manager test In-Reply-To: References: Message-ID: On Wed, 6 Sep 2023 15:39:16 GMT, Prasanta Sadhukhan wrote: > A security manager swing test is open sourced Marked as reviewed by aivanov (Reviewer). ------------- PR Review: https://git.openjdk.org/jdk/pull/15597#pullrequestreview-1615073797 From psadhukhan at openjdk.org Thu Sep 7 10:20:53 2023 From: psadhukhan at openjdk.org (Prasanta Sadhukhan) Date: Thu, 7 Sep 2023 10:20:53 GMT Subject: Integrated: 8315602: Open source swing security manager test In-Reply-To: References: Message-ID: On Wed, 6 Sep 2023 15:39:16 GMT, Prasanta Sadhukhan wrote: > A security manager swing test is open sourced This pull request has now been integrated. Changeset: fd6442c0 Author: Prasanta Sadhukhan URL: https://git.openjdk.org/jdk/commit/fd6442c079748dcaff3bb565dc35b108b68a61bd Stats: 55 lines in 1 file changed: 55 ins; 0 del; 0 mod 8315602: Open source swing security manager test Reviewed-by: kizune, aivanov ------------- PR: https://git.openjdk.org/jdk/pull/15597 From jdv at openjdk.org Thu Sep 7 10:25:39 2023 From: jdv at openjdk.org (Jayathirth D V) Date: Thu, 7 Sep 2023 10:25:39 GMT Subject: RFR: 8315609: Open source few more swing text/html tests In-Reply-To: References: Message-ID: <8_DTxpm31kjkDauMp1sv4tYXQ2m3yqVEJ5jKvmJsqzw=.7e3919bf-1397-4c30-9d99-2ee54557f5f4@github.com> On Thu, 7 Sep 2023 04:22:59 GMT, Prasanta Sadhukhan wrote: > Few closed swing text/html tests are open sourced Marked as reviewed by jdv (Reviewer). ------------- PR Review: https://git.openjdk.org/jdk/pull/15607#pullrequestreview-1615118358 From aivanov at openjdk.org Thu Sep 7 10:26:44 2023 From: aivanov at openjdk.org (Alexey Ivanov) Date: Thu, 7 Sep 2023 10:26:44 GMT Subject: RFR: 8313348: Fix typo in JFormattedTextField: 'it self' [v2] In-Reply-To: References: <_5rQ_t9i-odOEhntaz2UX3JaX4k16IosfrO8jHR9NG4=.69d39026-647b-4b9c-b71b-fd019ff8803a@github.com> <4T0pygyDZdSE3p-MlrcnWEvVFCzO9wgZK1G7BJHHSpo=.c53469e2-9e0b-484c-befb-5092631ed848@github.com> Message-ID: <83YjShRPDPsiJHh0EKKFsk9LcszTy-xXWOs_lMp8qVI=.376ef4f8-4f3d-494c-ba79-b8f2555d0e5e@github.com> On Tue, 8 Aug 2023 00:42:36 GMT, Sergey Bylokhov wrote: > That is wrong suggestion, if the one bug found in one place it is part of the fixing process to check that it does not exists in another one. Especially for typo it is easy to check. I don't think it is wrong, especially for typos. As I said, fixing typos in the entire code base, even if limited to the `java.desktop` module requires *considerable* amount of time. Yet fixing a typo in a certain file is a *trivial fix* which is easy to fix and is quick to review. > We already discussed this for one issue in scrollbars on windows, where the same bug was missed in the similar place. In that case, the problem could be more serious. As I [explained](https://github.com/openjdk/jdk/pull/14338#issuecomment-1581491086) in PR #14338, I missed this function was used in another component. At the same time, no test case has been found where functionality of ScrollBar is affected. I have submitted [the follow-up issues](https://github.com/openjdk/jdk/pull/14338#issuecomment-1706567768) to clean it up. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/15087#discussion_r1318402637 From aivanov at openjdk.org Thu Sep 7 10:26:44 2023 From: aivanov at openjdk.org (Alexey Ivanov) Date: Thu, 7 Sep 2023 10:26:44 GMT Subject: RFR: 8313348: Fix typo in JFormattedTextField: 'it self' [v2] In-Reply-To: <83YjShRPDPsiJHh0EKKFsk9LcszTy-xXWOs_lMp8qVI=.376ef4f8-4f3d-494c-ba79-b8f2555d0e5e@github.com> References: <_5rQ_t9i-odOEhntaz2UX3JaX4k16IosfrO8jHR9NG4=.69d39026-647b-4b9c-b71b-fd019ff8803a@github.com> <4T0pygyDZdSE3p-MlrcnWEvVFCzO9wgZK1G7BJHHSpo=.c53469e2-9e0b-484c-befb-5092631ed848@github.com> <83YjShRPDPsiJHh0EKKFsk9LcszTy-xXWOs_lMp8qVI=.376ef4f8-4f3d-494c-ba79-b8f2555d0e5e@github.com> Message-ID: On Thu, 7 Sep 2023 10:22:07 GMT, Alexey Ivanov wrote: >> That is wrong suggestion, if the one bug found in one place it is part of the fixing process to check that it does not exists in another one. Especially for typo it is easy to check. We already discussed this for one issue in scrollbars on windows, where the same bug was missed in the similar place. > >> That is wrong suggestion, if the one bug found in one place it is part of the fixing process to check that it does not exists in another one. Especially for typo it is easy to check. > > I don't think it is wrong, especially for typos. As I said, fixing typos in the entire code base, even if limited to the `java.desktop` module requires *considerable* amount of time. Yet fixing a typo in a certain file is a *trivial fix* which is easy to fix and is quick to review. > >> We already discussed this for one issue in scrollbars on windows, where the same bug was missed in the similar place. > > In that case, the problem could be more serious. As I [explained](https://github.com/openjdk/jdk/pull/14338#issuecomment-1581491086) in PR #14338, I missed this function was used in another component. At the same time, no test case has been found where functionality of ScrollBar is affected. > > I have submitted [the follow-up issues](https://github.com/openjdk/jdk/pull/14338#issuecomment-1706567768) to clean it up. Anyway, I have updated `BasicTreeUI`; in addition to fixing the typo there, I expanded the wildcard imports. Do you have any more comments? @mrserb ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/15087#discussion_r1318405279 From jdv at openjdk.org Thu Sep 7 10:27:40 2023 From: jdv at openjdk.org (Jayathirth D V) Date: Thu, 7 Sep 2023 10:27:40 GMT Subject: RFR: 8315611: Open source swing text/html and tree test In-Reply-To: References: Message-ID: On Thu, 7 Sep 2023 04:45:47 GMT, Prasanta Sadhukhan wrote: > Few closed swing text/html and tree tests are opensourced Marked as reviewed by jdv (Reviewer). ------------- PR Review: https://git.openjdk.org/jdk/pull/15608#pullrequestreview-1615120674 From azvegint at openjdk.org Thu Sep 7 13:49:41 2023 From: azvegint at openjdk.org (Alexander Zvegintsev) Date: Thu, 7 Sep 2023 13:49:41 GMT Subject: RFR: 8315594: Open source few headless Swing misc tests [v2] In-Reply-To: References: Message-ID: <_AibimfA1EN1cJJneDnQoQglCZPUDRgjC-u_HWgDlHg=.5feceb85-d92e-48a0-9621-23759f2c98d5@github.com> On Wed, 6 Sep 2023 09:28:12 GMT, Prasanta Sadhukhan wrote: >> Few closed swing tests are open sourced > > Prasanta Sadhukhan has updated the pull request incrementally with one additional commit since the last revision: > > Spacing issue Marked as reviewed by azvegint (Reviewer). ------------- PR Review: https://git.openjdk.org/jdk/pull/15577#pullrequestreview-1615483355 From abhiscxk at openjdk.org Thu Sep 7 15:27:07 2023 From: abhiscxk at openjdk.org (Abhishek Kumar) Date: Thu, 7 Sep 2023 15:27:07 GMT Subject: RFR: 8315761: Open source few swing JList and JMenuBar tests Message-ID: Few closed JList and JMenubar swing tests are open sourced. ------------- Commit messages: - Open source few swing JList and JMenubar tests Changes: https://git.openjdk.org/jdk/pull/15621/files Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=15621&range=00 Issue: https://bugs.openjdk.org/browse/JDK-8315761 Stats: 250 lines in 4 files changed: 250 ins; 0 del; 0 mod Patch: https://git.openjdk.org/jdk/pull/15621.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/15621/head:pull/15621 PR: https://git.openjdk.org/jdk/pull/15621 From abhiscxk at openjdk.org Thu Sep 7 19:06:27 2023 From: abhiscxk at openjdk.org (Abhishek Kumar) Date: Thu, 7 Sep 2023 19:06:27 GMT Subject: RFR: 8315677: Open source few swing JFileChooser and other tests Message-ID: Few closed JFileChooser and other swing tests are open sourced. ------------- Commit messages: - Open source few swing JFileChooser and other tests Changes: https://git.openjdk.org/jdk/pull/15626/files Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=15626&range=00 Issue: https://bugs.openjdk.org/browse/JDK-8315677 Stats: 358 lines in 5 files changed: 358 ins; 0 del; 0 mod Patch: https://git.openjdk.org/jdk/pull/15626.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/15626/head:pull/15626 PR: https://git.openjdk.org/jdk/pull/15626 From dcubed at openjdk.org Thu Sep 7 20:07:00 2023 From: dcubed at openjdk.org (Daniel D. Daugherty) Date: Thu, 7 Sep 2023 20:07:00 GMT Subject: RFR: 8315877: ProblemList vmTestbase/nsk/jvmti/InterruptThread/intrpthrd003/TestDescription.java on macosx-aarch64 Message-ID: Trivial fixes to ProblemList some tests: - [JDK-8315877](https://bugs.openjdk.org/browse/JDK-8315877) ProblemList vmTestbase/nsk/jvmti/InterruptThread/intrpthrd003/TestDescription.java on macosx-aarch64 - [JDK-8315879](https://bugs.openjdk.org/browse/JDK-8315879) ProblemList java/awt/PopupMenu/PopupMenuLocation.java on macosx-aarch64 ------------- Commit messages: - 8315879: ProblemList java/awt/PopupMenu/PopupMenuLocation.java on macosx-aarch64 - 8315877: ProblemList vmTestbase/nsk/jvmti/InterruptThread/intrpthrd003/TestDescription.java on macosx-aarch64 Changes: https://git.openjdk.org/jdk/pull/15627/files Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=15627&range=00 Issue: https://bugs.openjdk.org/browse/JDK-8315877 Stats: 2 lines in 2 files changed: 0 ins; 0 del; 2 mod Patch: https://git.openjdk.org/jdk/pull/15627.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/15627/head:pull/15627 PR: https://git.openjdk.org/jdk/pull/15627 From azvegint at openjdk.org Thu Sep 7 20:07:01 2023 From: azvegint at openjdk.org (Alexander Zvegintsev) Date: Thu, 7 Sep 2023 20:07:01 GMT Subject: RFR: 8315877: ProblemList vmTestbase/nsk/jvmti/InterruptThread/intrpthrd003/TestDescription.java on macosx-aarch64 In-Reply-To: References: Message-ID: On Thu, 7 Sep 2023 19:17:42 GMT, Daniel D. Daugherty wrote: > Trivial fixes to ProblemList some tests: > - [JDK-8315877](https://bugs.openjdk.org/browse/JDK-8315877) ProblemList vmTestbase/nsk/jvmti/InterruptThread/intrpthrd003/TestDescription.java on macosx-aarch64 > - [JDK-8315879](https://bugs.openjdk.org/browse/JDK-8315879) ProblemList java/awt/PopupMenu/PopupMenuLocation.java on macosx-aarch64 Marked as reviewed by azvegint (Reviewer). ------------- PR Review: https://git.openjdk.org/jdk/pull/15627#pullrequestreview-1616146162 From rriggs at openjdk.org Thu Sep 7 20:07:01 2023 From: rriggs at openjdk.org (Roger Riggs) Date: Thu, 7 Sep 2023 20:07:01 GMT Subject: RFR: 8315877: ProblemList vmTestbase/nsk/jvmti/InterruptThread/intrpthrd003/TestDescription.java on macosx-aarch64 In-Reply-To: References: Message-ID: On Thu, 7 Sep 2023 19:17:42 GMT, Daniel D. Daugherty wrote: > Trivial fixes to ProblemList some tests: > - [JDK-8315877](https://bugs.openjdk.org/browse/JDK-8315877) ProblemList vmTestbase/nsk/jvmti/InterruptThread/intrpthrd003/TestDescription.java on macosx-aarch64 > - [JDK-8315879](https://bugs.openjdk.org/browse/JDK-8315879) ProblemList java/awt/PopupMenu/PopupMenuLocation.java on macosx-aarch64 Marked as reviewed by rriggs (Reviewer). ------------- PR Review: https://git.openjdk.org/jdk/pull/15627#pullrequestreview-1616151170 From ccheung at openjdk.org Thu Sep 7 20:07:01 2023 From: ccheung at openjdk.org (Calvin Cheung) Date: Thu, 7 Sep 2023 20:07:01 GMT Subject: RFR: 8315877: ProblemList vmTestbase/nsk/jvmti/InterruptThread/intrpthrd003/TestDescription.java on macosx-aarch64 In-Reply-To: References: Message-ID: On Thu, 7 Sep 2023 19:17:42 GMT, Daniel D. Daugherty wrote: > Trivial fixes to ProblemList some tests: > - [JDK-8315877](https://bugs.openjdk.org/browse/JDK-8315877) ProblemList vmTestbase/nsk/jvmti/InterruptThread/intrpthrd003/TestDescription.java on macosx-aarch64 > - [JDK-8315879](https://bugs.openjdk.org/browse/JDK-8315879) ProblemList java/awt/PopupMenu/PopupMenuLocation.java on macosx-aarch64 Looks good and trivial. ------------- Marked as reviewed by ccheung (Reviewer). PR Review: https://git.openjdk.org/jdk/pull/15627#pullrequestreview-1616152066 From dcubed at openjdk.org Thu Sep 7 20:12:51 2023 From: dcubed at openjdk.org (Daniel D. Daugherty) Date: Thu, 7 Sep 2023 20:12:51 GMT Subject: Integrated: 8315877: ProblemList vmTestbase/nsk/jvmti/InterruptThread/intrpthrd003/TestDescription.java on macosx-aarch64 In-Reply-To: References: Message-ID: On Thu, 7 Sep 2023 19:17:42 GMT, Daniel D. Daugherty wrote: > Trivial fixes to ProblemList some tests: > - [JDK-8315877](https://bugs.openjdk.org/browse/JDK-8315877) ProblemList vmTestbase/nsk/jvmti/InterruptThread/intrpthrd003/TestDescription.java on macosx-aarch64 > - [JDK-8315879](https://bugs.openjdk.org/browse/JDK-8315879) ProblemList java/awt/PopupMenu/PopupMenuLocation.java on macosx-aarch64 This pull request has now been integrated. Changeset: 7e7ab6ee Author: Daniel D. Daugherty URL: https://git.openjdk.org/jdk/commit/7e7ab6ee1bfd05de6ca9aa690cf3349f9a3a19da Stats: 2 lines in 2 files changed: 0 ins; 0 del; 2 mod 8315877: ProblemList vmTestbase/nsk/jvmti/InterruptThread/intrpthrd003/TestDescription.java on macosx-aarch64 8315879: ProblemList java/awt/PopupMenu/PopupMenuLocation.java on macosx-aarch64 Reviewed-by: azvegint, rriggs, ccheung ------------- PR: https://git.openjdk.org/jdk/pull/15627 From achung at openjdk.org Thu Sep 7 20:40:00 2023 From: achung at openjdk.org (Alisen Chung) Date: Thu, 7 Sep 2023 20:40:00 GMT Subject: RFR: 8315882: Open some swing tests 2 Message-ID: <0lBLWnXYCKN_HqlMIN5ZDZKQUwmKkiAkGQwIGF0W78A=.33562ff7-49ad-47ea-bad4-264e346480ee@github.com> Opening some swing tests ------------- Commit messages: - changed tests - init commit Changes: https://git.openjdk.org/jdk/pull/15628/files Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=15628&range=00 Issue: https://bugs.openjdk.org/browse/JDK-8315882 Stats: 207 lines in 3 files changed: 207 ins; 0 del; 0 mod Patch: https://git.openjdk.org/jdk/pull/15628.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/15628/head:pull/15628 PR: https://git.openjdk.org/jdk/pull/15628 From psadhukhan at openjdk.org Fri Sep 8 03:47:57 2023 From: psadhukhan at openjdk.org (Prasanta Sadhukhan) Date: Fri, 8 Sep 2023 03:47:57 GMT Subject: Integrated: 8315594: Open source few headless Swing misc tests In-Reply-To: References: Message-ID: On Wed, 6 Sep 2023 06:05:59 GMT, Prasanta Sadhukhan wrote: > Few closed swing tests are open sourced This pull request has now been integrated. Changeset: 806ef089 Author: Prasanta Sadhukhan URL: https://git.openjdk.org/jdk/commit/806ef0897b42c8f3cb3b4d7bd904af9ed18a543e Stats: 256 lines in 4 files changed: 256 ins; 0 del; 0 mod 8315594: Open source few headless Swing misc tests Reviewed-by: azvegint ------------- PR: https://git.openjdk.org/jdk/pull/15577 From tr at openjdk.org Fri Sep 8 04:30:05 2023 From: tr at openjdk.org (Tejesh R) Date: Fri, 8 Sep 2023 04:30:05 GMT Subject: Integrated: 8312075: FileChooser.win32.newFolder is not updated when changing Locale In-Reply-To: <_XawiMouFRVn_letIBC3AceK-hMGomSenF5c-MjFCic=.a14a5114-0619-4456-8d89-29665d6623e5@github.com> References: <_XawiMouFRVn_letIBC3AceK-hMGomSenF5c-MjFCic=.a14a5114-0619-4456-8d89-29665d6623e5@github.com> Message-ID: <8y8_gKfg0aWARR1Ribkf3Xlrs3YW6GnTd3zIa5phypA=.c943f676-ef16-481f-b324-00938c6f5a41@github.com> On Fri, 28 Jul 2023 10:56:47 GMT, Tejesh R wrote: > On `NewFolderAction`, plain String is added `Action.ACTION_COMMAND_KEY`. Converting the `String `to `locale` before adding as command key fix the issue. > I have verified the test in all other platforms and Look and Feel which has option to create New Folder, results were fine. No regressions found on CI system with the fix. Added manual test to verify the fix. This pull request has now been integrated. Changeset: 3a00ec86 Author: Tejesh R URL: https://git.openjdk.org/jdk/commit/3a00ec863904abd09ddcdc4b6dcf1147c52e0aae Stats: 105 lines in 2 files changed: 91 ins; 13 del; 1 mod 8312075: FileChooser.win32.newFolder is not updated when changing Locale Reviewed-by: aivanov, abhiscxk ------------- PR: https://git.openjdk.org/jdk/pull/15069 From psadhukhan at openjdk.org Fri Sep 8 07:07:42 2023 From: psadhukhan at openjdk.org (Prasanta Sadhukhan) Date: Fri, 8 Sep 2023 07:07:42 GMT Subject: RFR: 8315677: Open source few swing JFileChooser and other tests In-Reply-To: References: Message-ID: <2uQKSlWUGpZZw-ZXkdevAdp1H-l8b5ktmjNmUlI2G-o=.6c398885-e346-4f50-9399-2750bf6ffa00@github.com> On Thu, 7 Sep 2023 18:57:50 GMT, Abhishek Kumar wrote: > Few closed JFileChooser and other swing tests are open sourced. I hope you have run these tests in open in mach5 as mentioned, as I dont see any test run job result in JBS..Approving assumming you have run and no issues in test job.. ------------- Marked as reviewed by psadhukhan (Reviewer). PR Review: https://git.openjdk.org/jdk/pull/15626#pullrequestreview-1616824372 From psadhukhan at openjdk.org Fri Sep 8 07:15:39 2023 From: psadhukhan at openjdk.org (Prasanta Sadhukhan) Date: Fri, 8 Sep 2023 07:15:39 GMT Subject: RFR: 8315761: Open source few swing JList and JMenuBar tests In-Reply-To: References: Message-ID: On Thu, 7 Sep 2023 15:19:37 GMT, Abhishek Kumar wrote: > Few closed JList and JMenubar swing tests are open sourced. Minor comment...Also please ensure mach5 job is run in open too before integration test/jdk/javax/swing/JList/bug4832765.java line 41: > 39: public class bug4832765 { > 40: > 41: static String[] data = {"One", "Two", "Three", "Four", I guess data can be local var ------------- Marked as reviewed by psadhukhan (Reviewer). PR Review: https://git.openjdk.org/jdk/pull/15621#pullrequestreview-1616827780 PR Review Comment: https://git.openjdk.org/jdk/pull/15621#discussion_r1319456756 From abhiscxk at openjdk.org Fri Sep 8 07:57:38 2023 From: abhiscxk at openjdk.org (Abhishek Kumar) Date: Fri, 8 Sep 2023 07:57:38 GMT Subject: RFR: 8315677: Open source few swing JFileChooser and other tests In-Reply-To: <2uQKSlWUGpZZw-ZXkdevAdp1H-l8b5ktmjNmUlI2G-o=.6c398885-e346-4f50-9399-2750bf6ffa00@github.com> References: <2uQKSlWUGpZZw-ZXkdevAdp1H-l8b5ktmjNmUlI2G-o=.6c398885-e346-4f50-9399-2750bf6ffa00@github.com> Message-ID: On Fri, 8 Sep 2023 07:04:54 GMT, Prasanta Sadhukhan wrote: > I hope you have run these tests in open in mach5 as mentioned, as I dont see any test run job result in JBS..Approving assumming you have run and no issues in test job.. I ran these tests in CI, it was green. Forgot to add in comment in JBS. Link added in JBS now. ------------- PR Comment: https://git.openjdk.org/jdk/pull/15626#issuecomment-1711239470 From abhiscxk at openjdk.org Fri Sep 8 08:08:38 2023 From: abhiscxk at openjdk.org (Abhishek Kumar) Date: Fri, 8 Sep 2023 08:08:38 GMT Subject: RFR: 8315761: Open source few swing JList and JMenuBar tests In-Reply-To: References: Message-ID: On Fri, 8 Sep 2023 07:12:50 GMT, Prasanta Sadhukhan wrote: > Minor comment...Also please ensure mach5 job is run in open too before integration Ran the mach5 job in open too, it was green. Link added in JBS comment. ------------- PR Comment: https://git.openjdk.org/jdk/pull/15621#issuecomment-1711253785 From mbaesken at openjdk.org Fri Sep 8 08:33:08 2023 From: mbaesken at openjdk.org (Matthias Baesken) Date: Fri, 8 Sep 2023 08:33:08 GMT Subject: RFR: JDK-8315897: some PrivilegedActions missing in JDK code for getting properties Message-ID: There are some remaining places in 'general' JDK code (= code not related to e.g. a specific tool) getting properties like : osName = System.getProperty(os.name) https://github.com/openjdk/jdk/blob/master/src/java.management/share/classes/sun/management/VMManagementImpl.java#L225 https://github.com/openjdk/jdk/blob/master/src/java.desktop/share/classes/sun/awt/FontConfiguration.java#L134 Those should be a PrivilegedAction . ------------- Commit messages: - JDK-8315897 Changes: https://git.openjdk.org/jdk/pull/15629/files Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=15629&range=00 Issue: https://bugs.openjdk.org/browse/JDK-8315897 Stats: 57 lines in 2 files changed: 36 ins; 4 del; 17 mod Patch: https://git.openjdk.org/jdk/pull/15629.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/15629/head:pull/15629 PR: https://git.openjdk.org/jdk/pull/15629 From alanb at openjdk.org Fri Sep 8 09:02:39 2023 From: alanb at openjdk.org (Alan Bateman) Date: Fri, 8 Sep 2023 09:02:39 GMT Subject: RFR: JDK-8315897: some PrivilegedActions missing in JDK code for getting properties In-Reply-To: References: Message-ID: On Fri, 8 Sep 2023 08:26:16 GMT, Matthias Baesken wrote: > There are some remaining places in 'general' JDK code (= code not related to e.g. a specific tool) getting properties like : > > osName = System.getProperty(os.name) > > https://github.com/openjdk/jdk/blob/master/src/java.management/share/classes/sun/management/VMManagementImpl.java#L225 > > https://github.com/openjdk/jdk/blob/master/src/java.desktop/share/classes/sun/awt/FontConfiguration.java#L134 > > Those should be a PrivilegedAction . Many of the methods defined by RuntimeMXBea are specified to throw SecurityException if the SM denies reading the property. It looks like the changes to VMManagementImpl will break that. It's not clear from the bug report if there is a bug here or not. I think the starting point needs to be a test that runs with a SM set and demonstrates an exported API throwing a security exception when it is not specified to do so. ------------- PR Comment: https://git.openjdk.org/jdk/pull/15629#issuecomment-1711327123 From abhiscxk at openjdk.org Fri Sep 8 10:14:20 2023 From: abhiscxk at openjdk.org (Abhishek Kumar) Date: Fri, 8 Sep 2023 10:14:20 GMT Subject: RFR: 8315761: Open source few swing JList and JMenuBar tests [v2] In-Reply-To: References: Message-ID: > Few closed JList and JMenubar swing tests are open sourced. Abhishek Kumar has updated the pull request incrementally with one additional commit since the last revision: Review comment update ------------- Changes: - all: https://git.openjdk.org/jdk/pull/15621/files - new: https://git.openjdk.org/jdk/pull/15621/files/cf4fe6c5..90d33005 Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=15621&range=01 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=15621&range=00-01 Stats: 7 lines in 1 file changed: 3 ins; 4 del; 0 mod Patch: https://git.openjdk.org/jdk/pull/15621.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/15621/head:pull/15621 PR: https://git.openjdk.org/jdk/pull/15621 From abhiscxk at openjdk.org Fri Sep 8 10:14:24 2023 From: abhiscxk at openjdk.org (Abhishek Kumar) Date: Fri, 8 Sep 2023 10:14:24 GMT Subject: RFR: 8315761: Open source few swing JList and JMenuBar tests [v2] In-Reply-To: References: Message-ID: On Fri, 8 Sep 2023 07:07:20 GMT, Prasanta Sadhukhan wrote: >> Abhishek Kumar has updated the pull request incrementally with one additional commit since the last revision: >> >> Review comment update > > test/jdk/javax/swing/JList/bug4832765.java line 41: > >> 39: public class bug4832765 { >> 40: >> 41: static String[] data = {"One", "Two", "Three", "Four", > > I guess data can be local var Updated. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/15621#discussion_r1319657617 From mbaesken at openjdk.org Fri Sep 8 11:01:38 2023 From: mbaesken at openjdk.org (Matthias Baesken) Date: Fri, 8 Sep 2023 11:01:38 GMT Subject: RFR: JDK-8315897: some PrivilegedActions missing in JDK code for getting properties In-Reply-To: References: Message-ID: On Fri, 8 Sep 2023 08:26:16 GMT, Matthias Baesken wrote: > There are some remaining places in 'general' JDK code (= code not related to e.g. a specific tool) getting properties like : > > osName = System.getProperty(os.name) > > https://github.com/openjdk/jdk/blob/master/src/java.management/share/classes/sun/management/VMManagementImpl.java#L225 > > https://github.com/openjdk/jdk/blob/master/src/java.desktop/share/classes/sun/awt/FontConfiguration.java#L134 > > Those should be a PrivilegedAction . Hi Alan, seems the calling into the VMManagement methods does not work any more in recent JDK (in 8 it was still possible in a kind of hack-like way but I tried it with 21 and it does not work any more (or maybe with setting lots of flags?) ). import sun.management.VMManagement; import java.lang.management.*; import java.lang.reflect.*; import java.security.*; public class VMExample { static class MySm extends SecurityManager { public void checkPermission(Permission p) { // okay } @Override public void checkPropertyAccess(String key) { System.out.println("accessing " + key); // throw new SecurityException("accessing " + key); } } private static void printInfo() { try { // Get the current process id using a reflection hack RuntimeMXBean runtime = ManagementFactory.getRuntimeMXBean(); Field jvm = runtime.getClass().getDeclaredField("jvm"); jvm.setAccessible(true); System.out.println("Getting VMManagement object"); VMManagement mgmt = (sun.management.VMManagement) jvm.get(runtime); System.out.println("OS name:" + mgmt.getOsName()); } catch(Exception ex) { } } public static void main(String[] args) { //System.setSecurityManager(new SecurityManager()); System.setSecurityManager(new MySm()); System.out.println("Before printInfo ..."); printInfo(); } } So probably we could avoid changing VMManagementImpl.java because it is not needed any more at least in jdk-head . ------------- PR Comment: https://git.openjdk.org/jdk/pull/15629#issuecomment-1711480332 From psadhukhan at openjdk.org Fri Sep 8 11:37:12 2023 From: psadhukhan at openjdk.org (Prasanta Sadhukhan) Date: Fri, 8 Sep 2023 11:37:12 GMT Subject: RFR: 8315663: Open source misc awt tests Message-ID: Some closed awt tests are opensourced ------------- Commit messages: - 8315663: Open source misc awt tests Changes: https://git.openjdk.org/jdk/pull/15634/files Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=15634&range=00 Issue: https://bugs.openjdk.org/browse/JDK-8315663 Stats: 263 lines in 2 files changed: 263 ins; 0 del; 0 mod Patch: https://git.openjdk.org/jdk/pull/15634.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/15634/head:pull/15634 PR: https://git.openjdk.org/jdk/pull/15634 From alanb at openjdk.org Fri Sep 8 13:04:39 2023 From: alanb at openjdk.org (Alan Bateman) Date: Fri, 8 Sep 2023 13:04:39 GMT Subject: RFR: JDK-8315897: some PrivilegedActions missing in JDK code for getting properties In-Reply-To: References: Message-ID: On Fri, 8 Sep 2023 10:58:23 GMT, Matthias Baesken wrote: > So probably we could avoid changing VMManagementImpl.java because it is not needed any more at least in jdk-head . It's a JDK internal class so should never have been used directly. I can't imagine what might be using a JDK internal class while running with a SM. So what about FontConfiguration? Is that something using the class directly too? ------------- PR Comment: https://git.openjdk.org/jdk/pull/15629#issuecomment-1711637260 From aivanov at openjdk.org Fri Sep 8 14:04:39 2023 From: aivanov at openjdk.org (Alexey Ivanov) Date: Fri, 8 Sep 2023 14:04:39 GMT Subject: RFR: JDK-8315897: some PrivilegedActions missing in JDK code for getting properties In-Reply-To: References: Message-ID: On Fri, 8 Sep 2023 13:02:07 GMT, Alan Bateman wrote: > So what about FontConfiguration? Is that something using the class directly too? I think this is not needed either. As far as I can see, the instance of `FontConfiguration` is created from `doPrivileged`, therefore these two system properties are read inside `doPrivileged` already. ------------- PR Comment: https://git.openjdk.org/jdk/pull/15629#issuecomment-1711722806 From abhiscxk at openjdk.org Fri Sep 8 15:25:20 2023 From: abhiscxk at openjdk.org (Abhishek Kumar) Date: Fri, 8 Sep 2023 15:25:20 GMT Subject: RFR: 8315898: Open source swing JMenu tests Message-ID: Few closed JMenu swing tests are open sourced. ------------- Commit messages: - Open source swing JMenu tests Changes: https://git.openjdk.org/jdk/pull/15639/files Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=15639&range=00 Issue: https://bugs.openjdk.org/browse/JDK-8315898 Stats: 357 lines in 6 files changed: 357 ins; 0 del; 0 mod Patch: https://git.openjdk.org/jdk/pull/15639.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/15639/head:pull/15639 PR: https://git.openjdk.org/jdk/pull/15639 From serb at openjdk.org Fri Sep 8 15:28:02 2023 From: serb at openjdk.org (Sergey Bylokhov) Date: Fri, 8 Sep 2023 15:28:02 GMT Subject: RFR: 8314755: Resource leak: SwingWorker listener keeps strong reference to executor In-Reply-To: References: Message-ID: On Sun, 30 Jul 2023 12:50:58 GMT, Christopher Sahnwaldt wrote: > In https://github.com/openjdk/jdk/commit/b8af3d50192f8bc98d83f8102f0fd1989f302e32 the weak reference was accidentally changed from a field to a local variable, which means that the PropertyChangeListener keeps a strong reference to executorService, which is a resource leak Is it possible to cover this change with the new test? ------------- PR Comment: https://git.openjdk.org/jdk/pull/15081#issuecomment-1679923547 From duke at openjdk.org Fri Sep 8 15:28:03 2023 From: duke at openjdk.org (Christopher Sahnwaldt) Date: Fri, 8 Sep 2023 15:28:03 GMT Subject: RFR: 8314755: Resource leak: SwingWorker listener keeps strong reference to executor In-Reply-To: References: Message-ID: On Sun, 30 Jul 2023 12:50:58 GMT, Christopher Sahnwaldt wrote: > In https://github.com/openjdk/jdk/commit/b8af3d50192f8bc98d83f8102f0fd1989f302e32 the weak reference was accidentally changed from a field to a local variable, which means that the PropertyChangeListener keeps a strong reference to executorService, which is a resource leak I wrote a test demonstrating the problem that the executor is retained: [SwingWorkerExecutorLeakTest.java](/jcsahnwaldt/SwingWorkerExecutorLeakTest/blob/master/src/main/java/SwingWorkerExecutorLeakTest.java). (It's slightly similar to [6799345/TestShutdown.java](/openjdk/jdk/blob/master/test/jdk/javax/swing/system/6799345/TestShutdown.java).) I ran the test on JDK 8, 11, 17, and 20 on macOS and always got the same result. Maybe an even cleaner way to break the reference chain appContext -> listener -> executor would be to remove the listener from the appContext. There's a bit of code in the test demonstrating that it would fix the problem. In `SwingWorker`, we could simply add the line `appContext.removePropertyChangeListener(AppContext.DISPOSED_PROPERTY_NAME, this)` somewhere in the listener. We could then do away with the weak reference, since the strong reference from the listener to the executor wouldn't cause a resource leak anymore. I'd be happy top update this PR accordingly. Let me know what you think. ------------- PR Comment: https://git.openjdk.org/jdk/pull/15081#issuecomment-1684661097 PR Comment: https://git.openjdk.org/jdk/pull/15081#issuecomment-1684671932 From duke at openjdk.org Fri Sep 8 15:28:02 2023 From: duke at openjdk.org (Christopher Sahnwaldt) Date: Fri, 8 Sep 2023 15:28:02 GMT Subject: RFR: 8314755: Resource leak: SwingWorker listener keeps strong reference to executor Message-ID: In https://github.com/openjdk/jdk/commit/b8af3d50192f8bc98d83f8102f0fd1989f302e32 the weak reference was accidentally changed from a field to a local variable, which means that the PropertyChangeListener keeps a strong reference to executorService, which is a resource leak ------------- Commit messages: - SwingWorker.java: appContext shouldn't keep a strong reference to executorService Changes: https://git.openjdk.org/jdk/pull/15081/files Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=15081&range=00 Issue: https://bugs.openjdk.org/browse/JDK-8314755 Stats: 4 lines in 1 file changed: 2 ins; 2 del; 0 mod Patch: https://git.openjdk.org/jdk/pull/15081.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/15081/head:pull/15081 PR: https://git.openjdk.org/jdk/pull/15081 From serb at openjdk.org Sun Sep 10 22:06:39 2023 From: serb at openjdk.org (Sergey Bylokhov) Date: Sun, 10 Sep 2023 22:06:39 GMT Subject: RFR: 8315898: Open source swing JMenu tests In-Reply-To: References: Message-ID: On Fri, 8 Sep 2023 15:17:49 GMT, Abhishek Kumar wrote: > Few closed JMenu swing tests are open sourced. Marked as reviewed by serb (Reviewer). ------------- PR Review: https://git.openjdk.org/jdk/pull/15639#pullrequestreview-1618926678 From serb at openjdk.org Sun Sep 10 22:08:38 2023 From: serb at openjdk.org (Sergey Bylokhov) Date: Sun, 10 Sep 2023 22:08:38 GMT Subject: RFR: 8315882: Open some swing tests 2 In-Reply-To: <0lBLWnXYCKN_HqlMIN5ZDZKQUwmKkiAkGQwIGF0W78A=.33562ff7-49ad-47ea-bad4-264e346480ee@github.com> References: <0lBLWnXYCKN_HqlMIN5ZDZKQUwmKkiAkGQwIGF0W78A=.33562ff7-49ad-47ea-bad4-264e346480ee@github.com> Message-ID: <685RGrOAQQ5F2ZiNOiviuXMrQ-esu_g-5fHR-qOuNzQ=.de2fbbc9-22cf-4f0b-9c95-8d04e0131256@github.com> On Thu, 7 Sep 2023 20:33:27 GMT, Alisen Chung wrote: > Opening some swing tests test/jdk/javax/swing/SpringLayout/SpringLayoutSetWidthTest.java line 28: > 26: @summary setWidth() doesn't work on the container in a SpringLayout > 27: @key headful > 28: @run main SpringLayoutSetWidthTest where is the main method in this test? test/jdk/javax/swing/SpringLayout/SpringLayoutSetWidthTest.java line 46: > 44: > 45: public void init() { > 46: fr = new JFrame("Test"); The JFrame will be created on non-EDT. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/15628#discussion_r1320868830 PR Review Comment: https://git.openjdk.org/jdk/pull/15628#discussion_r1320868740 From psadhukhan at openjdk.org Mon Sep 11 05:44:27 2023 From: psadhukhan at openjdk.org (Prasanta Sadhukhan) Date: Mon, 11 Sep 2023 05:44:27 GMT Subject: RFR: 8315663: Open source misc awt tests [v2] In-Reply-To: References: Message-ID: > Some closed awt tests are opensourced Prasanta Sadhukhan has updated the pull request incrementally with one additional commit since the last revision: Test resource ------------- Changes: - all: https://git.openjdk.org/jdk/pull/15634/files - new: https://git.openjdk.org/jdk/pull/15634/files/4def9e69..d2f436ef Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=15634&range=01 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=15634&range=00-01 Stats: 0 lines in 1 file changed: 0 ins; 0 del; 0 mod Patch: https://git.openjdk.org/jdk/pull/15634.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/15634/head:pull/15634 PR: https://git.openjdk.org/jdk/pull/15634 From psadhukhan at openjdk.org Mon Sep 11 07:05:32 2023 From: psadhukhan at openjdk.org (Prasanta Sadhukhan) Date: Mon, 11 Sep 2023 07:05:32 GMT Subject: RFR: 8315609: Open source few more swing text/html tests [v2] In-Reply-To: References: Message-ID: > Few closed swing text/html tests are open sourced Prasanta Sadhukhan has updated the pull request incrementally with one additional commit since the last revision: Spacing issue ------------- Changes: - all: https://git.openjdk.org/jdk/pull/15607/files - new: https://git.openjdk.org/jdk/pull/15607/files/e1c145ce..67687f49 Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=15607&range=01 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=15607&range=00-01 Stats: 2 lines in 2 files changed: 0 ins; 0 del; 2 mod Patch: https://git.openjdk.org/jdk/pull/15607.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/15607/head:pull/15607 PR: https://git.openjdk.org/jdk/pull/15607 From psadhukhan at openjdk.org Mon Sep 11 07:10:00 2023 From: psadhukhan at openjdk.org (Prasanta Sadhukhan) Date: Mon, 11 Sep 2023 07:10:00 GMT Subject: Integrated: 8315609: Open source few more swing text/html tests In-Reply-To: References: Message-ID: On Thu, 7 Sep 2023 04:22:59 GMT, Prasanta Sadhukhan wrote: > Few closed swing text/html tests are open sourced This pull request has now been integrated. Changeset: a04c6c1a Author: Prasanta Sadhukhan URL: https://git.openjdk.org/jdk/commit/a04c6c1ac663a1eab7d45913940cb6ac0af2c11c Stats: 422 lines in 4 files changed: 422 ins; 0 del; 0 mod 8315609: Open source few more swing text/html tests Reviewed-by: jdv ------------- PR: https://git.openjdk.org/jdk/pull/15607 From dholmes at openjdk.org Mon Sep 11 07:15:45 2023 From: dholmes at openjdk.org (David Holmes) Date: Mon, 11 Sep 2023 07:15:45 GMT Subject: RFR: 8267174: Many test files have the wrong Copyright header In-Reply-To: References: Message-ID: <-l07QgwUIOOMsXw9SniuLk856xxeIs8v6lwe8SWO_oI=.7c375b23-9f35-4d0d-a7bb-5fe513edb1d5@github.com> On Tue, 5 Sep 2023 22:49:41 GMT, Erik Joelsson wrote: > There are a number of files in the `test` directory that have an incorrect copyright header, which includes the "classpath" exception text. This patch removes that text from all test files that I could find it in. I did this using a combination of `sed` and `grep`. Reviewing this patch is probably easier using the raw patch file or a suitable webrev format. > > It's my assumption that these headers were introduced by mistake as it's quite easy to copy the wrong template when creating new files. Looks good. I have often pointed out that the CPE was not relevant for test files but ... Thanks ------------- Marked as reviewed by dholmes (Reviewer). PR Review: https://git.openjdk.org/jdk/pull/15573#pullrequestreview-1619274864 From psadhukhan at openjdk.org Mon Sep 11 09:52:51 2023 From: psadhukhan at openjdk.org (Prasanta Sadhukhan) Date: Mon, 11 Sep 2023 09:52:51 GMT Subject: RFR: 8315990: Amend PL tests to proper category Message-ID: <4DAGyjEbImBQO6rxISPLL9c54TIECk4yi283zCqIABo=.99bddf60-ec63-4a68-9b6a-aa5554760e2c@github.com> Few awt problem listed tests are placed in swing category which should be amended ------------- Commit messages: - Amend PL tests to proper category Changes: https://git.openjdk.org/jdk/pull/15655/files Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=15655&range=00 Issue: https://bugs.openjdk.org/browse/JDK-8315990 Stats: 16 lines in 1 file changed: 9 ins; 7 del; 0 mod Patch: https://git.openjdk.org/jdk/pull/15655.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/15655/head:pull/15655 PR: https://git.openjdk.org/jdk/pull/15655 From ihse at openjdk.org Mon Sep 11 10:37:45 2023 From: ihse at openjdk.org (Magnus Ihse Bursie) Date: Mon, 11 Sep 2023 10:37:45 GMT Subject: RFR: 8267174: Many test files have the wrong Copyright header In-Reply-To: References: Message-ID: On Tue, 5 Sep 2023 22:49:41 GMT, Erik Joelsson wrote: > There are a number of files in the `test` directory that have an incorrect copyright header, which includes the "classpath" exception text. This patch removes that text from all test files that I could find it in. I did this using a combination of `sed` and `grep`. Reviewing this patch is probably easier using the raw patch file or a suitable webrev format. > > It's my assumption that these headers were introduced by mistake as it's quite easy to copy the wrong template when creating new files. Looks good to me. Thanks for doing this cleanup! ------------- Marked as reviewed by ihse (Reviewer). PR Review: https://git.openjdk.org/jdk/pull/15573#pullrequestreview-1619669362 From aivanov at openjdk.org Mon Sep 11 13:26:57 2023 From: aivanov at openjdk.org (Alexey Ivanov) Date: Mon, 11 Sep 2023 13:26:57 GMT Subject: RFR: 8294158: HTML formatting for PassFailJFrame instructions Message-ID: <_66glVfDeTgdOjLf6UFWUpvbLliLuQh-vhHmQnYaHBg=.a6500a45-7b96-4cff-b14d-cf0375becb72@github.com> This enhancement provides HTML formatting for instructions in the manual test framework, `PassFailJFrame`. Some tests could benefit from rich-formatted instructions, especially when the instructions are long. ------------- Commit messages: - Wrap createUI call - Revert changes to FileChooserSymLinkTest.java - Refactor configuration of a text component for instructions - Improve instruction formatting - Enable HTML display if instructions start with Changes: https://git.openjdk.org/jdk/pull/15660/files Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=15660&range=00 Issue: https://bugs.openjdk.org/browse/JDK-8294158 Stats: 40 lines in 1 file changed: 35 ins; 0 del; 5 mod Patch: https://git.openjdk.org/jdk/pull/15660.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/15660/head:pull/15660 PR: https://git.openjdk.org/jdk/pull/15660 From psadhukhan at openjdk.org Mon Sep 11 13:29:46 2023 From: psadhukhan at openjdk.org (Prasanta Sadhukhan) Date: Mon, 11 Sep 2023 13:29:46 GMT Subject: RFR: 8315611: Open source swing text/html and tree test [v2] In-Reply-To: References: Message-ID: > Few closed swing text/html and tree 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/15608/files - new: https://git.openjdk.org/jdk/pull/15608/files/478c07c7..34a6d7a2 Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=15608&range=01 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=15608&range=00-01 Stats: 3 lines in 2 files changed: 0 ins; 0 del; 3 mod Patch: https://git.openjdk.org/jdk/pull/15608.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/15608/head:pull/15608 PR: https://git.openjdk.org/jdk/pull/15608 From psadhukhan at openjdk.org Mon Sep 11 13:29:49 2023 From: psadhukhan at openjdk.org (Prasanta Sadhukhan) Date: Mon, 11 Sep 2023 13:29:49 GMT Subject: Integrated: 8315611: Open source swing text/html and tree test In-Reply-To: References: Message-ID: On Thu, 7 Sep 2023 04:45:47 GMT, Prasanta Sadhukhan wrote: > Few closed swing text/html and tree tests are opensourced This pull request has now been integrated. Changeset: ae08143d Author: Prasanta Sadhukhan URL: https://git.openjdk.org/jdk/commit/ae08143d3dd3aa559447623389a5b23c5d32398a Stats: 469 lines in 4 files changed: 469 ins; 0 del; 0 mod 8315611: Open source swing text/html and tree test Reviewed-by: jdv ------------- PR: https://git.openjdk.org/jdk/pull/15608 From aivanov at openjdk.org Mon Sep 11 13:35:07 2023 From: aivanov at openjdk.org (Alexey Ivanov) Date: Mon, 11 Sep 2023 13:35:07 GMT Subject: RFR: 8316003: Update FileChooserSymLinkTest.java to HTML instructions Message-ID: To demonstrate the functionality of HTML formatting in `PassFailJFrame`, I updated the instructions for the `test/jdk/javax/swing/JFileChooser/FileChooserSymLinkTest.java` test. The commands to create the symbolic links are marked up with monospace font, which makes them stand out. The test instructions for single- and multi-selection are emphasised with bold text. This change depends on #15660 and [JDK-8294158](https://bugs.openjdk.org/browse/JDK-8294158). ------------- Commit messages: - Refactor configuration of a text component for instructions - Improve instruction formatting - Enable HTML display if instructions start with Changes: https://git.openjdk.org/jdk/pull/15661/files Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=15661&range=00 Issue: https://bugs.openjdk.org/browse/JDK-8316003 Stats: 84 lines in 2 files changed: 48 ins; 1 del; 35 mod Patch: https://git.openjdk.org/jdk/pull/15661.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/15661/head:pull/15661 PR: https://git.openjdk.org/jdk/pull/15661 From aivanov at openjdk.org Mon Sep 11 13:37:40 2023 From: aivanov at openjdk.org (Alexey Ivanov) Date: Mon, 11 Sep 2023 13:37:40 GMT Subject: RFR: 8315990: Amend PL tests to proper category In-Reply-To: <4DAGyjEbImBQO6rxISPLL9c54TIECk4yi283zCqIABo=.99bddf60-ec63-4a68-9b6a-aa5554760e2c@github.com> References: <4DAGyjEbImBQO6rxISPLL9c54TIECk4yi283zCqIABo=.99bddf60-ec63-4a68-9b6a-aa5554760e2c@github.com> Message-ID: On Mon, 11 Sep 2023 09:42:36 GMT, Prasanta Sadhukhan wrote: > Few awt problem listed tests are placed in swing category which should be amended test/jdk/ProblemList.txt line 471: > 469: java/awt/Mixing/AWT_Mixing/OpaqueOverlapping.java 8294264 windows-x64 > 470: > 471: java/awt/dnd/MissingDragExitEventTest/MissingDragExitEventTest.java 8288839 windows-x64 These tests are excluded on Windows, they don't seem to belong under the heading provided. Should they rather be placed closer to similar tests, in alphabetical order? ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/15655#discussion_r1321561824 From aivanov at openjdk.org Mon Sep 11 13:44:01 2023 From: aivanov at openjdk.org (Alexey Ivanov) Date: Mon, 11 Sep 2023 13:44:01 GMT Subject: RFR: 8316003: Update FileChooserSymLinkTest.java to HTML instructions [v2] In-Reply-To: References: Message-ID: > To demonstrate the functionality of HTML formatting in `PassFailJFrame`, I updated the instructions for the `test/jdk/javax/swing/JFileChooser/FileChooserSymLinkTest.java` test. The commands to create the symbolic links are marked up with monospace font, which makes them stand out. The test instructions for single- and multi-selection are emphasised with bold text. > > This change depends on #15660 and [JDK-8294158](https://bugs.openjdk.org/browse/JDK-8294158). Alexey Ivanov has updated the pull request with a new target base due to a merge or a rebase. The incremental webrev excludes the unrelated changes brought in by the merge/rebase. The pull request contains one additional commit since the last revision: Revert "Revert changes to FileChooserSymLinkTest.java" This reverts commit 7753b3f3e2d3a0df5fde672ad41833b6a9c6e247. ------------- Changes: - all: https://git.openjdk.org/jdk/pull/15661/files - new: https://git.openjdk.org/jdk/pull/15661/files/80fec8a4..41eaf1b8 Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=15661&range=01 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=15661&range=00-01 Stats: 2 lines in 1 file changed: 1 ins; 0 del; 1 mod Patch: https://git.openjdk.org/jdk/pull/15661.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/15661/head:pull/15661 PR: https://git.openjdk.org/jdk/pull/15661 From aivanov at openjdk.org Mon Sep 11 15:45:09 2023 From: aivanov at openjdk.org (Alexey Ivanov) Date: Mon, 11 Sep 2023 15:45:09 GMT Subject: RFR: 8294156: Allow PassFailJFrame.Builder to create test UI Message-ID: This enhances the `Builder` pattern added in [JDK-8294535](https://bugs.openjdk.org/browse/JDK-8294535) with a new method `testUI` which allows passing a lambda expression or a method reference to create *the test UI window*. The `PassFailJFrame` will automatically call the method on the EDT to create the UI, add it to the internal list of windows, install the window closing listener and finally position and show both the instructions and test UI. Alternatively, you can pass an already created window. The `main` method of a manual test could look as simple as a sequence of calls: public static void main(String[] args) throws Exception { PassFailJFrame.builder() .instructions(INSTRUCTIONS) .testUI(() -> createTestUI()) .build() .awaitAndCheck(); } where `createTestUI` returns a test UI window. ------------- Depends on: https://git.openjdk.org/jdk/pull/15660 Commit messages: - Remove trailing whitespace - Mark the Builder class final - Amend message in window closing handler - Use invokeOnEDT in getInstructionFrameBounds - Use functional style for disposing of windows - Use statically imported invokeAndWait and isEDT - Build functional test UI - Refactor windowClosing listener Changes: https://git.openjdk.org/jdk/pull/15665/files Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=15665&range=00 Issue: https://bugs.openjdk.org/browse/JDK-8294156 Stats: 125 lines in 1 file changed: 91 ins; 20 del; 14 mod Patch: https://git.openjdk.org/jdk/pull/15665.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/15665/head:pull/15665 PR: https://git.openjdk.org/jdk/pull/15665 From aivanov at openjdk.org Mon Sep 11 17:05:56 2023 From: aivanov at openjdk.org (Alexey Ivanov) Date: Mon, 11 Sep 2023 17:05:56 GMT Subject: RFR: 8316025: Use testUI() method of PassFailJFrame.Builder in FileChooserSymLinkTest.java Message-ID: This update to `FileChooserSymLinkTest.java` demonstrates the usage of the `testUI` method of the `PassFailJFrame.Builder` class to streamline creating the UI for manual tests. The [`main` method](https://github.com/aivanov-jdk/jdk/blob/cb1835527d718226f1c6fdd85ff5986703ea356f/test/jdk/javax/swing/JFileChooser/FileChooserSymLinkTest.java#L110-L118) is a simple sequence of calls: public static void main(String[] args) throws Exception { PassFailJFrame.builder() .instructions(INSTRUCTIONS) .rows(35) .columns(50) .testUI(FileChooserSymLinkTest::createTestUI) .build() .awaitAndCheck(); } It's the most streamlined way of creating a manual test. This change depends on #15665 and [JDK-8294156](https://bugs.openjdk.org/browse/JDK-8294156) as well as #15661, both of which depend on #15660. ------------- Depends on: https://git.openjdk.org/jdk/pull/15665 Commit messages: - Use testUI() and builder pattern to create test UI Changes: https://git.openjdk.org/jdk/pull/15666/files Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=15666&range=00 Issue: https://bugs.openjdk.org/browse/JDK-8316025 Stats: 110 lines in 1 file changed: 52 ins; 47 del; 11 mod Patch: https://git.openjdk.org/jdk/pull/15666.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/15666/head:pull/15666 PR: https://git.openjdk.org/jdk/pull/15666 From aivanov at openjdk.org Mon Sep 11 18:26:00 2023 From: aivanov at openjdk.org (Alexey Ivanov) Date: Mon, 11 Sep 2023 18:26:00 GMT Subject: RFR: 8316017: Refactor timeout handler in PassFailJFrame Message-ID: Refactored timeout handling in PassFailJFrame: 1. Managing the timer and formatting the time left is inside `TimeoutHandler` class. 2. The class handles timer events and updates the label accordingly. This is implemented on top of #15665. ------------- Depends on: https://git.openjdk.org/jdk/pull/15665 Commit messages: - 8316017: Refactor timeout handler in PassFailJFrame Changes: https://git.openjdk.org/jdk/pull/15668/files Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=15668&range=00 Issue: https://bugs.openjdk.org/browse/JDK-8316017 Stats: 88 lines in 1 file changed: 56 ins; 29 del; 3 mod Patch: https://git.openjdk.org/jdk/pull/15668.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/15668/head:pull/15668 PR: https://git.openjdk.org/jdk/pull/15668 From aivanov at openjdk.org Mon Sep 11 19:12:41 2023 From: aivanov at openjdk.org (Alexey Ivanov) Date: Mon, 11 Sep 2023 19:12:41 GMT Subject: RFR: 6450193: After the first Serialization, JTableHeader does not uninstall its UI In-Reply-To: References: Message-ID: On Thu, 31 Aug 2023 08:02:35 GMT, Prasanta Sadhukhan wrote: > After the first time a JTableHeader is serialized, it no longer will uninstall its UI upon subsequent serializations. > This happens for classes that use the BasicTableHeaderUI class. Any LAF that extends the BasicTableHeaderUI like SynthTableHeaderUI and WindowsTableHeaderUI will get an NotSerializableException thrown > > Each time an JComponent instance is Serialized, a [counter ](https://github.com/openjdk/jdk/blob/218829e0a2a3ae5599b81733df53557966392033/src/java.desktop/share/classes/javax/swing/JComponent.java#L5644-L5645) for the instance is incremented. It is de-incremented in JComponent's writeObject or a class that implements it the same way, like JButton, JScrollPane etc.. > With JTableHeader it does not deincrement the counter. The uninstall mechanism will not uninstall a UI if the counter is not 0 on the first pass..It is not possible to call JComponent.setWriteObjectCounter in JTableHeader as it is not in the same package so the fix is to remove the writeObject implementation and rely on JComponent writeObject implementation to make sure uninstallation of UI happens and also NotSerializableException does not happen for Synth Changes requested by aivanov (Reviewer). test/jdk/javax/swing/JTableHeader/SerializeJTableHeader.java line 44: > 42: JTableHeader jth = new JTableHeader(); > 43: try { > 44: for(int i = 0; i < 10; i ++){ Suggestion: for (int i = 0; i < 10; i ++) { test/jdk/javax/swing/JTableHeader/SerializeJTableHeader.java line 46: > 44: for(int i = 0; i < 10; i ++){ > 45: ByteArrayOutputStream baos = new ByteArrayOutputStream(); > 46: ObjectOutputStream oos = new ObjectOutputStream(baos); You should use try with resources to close the streams as a good pattern, even though closing byte-array does nothing, nor does it leak any resources. test/jdk/javax/swing/JTableHeader/SerializeJTableHeader.java line 54: > 52: catch (Exception x) { > 53: x.printStackTrace(); > 54: } Shouldn't the test fail if an exception is thrown? Without the fix, `NotSerializableException` is expected, and the test will fail. But the test will never fail if you catch the exception to print a message. Suggestion: } catch (Exception x) { x.printStackTrace(); } test/jdk/javax/swing/JTableHeader/SerializeJTableHeader.java line 68: > 66: } > 67: > 68: public static void main(String ... args) throws Exception{ Suggestion: public static void main(String... args) throws Exception { There's usually no space before the ellipses. ------------- PR Review: https://git.openjdk.org/jdk/pull/15507#pullrequestreview-1620659017 PR Review Comment: https://git.openjdk.org/jdk/pull/15507#discussion_r1321963036 PR Review Comment: https://git.openjdk.org/jdk/pull/15507#discussion_r1321964990 PR Review Comment: https://git.openjdk.org/jdk/pull/15507#discussion_r1321967563 PR Review Comment: https://git.openjdk.org/jdk/pull/15507#discussion_r1321968570 From achung at openjdk.org Mon Sep 11 19:23:09 2023 From: achung at openjdk.org (Alisen Chung) Date: Mon, 11 Sep 2023 19:23:09 GMT Subject: RFR: 8315882: Open some swing tests 2 [v2] In-Reply-To: <0lBLWnXYCKN_HqlMIN5ZDZKQUwmKkiAkGQwIGF0W78A=.33562ff7-49ad-47ea-bad4-264e346480ee@github.com> References: <0lBLWnXYCKN_HqlMIN5ZDZKQUwmKkiAkGQwIGF0W78A=.33562ff7-49ad-47ea-bad4-264e346480ee@github.com> Message-ID: > Opening some swing tests Alisen Chung has updated the pull request incrementally with one additional commit since the last revision: finished updating SpringLayoutSetWidthTest ------------- Changes: - all: https://git.openjdk.org/jdk/pull/15628/files - new: https://git.openjdk.org/jdk/pull/15628/files/94e8a6d9..129bbf66 Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=15628&range=01 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=15628&range=00-01 Stats: 7 lines in 1 file changed: 7 ins; 0 del; 0 mod Patch: https://git.openjdk.org/jdk/pull/15628.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/15628/head:pull/15628 PR: https://git.openjdk.org/jdk/pull/15628 From achung at openjdk.org Mon Sep 11 19:26:10 2023 From: achung at openjdk.org (Alisen Chung) Date: Mon, 11 Sep 2023 19:26:10 GMT Subject: RFR: 8315882: Open some swing tests 2 [v3] In-Reply-To: <0lBLWnXYCKN_HqlMIN5ZDZKQUwmKkiAkGQwIGF0W78A=.33562ff7-49ad-47ea-bad4-264e346480ee@github.com> References: <0lBLWnXYCKN_HqlMIN5ZDZKQUwmKkiAkGQwIGF0W78A=.33562ff7-49ad-47ea-bad4-264e346480ee@github.com> Message-ID: > Opening some swing tests Alisen Chung has updated the pull request incrementally with one additional commit since the last revision: named test frames ------------- Changes: - all: https://git.openjdk.org/jdk/pull/15628/files - new: https://git.openjdk.org/jdk/pull/15628/files/129bbf66..26e84bc9 Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=15628&range=02 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=15628&range=01-02 Stats: 2 lines in 2 files changed: 0 ins; 0 del; 2 mod Patch: https://git.openjdk.org/jdk/pull/15628.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/15628/head:pull/15628 PR: https://git.openjdk.org/jdk/pull/15628 From achung at openjdk.org Mon Sep 11 19:28:15 2023 From: achung at openjdk.org (Alisen Chung) Date: Mon, 11 Sep 2023 19:28:15 GMT Subject: RFR: 8315825: Open some swing tests [v2] In-Reply-To: References: Message-ID: > Opening some closed swing tests Alisen Chung has updated the pull request incrementally with one additional commit since the last revision: named test frames ------------- Changes: - all: https://git.openjdk.org/jdk/pull/15606/files - new: https://git.openjdk.org/jdk/pull/15606/files/967f25ac..64184c41 Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=15606&range=01 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=15606&range=00-01 Stats: 2 lines in 2 files changed: 0 ins; 0 del; 2 mod Patch: https://git.openjdk.org/jdk/pull/15606.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/15606/head:pull/15606 PR: https://git.openjdk.org/jdk/pull/15606 From achung at openjdk.org Mon Sep 11 20:33:50 2023 From: achung at openjdk.org (Alisen Chung) Date: Mon, 11 Sep 2023 20:33:50 GMT Subject: Withdrawn: 8315825: Open some swing tests In-Reply-To: References: Message-ID: On Wed, 6 Sep 2023 23:19:58 GMT, Alisen Chung wrote: > Opening some closed swing tests This pull request has been closed without being integrated. ------------- PR: https://git.openjdk.org/jdk/pull/15606 From achung at openjdk.org Mon Sep 11 20:33:50 2023 From: achung at openjdk.org (Alisen Chung) Date: Mon, 11 Sep 2023 20:33:50 GMT Subject: Withdrawn: 8315882: Open some swing tests 2 In-Reply-To: <0lBLWnXYCKN_HqlMIN5ZDZKQUwmKkiAkGQwIGF0W78A=.33562ff7-49ad-47ea-bad4-264e346480ee@github.com> References: <0lBLWnXYCKN_HqlMIN5ZDZKQUwmKkiAkGQwIGF0W78A=.33562ff7-49ad-47ea-bad4-264e346480ee@github.com> Message-ID: <0P6QD5hXLIdlEAIbaEDJLDKZAfox9IULA0wEH-VMA_E=.c0d9858a-355e-48f1-83b7-aa4fea787c14@github.com> On Thu, 7 Sep 2023 20:33:27 GMT, Alisen Chung wrote: > Opening some swing tests This pull request has been closed without being integrated. ------------- PR: https://git.openjdk.org/jdk/pull/15628 From azvegint at openjdk.org Mon Sep 11 22:27:21 2023 From: azvegint at openjdk.org (Alexander Zvegintsev) Date: Mon, 11 Sep 2023 22:27:21 GMT Subject: RFR: 8315726: Open source several AWT applet tests Message-ID: <4WOazUTC1hKAoxppzsJ49DpOmmuoGf5eUfSLYRlWhLA=.5634a73e-6c35-485d-8004-eec1271844ae@github.com> Some closed AWT test are open sourced. ------------- Commit messages: - initial Changes: https://git.openjdk.org/jdk/pull/15671/files Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=15671&range=00 Issue: https://bugs.openjdk.org/browse/JDK-8315726 Stats: 867 lines in 5 files changed: 867 ins; 0 del; 0 mod Patch: https://git.openjdk.org/jdk/pull/15671.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/15671/head:pull/15671 PR: https://git.openjdk.org/jdk/pull/15671 From honkar at openjdk.org Tue Sep 12 00:42:25 2023 From: honkar at openjdk.org (Harshitha Onkar) Date: Tue, 12 Sep 2023 00:42:25 GMT Subject: RFR: JDK-8315824: Open source several Swing Text/HTML related tests Message-ID: This PR open sources few Swing Text/HTML related tests. ------------- Commit messages: - extra spacing - Text/HTML tests Changes: https://git.openjdk.org/jdk/pull/15675/files Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=15675&range=00 Issue: https://bugs.openjdk.org/browse/JDK-8315824 Stats: 490 lines in 6 files changed: 490 ins; 0 del; 0 mod Patch: https://git.openjdk.org/jdk/pull/15675.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/15675/head:pull/15675 PR: https://git.openjdk.org/jdk/pull/15675 From duke at openjdk.org Tue Sep 12 00:45:41 2023 From: duke at openjdk.org (lawrence.andrews) Date: Tue, 12 Sep 2023 00:45:41 GMT Subject: RFR: 8316017: Refactor timeout handler in PassFailJFrame In-Reply-To: References: Message-ID: On Mon, 11 Sep 2023 18:18:28 GMT, Alexey Ivanov wrote: > Refactored timeout handling in PassFailJFrame: > > 1. Managing the timer and formatting the time left is inside `TimeoutHandler` class. > 2. The class handles timer events and updates the label accordingly. > > This is implemented on top of #15665. Looks good to me. ------------- PR Comment: https://git.openjdk.org/jdk/pull/15668#issuecomment-1714800439 From honkar at openjdk.org Tue Sep 12 00:48:18 2023 From: honkar at openjdk.org (Harshitha Onkar) Date: Tue, 12 Sep 2023 00:48:18 GMT Subject: RFR: JDK-8315824: Open source several Swing Text/HTML related tests [v2] In-Reply-To: References: Message-ID: > This PR open sources few Swing Text/HTML related tests. Harshitha Onkar has updated the pull request incrementally with one additional commit since the last revision: minor changes ------------- Changes: - all: https://git.openjdk.org/jdk/pull/15675/files - new: https://git.openjdk.org/jdk/pull/15675/files/39a0297f..711e464b Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=15675&range=01 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=15675&range=00-01 Stats: 2 lines in 2 files changed: 0 ins; 0 del; 2 mod Patch: https://git.openjdk.org/jdk/pull/15675.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/15675/head:pull/15675 PR: https://git.openjdk.org/jdk/pull/15675 From psadhukhan at openjdk.org Tue Sep 12 03:32:02 2023 From: psadhukhan at openjdk.org (Prasanta Sadhukhan) Date: Tue, 12 Sep 2023 03:32:02 GMT Subject: RFR: 8315990: Amend PL tests to proper category [v2] In-Reply-To: <4DAGyjEbImBQO6rxISPLL9c54TIECk4yi283zCqIABo=.99bddf60-ec63-4a68-9b6a-aa5554760e2c@github.com> References: <4DAGyjEbImBQO6rxISPLL9c54TIECk4yi283zCqIABo=.99bddf60-ec63-4a68-9b6a-aa5554760e2c@github.com> Message-ID: > Few awt problem listed tests are placed in swing category which should be amended Prasanta Sadhukhan has updated the pull request incrementally with one additional commit since the last revision: PL amend ------------- Changes: - all: https://git.openjdk.org/jdk/pull/15655/files - new: https://git.openjdk.org/jdk/pull/15655/files/bd1c5fab..2bd2f9c0 Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=15655&range=01 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=15655&range=00-01 Stats: 9 lines in 1 file changed: 4 ins; 5 del; 0 mod Patch: https://git.openjdk.org/jdk/pull/15655.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/15655/head:pull/15655 PR: https://git.openjdk.org/jdk/pull/15655 From psadhukhan at openjdk.org Tue Sep 12 03:37:07 2023 From: psadhukhan at openjdk.org (Prasanta Sadhukhan) Date: Tue, 12 Sep 2023 03:37:07 GMT Subject: RFR: 8315990: Amend PL tests to proper category [v3] In-Reply-To: <4DAGyjEbImBQO6rxISPLL9c54TIECk4yi283zCqIABo=.99bddf60-ec63-4a68-9b6a-aa5554760e2c@github.com> References: <4DAGyjEbImBQO6rxISPLL9c54TIECk4yi283zCqIABo=.99bddf60-ec63-4a68-9b6a-aa5554760e2c@github.com> Message-ID: > Few awt problem listed tests are placed in swing category which should be amended Prasanta Sadhukhan has updated the pull request incrementally with one additional commit since the last revision: PL amend ------------- Changes: - all: https://git.openjdk.org/jdk/pull/15655/files - new: https://git.openjdk.org/jdk/pull/15655/files/2bd2f9c0..5bc75886 Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=15655&range=02 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=15655&range=01-02 Stats: 7 lines in 1 file changed: 3 ins; 4 del; 0 mod Patch: https://git.openjdk.org/jdk/pull/15655.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/15655/head:pull/15655 PR: https://git.openjdk.org/jdk/pull/15655 From psadhukhan at openjdk.org Tue Sep 12 03:37:07 2023 From: psadhukhan at openjdk.org (Prasanta Sadhukhan) Date: Tue, 12 Sep 2023 03:37:07 GMT Subject: RFR: 8315990: Amend PL tests to proper category [v3] In-Reply-To: References: <4DAGyjEbImBQO6rxISPLL9c54TIECk4yi283zCqIABo=.99bddf60-ec63-4a68-9b6a-aa5554760e2c@github.com> Message-ID: On Mon, 11 Sep 2023 13:34:28 GMT, Alexey Ivanov wrote: >> Prasanta Sadhukhan has updated the pull request incrementally with one additional commit since the last revision: >> >> PL amend > > test/jdk/ProblemList.txt line 471: > >> 469: java/awt/Mixing/AWT_Mixing/OpaqueOverlapping.java 8294264 windows-x64 >> 470: >> 471: java/awt/dnd/MissingDragExitEventTest/MissingDragExitEventTest.java 8288839 windows-x64 > > These tests are excluded on Windows, they don't seem to belong under the heading provided. > > Should they rather be placed closer to similar tests, in alphabetical order? There was a line gap which should signify these tests doesn't belong to that heading, but anyways I have placed those tests closer to similar tests.. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/15655#discussion_r1322315845 From psadhukhan at openjdk.org Tue Sep 12 04:54:57 2023 From: psadhukhan at openjdk.org (Prasanta Sadhukhan) Date: Tue, 12 Sep 2023 04:54:57 GMT Subject: RFR: 8315986: javax/swing/JMenuItem/4654927/bug4654927.java: component must be showing on the screen to determine its location Message-ID: Test was run without waiting for UI to be made visible leading to IllegalComponentStateException. Used robot.delay consistent with other headful tests to made the test wait after UI is created and shown. Test passed in several iterations in all platforms. Link in JBS ------------- Commit messages: - 8315986: javax/swing/JMenuItem/4654927/bug4654927.java: component must be showing on the screen to determine its location - 8315986: javax/swing/JMenuItem/4654927/bug4654927.java: component must be showing on the screen to determine its location Changes: https://git.openjdk.org/jdk/pull/15677/files Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=15677&range=00 Issue: https://bugs.openjdk.org/browse/JDK-8315986 Stats: 34 lines in 1 file changed: 13 ins; 6 del; 15 mod Patch: https://git.openjdk.org/jdk/pull/15677.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/15677/head:pull/15677 PR: https://git.openjdk.org/jdk/pull/15677 From tr at openjdk.org Tue Sep 12 05:03:39 2023 From: tr at openjdk.org (Tejesh R) Date: Tue, 12 Sep 2023 05:03:39 GMT Subject: RFR: 8315761: Open source few swing JList and JMenuBar tests [v2] In-Reply-To: References: Message-ID: <6X671hTJGBzEDu7njFWRk8gCR_a5NDPWEyYyHK9UHAo=.65479124-848a-4571-bfd3-eff9ccf3e753@github.com> On Fri, 8 Sep 2023 10:14:20 GMT, Abhishek Kumar wrote: >> Few closed JList and JMenubar swing tests are open sourced. > > Abhishek Kumar has updated the pull request incrementally with one additional commit since the last revision: > > Review comment update Marked as reviewed by tr (Committer). ------------- PR Review: https://git.openjdk.org/jdk/pull/15621#pullrequestreview-1621250298 From tr at openjdk.org Tue Sep 12 05:13:39 2023 From: tr at openjdk.org (Tejesh R) Date: Tue, 12 Sep 2023 05:13:39 GMT Subject: RFR: 8315677: Open source few swing JFileChooser and other tests In-Reply-To: References: Message-ID: On Thu, 7 Sep 2023 18:57:50 GMT, Abhishek Kumar wrote: > Few closed JFileChooser and other swing tests are open sourced. test/jdk/javax/swing/JFileChooser/bug4624353.java line 55: > 53: fr.getContentPane().add(fc); > 54: fr.pack(); > 55: fr.setVisible(true); Delay might be required before starting test. test/jdk/javax/swing/JFileChooser/bug4624353.java line 59: > 57: passAround(fc); > 58: if (!passed) { > 59: throw new RuntimeException("Test failed"); RuntimeException can be outside SwingUtility to avoid Invocation error. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/15626#discussion_r1322391425 PR Review Comment: https://git.openjdk.org/jdk/pull/15626#discussion_r1322392286 From tr at openjdk.org Tue Sep 12 05:53:38 2023 From: tr at openjdk.org (Tejesh R) Date: Tue, 12 Sep 2023 05:53:38 GMT Subject: RFR: 8315663: Open source misc awt tests [v2] In-Reply-To: References: Message-ID: On Mon, 11 Sep 2023 05:44:27 GMT, Prasanta Sadhukhan wrote: >> Some closed awt tests are opensourced > > Prasanta Sadhukhan has updated the pull request incrementally with one additional commit since the last revision: > > Test resource Marked as reviewed by tr (Committer). ------------- PR Review: https://git.openjdk.org/jdk/pull/15634#pullrequestreview-1621293645 From tr at openjdk.org Tue Sep 12 05:55:08 2023 From: tr at openjdk.org (Tejesh R) Date: Tue, 12 Sep 2023 05:55:08 GMT Subject: RFR: 8315834: Open source several Swing JSpinner related tests Message-ID: Open source these Swing JSpinner related tests: javax/swing/JSpinner/4522737/bug4522737.java javax/swing/JSpinner/4656590/bug4656590.java javax/swing/JSpinner/4680204/bug4680204.java javax/swing/JSpinner/4862257/bug4862257.java javax/swing/JSpinner/5104421/bug5104421.java ------------- Commit messages: - Open sourcing few spinner test Changes: https://git.openjdk.org/jdk/pull/15678/files Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=15678&range=00 Issue: https://bugs.openjdk.org/browse/JDK-8315834 Stats: 375 lines in 5 files changed: 375 ins; 0 del; 0 mod Patch: https://git.openjdk.org/jdk/pull/15678.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/15678/head:pull/15678 PR: https://git.openjdk.org/jdk/pull/15678 From mbaesken at openjdk.org Tue Sep 12 08:24:38 2023 From: mbaesken at openjdk.org (Matthias Baesken) Date: Tue, 12 Sep 2023 08:24:38 GMT Subject: RFR: JDK-8315897: some PrivilegedActions missing in JDK code for getting properties In-Reply-To: References: Message-ID: On Fri, 8 Sep 2023 14:01:24 GMT, Alexey Ivanov wrote: > > So what about FontConfiguration? Is that something using the class directly too? > > I think this is not needed either. As far as I can see, the instance of `FontConfiguration` is created from `doPrivileged`, therefore these two system properties are read inside `doPrivileged` already. Hi there is a public constructor ` public FontConfiguration(SunFontManager fm) {` calling setOsNameAndVersion(), so is it really always called from `doPrivileged` ? (however it is currently only exported in a qualified way) ------------- PR Comment: https://git.openjdk.org/jdk/pull/15629#issuecomment-1715235616 From mbaesken at openjdk.org Tue Sep 12 08:29:37 2023 From: mbaesken at openjdk.org (Matthias Baesken) Date: Tue, 12 Sep 2023 08:29:37 GMT Subject: RFR: JDK-8315897: some PrivilegedActions missing in JDK code for getting properties In-Reply-To: References: Message-ID: On Fri, 8 Sep 2023 13:02:07 GMT, Alan Bateman wrote: > > So probably we could avoid changing VMManagementImpl.java because it is not needed any more at least in jdk-head . > > It's a JDK internal class so should never have been used directly. I can't imagine what might be using a JDK internal class while running with a SM. > okay thanks for the explanation. So could we remove the existing PrivilegedAction in getCompilerName ? ------------- PR Comment: https://git.openjdk.org/jdk/pull/15629#issuecomment-1715244233 From psadhukhan at openjdk.org Tue Sep 12 08:40:40 2023 From: psadhukhan at openjdk.org (Prasanta Sadhukhan) Date: Tue, 12 Sep 2023 08:40:40 GMT Subject: RFR: 8315726: Open source several AWT applet tests In-Reply-To: <4WOazUTC1hKAoxppzsJ49DpOmmuoGf5eUfSLYRlWhLA=.5634a73e-6c35-485d-8004-eec1271844ae@github.com> References: <4WOazUTC1hKAoxppzsJ49DpOmmuoGf5eUfSLYRlWhLA=.5634a73e-6c35-485d-8004-eec1271844ae@github.com> Message-ID: <0SfeVC-ksNJvzw855_Fle8_oEdKzzU5EnkdKnbiBquU=.d90b8824-33e3-467b-848e-04885d96a4bc@github.com> On Mon, 11 Sep 2023 22:18:51 GMT, Alexander Zvegintsev wrote: > Some closed AWT test are open sourced. Marked as reviewed by psadhukhan (Reviewer). test/jdk/java/awt/Component/Displayable.java line 98: > 96: f.add("North", test); > 97: f.pack(); > 98: f.dispose(); GUess it will be better to do dispose in try-finally block ------------- PR Review: https://git.openjdk.org/jdk/pull/15671#pullrequestreview-1621645917 PR Review Comment: https://git.openjdk.org/jdk/pull/15671#discussion_r1322657523 From aturbanov at openjdk.org Tue Sep 12 08:47:41 2023 From: aturbanov at openjdk.org (Andrey Turbanov) Date: Tue, 12 Sep 2023 08:47:41 GMT Subject: RFR: 8315726: Open source several AWT applet tests In-Reply-To: <4WOazUTC1hKAoxppzsJ49DpOmmuoGf5eUfSLYRlWhLA=.5634a73e-6c35-485d-8004-eec1271844ae@github.com> References: <4WOazUTC1hKAoxppzsJ49DpOmmuoGf5eUfSLYRlWhLA=.5634a73e-6c35-485d-8004-eec1271844ae@github.com> Message-ID: On Mon, 11 Sep 2023 22:18:51 GMT, Alexander Zvegintsev wrote: > Some closed AWT test are open sourced. test/jdk/java/awt/Focus/TestWindowsLFFocus.java line 103: > 101: SwingUtilities.invokeAndWait(() -> { > 102: Point location = new Point(frameLoc); > 103: location.y += bar.getHeight() / 2 + item.getHeight() / 2; Suggestion: location.y += bar.getHeight() / 2 + item.getHeight() / 2; ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/15671#discussion_r1322667114 From aivanov at openjdk.org Tue Sep 12 10:33:41 2023 From: aivanov at openjdk.org (Alexey Ivanov) Date: Tue, 12 Sep 2023 10:33:41 GMT Subject: RFR: 8315990: Amend problemlisted tests to proper position [v3] In-Reply-To: References: <4DAGyjEbImBQO6rxISPLL9c54TIECk4yi283zCqIABo=.99bddf60-ec63-4a68-9b6a-aa5554760e2c@github.com> Message-ID: On Tue, 12 Sep 2023 03:32:04 GMT, Prasanta Sadhukhan wrote: >> test/jdk/ProblemList.txt line 471: >> >>> 469: java/awt/Mixing/AWT_Mixing/OpaqueOverlapping.java 8294264 windows-x64 >>> 470: >>> 471: java/awt/dnd/MissingDragExitEventTest/MissingDragExitEventTest.java 8288839 windows-x64 >> >> These tests are excluded on Windows, they don't seem to belong under the heading provided. >> >> Should they rather be placed closer to similar tests, in alphabetical order? > > There was a line gap which should signify these tests doesn't belong to that heading, but anyways I have placed those tests closer to similar tests.. Thanks. I can't find any guidelines where newly added tests should be placed. Looking at the list, I have the impression that it was common to add tests to the same group, keeping the list sorted alphabetically. However, as far as I can see, most new lines are added to an end of a section. This is easier, I guess? ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/15655#discussion_r1322838901 From aivanov at openjdk.org Tue Sep 12 10:33:40 2023 From: aivanov at openjdk.org (Alexey Ivanov) Date: Tue, 12 Sep 2023 10:33:40 GMT Subject: RFR: 8315990: Amend problemlisted tests to proper position [v3] In-Reply-To: References: <4DAGyjEbImBQO6rxISPLL9c54TIECk4yi283zCqIABo=.99bddf60-ec63-4a68-9b6a-aa5554760e2c@github.com> Message-ID: On Tue, 12 Sep 2023 03:37:07 GMT, Prasanta Sadhukhan wrote: >> Few awt problem listed tests are placed in swing category which should be amended > > Prasanta Sadhukhan has updated the pull request incrementally with one additional commit since the last revision: > > PL amend Marked as reviewed by aivanov (Reviewer). ------------- PR Review: https://git.openjdk.org/jdk/pull/15655#pullrequestreview-1621927400 From aivanov at openjdk.org Tue Sep 12 10:39:40 2023 From: aivanov at openjdk.org (Alexey Ivanov) Date: Tue, 12 Sep 2023 10:39:40 GMT Subject: RFR: 8314755: Resource leak: SwingWorker listener keeps strong reference to executor In-Reply-To: References: Message-ID: On Sun, 30 Jul 2023 12:50:58 GMT, Christopher Sahnwaldt wrote: > In https://github.com/openjdk/jdk/commit/b8af3d50192f8bc98d83f8102f0fd1989f302e32 the weak reference was accidentally changed from a field to a local variable, which means that the PropertyChangeListener keeps a strong reference to executorService, which is a resource leak >> Is it possible to cover this change with the new test? > > I wrote a test demonstrating the problem that the executor is retained: [SwingWorkerExecutorLeakTest.java](/jcsahnwaldt/SwingWorkerExecutorLeakTest/blob/master/src/main/java/SwingWorkerExecutorLeakTest.java). (It's slightly similar to [6799345/TestShutdown.java](/openjdk/jdk/blob/master/test/jdk/javax/swing/system/6799345/TestShutdown.java).) > > I ran the test on JDK 8, 11, 17, and 20 on macOS and always got the same result. @jcsahnwaldt You should add this test as a jtreg regression test which demonstrates the problem to this PR. ------------- PR Comment: https://git.openjdk.org/jdk/pull/15081#issuecomment-1715473742 From duke at openjdk.org Tue Sep 12 10:57:39 2023 From: duke at openjdk.org (Christopher Sahnwaldt) Date: Tue, 12 Sep 2023 10:57:39 GMT Subject: RFR: 8314755: Resource leak: SwingWorker listener keeps strong reference to executor In-Reply-To: References: Message-ID: On Sun, 30 Jul 2023 12:50:58 GMT, Christopher Sahnwaldt wrote: > In https://github.com/openjdk/jdk/commit/b8af3d50192f8bc98d83f8102f0fd1989f302e32 the weak reference was accidentally changed from a field to a local variable, which means that the PropertyChangeListener keeps a strong reference to executorService, which is a resource leak Sure. How do I do that? ------------- PR Comment: https://git.openjdk.org/jdk/pull/15081#issuecomment-1715499546 From duke at openjdk.org Tue Sep 12 11:08:25 2023 From: duke at openjdk.org (Christopher Sahnwaldt) Date: Tue, 12 Sep 2023 11:08:25 GMT Subject: RFR: 8314755: Resource leak: SwingWorker listener keeps strong reference to executor [v2] In-Reply-To: References: Message-ID: > In https://github.com/openjdk/jdk/commit/b8af3d50192f8bc98d83f8102f0fd1989f302e32 the weak reference was accidentally changed from a field to a local variable, which means that the PropertyChangeListener keeps a strong reference to executorService, which is a resource leak Christopher Sahnwaldt 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 patch-1 - SwingWorker.java: appContext shouldn't keep a strong reference to executorService In https://github.com/openjdk/jdk/commit/b8af3d50192f8bc98d83f8102f0fd1989f302e32 the weak reference was accidentally changed from a field to a local variable, which means that the PropertyChangeListener keeps a strong reference to executorService, which is a resource leak ------------- Changes: - all: https://git.openjdk.org/jdk/pull/15081/files - new: https://git.openjdk.org/jdk/pull/15081/files/59d7bd5d..f11dc305 Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=15081&range=01 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=15081&range=00-01 Stats: 75083 lines in 2378 files changed: 43178 ins; 16345 del; 15560 mod Patch: https://git.openjdk.org/jdk/pull/15081.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/15081/head:pull/15081 PR: https://git.openjdk.org/jdk/pull/15081 From abhiscxk at openjdk.org Tue Sep 12 11:17:40 2023 From: abhiscxk at openjdk.org (Abhishek Kumar) Date: Tue, 12 Sep 2023 11:17:40 GMT Subject: RFR: 8315677: Open source few swing JFileChooser and other tests In-Reply-To: References: Message-ID: On Tue, 12 Sep 2023 05:03:36 GMT, Tejesh R wrote: >> Few closed JFileChooser and other swing tests are open sourced. > > test/jdk/javax/swing/JFileChooser/bug4624353.java line 55: > >> 53: fr.getContentPane().add(fc); >> 54: fr.pack(); >> 55: fr.setVisible(true); > > Delay might be required before starting test. Didn't observe any failure for multiple runs without delay. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/15626#discussion_r1322884992 From duke at openjdk.org Tue Sep 12 11:24:37 2023 From: duke at openjdk.org (Christopher Sahnwaldt) Date: Tue, 12 Sep 2023 11:24:37 GMT Subject: RFR: 8314755: Resource leak: SwingWorker listener keeps strong reference to executor [v3] In-Reply-To: References: Message-ID: > In https://github.com/openjdk/jdk/commit/b8af3d50192f8bc98d83f8102f0fd1989f302e32 the weak reference was accidentally changed from a field to a local variable, which means that the PropertyChangeListener keeps a strong reference to executorService, which is a resource leak Christopher Sahnwaldt has updated the pull request incrementally with one additional commit since the last revision: Create SwingWorkerExecutorLeakTest.java ------------- Changes: - all: https://git.openjdk.org/jdk/pull/15081/files - new: https://git.openjdk.org/jdk/pull/15081/files/f11dc305..e51b49cf Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=15081&range=02 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=15081&range=01-02 Stats: 70 lines in 1 file changed: 70 ins; 0 del; 0 mod Patch: https://git.openjdk.org/jdk/pull/15081.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/15081/head:pull/15081 PR: https://git.openjdk.org/jdk/pull/15081 From abhiscxk at openjdk.org Tue Sep 12 11:28:36 2023 From: abhiscxk at openjdk.org (Abhishek Kumar) Date: Tue, 12 Sep 2023 11:28:36 GMT Subject: RFR: 8315677: Open source few swing JFileChooser and other tests [v2] In-Reply-To: References: Message-ID: > Few closed JFileChooser and other swing tests are open sourced. Abhishek Kumar has updated the pull request incrementally with one additional commit since the last revision: Review comment update ------------- Changes: - all: https://git.openjdk.org/jdk/pull/15626/files - new: https://git.openjdk.org/jdk/pull/15626/files/aec5fd8a..6caa246b Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=15626&range=01 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=15626&range=00-01 Stats: 11 lines in 1 file changed: 2 ins; 0 del; 9 mod Patch: https://git.openjdk.org/jdk/pull/15626.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/15626/head:pull/15626 PR: https://git.openjdk.org/jdk/pull/15626 From abhiscxk at openjdk.org Tue Sep 12 11:28:38 2023 From: abhiscxk at openjdk.org (Abhishek Kumar) Date: Tue, 12 Sep 2023 11:28:38 GMT Subject: RFR: 8315677: Open source few swing JFileChooser and other tests [v2] In-Reply-To: References: Message-ID: On Tue, 12 Sep 2023 05:04:56 GMT, Tejesh R wrote: >> Abhishek Kumar has updated the pull request incrementally with one additional commit since the last revision: >> >> Review comment update > > test/jdk/javax/swing/JFileChooser/bug4624353.java line 59: > >> 57: passAround(fc); >> 58: if (!passed) { >> 59: throw new RuntimeException("Test failed"); > > RuntimeException can be outside SwingUtility to avoid Invocation error. Updated. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/15626#discussion_r1322893705 From alanb at openjdk.org Tue Sep 12 11:48:44 2023 From: alanb at openjdk.org (Alan Bateman) Date: Tue, 12 Sep 2023 11:48:44 GMT Subject: RFR: JDK-8315897: some PrivilegedActions missing in JDK code for getting properties In-Reply-To: References: Message-ID: On Tue, 12 Sep 2023 08:26:59 GMT, Matthias Baesken wrote: > So could we remove the existing PrivilegedAction in getCompilerName ? Wouldn't that break ManagementFactory.getCompilationMXBean? ------------- PR Comment: https://git.openjdk.org/jdk/pull/15629#issuecomment-1715570499 From psadhukhan at openjdk.org Tue Sep 12 11:49:52 2023 From: psadhukhan at openjdk.org (Prasanta Sadhukhan) Date: Tue, 12 Sep 2023 11:49:52 GMT Subject: Integrated: 8315990: Amend problemlisted tests to proper position In-Reply-To: <4DAGyjEbImBQO6rxISPLL9c54TIECk4yi283zCqIABo=.99bddf60-ec63-4a68-9b6a-aa5554760e2c@github.com> References: <4DAGyjEbImBQO6rxISPLL9c54TIECk4yi283zCqIABo=.99bddf60-ec63-4a68-9b6a-aa5554760e2c@github.com> Message-ID: On Mon, 11 Sep 2023 09:42:36 GMT, Prasanta Sadhukhan wrote: > Few awt problem listed tests are placed in swing category which should be amended This pull request has now been integrated. Changeset: 8b4f9a88 Author: Prasanta Sadhukhan URL: https://git.openjdk.org/jdk/commit/8b4f9a88e606c4c6722061ce9946ce17340ff1df Stats: 14 lines in 1 file changed: 7 ins; 7 del; 0 mod 8315990: Amend problemlisted tests to proper position Reviewed-by: aivanov ------------- PR: https://git.openjdk.org/jdk/pull/15655 From azvegint at openjdk.org Tue Sep 12 12:26:38 2023 From: azvegint at openjdk.org (Alexander Zvegintsev) Date: Tue, 12 Sep 2023 12:26:38 GMT Subject: RFR: 8315726: Open source several AWT applet tests [v2] In-Reply-To: <4WOazUTC1hKAoxppzsJ49DpOmmuoGf5eUfSLYRlWhLA=.5634a73e-6c35-485d-8004-eec1271844ae@github.com> References: <4WOazUTC1hKAoxppzsJ49DpOmmuoGf5eUfSLYRlWhLA=.5634a73e-6c35-485d-8004-eec1271844ae@github.com> Message-ID: > Some closed AWT test are open sourced. Alexander Zvegintsev has updated the pull request incrementally with one additional commit since the last revision: spacing ------------- Changes: - all: https://git.openjdk.org/jdk/pull/15671/files - new: https://git.openjdk.org/jdk/pull/15671/files/9a4498f7..25cca2ef Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=15671&range=01 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=15671&range=00-01 Stats: 1 line in 1 file changed: 0 ins; 0 del; 1 mod Patch: https://git.openjdk.org/jdk/pull/15671.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/15671/head:pull/15671 PR: https://git.openjdk.org/jdk/pull/15671 From azvegint at openjdk.org Tue Sep 12 12:26:40 2023 From: azvegint at openjdk.org (Alexander Zvegintsev) Date: Tue, 12 Sep 2023 12:26:40 GMT Subject: RFR: 8315726: Open source several AWT applet tests [v2] In-Reply-To: References: <4WOazUTC1hKAoxppzsJ49DpOmmuoGf5eUfSLYRlWhLA=.5634a73e-6c35-485d-8004-eec1271844ae@github.com> Message-ID: On Tue, 12 Sep 2023 08:44:35 GMT, Andrey Turbanov wrote: >> Alexander Zvegintsev has updated the pull request incrementally with one additional commit since the last revision: >> >> spacing > > test/jdk/java/awt/Focus/TestWindowsLFFocus.java line 103: > >> 101: SwingUtilities.invokeAndWait(() -> { >> 102: Point location = new Point(frameLoc); >> 103: location.y += bar.getHeight() / 2 + item.getHeight() / 2; > > Suggestion: > > location.y += bar.getHeight() / 2 + item.getHeight() / 2; Fixed ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/15671#discussion_r1322953763 From duke at openjdk.org Tue Sep 12 12:34:12 2023 From: duke at openjdk.org (Christopher Sahnwaldt) Date: Tue, 12 Sep 2023 12:34:12 GMT Subject: RFR: 8314755: Resource leak: SwingWorker listener keeps strong reference to executor [v4] In-Reply-To: References: Message-ID: > In https://github.com/openjdk/jdk/commit/b8af3d50192f8bc98d83f8102f0fd1989f302e32 the weak reference was accidentally changed from a field to a local variable, which means that the PropertyChangeListener keeps a strong reference to executorService, which is a resource leak Christopher Sahnwaldt has updated the pull request incrementally with one additional commit since the last revision: SwingWorkerExecutorLeakTest.java: use AppContext.getAppContext() instead of SunToolkit.createNewAppContext() to create AppContext, set necessary system properties ------------- Changes: - all: https://git.openjdk.org/jdk/pull/15081/files - new: https://git.openjdk.org/jdk/pull/15081/files/e51b49cf..06cbac9e Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=15081&range=03 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=15081&range=02-03 Stats: 19 lines in 1 file changed: 16 ins; 0 del; 3 mod Patch: https://git.openjdk.org/jdk/pull/15081.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/15081/head:pull/15081 PR: https://git.openjdk.org/jdk/pull/15081 From duke at openjdk.org Tue Sep 12 12:51:41 2023 From: duke at openjdk.org (Christopher Sahnwaldt) Date: Tue, 12 Sep 2023 12:51:41 GMT Subject: RFR: 8314755: Resource leak: SwingWorker listener keeps strong reference to executor [v4] In-Reply-To: References: Message-ID: On Tue, 12 Sep 2023 12:34:12 GMT, Christopher Sahnwaldt wrote: >> In https://github.com/openjdk/jdk/commit/b8af3d50192f8bc98d83f8102f0fd1989f302e32 the weak reference was accidentally changed from a field to a local variable, which means that the PropertyChangeListener keeps a strong reference to executorService, which is a resource leak > > Christopher Sahnwaldt has updated the pull request incrementally with one additional commit since the last revision: > > SwingWorkerExecutorLeakTest.java: use AppContext.getAppContext() instead of SunToolkit.createNewAppContext() to create AppContext, set necessary system properties Maybe this issue is a non-issue. Someone who knows how `AppContext` is currently used should check. The resource leak only occurs when `AppContext.dispose()` is called. I don't know if this method is still called anywhere in the JDK. (A [search for `dispose`](https://github.com/search?q=repo%3Aopenjdk/jdk%20path%3asrc%20dispose&type=code) produces too many results.) Each `AppContext` is related to a thread group, and `AppContext.dispose()` must be called in a thread group that is not the same or a descendant of the `AppContext`'s thread group ? otherwise `dispose()` does nothing and throws. But `AppContext.getAppContext()` usually creates an `AppContext` in the root thread group, which means that `dispose()` can never succeed. `AppContext.getAppContext()` only creates `AppContext` in the current thread group if at least one of the system properties `javaplugin.version` and `javawebstart.version` is set, and `javafx.version` is set. See [AppContext.getAppContext()](https://github.com/openjdk/jdk/blob/master/src/java.desktop/share/classes/sun/awt/AppContext.java#L313). I don't know in which situations that condition is true. A comment in the code says "Swing inside JavaFX case". ------------- PR Comment: https://git.openjdk.org/jdk/pull/15081#issuecomment-1715660040 From azvegint at openjdk.org Tue Sep 12 12:52:39 2023 From: azvegint at openjdk.org (Alexander Zvegintsev) Date: Tue, 12 Sep 2023 12:52:39 GMT Subject: RFR: 8294158: HTML formatting for PassFailJFrame instructions In-Reply-To: <_66glVfDeTgdOjLf6UFWUpvbLliLuQh-vhHmQnYaHBg=.a6500a45-7b96-4cff-b14d-cf0375becb72@github.com> References: <_66glVfDeTgdOjLf6UFWUpvbLliLuQh-vhHmQnYaHBg=.a6500a45-7b96-4cff-b14d-cf0375becb72@github.com> Message-ID: On Mon, 11 Sep 2023 13:11:10 GMT, Alexey Ivanov wrote: > This enhancement provides HTML formatting for instructions in the manual test framework, `PassFailJFrame`. > > Some tests could benefit from rich-formatted instructions, especially when the instructions are long. > > See a sample usage in #15661. test/jdk/java/awt/regtesthelpers/PassFailJFrame.java line 198: > 196: frame.setLayout(new BorderLayout()); > 197: > 198: JTextComponent text = instructions.startsWith("") Probably `trim()` and `toLowerCase()` could be useful here. Do we consider adding adding one more builder method to force enable html rendering? (e.g. when we just want to highlight only few words/sentences with `` without adding `` tag) ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/15660#discussion_r1322984372 From azvegint at openjdk.org Tue Sep 12 13:09:42 2023 From: azvegint at openjdk.org (Alexander Zvegintsev) Date: Tue, 12 Sep 2023 13:09:42 GMT Subject: RFR: 8294156: Allow PassFailJFrame.Builder to create test UI In-Reply-To: References: Message-ID: On Mon, 11 Sep 2023 15:36:56 GMT, Alexey Ivanov wrote: > This enhances the `Builder` pattern added in [JDK-8294535](https://bugs.openjdk.org/browse/JDK-8294535) with a new method `testUI` which allows passing a lambda expression or a method reference to create *the test UI window*. > > The `PassFailJFrame` will automatically call the method on the EDT to create the UI, add it to the internal list of windows, install the window closing listener and finally position and show both the instructions and test UI. > > Alternatively, you can pass an already created window. > > The `main` method of a manual test could look as simple as a sequence of calls: > > > public static void main(String[] args) throws Exception { > PassFailJFrame.builder() > .instructions(INSTRUCTIONS) > .testUI(() -> createTestUI()) > .build() > .awaitAndCheck(); > } > > where `createTestUI` returns a test UI window. test/jdk/java/awt/regtesthelpers/PassFailJFrame.java line 313: > 311: @FunctionalInterface > 312: public interface WindowCreator { > 313: Window createTestUI(); Sometimes we may need to create more than one window(e.g. some DnD test with two windows). Perhaps we should consider that here by adding `List createTestUI()`. test/jdk/java/awt/regtesthelpers/PassFailJFrame.java line 457: > 455: /** > 456: * Disposes of all the windows. It disposes of the test instruction frame > 457: * and all other windows added via {@link #addTestWindow(Window)}. Shouldn't we mention here a window added by `testUI` via builder? ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/15665#discussion_r1323010242 PR Review Comment: https://git.openjdk.org/jdk/pull/15665#discussion_r1323014582 From aivanov at openjdk.org Tue Sep 12 13:18:40 2023 From: aivanov at openjdk.org (Alexey Ivanov) Date: Tue, 12 Sep 2023 13:18:40 GMT Subject: RFR: 8294158: HTML formatting for PassFailJFrame instructions In-Reply-To: References: <_66glVfDeTgdOjLf6UFWUpvbLliLuQh-vhHmQnYaHBg=.a6500a45-7b96-4cff-b14d-cf0375becb72@github.com> Message-ID: On Tue, 12 Sep 2023 12:44:34 GMT, Alexander Zvegintsev wrote: > Probably `trim()` and `toLowerCase()` could be useful here. Could be? On the other hand, in post XHTML era, the elements are usually in lower-case. Thus we should stick with it and use lowercase HTML elements anyway. I think `startsWith("")` covers the scenario well. Although neither `` nor `` are required, I prefer to always add them. These two elements don't add much overhead, do they? > Do we consider adding adding one more builder method to force enable html rendering? (e.g. when we just want to highlight only few words/sentences with `` without adding `` tag) I don't think it's needed. If you want the instructions rendered as HTML, you'll have to format them as HTML. Forcing HTML rendering on plain text which highlights a couple of words with `` will render the text unreadable: line ends are ignored by HTML, so you'll have to use `
    ` element to force line breaks. (A similar thing often happens in javadoc where a blank line is added as if to start a new paragraph, but without the explicit `

    ` element the text continues on the same line / paragraph.) It is possible to wrap such instructions into `

    ` but what stops you from doing it explicitly if it's what you want? (Note, however, the `
    ` element disables line wrapping.)
    
    I'd rather keep it simple.
    
    -------------
    
    PR Review Comment: https://git.openjdk.org/jdk/pull/15660#discussion_r1323028087
    
    From aivanov at openjdk.org  Tue Sep 12 13:39:42 2023
    From: aivanov at openjdk.org (Alexey Ivanov)
    Date: Tue, 12 Sep 2023 13:39:42 GMT
    Subject: RFR: 8294156: Allow PassFailJFrame.Builder to create test UI
    In-Reply-To: 
    References: 
     
    Message-ID: 
    
    On Tue, 12 Sep 2023 13:04:09 GMT, Alexander Zvegintsev  wrote:
    
    > Sometimes we may need to create more than one window(e.g. some DnD test with two windows). Perhaps we should consider that here by adding `List createTestUI()`.
    
    I thought about it. Yet I couldn't find a simple scenario where multiple windows need to be created. When there are multiple windows, you have to position them. The positions of the windows may depend on the position of the instruction frame. In #12447, Harshitha @honkar-jdk managed many test windows.
    
    I decided to handle the most common scenario: *one test window*.
    
    This can be extended in the future by creating `WindowListCreator` interface, its `createTestUI` method will return a list or a collection: `List` or `Collection`. Changing the signature of the existing `WindowCreator.createTestUI` could also be possible without breaking backwards compatibility.
    
    Now that I think about it more, you have a point? *Why not allow passing a list of windows right away?* However, to test this case I'll need a (simple) scenario where multiple windows are created.
    
    -------------
    
    PR Review Comment: https://git.openjdk.org/jdk/pull/15665#discussion_r1323058859
    
    From aivanov at openjdk.org  Tue Sep 12 13:46:39 2023
    From: aivanov at openjdk.org (Alexey Ivanov)
    Date: Tue, 12 Sep 2023 13:46:39 GMT
    Subject: RFR: 8294156: Allow PassFailJFrame.Builder to create test UI
    In-Reply-To: 
    References: 
     
    Message-ID: 
    
    On Tue, 12 Sep 2023 13:06:02 GMT, Alexander Zvegintsev  wrote:
    
    > Shouldn't we mention here a window added by `testUI` via builder?
    
    I don't think it's necessary: the builder uses `addTestWindow` under the hood. It's the builder that requires documentation.
    
    In fact, the entire class requires a bit of TLC for documentation. I even wrote some after Lawrence @lawrence-andrew created the first version of `PassFailJFrame` but I never finished it. Even this part was implemented nearly a year ago.
    
    I plan to create a wiki page on the [client-libs wiki](https://wiki.openjdk.org/display/ClientLibs) to describe creating manual tests with `PassFailJFrame`.
    
    -------------
    
    PR Review Comment: https://git.openjdk.org/jdk/pull/15665#discussion_r1323068184
    
    From azvegint at openjdk.org  Tue Sep 12 13:52:41 2023
    From: azvegint at openjdk.org (Alexander Zvegintsev)
    Date: Tue, 12 Sep 2023 13:52:41 GMT
    Subject: RFR: 8294158: HTML formatting for PassFailJFrame instructions
    In-Reply-To: <_66glVfDeTgdOjLf6UFWUpvbLliLuQh-vhHmQnYaHBg=.a6500a45-7b96-4cff-b14d-cf0375becb72@github.com>
    References: <_66glVfDeTgdOjLf6UFWUpvbLliLuQh-vhHmQnYaHBg=.a6500a45-7b96-4cff-b14d-cf0375becb72@github.com>
    Message-ID: 
    
    On Mon, 11 Sep 2023 13:11:10 GMT, Alexey Ivanov  wrote:
    
    > This enhancement provides HTML formatting for instructions in the manual test framework, `PassFailJFrame`.
    > 
    > Some tests could benefit from rich-formatted instructions, especially when the instructions are long.
    > 
    > See a sample usage in #15661.
    
    Marked as reviewed by azvegint (Reviewer).
    
    -------------
    
    PR Review: https://git.openjdk.org/jdk/pull/15660#pullrequestreview-1622308311
    
    From azvegint at openjdk.org  Tue Sep 12 13:52:43 2023
    From: azvegint at openjdk.org (Alexander Zvegintsev)
    Date: Tue, 12 Sep 2023 13:52:43 GMT
    Subject: RFR: 8294158: HTML formatting for PassFailJFrame instructions
    In-Reply-To: 
    References: <_66glVfDeTgdOjLf6UFWUpvbLliLuQh-vhHmQnYaHBg=.a6500a45-7b96-4cff-b14d-cf0375becb72@github.com>
     
     
    Message-ID: 
    
    On Tue, 12 Sep 2023 13:15:26 GMT, Alexey Ivanov  wrote:
    
    > Could be? On the other hand, in post XHTML era, the elements are usually in lower-case. Thus we should stick with it and use lowercase HTML elements anyway.
    
    https://www.w3schools.com/html/html_elements.asp
    
    > HTML is Not Case Sensitive
    > 
    > HTML tags are not case sensitive: `

    ` means the same as `

    `. > > The HTML standard does not require lowercase tags, but W3C recommends lowercase in HTML, and demands lowercase for stricter document types like XHTML. > > At W3Schools we always use lowercase tag names. So this is still a recommendation, not a requirement (we don't use XHTML). But I agree that this can be helpful for a certain amount of consistency across tests(they can still use other tags in uppercase). > Although neither nor are required, I prefer to always add them. These two elements don't add much overhead, do they? It is a matter of personal taste. Normally, I prefer to indent a content of such tags by extra spaces, andThis can create additional formatting difficulties under the 80(120) character limit per line. In those cases, I would prefer to omit those tags. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/15660#discussion_r1323077063 From tr at openjdk.org Tue Sep 12 13:58:42 2023 From: tr at openjdk.org (Tejesh R) Date: Tue, 12 Sep 2023 13:58:42 GMT Subject: RFR: 8315677: Open source few swing JFileChooser and other tests [v2] In-Reply-To: References: Message-ID: On Tue, 12 Sep 2023 11:28:36 GMT, Abhishek Kumar wrote: >> Few closed JFileChooser and other swing tests are open sourced. > > Abhishek Kumar has updated the pull request incrementally with one additional commit since the last revision: > > Review comment update Marked as reviewed by tr (Committer). ------------- PR Review: https://git.openjdk.org/jdk/pull/15626#pullrequestreview-1622323232 From aivanov at openjdk.org Tue Sep 12 14:14:41 2023 From: aivanov at openjdk.org (Alexey Ivanov) Date: Tue, 12 Sep 2023 14:14:41 GMT Subject: RFR: 8294158: HTML formatting for PassFailJFrame instructions In-Reply-To: References: <_66glVfDeTgdOjLf6UFWUpvbLliLuQh-vhHmQnYaHBg=.a6500a45-7b96-4cff-b14d-cf0375becb72@github.com> Message-ID: On Tue, 12 Sep 2023 13:49:41 GMT, Alexander Zvegintsev wrote: >>> Probably `trim()` and `toLowerCase()` could be useful here. >> >> Could be? On the other hand, in post XHTML era, the elements are usually in lower-case. Thus we should stick with it and use lowercase HTML elements anyway. >> >> I think `startsWith("")` covers the scenario well. >> >> Although neither `` nor `` are required, I prefer to always add them. These two elements don't add much overhead, do they? >> >>> Do we consider adding adding one more builder method to force enable html rendering? (e.g. when we just want to highlight only few words/sentences with `` without adding `` tag) >> >> I don't think it's needed. If you want the instructions rendered as HTML, you'll have to format them as HTML. >> >> Forcing HTML rendering on plain text which highlights a couple of words with `` will render the text unreadable: line ends are ignored by HTML, so you'll have to use `
    ` element to force line breaks. (A similar thing often happens in javadoc where a blank line is added as if to start a new paragraph, but without the explicit `

    ` element the text continues on the same line / paragraph.) >> >> It is possible to wrap such instructions into `

    ` but what stops you from doing it explicitly if it's what you want? (Note, however, the `
    ` element disables line wrapping.)
    >> 
    >> I'd rather keep it simple.
    >
    >> Could be? On the other hand, in post XHTML era, the elements are usually in lower-case. Thus we should stick with it and use lowercase HTML elements anyway.
    > 
    > https://www.w3schools.com/html/html_elements.asp
    > 
    >> HTML is Not Case Sensitive
    >> 
    >> HTML tags are not case sensitive: `

    ` means the same as `

    `. >> >> The HTML standard does not require lowercase tags, but W3C recommends lowercase in HTML, and demands lowercase for stricter document types like XHTML. >> >> At W3Schools we always use lowercase tag names. > > So this is still a recommendation, not a requirement (we don't use XHTML). > But I agree that this can be helpful for a certain amount of consistency across tests(they can still use other tags in uppercase). > > >> Although neither nor are required, I prefer to always add them. These two elements don't add much overhead, do they? > > It is a matter of personal taste. > Normally, I prefer to indent a content of such tags by extra spaces, andThis can create additional formatting difficulties under the 80(120) character limit per line. > In those cases, I would prefer to omit those tags. I know HTML is *not case sensitive*. It's just HTML tags are always in lower case in recent years. > But I agree that this can be helpful for a certain amount of consistency across tests(they can still use other tags in uppercase). Yep! In a way, this will enforce `` in lower case, and I hope all other tags in the instructions. > > Although neither nor are required, I prefer to always add them. These two elements don't add much overhead, do they? > > It is a matter of personal taste. Yes, it is? which could create inconsistencies. > Normally, I prefer to indent a content of such tags by extra spaces, and > This can create additional formatting difficulties under the 80(120) character limit per line. > In those cases, I would prefer to omit those tags. I don't expect too many nesting levels in instructions. However, I agree it could be problematic? In the sample in #15661, I keep `` and the content on the same level. Now that I looked at it again, I realised that I didn't follow the indentation consistently: first-level `

  • ` aren't indented but third-level `
  • ` are. I should correct this. Because `
    ` is used to format pieces of code, I decided not to indent the first-level `
  • ` elements to avoid indentation of the code inside. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/15660#discussion_r1323108124 From duke at openjdk.org Tue Sep 12 15:03:57 2023 From: duke at openjdk.org (Christopher Sahnwaldt) Date: Tue, 12 Sep 2023 15:03:57 GMT Subject: RFR: 8314755: Resource leak: SwingWorker listener keeps strong reference to executor [v4] In-Reply-To: References: Message-ID: On Tue, 12 Sep 2023 12:34:12 GMT, Christopher Sahnwaldt wrote: >> In https://github.com/openjdk/jdk/commit/b8af3d50192f8bc98d83f8102f0fd1989f302e32 the weak reference was accidentally changed from a field to a local variable, which means that the PropertyChangeListener keeps a strong reference to executorService, which is a resource leak > > Christopher Sahnwaldt has updated the pull request incrementally with one additional commit since the last revision: > > SwingWorkerExecutorLeakTest.java: use AppContext.getAppContext() instead of SunToolkit.createNewAppContext() to create AppContext, set necessary system properties I just found [this comment](https://bugs.openjdk.org/browse/JDK-8289616?focusedCommentId=14516108#comment-14516108) by @prrace: "AppContext.dispose() is no longer called from anywhere in JDK code." So as I explained in my previous comment, this is a non-issue. I'll close it. Arguably, there still is a resource leak, because the executor created in `SwingWorker.getWorkersExecutorService()` is never shut down. But that's probably only relevant if there is a significant time span in which the JVM is still running but the `AppContext` isn't needed anymore. I guess such a situation only occurs if an application starts a GUI, later shuts down the GUI, but keeps the JVM running. Should be pretty rare. Anyway, my suggested fix won't help, because it depends on `AppContext.dispose()` being called, which will never happen. Sorry for the waste of time. :-) ------------- PR Comment: https://git.openjdk.org/jdk/pull/15081#issuecomment-1715896997 From duke at openjdk.org Tue Sep 12 15:03:58 2023 From: duke at openjdk.org (Christopher Sahnwaldt) Date: Tue, 12 Sep 2023 15:03:58 GMT Subject: Withdrawn: 8314755: Resource leak: SwingWorker listener keeps strong reference to executor In-Reply-To: References: Message-ID: On Sun, 30 Jul 2023 12:50:58 GMT, Christopher Sahnwaldt wrote: > In https://github.com/openjdk/jdk/commit/b8af3d50192f8bc98d83f8102f0fd1989f302e32 the weak reference was accidentally changed from a field to a local variable, which means that the PropertyChangeListener keeps a strong reference to executorService, which is a resource leak This pull request has been closed without being integrated. ------------- PR: https://git.openjdk.org/jdk/pull/15081 From aivanov at openjdk.org Tue Sep 12 15:27:18 2023 From: aivanov at openjdk.org (Alexey Ivanov) Date: Tue, 12 Sep 2023 15:27:18 GMT Subject: RFR: 8316003: Update FileChooserSymLinkTest.java to HTML instructions [v3] In-Reply-To: References: Message-ID: > To demonstrate the functionality of HTML formatting in `PassFailJFrame`, I updated the instructions for the `test/jdk/javax/swing/JFileChooser/FileChooserSymLinkTest.java` test. The commands to create the symbolic links are marked up with monospace font, which makes them stand out. The test instructions for single- and multi-selection are emphasised with bold text. > > This change depends on #15660 and [JDK-8294158](https://bugs.openjdk.org/browse/JDK-8294158). Alexey Ivanov has updated the pull request incrementally with one additional commit since the last revision: Amend indentation of nested
  • elements ------------- Changes: - all: https://git.openjdk.org/jdk/pull/15661/files - new: https://git.openjdk.org/jdk/pull/15661/files/41eaf1b8..a8339019 Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=15661&range=02 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=15661&range=01-02 Stats: 18 lines in 1 file changed: 0 ins; 0 del; 18 mod Patch: https://git.openjdk.org/jdk/pull/15661.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/15661/head:pull/15661 PR: https://git.openjdk.org/jdk/pull/15661 From honkar at openjdk.org Tue Sep 12 17:14:14 2023 From: honkar at openjdk.org (Harshitha Onkar) Date: Tue, 12 Sep 2023 17:14:14 GMT Subject: RFR: JDK-8315889: Open source several Swing HTMLDocument related tests Message-ID: Following tests are being open sourced as part of this PR. javax/swing/text/html/HTMLDocument/4251593/bug4251593.java javax/swing/text/html/HTMLDocument/4687405/bug4687405.java javax/swing/text/html/HTMLDocument/4226914/bug4226914.java javax/swing/text/html/HTMLEditorKit/4213373/bug4213373.java ------------- Commit messages: - HTMLDoc tests Changes: https://git.openjdk.org/jdk/pull/15687/files Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=15687&range=00 Issue: https://bugs.openjdk.org/browse/JDK-8315889 Stats: 250 lines in 4 files changed: 250 ins; 0 del; 0 mod Patch: https://git.openjdk.org/jdk/pull/15687.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/15687/head:pull/15687 PR: https://git.openjdk.org/jdk/pull/15687 From azvegint at openjdk.org Tue Sep 12 18:44:40 2023 From: azvegint at openjdk.org (Alexander Zvegintsev) Date: Tue, 12 Sep 2023 18:44:40 GMT Subject: RFR: 8294156: Allow PassFailJFrame.Builder to create test UI In-Reply-To: References: Message-ID: On Tue, 12 Sep 2023 13:37:09 GMT, Alexey Ivanov wrote: > However, to test this case I'll need a (simple) scenario where multiple windows are created. For example `test/jdk/java/awt/event/MouseEvent/SpuriousExitEnter/SpuriousExitEnter_2.java` is not converted to use PassFailJFrame, but shows instruction window and two test windows. For these test windows, we can safely reduce the width a lot and arrange them in a row. ![image](https://github.com/openjdk/jdk/assets/77687766/9c7f3548-fa0a-4e1f-ad87-a7af7561064b) Probably we could add some other sophisticated layouts later, e.g.: ![image](https://github.com/openjdk/jdk/assets/77687766/a9da5948-9f52-420e-8f15-55818fe8f255) But this kind of layout seems to be beyond the scope of this PR, I just wish we hadn't missed the option to add multiple windows at once. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/15665#discussion_r1323425586 From aivanov at openjdk.org Tue Sep 12 19:54:39 2023 From: aivanov at openjdk.org (Alexey Ivanov) Date: Tue, 12 Sep 2023 19:54:39 GMT Subject: RFR: 8294156: Allow PassFailJFrame.Builder to create test UI In-Reply-To: References: Message-ID: On Tue, 12 Sep 2023 18:41:23 GMT, Alexander Zvegintsev wrote: >>> Sometimes we may need to create more than one window(e.g. some DnD test with two windows). Perhaps we should consider that here by adding `List createTestUI()`. >> >> I thought about it. Yet I couldn't find a simple scenario where multiple windows need to be created. When there are multiple windows, you have to position them. The positions of the windows may depend on the position of the instruction frame. In #12447, Harshitha @honkar-jdk managed many test windows. >> >> I decided to handle the most common scenario: *one test window*. >> >> This can be extended in the future by creating `WindowListCreator` interface, its `createTestUI` method will return a list or a collection: `List` or `Collection`. Changing the signature of the existing `WindowCreator.createTestUI` could also be possible without breaking backwards compatibility. >> >> Now that I think about it more, you have a point? *Why not allow passing a list of windows right away?* However, to test this case I'll need a (simple) scenario where multiple windows are created. > >> However, to test this case I'll need a (simple) scenario where multiple windows are created. > > For example `test/jdk/java/awt/event/MouseEvent/SpuriousExitEnter/SpuriousExitEnter_2.java` is not converted to use PassFailJFrame, but shows instruction window and two test windows. > > For these test windows, we can safely reduce the width a lot and arrange them in a row. > ![image](https://github.com/openjdk/jdk/assets/77687766/9c7f3548-fa0a-4e1f-ad87-a7af7561064b) > > Probably we could add some other sophisticated layouts later, e.g.: > ![image](https://github.com/openjdk/jdk/assets/77687766/a9da5948-9f52-420e-8f15-55818fe8f255) > > But this kind of layout seems to be beyond the scope of this PR, I just wish we hadn't missed the option to add multiple windows at once. But laying out the test windows is really a problem. With one window, the framework already provides a way to position the window, it is applied to the primary test window. Before showing other windows, they need to be positioned. There could be a callback so that the test developer is able to position the windows. In the future, we may add simple layouts to perform this task automatically. > But this kind of layout seems to be beyond the scope of this PR, I just wish we hadn't missed the option to add multiple windows at once. I agree, it's better to implement it right away. I didn't think about it as viable solution because of positioning issues. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/15665#discussion_r1323491246 From aturbanov at openjdk.org Tue Sep 12 20:02:44 2023 From: aturbanov at openjdk.org (Andrey Turbanov) Date: Tue, 12 Sep 2023 20:02:44 GMT Subject: RFR: 8312165: Fix typos in java.desktop Swing [v6] In-Reply-To: References: Message-ID: On Fri, 1 Sep 2023 20:32:42 GMT, Andrey Turbanov wrote: >> Found many typos in java.desktop by IDEA's inspection `Proofreading | Typo` > > Andrey Turbanov has updated the pull request incrementally with one additional commit since the last revision: > > 8312165: Fix typos in java.desktop Swing > > last fixes Do we need a second reviewer or I can integrate? ------------- PR Comment: https://git.openjdk.org/jdk/pull/14847#issuecomment-1716340045 From erikj at openjdk.org Tue Sep 12 20:18:51 2023 From: erikj at openjdk.org (Erik Joelsson) Date: Tue, 12 Sep 2023 20:18:51 GMT Subject: RFR: 8267174: Many test files have the wrong Copyright header In-Reply-To: References: Message-ID: On Tue, 5 Sep 2023 22:49:41 GMT, Erik Joelsson wrote: > There are a number of files in the `test` directory that have an incorrect copyright header, which includes the "classpath" exception text. This patch removes that text from all test files that I could find it in. I did this using a combination of `sed` and `grep`. Reviewing this patch is probably easier using the raw patch file or a suitable webrev format. > > It's my assumption that these headers were introduced by mistake as it's quite easy to copy the wrong template when creating new files. Thanks for reviews! ------------- PR Comment: https://git.openjdk.org/jdk/pull/15573#issuecomment-1716362585 From erikj at openjdk.org Tue Sep 12 20:18:52 2023 From: erikj at openjdk.org (Erik Joelsson) Date: Tue, 12 Sep 2023 20:18:52 GMT Subject: Integrated: 8267174: Many test files have the wrong Copyright header In-Reply-To: References: Message-ID: <0l5wbPPACAFDpuzCNnCNkr_RJ35CFXxPC9EpiVFt_Ao=.fbfbc877-43fd-4706-9d0d-bace4d004632@github.com> On Tue, 5 Sep 2023 22:49:41 GMT, Erik Joelsson wrote: > There are a number of files in the `test` directory that have an incorrect copyright header, which includes the "classpath" exception text. This patch removes that text from all test files that I could find it in. I did this using a combination of `sed` and `grep`. Reviewing this patch is probably easier using the raw patch file or a suitable webrev format. > > It's my assumption that these headers were introduced by mistake as it's quite easy to copy the wrong template when creating new files. This pull request has now been integrated. Changeset: 020255a7 Author: Erik Joelsson URL: https://git.openjdk.org/jdk/commit/020255a72dc374ba0bdd44772047f14a8bfe69a9 Stats: 1944 lines in 648 files changed: 0 ins; 1296 del; 648 mod 8267174: Many test files have the wrong Copyright header Reviewed-by: valeriep, aivanov, iris, dholmes, ihse ------------- PR: https://git.openjdk.org/jdk/pull/15573 From aivanov at openjdk.org Tue Sep 12 21:07:45 2023 From: aivanov at openjdk.org (Alexey Ivanov) Date: Tue, 12 Sep 2023 21:07:45 GMT Subject: RFR: 8315726: Open source several AWT applet tests [v2] In-Reply-To: References: <4WOazUTC1hKAoxppzsJ49DpOmmuoGf5eUfSLYRlWhLA=.5634a73e-6c35-485d-8004-eec1271844ae@github.com> Message-ID: On Tue, 12 Sep 2023 12:26:38 GMT, Alexander Zvegintsev wrote: >> Some closed AWT test are open sourced. > > Alexander Zvegintsev has updated the pull request incrementally with one additional commit since the last revision: > > spacing Changes requested by aivanov (Reviewer). test/jdk/java/awt/Choice/ChoiceSelectTest.java line 39: > 37: > 38: public class ChoiceSelectTest extends Panel { > 39: Choice c; Can be `final`? test/jdk/java/awt/Choice/ChoiceSelectTest.java line 160: > 158: public static void main(String[] args) throws Exception { > 159: EventQueue.invokeAndWait(() -> new ChoiceSelectTest().test()); > 160: } The choice is never shown on the screen, is it? Can the test be headless then? test/jdk/java/awt/Focus/TestWindowsLFFocus.java line 62: > 60: > 61: private static void test() throws Exception { > 62: try { You should reset `actionFired = false` before creating UI and clicking the menu. Otherwise the test will always pass if it passes in the first Look-and-Feel. test/jdk/java/awt/Focus/TestWindowsLFFocus.java line 112: > 110: robot.mouseRelease(InputEvent.BUTTON1_DOWN_MASK); > 111: > 112: robot.delay(500); Suggestion: robot.waitForIdle(); robot.delay(500); Perhaps, you want to ensure the events are processed before checking the value of `actionFired`. test/jdk/java/awt/geom/HitTest/PathHitTestManual.java line 114: > 112: public static class PathHitTestCanvas extends Canvas implements Runnable { > 113: public static final Color[] colors = { > 114: /* contains? point in? intersects? */ Should this line align to Yes / No comments below? ------------- PR Review: https://git.openjdk.org/jdk/pull/15671#pullrequestreview-1623068233 PR Review Comment: https://git.openjdk.org/jdk/pull/15671#discussion_r1323525274 PR Review Comment: https://git.openjdk.org/jdk/pull/15671#discussion_r1323526349 PR Review Comment: https://git.openjdk.org/jdk/pull/15671#discussion_r1323537138 PR Review Comment: https://git.openjdk.org/jdk/pull/15671#discussion_r1323544748 PR Review Comment: https://git.openjdk.org/jdk/pull/15671#discussion_r1323561593 From honkar at openjdk.org Tue Sep 12 21:40:13 2023 From: honkar at openjdk.org (Harshitha Onkar) Date: Tue, 12 Sep 2023 21:40:13 GMT Subject: RFR: JDK-8315731: Open source several Swing Text related tests Message-ID: Open sourcing the following tests - 1. javax/swing/text/CompositeView/4398059/bug4398059.java 2. javax/swing/text/DefaultCaret/4197894/bug4197894.java 3. javax/swing/text/DefaultCaret/4203175/bug4203175.java 4. javax/swing/text/DefaultEditorKit/4265242/bug4265242.java 5. javax/swing/text/DefaultStyledDocument/4472852/bug4472852.java ------------- Commit messages: - Swing test changes Changes: https://git.openjdk.org/jdk/pull/15693/files Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=15693&range=00 Issue: https://bugs.openjdk.org/browse/JDK-8315731 Stats: 473 lines in 5 files changed: 473 ins; 0 del; 0 mod Patch: https://git.openjdk.org/jdk/pull/15693.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/15693/head:pull/15693 PR: https://git.openjdk.org/jdk/pull/15693 From azvegint at openjdk.org Tue Sep 12 21:47:26 2023 From: azvegint at openjdk.org (Alexander Zvegintsev) Date: Tue, 12 Sep 2023 21:47:26 GMT Subject: RFR: 8315726: Open source several AWT applet tests [v3] In-Reply-To: <4WOazUTC1hKAoxppzsJ49DpOmmuoGf5eUfSLYRlWhLA=.5634a73e-6c35-485d-8004-eec1271844ae@github.com> References: <4WOazUTC1hKAoxppzsJ49DpOmmuoGf5eUfSLYRlWhLA=.5634a73e-6c35-485d-8004-eec1271844ae@github.com> Message-ID: > Some closed AWT test are open sourced. Alexander Zvegintsev has updated the pull request incrementally with two additional commits since the last revision: - review comments - combine PathHitTest and PathHitTestManual into one test. ------------- Changes: - all: https://git.openjdk.org/jdk/pull/15671/files - new: https://git.openjdk.org/jdk/pull/15671/files/25cca2ef..73487d4e Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=15671&range=02 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=15671&range=01-02 Stats: 518 lines in 5 files changed: 239 ins; 257 del; 22 mod Patch: https://git.openjdk.org/jdk/pull/15671.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/15671/head:pull/15671 PR: https://git.openjdk.org/jdk/pull/15671 From azvegint at openjdk.org Tue Sep 12 21:47:32 2023 From: azvegint at openjdk.org (Alexander Zvegintsev) Date: Tue, 12 Sep 2023 21:47:32 GMT Subject: RFR: 8315726: Open source several AWT applet tests [v2] In-Reply-To: References: <4WOazUTC1hKAoxppzsJ49DpOmmuoGf5eUfSLYRlWhLA=.5634a73e-6c35-485d-8004-eec1271844ae@github.com> Message-ID: On Tue, 12 Sep 2023 20:26:42 GMT, Alexey Ivanov wrote: >> Alexander Zvegintsev has updated the pull request incrementally with one additional commit since the last revision: >> >> spacing > > test/jdk/java/awt/Choice/ChoiceSelectTest.java line 39: > >> 37: >> 38: public class ChoiceSelectTest extends Panel { >> 39: Choice c; > > Can be `final`? Sure. > test/jdk/java/awt/Choice/ChoiceSelectTest.java line 160: > >> 158: public static void main(String[] args) throws Exception { >> 159: EventQueue.invokeAndWait(() -> new ChoiceSelectTest().test()); >> 160: } > > The choice is never shown on the screen, is it? Can the test be headless then? No, it can't, Choice is heavyweight component: https://github.com/openjdk/jdk/blob/master/src/java.desktop/share/classes/java/awt/Choice.java#L116 > test/jdk/java/awt/geom/HitTest/PathHitTestManual.java line 114: > >> 112: public static class PathHitTestCanvas extends Canvas implements Runnable { >> 113: public static final Color[] colors = { >> 114: /* contains? point in? intersects? */ > > Should this line align to Yes / No comments below? Fixed. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/15671#discussion_r1323602150 PR Review Comment: https://git.openjdk.org/jdk/pull/15671#discussion_r1323602446 PR Review Comment: https://git.openjdk.org/jdk/pull/15671#discussion_r1323605213 From azvegint at openjdk.org Tue Sep 12 21:52:33 2023 From: azvegint at openjdk.org (Alexander Zvegintsev) Date: Tue, 12 Sep 2023 21:52:33 GMT Subject: RFR: 8315726: Open source several AWT applet tests [v4] In-Reply-To: <4WOazUTC1hKAoxppzsJ49DpOmmuoGf5eUfSLYRlWhLA=.5634a73e-6c35-485d-8004-eec1271844ae@github.com> References: <4WOazUTC1hKAoxppzsJ49DpOmmuoGf5eUfSLYRlWhLA=.5634a73e-6c35-485d-8004-eec1271844ae@github.com> Message-ID: > Some closed AWT test are open sourced. Alexander Zvegintsev has updated the pull request incrementally with one additional commit since the last revision: fix path ------------- Changes: - all: https://git.openjdk.org/jdk/pull/15671/files - new: https://git.openjdk.org/jdk/pull/15671/files/73487d4e..758c0454 Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=15671&range=03 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=15671&range=02-03 Stats: 2 lines in 1 file changed: 0 ins; 0 del; 2 mod Patch: https://git.openjdk.org/jdk/pull/15671.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/15671/head:pull/15671 PR: https://git.openjdk.org/jdk/pull/15671 From jlu at openjdk.org Tue Sep 12 22:04:12 2023 From: jlu at openjdk.org (Justin Lu) Date: Tue, 12 Sep 2023 22:04:12 GMT Subject: RFR: 8301991: Convert l10n properties resource bundles to UTF-8 native Message-ID: 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). ------------- Commit messages: - Update header / copyright for CurrencyFormat - Adjust CurrencyFormat test to read in .properties with UTF-8 - Convert unicode escape sequences to native - Add clarifying comment in Bug6204853 for lack of conversion - Read JDK properties files in UTF-8 during build process for LRB Changes: https://git.openjdk.org/jdk/pull/15694/files Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=15694&range=00 Issue: https://bugs.openjdk.org/browse/JDK-8301991 Stats: 28966 lines in 488 files changed: 14 ins; 0 del; 28952 mod Patch: https://git.openjdk.org/jdk/pull/15694.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/15694/head:pull/15694 PR: https://git.openjdk.org/jdk/pull/15694 From azvegint at openjdk.org Tue Sep 12 22:16:40 2023 From: azvegint at openjdk.org (Alexander Zvegintsev) Date: Tue, 12 Sep 2023 22:16:40 GMT Subject: RFR: 8294156: Allow PassFailJFrame.Builder to create test UI In-Reply-To: References: Message-ID: On Mon, 11 Sep 2023 15:36:56 GMT, Alexey Ivanov wrote: > This enhances the `Builder` pattern added in [JDK-8294535](https://bugs.openjdk.org/browse/JDK-8294535) with a new method `testUI` which allows passing a lambda expression or a method reference to create *the test UI window*. > > The `PassFailJFrame` will automatically call the method on the EDT to create the UI, add it to the internal list of windows, install the window closing listener and finally position and show both the instructions and test UI. > > Alternatively, you can pass an already created window. > > The `main` method of a manual test could look as simple as a sequence of calls: > > > public static void main(String[] args) throws Exception { > PassFailJFrame.builder() > .instructions(INSTRUCTIONS) > .testUI(() -> createTestUI()) > .build() > .awaitAndCheck(); > } > > where `createTestUI` returns a test UI window. Marked as reviewed by azvegint (Reviewer). ------------- PR Review: https://git.openjdk.org/jdk/pull/15665#pullrequestreview-1623275843 From liach at openjdk.org Tue Sep 12 23:16:40 2023 From: liach at openjdk.org (Chen Liang) Date: Tue, 12 Sep 2023 23:16:40 GMT Subject: RFR: 8301991: Convert l10n properties resource bundles to UTF-8 native In-Reply-To: References: Message-ID: On Tue, 12 Sep 2023 21:57:31 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). make/jdk/src/classes/build/tools/compileproperties/CompileProperties.java line 227: > 225: try (FileInputStream input = new FileInputStream(propertiesPath); > 226: // Read in JDK .properties files in UTF-8 > 227: InputStreamReader streamReader = new InputStreamReader(input, StandardCharsets.UTF_8) Can we just uses `Files.newBufferedReader(Path.of(propertiesPath))` instead? ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/15694#discussion_r1323716978 From jdv at openjdk.org Wed Sep 13 04:48:37 2023 From: jdv at openjdk.org (Jayathirth D V) Date: Wed, 13 Sep 2023 04:48:37 GMT Subject: RFR: 8315663: Open source misc awt tests [v2] In-Reply-To: References: Message-ID: On Mon, 11 Sep 2023 05:44:27 GMT, Prasanta Sadhukhan wrote: >> Some closed awt tests are opensourced > > Prasanta Sadhukhan has updated the pull request incrementally with one additional commit since the last revision: > > Test resource Marked as reviewed by jdv (Reviewer). ------------- PR Review: https://git.openjdk.org/jdk/pull/15634#pullrequestreview-1623681072 From psadhukhan at openjdk.org Wed Sep 13 05:28:58 2023 From: psadhukhan at openjdk.org (Prasanta Sadhukhan) Date: Wed, 13 Sep 2023 05:28:58 GMT Subject: Integrated: 8315663: Open source misc awt tests In-Reply-To: References: Message-ID: <8q10gaw6Qo9TvHcJLoeiAL1oH9KhOmcAUxtBRA5nmSM=.5a4a2cad-8d3b-4df0-92e3-f1dc5f4e63ae@github.com> On Fri, 8 Sep 2023 11:29:36 GMT, Prasanta Sadhukhan wrote: > Some closed awt tests are opensourced This pull request has now been integrated. Changeset: a36f5a54 Author: Prasanta Sadhukhan URL: https://git.openjdk.org/jdk/commit/a36f5a54ab4871739f2ccbabb684942fc3cadf20 Stats: 263 lines in 3 files changed: 263 ins; 0 del; 0 mod 8315663: Open source misc awt tests Reviewed-by: tr, jdv ------------- PR: https://git.openjdk.org/jdk/pull/15634 From psadhukhan at openjdk.org Wed Sep 13 06:26:38 2023 From: psadhukhan at openjdk.org (Prasanta Sadhukhan) Date: Wed, 13 Sep 2023 06:26:38 GMT Subject: RFR: JDK-8315731: Open source several Swing Text related tests In-Reply-To: References: Message-ID: On Tue, 12 Sep 2023 21:32:58 GMT, Harshitha Onkar wrote: > Open sourcing the following tests - > > 1. javax/swing/text/CompositeView/4398059/bug4398059.java > 2. javax/swing/text/DefaultCaret/4197894/bug4197894.java > 3. javax/swing/text/DefaultCaret/4203175/bug4203175.java > 4. javax/swing/text/DefaultEditorKit/4265242/bug4265242.java > 5. javax/swing/text/DefaultStyledDocument/4472852/bug4472852.java Marked as reviewed by psadhukhan (Reviewer). test/jdk/javax/swing/text/DefaultStyledDocument/bug4472852.java line 46: > 44: try { > 45: doc.insertString(0, "this", null); > 46: } catch (BadLocationException e) { I guess we can do away with this try-catch block and let original exception be propagated by throwing exception in main method signature ------------- PR Review: https://git.openjdk.org/jdk/pull/15693#pullrequestreview-1623776019 PR Review Comment: https://git.openjdk.org/jdk/pull/15693#discussion_r1324026207 From psadhukhan at openjdk.org Wed Sep 13 06:32:40 2023 From: psadhukhan at openjdk.org (Prasanta Sadhukhan) Date: Wed, 13 Sep 2023 06:32:40 GMT Subject: RFR: JDK-8315824: Open source several Swing Text/HTML related tests [v2] In-Reply-To: References: Message-ID: On Tue, 12 Sep 2023 00:48:18 GMT, Harshitha Onkar wrote: >> This PR open sources few Swing Text/HTML related tests. > > Harshitha Onkar has updated the pull request incrementally with one additional commit since the last revision: > > minor changes Marked as reviewed by psadhukhan (Reviewer). test/jdk/javax/swing/text/html/bug4210307.java line 40: > 38: > 39: public class bug4210307 { > 40: private static Robot robot; Robot can be local var ------------- PR Review: https://git.openjdk.org/jdk/pull/15675#pullrequestreview-1623783642 PR Review Comment: https://git.openjdk.org/jdk/pull/15675#discussion_r1324030863 From psadhukhan at openjdk.org Wed Sep 13 06:38:39 2023 From: psadhukhan at openjdk.org (Prasanta Sadhukhan) Date: Wed, 13 Sep 2023 06:38:39 GMT Subject: RFR: 8315834: Open source several Swing JSpinner related tests In-Reply-To: References: Message-ID: On Tue, 12 Sep 2023 05:46:23 GMT, Tejesh R wrote: > Open source these Swing JSpinner related tests: > > javax/swing/JSpinner/4522737/bug4522737.java > javax/swing/JSpinner/4656590/bug4656590.java > javax/swing/JSpinner/4680204/bug4680204.java > javax/swing/JSpinner/4862257/bug4862257.java > javax/swing/JSpinner/5104421/bug5104421.java Marked as reviewed by psadhukhan (Reviewer). test/jdk/javax/swing/JSpinner/bug4522737.java line 51: > 49: objectOutputStream = new ObjectOutputStream(byteArrayOutputStream); > 50: objectOutputStream.writeObject(originalComponent); > 51: } catch (Throwable e) { You can remove this try-catch block and let original exception propagate test/jdk/javax/swing/JSpinner/bug4680204.java line 65: > 63: frame.getContentPane().add(sp2); > 64: sp2.setModel(new SpinnerNumberModel(1, 1, 100, 1)); > 65: frame.pack(); Probably setLocationRelativeTo call would be good ------------- PR Review: https://git.openjdk.org/jdk/pull/15678#pullrequestreview-1623787651 PR Review Comment: https://git.openjdk.org/jdk/pull/15678#discussion_r1324033900 PR Review Comment: https://git.openjdk.org/jdk/pull/15678#discussion_r1324036078 From tr at openjdk.org Wed Sep 13 07:25:41 2023 From: tr at openjdk.org (Tejesh R) Date: Wed, 13 Sep 2023 07:25:41 GMT Subject: RFR: 8315834: Open source several Swing JSpinner related tests In-Reply-To: References: Message-ID: On Wed, 13 Sep 2023 06:32:54 GMT, Prasanta Sadhukhan wrote: >> Open source these Swing JSpinner related tests: >> >> javax/swing/JSpinner/4522737/bug4522737.java >> javax/swing/JSpinner/4656590/bug4656590.java >> javax/swing/JSpinner/4680204/bug4680204.java >> javax/swing/JSpinner/4862257/bug4862257.java >> javax/swing/JSpinner/5104421/bug5104421.java > > test/jdk/javax/swing/JSpinner/bug4522737.java line 51: > >> 49: objectOutputStream = new ObjectOutputStream(byteArrayOutputStream); >> 50: objectOutputStream.writeObject(originalComponent); >> 51: } catch (Throwable e) { > > You can remove this try-catch block and let original exception propagate The test can be headless right? Not necessary to be headful? ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/15678#discussion_r1324085336 From psadhukhan at openjdk.org Wed Sep 13 07:30:40 2023 From: psadhukhan at openjdk.org (Prasanta Sadhukhan) Date: Wed, 13 Sep 2023 07:30:40 GMT Subject: RFR: 8315834: Open source several Swing JSpinner related tests In-Reply-To: References: Message-ID: On Wed, 13 Sep 2023 07:22:52 GMT, Tejesh R wrote: >> test/jdk/javax/swing/JSpinner/bug4522737.java line 51: >> >>> 49: objectOutputStream = new ObjectOutputStream(byteArrayOutputStream); >>> 50: objectOutputStream.writeObject(originalComponent); >>> 51: } catch (Throwable e) { >> >> You can remove this try-catch block and let original exception propagate > > The test can be headless right? Not necessary to be headful? yes ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/15678#discussion_r1324091300 From abhiscxk at openjdk.org Wed Sep 13 07:30:56 2023 From: abhiscxk at openjdk.org (Abhishek Kumar) Date: Wed, 13 Sep 2023 07:30:56 GMT Subject: Integrated: 8315677: Open source few swing JFileChooser and other tests In-Reply-To: References: Message-ID: <3pUoj4pm3q3A6XqVVuuLLCHvaAfmW1cCz0T6mvKijYM=.d4152744-3294-434d-a3ba-644d34faf727@github.com> On Thu, 7 Sep 2023 18:57:50 GMT, Abhishek Kumar wrote: > Few closed JFileChooser and other swing tests are open sourced. This pull request has now been integrated. Changeset: fe5ef5f2 Author: Abhishek Kumar URL: https://git.openjdk.org/jdk/commit/fe5ef5f20dcf647b4ca30963b42fa01449f0d9c0 Stats: 360 lines in 5 files changed: 360 ins; 0 del; 0 mod 8315677: Open source few swing JFileChooser and other tests Reviewed-by: psadhukhan, tr ------------- PR: https://git.openjdk.org/jdk/pull/15626 From abhiscxk at openjdk.org Wed Sep 13 07:37:55 2023 From: abhiscxk at openjdk.org (Abhishek Kumar) Date: Wed, 13 Sep 2023 07:37:55 GMT Subject: Integrated: 8315761: Open source few swing JList and JMenuBar tests In-Reply-To: References: Message-ID: On Thu, 7 Sep 2023 15:19:37 GMT, Abhishek Kumar wrote: > Few closed JList and JMenubar swing tests are open sourced. This pull request has now been integrated. Changeset: bb6b3f24 Author: Abhishek Kumar URL: https://git.openjdk.org/jdk/commit/bb6b3f2486b07a6ccdeea18519453e6d9c05c2c3 Stats: 249 lines in 4 files changed: 249 ins; 0 del; 0 mod 8315761: Open source few swing JList and JMenuBar tests Reviewed-by: psadhukhan, tr ------------- PR: https://git.openjdk.org/jdk/pull/15621 From psadhukhan at openjdk.org Wed Sep 13 07:40:18 2023 From: psadhukhan at openjdk.org (Prasanta Sadhukhan) Date: Wed, 13 Sep 2023 07:40:18 GMT Subject: RFR: 8316154: Opensource JTextArea manual tests Message-ID: JTextArea manual applet test converted to automated and opensourced ------------- Commit messages: - 8316154: Opensource JTextArea manual tests Changes: https://git.openjdk.org/jdk/pull/15700/files Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=15700&range=00 Issue: https://bugs.openjdk.org/browse/JDK-8316154 Stats: 90 lines in 1 file changed: 90 ins; 0 del; 0 mod Patch: https://git.openjdk.org/jdk/pull/15700.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/15700/head:pull/15700 PR: https://git.openjdk.org/jdk/pull/15700 From abhiscxk at openjdk.org Wed Sep 13 07:45:51 2023 From: abhiscxk at openjdk.org (Abhishek Kumar) Date: Wed, 13 Sep 2023 07:45:51 GMT Subject: Integrated: 8315898: Open source swing JMenu tests In-Reply-To: References: Message-ID: On Fri, 8 Sep 2023 15:17:49 GMT, Abhishek Kumar wrote: > Few closed JMenu swing tests are open sourced. This pull request has now been integrated. Changeset: fecd2fd8 Author: Abhishek Kumar URL: https://git.openjdk.org/jdk/commit/fecd2fd8f26d0e8905a519e30e9aa171683c9df1 Stats: 357 lines in 6 files changed: 357 ins; 0 del; 0 mod 8315898: Open source swing JMenu tests Reviewed-by: serb ------------- PR: https://git.openjdk.org/jdk/pull/15639 From aivanov at openjdk.org Wed Sep 13 07:55:06 2023 From: aivanov at openjdk.org (Alexey Ivanov) Date: Wed, 13 Sep 2023 07:55:06 GMT Subject: RFR: 4622866: javax.swing.text.Document.remove(int, int) has a misleading picture Message-ID: The image in the [documentation for `Document.remove`](https://docs.oracle.com/en/java/javase/17/docs/api/java.desktop/javax/swing/text/Document.html#remove(int,int)) looks as if the portion between the offsets 6 and 10 is removed. However, the entire region for _?quick ?_ is highlighted. I updated the image to mark the start offset 4 and the end offset 10. The new image is in SVG format which looks crisp on modern High DPI displays. I added a sentence that describes the image, which makes the documentation accessible and clearer. Also, I marked up references to classes and members with `{@code}`. Look at the updated version: [`Document.remove` in JDK 22](https://cr.openjdk.org/~aivanov/4622866/api/java.desktop/javax/swing/text/Document.html#remove(int,int)). ------------- Commit messages: - Update example description - Adjust arrow start to accommodate for larger font - Remove {@code} formatting from ?the Document structure? - Describe the removal of ?quick? - Adjust fonts: use Arial by default, increase size to 13px - Use ?shape-rendering: crispEdges? for rectangles and lines - Delete unused Document-remove.gif - Markup class and method references with {@code} - 4622866: javax.swing.text.Document.remove(int, int) has a misleading picture Changes: https://git.openjdk.org/jdk/pull/15701/files Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=15701&range=00 Issue: https://bugs.openjdk.org/browse/JDK-4622866 Stats: 174 lines in 3 files changed: 162 ins; 0 del; 12 mod Patch: https://git.openjdk.org/jdk/pull/15701.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/15701/head:pull/15701 PR: https://git.openjdk.org/jdk/pull/15701 From jdv at openjdk.org Wed Sep 13 08:08:39 2023 From: jdv at openjdk.org (Jayathirth D V) Date: Wed, 13 Sep 2023 08:08:39 GMT Subject: RFR: 8315986: javax/swing/JMenuItem/4654927/bug4654927.java: component must be showing on the screen to determine its location In-Reply-To: References: Message-ID: On Tue, 12 Sep 2023 04:45:51 GMT, Prasanta Sadhukhan wrote: > Test was run without waiting for UI to be made visible leading to IllegalComponentStateException. > Used robot.delay consistent with other headful tests to made the test wait after UI is created and shown. > > Test passed in several iterations in all platforms. Link in JBS https://bugs.openjdk.org/browse/JDK-8315986 for which this PR is raised mentions this as macOS 14 specific issue and 100% reproducible. We don't see these tests failing in pre-macOS 14 versions in our CI for which this patch is tested. To make sure that the fix under this PR resolves the test issue captured in the JBS we should be able to reproduce test fail & pass scenario with this fix. If we want to stabilize these tests using delay, it should be taken up as part of separate JBS issue. ------------- PR Comment: https://git.openjdk.org/jdk/pull/15677#issuecomment-1717144740 From aivanov at openjdk.org Wed Sep 13 08:26:39 2023 From: aivanov at openjdk.org (Alexey Ivanov) Date: Wed, 13 Sep 2023 08:26:39 GMT Subject: RFR: 4622866: javax.swing.text.Document.remove(int, int) has a misleading picture In-Reply-To: References: Message-ID: On Wed, 13 Sep 2023 07:46:50 GMT, Alexey Ivanov wrote: > The image in the [documentation for `Document.remove`](https://docs.oracle.com/en/java/javase/17/docs/api/java.desktop/javax/swing/text/Document.html#remove(int,int)) looks as if the portion between the offsets 6 and 10 is removed. However, the entire region for _?quick ?_ is highlighted. > > I updated the image to mark the start offset 4 and the end offset 10. The new image is in SVG format which looks crisp on modern High DPI displays. > > I added a sentence that describes the image, which makes the documentation accessible and clearer. > > Also, I marked up references to classes and members with `{@code}`. > > Look at the updated version: [`Document.remove` in JDK 22](https://cr.openjdk.org/~aivanov/4622866/api/java.desktop/javax/swing/text/Document.html#remove(int,int)). Perhaps, the intention of the original image was to demonstrate that all the marks in the range 4?10 are collapsed to 4. That is the mark at offset 6 is at offset 4 after the removal: ![Diagram of removal of ?quick? from ?The quick brown fox.? The marks at offsets 4, 6, 10 have offset 4 after the removal](https://cr.openjdk.org/~aivanov/4622866/Document-remove-with-6-crisp4.svg) The above image could still be confusing. ------------- PR Comment: https://git.openjdk.org/jdk/pull/15701#issuecomment-1717171413 From kizune at openjdk.org Wed Sep 13 08:56:15 2023 From: kizune at openjdk.org (Alexander Zuev) Date: Wed, 13 Sep 2023 08:56:15 GMT Subject: RFR: 8315871: Opensource five more Swing regression tests Message-ID: Clean up and move to open source five tests. javax/swing/AncestorNotifier/4817630/bug4817630.java javax/swing/BoxLayout/4191948/bug4191948.java javax/swing/ComponentInputMap/4248723/bug4248723.java javax/swing/DefaultBoundedRangeModel/4297953/bug4297953.java javax/swing/DefaultButtonModel/4097723/bug4097723.java ------------- Commit messages: - 8315871: Opensource five more Swing regression tests Changes: https://git.openjdk.org/jdk/pull/15702/files Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=15702&range=00 Issue: https://bugs.openjdk.org/browse/JDK-8315871 Stats: 356 lines in 5 files changed: 356 ins; 0 del; 0 mod Patch: https://git.openjdk.org/jdk/pull/15702.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/15702/head:pull/15702 PR: https://git.openjdk.org/jdk/pull/15702 From tr at openjdk.org Wed Sep 13 09:10:18 2023 From: tr at openjdk.org (Tejesh R) Date: Wed, 13 Sep 2023 09:10:18 GMT Subject: RFR: 8315834: Open source several Swing JSpinner related tests [v2] In-Reply-To: References: Message-ID: > Open source these Swing JSpinner related tests: > > javax/swing/JSpinner/4522737/bug4522737.java > javax/swing/JSpinner/4656590/bug4656590.java > javax/swing/JSpinner/4680204/bug4680204.java > javax/swing/JSpinner/4862257/bug4862257.java > javax/swing/JSpinner/5104421/bug5104421.java Tejesh R has updated the pull request incrementally with one additional commit since the last revision: Review fix ------------- Changes: - all: https://git.openjdk.org/jdk/pull/15678/files - new: https://git.openjdk.org/jdk/pull/15678/files/094b7a32..8ca1f0fd Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=15678&range=01 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=15678&range=00-01 Stats: 19 lines in 2 files changed: 3 ins; 8 del; 8 mod Patch: https://git.openjdk.org/jdk/pull/15678.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/15678/head:pull/15678 PR: https://git.openjdk.org/jdk/pull/15678 From aivanov at openjdk.org Wed Sep 13 09:24:50 2023 From: aivanov at openjdk.org (Alexey Ivanov) Date: Wed, 13 Sep 2023 09:24:50 GMT Subject: RFR: 8316159: Update BoxLayout sample image for crispier edges Message-ID: <3qA83A35UhJzf22QgJve-oeYd77lFaPYMGmMZxcXNmM=.4a035825-7a75-47ce-803b-324be5881afe@github.com> **Problem** On a standard display with the scale of 100%, the BoxLayout sample has blurred edges. It is the result of how SVG is rendered: the strokes fall between the pixel grid, therefore a 1-pixel wide stroke is blurred between the previous and the following pixels with 50% of colour on each pixel. It doesn't look as good. **Fix** Move all rectangles half a pixel to make edges crisp. The edges of the rectangles look crisp in 100% and 200%. For more information see answers to the following questions on Stack Overflow: - [Why is my SVG line blurry or 2px in height when I specified 1px?](https://stackoverflow.com/a/34229584/572834) - [Avoiding lines between adjacent SVG rectangles](https://stackoverflow.com/a/23376793/572834) ------------- Commit messages: - 8316159: Update BoxLayout sample image for crispier edges Changes: https://git.openjdk.org/jdk/pull/15703/files Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=15703&range=00 Issue: https://bugs.openjdk.org/browse/JDK-8316159 Stats: 5 lines in 1 file changed: 0 ins; 0 del; 5 mod Patch: https://git.openjdk.org/jdk/pull/15703.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/15703/head:pull/15703 PR: https://git.openjdk.org/jdk/pull/15703 From tr at openjdk.org Wed Sep 13 09:26:29 2023 From: tr at openjdk.org (Tejesh R) Date: Wed, 13 Sep 2023 09:26:29 GMT Subject: RFR: 8315669: Open source several Swing PopupMenu related tests Message-ID: Open source these Swing PopupMenu related tests: javax/swing/JPopupMenu/4236750/bug4236750.java javax/swing/JPopupMenu/4321273/bug4321273.java javax/swing/JPopupMenu/4711693/bug4711693.java javax/swing/JPopupMenu/4962731/bug4962731.java javax/swing/JPopupMenu/4966109/bug4966109.java javax/swing/JPopupMenu/5091257/bug5091257.java ------------- Commit messages: - Open sourcing few Popupmenu test Changes: https://git.openjdk.org/jdk/pull/15704/files Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=15704&range=00 Issue: https://bugs.openjdk.org/browse/JDK-8315669 Stats: 754 lines in 6 files changed: 754 ins; 0 del; 0 mod Patch: https://git.openjdk.org/jdk/pull/15704.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/15704/head:pull/15704 PR: https://git.openjdk.org/jdk/pull/15704 From tr at openjdk.org Wed Sep 13 09:26:40 2023 From: tr at openjdk.org (Tejesh R) Date: Wed, 13 Sep 2023 09:26:40 GMT Subject: RFR: JDK-8315731: Open source several Swing Text related tests In-Reply-To: References: Message-ID: On Tue, 12 Sep 2023 21:32:58 GMT, Harshitha Onkar wrote: > Open sourcing the following tests - > > 1. javax/swing/text/CompositeView/4398059/bug4398059.java > 2. javax/swing/text/DefaultCaret/4197894/bug4197894.java > 3. javax/swing/text/DefaultCaret/4203175/bug4203175.java > 4. javax/swing/text/DefaultEditorKit/4265242/bug4265242.java > 5. javax/swing/text/DefaultStyledDocument/4472852/bug4472852.java test/jdk/javax/swing/text/DefaultCaret/bug4197894.java line 53: > 51: try { > 52: Robot robot = new Robot(); > 53: robot.setAutoDelay(100); This delay might be redundant? Any specific reason for this delay? ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/15693#discussion_r1324232948 From abhiscxk at openjdk.org Wed Sep 13 11:15:40 2023 From: abhiscxk at openjdk.org (Abhishek Kumar) Date: Wed, 13 Sep 2023 11:15:40 GMT Subject: RFR: 8316154: Opensource JTextArea manual tests In-Reply-To: References: Message-ID: On Wed, 13 Sep 2023 07:32:04 GMT, Prasanta Sadhukhan wrote: > JTextArea manual applet test converted to automated and opensourced LGTM. ------------- Marked as reviewed by abhiscxk (Committer). PR Review: https://git.openjdk.org/jdk/pull/15700#pullrequestreview-1624290505 From psadhukhan at openjdk.org Wed Sep 13 13:07:10 2023 From: psadhukhan at openjdk.org (Prasanta Sadhukhan) Date: Wed, 13 Sep 2023 13:07:10 GMT Subject: RFR: 8316164: Opensource JMenuBar manual test Message-ID: JMenubar manual applet test converted to automated and opensourced ------------- Commit messages: - 8316164: Opensource JMenuBar manual test Changes: https://git.openjdk.org/jdk/pull/15717/files Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=15717&range=00 Issue: https://bugs.openjdk.org/browse/JDK-8316164 Stats: 128 lines in 1 file changed: 128 ins; 0 del; 0 mod Patch: https://git.openjdk.org/jdk/pull/15717.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/15717/head:pull/15717 PR: https://git.openjdk.org/jdk/pull/15717 From aivanov at openjdk.org Wed Sep 13 14:25:19 2023 From: aivanov at openjdk.org (Alexey Ivanov) Date: Wed, 13 Sep 2023 14:25:19 GMT Subject: RFR: 8294156: Allow PassFailJFrame.Builder to create test UI [v2] In-Reply-To: References: Message-ID: <2AD15rZ3B4RKFOsu-GAK6vMllvVuywhwQPJvdIxPnJ0=.c824db8b-0efb-4916-84e2-4b093fd8d942@github.com> > This enhances the `Builder` pattern added in [JDK-8294535](https://bugs.openjdk.org/browse/JDK-8294535) with a new method `testUI` which allows passing a lambda expression or a method reference to create *the test UI window*. > > The `PassFailJFrame` will automatically call the method on the EDT to create the UI, add it to the internal list of windows, install the window closing listener and finally position and show both the instructions and test UI. > > Alternatively, you can pass an already created window. > > The `main` method of a manual test could look as simple as a sequence of calls: > > > public static void main(String[] args) throws Exception { > PassFailJFrame.builder() > .instructions(INSTRUCTIONS) > .testUI(() -> createTestUI()) > .build() > .awaitAndCheck(); > } > > where `createTestUI` returns a test UI window. Alexey Ivanov has updated the pull request incrementally with one additional commit since the last revision: 8294156: Allow creating several test windows The windows can be positioned in advance, or a call back PositionWindows interface can be used to define their positions after the instruction UI frame is positioned on the screen. ------------- Changes: - all: https://git.openjdk.org/jdk/pull/15665/files - new: https://git.openjdk.org/jdk/pull/15665/files/70256b66..62521e38 Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=15665&range=01 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=15665&range=00-01 Stats: 259 lines in 1 file changed: 201 ins; 18 del; 40 mod Patch: https://git.openjdk.org/jdk/pull/15665.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/15665/head:pull/15665 PR: https://git.openjdk.org/jdk/pull/15665 From aivanov at openjdk.org Wed Sep 13 14:50:24 2023 From: aivanov at openjdk.org (Alexey Ivanov) Date: Wed, 13 Sep 2023 14:50:24 GMT Subject: RFR: 8294156: Demo positioning of multiple test windows Message-ID: The manual test frame does not provide any layout managers for test windows, the user has to implement one. This demonstrates how to position a several test UI windows. We may include some implementations into the manual test framework in the future. **This PR is not meant to be integrated.** It just demonstrates the feature of adding multiple test windows to `PassFailJFrame` which is reviewed in #15665. To play around, you can checkout the PR branch using the commands that bots add. Path to the tests: `test/jdk/java/awt/Window/8294156`. Alternatively, you can checkout directly from my fork: git fetch https://github.com/aivanov-jdk/jdk.git demo-manyTestWindows:demo-manyTestWindows git checkout demo-manyTestWindows ------------- Depends on: https://git.openjdk.org/jdk/pull/15665 Commit messages: - 8294156: Demo positioning of multiple test windows Changes: https://git.openjdk.org/jdk/pull/15721/files Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=15721&range=00 Issue: https://bugs.openjdk.org/browse/JDK-8294156 Stats: 381 lines in 5 files changed: 381 ins; 0 del; 0 mod Patch: https://git.openjdk.org/jdk/pull/15721.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/15721/head:pull/15721 PR: https://git.openjdk.org/jdk/pull/15721 From aivanov at openjdk.org Wed Sep 13 14:52:39 2023 From: aivanov at openjdk.org (Alexey Ivanov) Date: Wed, 13 Sep 2023 14:52:39 GMT Subject: RFR: 8294156: Allow PassFailJFrame.Builder to create test UI [v2] In-Reply-To: <2AD15rZ3B4RKFOsu-GAK6vMllvVuywhwQPJvdIxPnJ0=.c824db8b-0efb-4916-84e2-4b093fd8d942@github.com> References: <2AD15rZ3B4RKFOsu-GAK6vMllvVuywhwQPJvdIxPnJ0=.c824db8b-0efb-4916-84e2-4b093fd8d942@github.com> Message-ID: On Wed, 13 Sep 2023 14:25:19 GMT, Alexey Ivanov wrote: >> This enhances the `Builder` pattern added in [JDK-8294535](https://bugs.openjdk.org/browse/JDK-8294535) with a new method `testUI` which allows passing a lambda expression or a method reference to create *the test UI window*. >> >> The `PassFailJFrame` will automatically call the method on the EDT to create the UI, add it to the internal list of windows, install the window closing listener and finally position and show both the instructions and test UI. >> >> Alternatively, you can pass an already created window. >> >> The `main` method of a manual test could look as simple as a sequence of calls: >> >> >> public static void main(String[] args) throws Exception { >> PassFailJFrame.builder() >> .instructions(INSTRUCTIONS) >> .testUI(() -> createTestUI()) >> .build() >> .awaitAndCheck(); >> } >> >> where `createTestUI` returns a test UI window. > > Alexey Ivanov has updated the pull request incrementally with one additional commit since the last revision: > > 8294156: Allow creating several test windows > > The windows can be positioned in advance, or > a call back PositionWindows interface can be used > to define their positions after the instruction UI > frame is positioned on the screen. I've implemented the feature for adding several test UI windows. @azvegint Could you re-review please? The test in #15666 needed a small update as the result. The demos for multiple windows are available in #15721. I couldn't resist to play around with a couple of layouts. ------------- PR Comment: https://git.openjdk.org/jdk/pull/15665#issuecomment-1717786091 From aivanov at openjdk.org Wed Sep 13 15:05:40 2023 From: aivanov at openjdk.org (Alexey Ivanov) Date: Wed, 13 Sep 2023 15:05:40 GMT Subject: RFR: 8316025: Use testUI() method of PassFailJFrame.Builder in FileChooserSymLinkTest.java [v2] In-Reply-To: References: Message-ID: > This update to `FileChooserSymLinkTest.java` demonstrates the usage of the `testUI` method of the `PassFailJFrame.Builder` class to streamline creating the UI for manual tests. > > The [`main` method](https://github.com/aivanov-jdk/jdk/blob/cb1835527d718226f1c6fdd85ff5986703ea356f/test/jdk/javax/swing/JFileChooser/FileChooserSymLinkTest.java#L110-L118) is a simple sequence of calls: > > > public static void main(String[] args) throws Exception { > PassFailJFrame.builder() > .instructions(INSTRUCTIONS) > .rows(35) > .columns(50) > .testUI(FileChooserSymLinkTest::createTestUI) > .build() > .awaitAndCheck(); > } > > > It's the most streamlined way of creating a manual test. > > This change depends on #15665 and [JDK-8294156](https://bugs.openjdk.org/browse/JDK-8294156) as well as #15661, both of which depend on #15660. Alexey Ivanov has updated the pull request with a new target base due to a merge or a rebase. The incremental webrev excludes the unrelated changes brought in by the merge/rebase. The pull request contains three additional commits since the last revision: - 8316025: Update the return type of createTestUI PassFailJFrame now supports creating a list of test windows - Merge branch '8294156-func-manual-TestUI' into 8316025-testUI-SymLinkTest - Use testUI() and builder pattern to create test UI ------------- Changes: - all: https://git.openjdk.org/jdk/pull/15666/files - new: https://git.openjdk.org/jdk/pull/15666/files/cb183552..a813fe85 Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=15666&range=01 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=15666&range=00-01 Stats: 262 lines in 2 files changed: 202 ins; 18 del; 42 mod Patch: https://git.openjdk.org/jdk/pull/15666.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/15666/head:pull/15666 PR: https://git.openjdk.org/jdk/pull/15666 From kizune at openjdk.org Wed Sep 13 16:01:26 2023 From: kizune at openjdk.org (Alexander Zuev) Date: Wed, 13 Sep 2023 16:01:26 GMT Subject: RFR: 8315981: Opensource five more random Swing tests Message-ID: Clean up and open source five tests: javax/swing/DefaultListCellRenderer/4180943/bug4180943.java javax/swing/DefaultListModel/4466250/bug4466250.java javax/swing/DefaultListSelectionModel/4140619/bug4140619.java javax/swing/DefaultListSelectionModel/4177723/bug4177723.java javax/swing/ImageIcon/4827074/bug4827074.java ------------- Commit messages: - 8315981: Opensource five more random Swing tests Changes: https://git.openjdk.org/jdk/pull/15724/files Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=15724&range=00 Issue: https://bugs.openjdk.org/browse/JDK-8315981 Stats: 297 lines in 5 files changed: 297 ins; 0 del; 0 mod Patch: https://git.openjdk.org/jdk/pull/15724.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/15724/head:pull/15724 PR: https://git.openjdk.org/jdk/pull/15724 From duke at openjdk.org Wed Sep 13 16:11:39 2023 From: duke at openjdk.org (Sergei Tachenov) Date: Wed, 13 Sep 2023 16:11:39 GMT Subject: RFR: 6415065: Submenu is shown on wrong screen in multiple monitor environment In-Reply-To: References: Message-ID: On Tue, 8 Aug 2023 08:44:25 GMT, Sergei Tachenov wrote: > Hello! > > I'm a member of the UI team in JetBrains IntelliJ department, and we have this bug with popup menus being shown on the wrong monitor in multi-monitor environments: > > https://youtrack.jetbrains.com/issue/JBR-5824/Dual-monitor-bug-on-the-context-menu > > I managed to track it down to this JDK bug: > > https://bugs.openjdk.org/browse/JDK-6415065 > > I've described the cause and the fix in the commit message, but in short, what happens here is that `JMenu.getPopupMenuOrigin` sometimes returns coordinates outside (usually above) of the current screen, and later `JPopupMenu.adjustPopupLocationToFitScreen` uses those coordinates to fit the entire popup menu into the screen, which goes wrong because at that point it's no longer known which screen the menu was initially invoked on. > > I've fixed this by making sure the Y coordinate is still within the correct screen when it's returned from `JMenu.getPopupMenuOrigin`. Any news on this? The bot warns me that it'll be closed if there's no activity, but I don't understand what I can do here. ------------- PR Comment: https://git.openjdk.org/jdk/pull/15185#issuecomment-1717924355 From duke at openjdk.org Wed Sep 13 17:01:40 2023 From: duke at openjdk.org (lawrence.andrews) Date: Wed, 13 Sep 2023 17:01:40 GMT Subject: RFR: 8294156: Allow PassFailJFrame.Builder to create test UI [v2] In-Reply-To: <2AD15rZ3B4RKFOsu-GAK6vMllvVuywhwQPJvdIxPnJ0=.c824db8b-0efb-4916-84e2-4b093fd8d942@github.com> References: <2AD15rZ3B4RKFOsu-GAK6vMllvVuywhwQPJvdIxPnJ0=.c824db8b-0efb-4916-84e2-4b093fd8d942@github.com> Message-ID: On Wed, 13 Sep 2023 14:25:19 GMT, Alexey Ivanov wrote: >> This enhances the `Builder` pattern added in [JDK-8294535](https://bugs.openjdk.org/browse/JDK-8294535) with a new method `testUI` which allows passing a lambda expression or a method reference to create *the test UI window*. >> >> The `PassFailJFrame` will automatically call the method on the EDT to create the UI, add it to the internal list of windows, install the window closing listener and finally position and show both the instructions and test UI. >> >> Alternatively, you can pass an already created window. >> >> The `main` method of a manual test could look as simple as a sequence of calls: >> >> >> public static void main(String[] args) throws Exception { >> PassFailJFrame.builder() >> .instructions(INSTRUCTIONS) >> .testUI(() -> createTestUI()) >> .build() >> .awaitAndCheck(); >> } >> >> where `createTestUI` returns a test UI window. > > Alexey Ivanov has updated the pull request incrementally with one additional commit since the last revision: > > 8294156: Allow creating several test windows > > The windows can be positioned in advance, or > a call back PositionWindows interface can be used > to define their positions after the instruction UI > frame is positioned on the screen. The new several test UI windows , looks good to me. ------------- PR Comment: https://git.openjdk.org/jdk/pull/15665#issuecomment-1717994802 From jlu at openjdk.org Wed Sep 13 17:38:28 2023 From: jlu at openjdk.org (Justin Lu) Date: Wed, 13 Sep 2023 17:38:28 GMT Subject: RFR: 8301991: Convert l10n properties resource bundles to UTF-8 native [v2] In-Reply-To: References: Message-ID: > 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 ------------- Changes: - all: https://git.openjdk.org/jdk/pull/15694/files - new: https://git.openjdk.org/jdk/pull/15694/files/0f3698a5..ceb48bbe Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=15694&range=01 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=15694&range=00-01 Stats: 18 lines in 2 files changed: 6 ins; 8 del; 4 mod Patch: https://git.openjdk.org/jdk/pull/15694.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/15694/head:pull/15694 PR: https://git.openjdk.org/jdk/pull/15694 From naoto at openjdk.org Wed Sep 13 18:14:41 2023 From: naoto at openjdk.org (Naoto Sato) Date: Wed, 13 Sep 2023 18:14:41 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 Looks good to me, although I did not look at each l10n file, but sampled some. Thanks for tackling this conversion. ------------- Marked as reviewed by naoto (Reviewer). PR Review: https://git.openjdk.org/jdk/pull/15694#pullrequestreview-1625154951 From jlu at openjdk.org Wed Sep 13 18:46:38 2023 From: jlu at openjdk.org (Justin Lu) Date: Wed, 13 Sep 2023 18:46:38 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 18:12:15 GMT, Naoto Sato wrote: > Looks good to me, although I did not look at each l10n file, but sampled some. Thanks for tackling this conversion. Thanks for the review; (In addition to testing), I ran a script to verify only white space escape sequences exist in JDK .properties files. (Excluding escape sequences in test files that should remain as is for the purpose of the test) ------------- PR Comment: https://git.openjdk.org/jdk/pull/15694#issuecomment-1718139807 From aivanov at openjdk.org Wed Sep 13 18:50:54 2023 From: aivanov at openjdk.org (Alexey Ivanov) Date: Wed, 13 Sep 2023 18:50:54 GMT Subject: RFR: 8294156: Demo positioning of multiple test windows [v2] In-Reply-To: References: Message-ID: > The manual test frame does not provide any layout managers for test windows, the user has to implement one. This demonstrates how to position a several test UI windows. > > We may include some implementations into the manual test framework in the future. > > **This PR is not meant to be integrated.** It just demonstrates the feature of adding multiple test windows to `PassFailJFrame` which is reviewed in #15665. > > To play around, you can checkout the PR branch using the commands that bots add. > > Path to the tests: `test/jdk/java/awt/Window/8294156`. > > Alternatively, you can checkout directly from my fork: > > > git fetch https://github.com/aivanov-jdk/jdk.git demo-manyTestWindows:demo-manyTestWindows > git checkout demo-manyTestWindows Alexey Ivanov has updated the pull request incrementally with one additional commit since the last revision: 8294156: Additional layouts for vertically positioned test windows ------------- Changes: - all: https://git.openjdk.org/jdk/pull/15721/files - new: https://git.openjdk.org/jdk/pull/15721/files/b8f14f92..4c0e4d09 Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=15721&range=01 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=15721&range=00-01 Stats: 133 lines in 5 files changed: 105 ins; 21 del; 7 mod Patch: https://git.openjdk.org/jdk/pull/15721.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/15721/head:pull/15721 PR: https://git.openjdk.org/jdk/pull/15721 From aivanov at openjdk.org Wed Sep 13 18:54:39 2023 From: aivanov at openjdk.org (Alexey Ivanov) Date: Wed, 13 Sep 2023 18:54:39 GMT Subject: RFR: 8294156: Allow PassFailJFrame.Builder to create test UI [v2] In-Reply-To: References: Message-ID: <_8ycdiVYe1YWEa2r0lqduv7GS62mnea-jzYRv0toeN8=.b04555fc-61ec-486f-863c-f9c66fc606d9@github.com> On Tue, 12 Sep 2023 19:51:45 GMT, Alexey Ivanov wrote: >>> However, to test this case I'll need a (simple) scenario where multiple windows are created. >> >> For example `test/jdk/java/awt/event/MouseEvent/SpuriousExitEnter/SpuriousExitEnter_2.java` is not converted to use PassFailJFrame, but shows instruction window and two test windows. >> >> For these test windows, we can safely reduce the width a lot and arrange them in a row. >> ![image](https://github.com/openjdk/jdk/assets/77687766/9c7f3548-fa0a-4e1f-ad87-a7af7561064b) >> >> Probably we could add some other sophisticated layouts later, e.g.: >> ![image](https://github.com/openjdk/jdk/assets/77687766/a9da5948-9f52-420e-8f15-55818fe8f255) >> >> But this kind of layout seems to be beyond the scope of this PR, I just wish we hadn't missed the option to add multiple windows at once. > > But laying out the test windows is really a problem. With one window, the framework already provides a way to position the window, it is applied to the primary test window. > > Before showing other windows, they need to be positioned. > > There could be a callback so that the test developer is able to position the windows. In the future, we may add simple layouts to perform this task automatically. > >> But this kind of layout seems to be beyond the scope of this PR, I just wish we hadn't missed the option to add multiple windows at once. > > I agree, it's better to implement it right away. I didn't think about it as viable solution because of positioning issues. It is possible to lay out test windows like this: ![TwoWindowsHH: Two test windows are positioned horizontally to the left of instructions window](https://github.com/openjdk/jdk/assets/70774172/e51b136e-3f2a-4c0e-842c-d8e2e221c8cd) ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/15665#discussion_r1324935857 From aivanov at openjdk.org Wed Sep 13 18:58:39 2023 From: aivanov at openjdk.org (Alexey Ivanov) Date: Wed, 13 Sep 2023 18:58:39 GMT Subject: RFR: 8294156: Demo positioning of multiple test windows [v2] In-Reply-To: References: Message-ID: On Wed, 13 Sep 2023 18:50:54 GMT, Alexey Ivanov wrote: >> The manual test frame does not provide any layout managers for test windows, the user has to implement one. This demonstrates how to position a several test UI windows. >> >> We may include some implementations into the manual test framework in the future. >> >> **This PR is not meant to be integrated.** It just demonstrates the feature of adding multiple test windows to `PassFailJFrame` which is reviewed in #15665. >> >> To play around, you can checkout the PR branch using the commands that bots add. >> >> Path to the tests: `test/jdk/java/awt/Window/8294156`. >> >> Alternatively, you can checkout directly from my fork: >> >> >> git fetch https://github.com/aivanov-jdk/jdk.git demo-manyTestWindows:demo-manyTestWindows >> git checkout demo-manyTestWindows > > Alexey Ivanov has updated the pull request incrementally with one additional commit since the last revision: > > 8294156: Additional layouts for vertically positioned test windows The `ThreeWindowRows` test from the demo set creates 8 test windows which are laid out in three rows below the instructions window: the first two rows contain 3 windows, the last row contains 2 windows. The instructions window is moved upwards, it's on the zeroth row. The entire set is centred on the screen. ![ThreeWindowRows: instruction window followed by three rows of test UI windows](https://github.com/openjdk/jdk/assets/70774172/653a9689-dd09-4424-a510-063cca8260d7) ------------- PR Comment: https://git.openjdk.org/jdk/pull/15721#issuecomment-1718154967 From aturbanov at openjdk.org Wed Sep 13 19:04:38 2023 From: aturbanov at openjdk.org (Andrey Turbanov) Date: Wed, 13 Sep 2023 19:04:38 GMT Subject: RFR: 8315981: Opensource five more random Swing tests In-Reply-To: References: Message-ID: On Wed, 13 Sep 2023 15:53:30 GMT, Alexander Zuev wrote: > Clean up and open source five tests: > javax/swing/DefaultListCellRenderer/4180943/bug4180943.java > javax/swing/DefaultListModel/4466250/bug4466250.java > javax/swing/DefaultListSelectionModel/4140619/bug4140619.java > javax/swing/DefaultListSelectionModel/4177723/bug4177723.java > javax/swing/ImageIcon/4827074/bug4827074.java test/jdk/javax/swing/ImageIcon/4827074/bug4827074.java line 67: > 65: ObjectInputStream in = new ObjectInputStream(bais); > 66: _ii = (ImageIcon)in.readObject(); > 67: } catch(Exception ex) { Suggestion: } catch (Exception ex) { ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/15724#discussion_r1324946066 From aturbanov at openjdk.org Wed Sep 13 19:06:40 2023 From: aturbanov at openjdk.org (Andrey Turbanov) Date: Wed, 13 Sep 2023 19:06:40 GMT Subject: RFR: 8315871: Opensource five more Swing regression tests In-Reply-To: References: Message-ID: <8uXPFE0zT6gHnBWbBRF897O3zXCBTROVCUc8LJLgaiA=.cde9be3d-08d0-4c69-b757-16ef187e7a85@github.com> On Wed, 13 Sep 2023 08:48:25 GMT, Alexander Zuev wrote: > Clean up and move to open source five tests. > javax/swing/AncestorNotifier/4817630/bug4817630.java > javax/swing/BoxLayout/4191948/bug4191948.java > javax/swing/ComponentInputMap/4248723/bug4248723.java > javax/swing/DefaultBoundedRangeModel/4297953/bug4297953.java > javax/swing/DefaultButtonModel/4097723/bug4097723.java test/jdk/javax/swing/AncestorNotifier/4817630/bug4817630.java line 80: > 78: } > 79: } > 80: } catch(Exception e) { Suggestion: } catch (Exception e) { test/jdk/javax/swing/DefaultBoundedRangeModel/4297953/bug4297953.java line 35: > 33: > 34: public class bug4297953 { > 35: public static void main(String[] args) { Suggestion: public static void main(String[] args) { ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/15702#discussion_r1324948218 PR Review Comment: https://git.openjdk.org/jdk/pull/15702#discussion_r1324947878 From aivanov at openjdk.org Wed Sep 13 19:19:40 2023 From: aivanov at openjdk.org (Alexey Ivanov) Date: Wed, 13 Sep 2023 19:19:40 GMT Subject: RFR: 8315726: Open source several AWT applet tests [v4] In-Reply-To: References: <4WOazUTC1hKAoxppzsJ49DpOmmuoGf5eUfSLYRlWhLA=.5634a73e-6c35-485d-8004-eec1271844ae@github.com> Message-ID: On Tue, 12 Sep 2023 21:52:33 GMT, Alexander Zvegintsev wrote: >> Some closed AWT test are open sourced. > > Alexander Zvegintsev has updated the pull request incrementally with one additional commit since the last revision: > > fix path Looks good. ------------- Marked as reviewed by aivanov (Reviewer). PR Review: https://git.openjdk.org/jdk/pull/15671#pullrequestreview-1625258794 From aivanov at openjdk.org Wed Sep 13 19:19:43 2023 From: aivanov at openjdk.org (Alexey Ivanov) Date: Wed, 13 Sep 2023 19:19:43 GMT Subject: RFR: 8315726: Open source several AWT applet tests [v2] In-Reply-To: References: <4WOazUTC1hKAoxppzsJ49DpOmmuoGf5eUfSLYRlWhLA=.5634a73e-6c35-485d-8004-eec1271844ae@github.com> Message-ID: On Tue, 12 Sep 2023 21:33:44 GMT, Alexander Zvegintsev wrote: >> test/jdk/java/awt/Choice/ChoiceSelectTest.java line 160: >> >>> 158: public static void main(String[] args) throws Exception { >>> 159: EventQueue.invokeAndWait(() -> new ChoiceSelectTest().test()); >>> 160: } >> >> The choice is never shown on the screen, is it? Can the test be headless then? > > No, it can't, Choice is heavyweight component: https://github.com/openjdk/jdk/blob/master/src/java.desktop/share/classes/java/awt/Choice.java#L116 Right, heavyweight can't even be created in headless mode. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/15671#discussion_r1324958857 From aivanov at openjdk.org Wed Sep 13 20:11:42 2023 From: aivanov at openjdk.org (Alexey Ivanov) Date: Wed, 13 Sep 2023 20:11:42 GMT Subject: RFR: 8312165: Fix typos in java.desktop Swing In-Reply-To: References: Message-ID: On Wed, 30 Aug 2023 14:08:21 GMT, Alexey Ivanov wrote: > I reverted changes in non-Swing parts to reduce amount of files to review. Did you submit a follow-up bug for those files? Do you have a PR already? ------------- PR Comment: https://git.openjdk.org/jdk/pull/14847#issuecomment-1718250875 From aivanov at openjdk.org Wed Sep 13 20:11:41 2023 From: aivanov at openjdk.org (Alexey Ivanov) Date: Wed, 13 Sep 2023 20:11:41 GMT Subject: RFR: 8312165: Fix typos in java.desktop Swing [v6] In-Reply-To: References: Message-ID: <798bKhmxZgkaQ49xqHmTLpubV8nqBzgaxJyBBVMZGbs=.e2184291-d41b-444f-865c-3a786b7554a2@github.com> On Tue, 12 Sep 2023 19:59:27 GMT, Andrey Turbanov wrote: > Do we need a second reviewer or I can integrate? It's a good question. Overall, the changes are trivial: only comments are updated, some javadoc for private classes which are comments, then a couple of method names and variable names are corrected. I can't see any logic change. I would say *integrate* if no else looks in the next 12?24 hours. ------------- PR Comment: https://git.openjdk.org/jdk/pull/14847#issuecomment-1718248647 From aturbanov at openjdk.org Wed Sep 13 20:36:46 2023 From: aturbanov at openjdk.org (Andrey Turbanov) Date: Wed, 13 Sep 2023 20:36:46 GMT Subject: RFR: 8312165: Fix typos in java.desktop Swing In-Reply-To: References: Message-ID: On Wed, 13 Sep 2023 20:09:07 GMT, Alexey Ivanov wrote: >Did you submit a follow-up bug for those files? >Do you have a PR already? I plan to work on new PR after merge of this. ------------- PR Comment: https://git.openjdk.org/jdk/pull/14847#issuecomment-1718280444 From azvegint at openjdk.org Wed Sep 13 21:20:40 2023 From: azvegint at openjdk.org (Alexander Zvegintsev) Date: Wed, 13 Sep 2023 21:20:40 GMT Subject: RFR: 8294156: Demo positioning of multiple test windows [v2] In-Reply-To: References: Message-ID: On Wed, 13 Sep 2023 18:50:54 GMT, Alexey Ivanov wrote: >> The manual test frame does not provide any layout managers for test windows, the user has to implement one. This demonstrates how to position a several test UI windows. >> >> We may include some implementations into the manual test framework in the future. >> >> **This PR is not meant to be integrated.** It just demonstrates the feature of adding multiple test windows to `PassFailJFrame` which is reviewed in #15665. >> >> To play around, you can checkout the PR branch using the commands that bots add. >> >> Path to the tests: `test/jdk/java/awt/Window/8294156`. >> >> Alternatively, you can checkout directly from my fork: >> >> >> git fetch https://github.com/aivanov-jdk/jdk.git demo-manyTestWindows:demo-manyTestWindows >> git checkout demo-manyTestWindows > > Alexey Ivanov has updated the pull request incrementally with one additional commit since the last revision: > > 8294156: Additional layouts for vertically positioned test windows test/jdk/java/awt/Window/8294156/manyWindows/TwoWindowColumnsH.java line 96: > 94: private static final int COLUMNS = 3; > 95: > 96: public static void positionTestUI(List windows, When I thought about adding more than one window, I thought about simply placing everything in a row. Looking at all this I have mixed feelings. On the one hand a person using all this for the first time will have to spend some time to understand how it works, or take the easy way out and manually arrange the windows. On the other hand, the result is impressive, and can make life easier if you don't have to write positionTestUI every time. I think if we do go this way, we should add some standard positionTestUI implementations to PassFailJFrame so that we don't have to reinvent the wheel every time. It is also worth considering that looks like we don't have many tests with more than 2-3 windows. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/15721#discussion_r1325086960 From azvegint at openjdk.org Wed Sep 13 21:36:45 2023 From: azvegint at openjdk.org (Alexander Zvegintsev) Date: Wed, 13 Sep 2023 21:36:45 GMT Subject: RFR: 8315726: Open source several AWT applet tests [v5] In-Reply-To: <4WOazUTC1hKAoxppzsJ49DpOmmuoGf5eUfSLYRlWhLA=.5634a73e-6c35-485d-8004-eec1271844ae@github.com> References: <4WOazUTC1hKAoxppzsJ49DpOmmuoGf5eUfSLYRlWhLA=.5634a73e-6c35-485d-8004-eec1271844ae@github.com> Message-ID: > Some closed AWT test are open sourced. Alexander Zvegintsev has updated the pull request incrementally with one additional commit since the last revision: fix whitespaces ------------- Changes: - all: https://git.openjdk.org/jdk/pull/15671/files - new: https://git.openjdk.org/jdk/pull/15671/files/758c0454..a367ad34 Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=15671&range=04 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=15671&range=03-04 Stats: 5 lines in 1 file changed: 0 ins; 0 del; 5 mod Patch: https://git.openjdk.org/jdk/pull/15671.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/15671/head:pull/15671 PR: https://git.openjdk.org/jdk/pull/15671 From azvegint at openjdk.org Wed Sep 13 22:26:54 2023 From: azvegint at openjdk.org (Alexander Zvegintsev) Date: Wed, 13 Sep 2023 22:26:54 GMT Subject: Integrated: 8315726: Open source several AWT applet tests In-Reply-To: <4WOazUTC1hKAoxppzsJ49DpOmmuoGf5eUfSLYRlWhLA=.5634a73e-6c35-485d-8004-eec1271844ae@github.com> References: <4WOazUTC1hKAoxppzsJ49DpOmmuoGf5eUfSLYRlWhLA=.5634a73e-6c35-485d-8004-eec1271844ae@github.com> Message-ID: <9-QkwrfSYUchoW6siDOLgY0-RUmwic5YET7TRPaJjIA=.02f45d4d-233f-4942-8605-815a71a3746d@github.com> On Mon, 11 Sep 2023 22:18:51 GMT, Alexander Zvegintsev wrote: > Some closed AWT test are open sourced. This pull request has now been integrated. Changeset: 1741d13b Author: Alexander Zvegintsev URL: https://git.openjdk.org/jdk/commit/1741d13b1260253d1e299e8da9c42b5519a7ae48 Stats: 849 lines in 4 files changed: 849 ins; 0 del; 0 mod 8315726: Open source several AWT applet tests Reviewed-by: psadhukhan, aivanov ------------- PR: https://git.openjdk.org/jdk/pull/15671 From honkar at openjdk.org Wed Sep 13 22:47:20 2023 From: honkar at openjdk.org (Harshitha Onkar) Date: Wed, 13 Sep 2023 22:47:20 GMT Subject: RFR: JDK-8315731: Open source several Swing Text related tests [v2] In-Reply-To: References: Message-ID: > Open sourcing the following tests - > > 1. javax/swing/text/CompositeView/4398059/bug4398059.java > 2. javax/swing/text/DefaultCaret/4197894/bug4197894.java > 3. javax/swing/text/DefaultCaret/4203175/bug4203175.java > 4. javax/swing/text/DefaultEditorKit/4265242/bug4265242.java > 5. javax/swing/text/DefaultStyledDocument/4472852/bug4472852.java Harshitha Onkar has updated the pull request incrementally with two additional commits since the last revision: - delay changes - minor review change ------------- Changes: - all: https://git.openjdk.org/jdk/pull/15693/files - new: https://git.openjdk.org/jdk/pull/15693/files/d9c1b8b5..70d5320c Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=15693&range=01 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=15693&range=00-01 Stats: 8 lines in 2 files changed: 0 ins; 5 del; 3 mod Patch: https://git.openjdk.org/jdk/pull/15693.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/15693/head:pull/15693 PR: https://git.openjdk.org/jdk/pull/15693 From honkar at openjdk.org Wed Sep 13 22:48:38 2023 From: honkar at openjdk.org (Harshitha Onkar) Date: Wed, 13 Sep 2023 22:48:38 GMT Subject: RFR: JDK-8315731: Open source several Swing Text related tests [v2] In-Reply-To: References: Message-ID: On Wed, 13 Sep 2023 09:22:27 GMT, Tejesh R wrote: >> Harshitha Onkar has updated the pull request incrementally with two additional commits since the last revision: >> >> - delay changes >> - minor review change > > test/jdk/javax/swing/text/DefaultCaret/bug4197894.java line 53: > >> 51: try { >> 52: Robot robot = new Robot(); >> 53: robot.setAutoDelay(100); > > This delay might be redundant? Any specific reason for this delay? I added it because of following robot's keypress and release events. I have reduced the delay to 50ms. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/15693#discussion_r1325145837 From honkar at openjdk.org Thu Sep 14 00:09:29 2023 From: honkar at openjdk.org (Harshitha Onkar) Date: Thu, 14 Sep 2023 00:09:29 GMT Subject: RFR: JDK-8315824: Open source several Swing Text/HTML related tests [v3] In-Reply-To: References: Message-ID: > This PR open sources few Swing Text/HTML related tests. Harshitha Onkar has updated the pull request incrementally with one additional commit since the last revision: test update ------------- Changes: - all: https://git.openjdk.org/jdk/pull/15675/files - new: https://git.openjdk.org/jdk/pull/15675/files/711e464b..efd72128 Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=15675&range=02 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=15675&range=01-02 Stats: 72 lines in 3 files changed: 18 ins; 23 del; 31 mod Patch: https://git.openjdk.org/jdk/pull/15675.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/15675/head:pull/15675 PR: https://git.openjdk.org/jdk/pull/15675 From honkar at openjdk.org Thu Sep 14 00:09:33 2023 From: honkar at openjdk.org (Harshitha Onkar) Date: Thu, 14 Sep 2023 00:09:33 GMT Subject: RFR: JDK-8315824: Open source several Swing Text/HTML related tests [v2] In-Reply-To: References: Message-ID: On Wed, 13 Sep 2023 06:29:20 GMT, Prasanta Sadhukhan wrote: >> Harshitha Onkar has updated the pull request incrementally with one additional commit since the last revision: >> >> minor changes > > test/jdk/javax/swing/text/html/bug4210307.java line 40: > >> 38: >> 39: public class bug4210307 { >> 40: private static Robot robot; > > Robot can be local var In this case robot wasn't needed hence it has been removed and the test is converted into headless. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/15675#discussion_r1325186960 From azvegint at openjdk.org Thu Sep 14 00:32:42 2023 From: azvegint at openjdk.org (Alexander Zvegintsev) Date: Thu, 14 Sep 2023 00:32:42 GMT Subject: RFR: JDK-8315824: Open source several Swing Text/HTML related tests [v3] In-Reply-To: References: Message-ID: On Thu, 14 Sep 2023 00:09:29 GMT, Harshitha Onkar wrote: >> This PR open sources few Swing Text/HTML related tests. > > Harshitha Onkar has updated the pull request incrementally with one additional commit since the last revision: > > test update Marked as reviewed by azvegint (Reviewer). ------------- PR Review: https://git.openjdk.org/jdk/pull/15675#pullrequestreview-1625630278 From serb at openjdk.org Thu Sep 14 01:03:38 2023 From: serb at openjdk.org (Sergey Bylokhov) Date: Thu, 14 Sep 2023 01:03:38 GMT Subject: RFR: 8312191: ColorConvertOp.filter for the default destination is too slow In-Reply-To: References: Message-ID: On Mon, 17 Jul 2023 20:59:05 GMT, Sergey Bylokhov wrote: > I have found that MTPerLineTransformValidation - one of our slowest stress test spends most of the time not in the code related to the colors conversion(as it was intended) but in the initialization of the native cmm-transforms. > > > ColorConvertOp sharedOp = new ColorConvertOp(srcCS, dstCS, null); <-- slow > BufferedImage dst = sharedOp.filter(src, null); > > > The code above triggers the next sequence: > 1. The destination buffered image is not set so it should be created [automatically](https://github.com/openjdk/jdk/blob/master/src/java.desktop/share/classes/java/awt/image/ColorConvertOp.java#L551) ->> > 2. The buffered image requires the new color [model](https://github.com/openjdk/jdk/blob/master/src/java.desktop/share/classes/java/awt/image/ColorConvertOp.java#L588) ->> > 3. The color model requires new color [space](https://github.com/openjdk/jdk/blob/master/src/java.desktop/share/classes/java/awt/image/ColorConvertOp.java#L563) ->> > 4. The color model initialize some [LUTs](https://github.com/openjdk/jdk/blob/master/src/java.desktop/share/classes/java/awt/image/ColorModel.java#L1816), **and cache it per color space** ->> > 5. When the ColorConvertOp is used for the first time the color space caches some state internally if the format of the src/dst image is not changed > > So the critical thing above is to minimize the creation of the new color spaces, since for each new space all optimizations above should be repeated. Unfortunately, when we create the ColorConvertOp using standard icc_profile/icc_colorspace we store the profile only and [lost](https://github.com/openjdk/jdk/blob/master/src/java.desktop/share/classes/java/awt/image/ColorConvertOp.java#L150) the reference to the initial color space. And when later we decide to create a color model we create the new icc_color space->all optimizations resets. > > We do not save the reference to the color space because that way we distinguish the icc_colorspace saved using profiles, and non-icc_color spaces used as is. I think all that code should be reworked to take into account the current issue. But for now, we can fix it at least for standard types. > > **Important notes**: > * Performance of MTPerLineTransformValidation test is increased(on my system from 3m30s to the 14s) - the number of used native transforms changed from 80000 to ~500. It can have a side effect since a few crashes(exit code 134) were reported for this test. The crashes of this test and others may disappear since the memory pressure is decreased, o... keep open ------------- PR Comment: https://git.openjdk.org/jdk/pull/14910#issuecomment-1718501845 From serb at openjdk.org Thu Sep 14 01:54:40 2023 From: serb at openjdk.org (Sergey Bylokhov) Date: Thu, 14 Sep 2023 01:54:40 GMT Subject: RFR: JDK-8311113: Remove invalid pointer cast and clean up setLabel() in awt_MenuItem.cpp [v4] In-Reply-To: References: <-UpmI9X_txepgRxGnsfSTtjwmqPQgtjeA5gqo-wmuGk=.3c84af65-e29e-4eeb-b393-efa9c990e721@github.com> Message-ID: On Fri, 1 Sep 2023 00:04:18 GMT, Harshitha Onkar wrote: >> In awt_MenuItem.cpp (712,22): ` mii.dwTypeData = (LPTSTR)(*sb)` produces invalid pointer cast warning when complied on clang and moreover this is a no-op. >> >> `mii.dwTypeData` is used only when **MIIM_STRING** flag is set in the fMask (as per [Docs](https://learn.microsoft.com/en-us/windows/win32/api/winuser/ns-winuser-menuiteminfoa)), which is not the case in JDK [Ln#705](https://github.com/openjdk/jdk/blob/e56d3bc2dab3d32453b6eda66e8434953c436084/src/java.desktop/windows/native/libawt/windows/awt_MenuItem.cpp#L706). Hence the assignment ` mii.dwTypeData = (LPTSTR)(*sb)` is not required and so is the label parameter. Additionally necessary cleanup is done at the following places - >> >> - WMenuItemPeer.java - to the native function call >> - awt_MenuItem.cpp - `WMenuItemPeer__1setLabel() ,_SetLabel(), SetLabel()` >> - awt_MenuItem.h >> >> Added a test which checks setLabel() functionality on Menu, MenuItem and PopupMenu. > > Harshitha Onkar has updated the pull request incrementally with one additional commit since the last revision: > > review changes Looks fine if the a11y things works fine, we probably can check for a possible cleanups in other places we use ownerdraw logic. ------------- Marked as reviewed by serb (Reviewer). PR Review: https://git.openjdk.org/jdk/pull/15276#pullrequestreview-1625692568 From jwaters at openjdk.org Thu Sep 14 03:25:15 2023 From: jwaters at openjdk.org (Julian Waters) Date: Thu, 14 Sep 2023 03:25:15 GMT Subject: RFR: 8307160: [REDO] Enable the permissive- flag on the Microsoft Visual C compiler [v5] In-Reply-To: <7piLRto5nNbhYYYfENCr5ecm4M2xNtMkjkE8XhrLLQ0=.8fd1ac3a-46f8-47a8-ae37-a4abbf7757d9@github.com> References: <7piLRto5nNbhYYYfENCr5ecm4M2xNtMkjkE8XhrLLQ0=.8fd1ac3a-46f8-47a8-ae37-a4abbf7757d9@github.com> Message-ID: > We should set the -permissive- flag for the Microsoft Visual C compiler, as was requested by the now backed out [JDK-8241499](https://bugs.openjdk.org/browse/JDK-8241499). Doing so makes the Visual C compiler much less accepting of ill formed code, which will improve code quality on Windows in the future. Julian Waters has updated the pull request with a new target base due to a merge or a rebase. The pull request now contains 25 commits: - Merge branch 'master' into patch-10 - Document changes in awt_DnDDS.cpp - Remove negation in os_windows.cpp - Mismatched declaration in D3DGlyphCache.cpp - Fields in awt_TextComponent.cpp - reinterpret_cast needed in AccessBridgeJavaEntryPoints.cpp - Qualifiers in awt_PrintDialog.h should be removed - Likewise for awt_DnDDT.cpp - awt_ole.h include order issue in awt_DnDDS.cpp - Revert awt_ole.h - ... and 15 more: https://git.openjdk.org/jdk/compare/11d431b2...1d3d6b5e ------------- Changes: https://git.openjdk.org/jdk/pull/15096/files Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=15096&range=04 Stats: 802 lines in 17 files changed: 171 ins; 127 del; 504 mod Patch: https://git.openjdk.org/jdk/pull/15096.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/15096/head:pull/15096 PR: https://git.openjdk.org/jdk/pull/15096 From jwaters at openjdk.org Thu Sep 14 03:26:04 2023 From: jwaters at openjdk.org (Julian Waters) Date: Thu, 14 Sep 2023 03:26:04 GMT Subject: RFR: 8307160: [REDO] Enable the permissive- flag on the Microsoft Visual C compiler [v4] In-Reply-To: References: <7piLRto5nNbhYYYfENCr5ecm4M2xNtMkjkE8XhrLLQ0=.8fd1ac3a-46f8-47a8-ae37-a4abbf7757d9@github.com> Message-ID: On Thu, 17 Aug 2023 08:38:01 GMT, Julian Waters wrote: >> We should set the -permissive- flag for the Microsoft Visual C compiler, as was requested by the now backed out [JDK-8241499](https://bugs.openjdk.org/browse/JDK-8241499). Doing so makes the Visual C compiler much less accepting of ill formed code, which will improve code quality on Windows in the future. > > Julian Waters has updated the pull request incrementally with one additional commit since the last revision: > > Document changes in awt_DnDDS.cpp Pinging ------------- PR Comment: https://git.openjdk.org/jdk/pull/15096#issuecomment-1718706290 From tr at openjdk.org Thu Sep 14 04:43:49 2023 From: tr at openjdk.org (Tejesh R) Date: Thu, 14 Sep 2023 04:43:49 GMT Subject: RFR: JDK-8315731: Open source several Swing Text related tests [v2] In-Reply-To: References: Message-ID: On Wed, 13 Sep 2023 22:47:20 GMT, Harshitha Onkar wrote: >> Open sourcing the following tests - >> >> 1. javax/swing/text/CompositeView/4398059/bug4398059.java >> 2. javax/swing/text/DefaultCaret/4197894/bug4197894.java >> 3. javax/swing/text/DefaultCaret/4203175/bug4203175.java >> 4. javax/swing/text/DefaultEditorKit/4265242/bug4265242.java >> 5. javax/swing/text/DefaultStyledDocument/4472852/bug4472852.java > > Harshitha Onkar has updated the pull request incrementally with two additional commits since the last revision: > > - delay changes > - minor review change Marked as reviewed by tr (Committer). ------------- PR Review: https://git.openjdk.org/jdk/pull/15693#pullrequestreview-1625816801 From tr at openjdk.org Thu Sep 14 05:19:44 2023 From: tr at openjdk.org (Tejesh R) Date: Thu, 14 Sep 2023 05:19:44 GMT Subject: RFR: JDK-8315889: Open source several Swing HTMLDocument related tests In-Reply-To: References: Message-ID: <1TSAbeoVbj8skwLA2KBl00sel7JrD9UPxPMjT9HSEHU=.9a0e1a6a-f0ce-416a-82e6-3e393ba8bd78@github.com> On Tue, 12 Sep 2023 17:05:47 GMT, Harshitha Onkar wrote: > Following tests are being open sourced as part of this PR. > > javax/swing/text/html/HTMLDocument/4251593/bug4251593.java > javax/swing/text/html/HTMLDocument/4687405/bug4687405.java > javax/swing/text/html/HTMLDocument/4226914/bug4226914.java > javax/swing/text/html/HTMLEditorKit/4213373/bug4213373.java Marked as reviewed by tr (Committer). ------------- PR Review: https://git.openjdk.org/jdk/pull/15687#pullrequestreview-1625846117 From tr at openjdk.org Thu Sep 14 05:23:38 2023 From: tr at openjdk.org (Tejesh R) Date: Thu, 14 Sep 2023 05:23:38 GMT Subject: RFR: 8315981: Opensource five more random Swing tests In-Reply-To: References: Message-ID: On Wed, 13 Sep 2023 15:53:30 GMT, Alexander Zuev wrote: > Clean up and open source five tests: > javax/swing/DefaultListCellRenderer/4180943/bug4180943.java > javax/swing/DefaultListModel/4466250/bug4466250.java > javax/swing/DefaultListSelectionModel/4140619/bug4140619.java > javax/swing/DefaultListSelectionModel/4177723/bug4177723.java > javax/swing/ImageIcon/4827074/bug4827074.java Marked as reviewed by tr (Committer). ------------- PR Review: https://git.openjdk.org/jdk/pull/15724#pullrequestreview-1625849694 From tr at openjdk.org Thu Sep 14 05:29:38 2023 From: tr at openjdk.org (Tejesh R) Date: Thu, 14 Sep 2023 05:29:38 GMT Subject: RFR: 8316164: Opensource JMenuBar manual test In-Reply-To: References: Message-ID: On Wed, 13 Sep 2023 13:00:28 GMT, Prasanta Sadhukhan wrote: > JMenubar manual applet test converted to automated and opensourced Marked as reviewed by tr (Committer). ------------- PR Review: https://git.openjdk.org/jdk/pull/15717#pullrequestreview-1625854618 From tr at openjdk.org Thu Sep 14 07:37:00 2023 From: tr at openjdk.org (Tejesh R) Date: Thu, 14 Sep 2023 07:37:00 GMT Subject: RFR: 8316061: Open source several Swing RootPane and Slider related tests Message-ID: Open sourcing these Swing RootPane and Slider related tests: javax/swing/JRootPane/4207333/bug4207333.java javax/swing/JRootPane/4224113/bug4224113.java javax/swing/JRootPane/4627806/bug4627806.java javax/swing/JSlider/4200901/bug4200901.java javax/swing/JSlider/4203754/bug4203754.java ------------- Commit messages: - Open sourcing few RootPane and Slider test Changes: https://git.openjdk.org/jdk/pull/15734/files Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=15734&range=00 Issue: https://bugs.openjdk.org/browse/JDK-8316061 Stats: 302 lines in 5 files changed: 302 ins; 0 del; 0 mod Patch: https://git.openjdk.org/jdk/pull/15734.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/15734/head:pull/15734 PR: https://git.openjdk.org/jdk/pull/15734 From abhiscxk at openjdk.org Thu Sep 14 08:13:09 2023 From: abhiscxk at openjdk.org (Abhishek Kumar) Date: Thu, 14 Sep 2023 08:13:09 GMT Subject: RFR: 8316106: Open source few swing JInternalFrame and JMenuBar tests Message-ID: Few closed JInternalFrame and JMenuBarswing tests are open sourced. ------------- Commit messages: - Open source few swing JInternalFrame and JMenuBar tests Changes: https://git.openjdk.org/jdk/pull/15735/files Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=15735&range=00 Issue: https://bugs.openjdk.org/browse/JDK-8316106 Stats: 450 lines in 5 files changed: 450 ins; 0 del; 0 mod Patch: https://git.openjdk.org/jdk/pull/15735.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/15735/head:pull/15735 PR: https://git.openjdk.org/jdk/pull/15735 From abhiscxk at openjdk.org Thu Sep 14 09:10:43 2023 From: abhiscxk at openjdk.org (Abhishek Kumar) Date: Thu, 14 Sep 2023 09:10:43 GMT Subject: RFR: 8315834: Open source several Swing JSpinner related tests [v2] In-Reply-To: References: Message-ID: <9PU46jBBU8l8uHXLqjAHcWkBlzMvZjjlETza57dUcKg=.1db98f51-d861-48b0-8bc7-90e5c8f456a4@github.com> On Wed, 13 Sep 2023 09:10:18 GMT, Tejesh R wrote: >> Open source these Swing JSpinner related tests: >> >> javax/swing/JSpinner/4522737/bug4522737.java >> javax/swing/JSpinner/4656590/bug4656590.java >> javax/swing/JSpinner/4680204/bug4680204.java >> javax/swing/JSpinner/4862257/bug4862257.java >> javax/swing/JSpinner/5104421/bug5104421.java > > Tejesh R has updated the pull request incrementally with one additional commit since the last revision: > > Review fix test/jdk/javax/swing/JSpinner/bug4656590.java line 110: > 108: System.out.println("Test Passed!"); > 109: } finally { > 110: if (frame != null) { I think there is a discussion going on to keep this `frame null check` also inside SwingUtilities. Are you going to update here as well? ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/15678#discussion_r1325634582 From abhiscxk at openjdk.org Thu Sep 14 09:12:15 2023 From: abhiscxk at openjdk.org (Abhishek Kumar) Date: Thu, 14 Sep 2023 09:12:15 GMT Subject: RFR: 8315741: Open source few swing JFormattedTextField and JPopupMenu tests Message-ID: <2DFnCpyLpvQoknmNL2F9m4Ow7ByPO0mb3sCwD3rzqrQ=.caa086fe-aeb7-4457-8d58-1bea75c2e1aa@github.com> Few closed JFormattedTextField and JPopupMenu tests are open sourced. ------------- Commit messages: - Open source few swing JFormattedTextField and JPopupMenu tests Changes: https://git.openjdk.org/jdk/pull/15737/files Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=15737&range=00 Issue: https://bugs.openjdk.org/browse/JDK-8315741 Stats: 486 lines in 5 files changed: 486 ins; 0 del; 0 mod Patch: https://git.openjdk.org/jdk/pull/15737.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/15737/head:pull/15737 PR: https://git.openjdk.org/jdk/pull/15737 From tr at openjdk.org Thu Sep 14 09:23:42 2023 From: tr at openjdk.org (Tejesh R) Date: Thu, 14 Sep 2023 09:23:42 GMT Subject: RFR: 8315834: Open source several Swing JSpinner related tests [v2] In-Reply-To: <9PU46jBBU8l8uHXLqjAHcWkBlzMvZjjlETza57dUcKg=.1db98f51-d861-48b0-8bc7-90e5c8f456a4@github.com> References: <9PU46jBBU8l8uHXLqjAHcWkBlzMvZjjlETza57dUcKg=.1db98f51-d861-48b0-8bc7-90e5c8f456a4@github.com> Message-ID: On Thu, 14 Sep 2023 09:08:05 GMT, Abhishek Kumar wrote: >> Tejesh R has updated the pull request incrementally with one additional commit since the last revision: >> >> Review fix > > test/jdk/javax/swing/JSpinner/bug4656590.java line 110: > >> 108: System.out.println("Test Passed!"); >> 109: } finally { >> 110: if (frame != null) { > > I think there is a discussion going on to keep this `frame null check` also inside SwingUtilities. > > Are you going to update here as well? Yes. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/15678#discussion_r1325655706 From jdv at openjdk.org Thu Sep 14 09:26:41 2023 From: jdv at openjdk.org (Jayathirth D V) Date: Thu, 14 Sep 2023 09:26:41 GMT Subject: RFR: 8316154: Opensource JTextArea manual tests In-Reply-To: References: Message-ID: <5stCfID_hAGoYxiUd9InEGosovleO1y2v943qsTCUrY=.d51976da-5532-49ab-b892-17944c0ec08e@github.com> On Wed, 13 Sep 2023 07:32:04 GMT, Prasanta Sadhukhan wrote: > JTextArea manual applet test converted to automated and opensourced Marked as reviewed by jdv (Reviewer). ------------- PR Review: https://git.openjdk.org/jdk/pull/15700#pullrequestreview-1626447002 From tr at openjdk.org Thu Sep 14 09:35:37 2023 From: tr at openjdk.org (Tejesh R) Date: Thu, 14 Sep 2023 09:35:37 GMT Subject: RFR: 8315834: Open source several Swing JSpinner related tests [v3] In-Reply-To: References: Message-ID: > Open source these Swing JSpinner related tests: > > javax/swing/JSpinner/4522737/bug4522737.java > javax/swing/JSpinner/4656590/bug4656590.java > javax/swing/JSpinner/4680204/bug4680204.java > javax/swing/JSpinner/4862257/bug4862257.java > javax/swing/JSpinner/5104421/bug5104421.java Tejesh R has updated the pull request incrementally with one additional commit since the last revision: Review fix ------------- Changes: - all: https://git.openjdk.org/jdk/pull/15678/files - new: https://git.openjdk.org/jdk/pull/15678/files/8ca1f0fd..2c01bf99 Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=15678&range=02 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=15678&range=01-02 Stats: 8 lines in 2 files changed: 0 ins; 0 del; 8 mod Patch: https://git.openjdk.org/jdk/pull/15678.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/15678/head:pull/15678 PR: https://git.openjdk.org/jdk/pull/15678 From tr at openjdk.org Thu Sep 14 09:42:11 2023 From: tr at openjdk.org (Tejesh R) Date: Thu, 14 Sep 2023 09:42:11 GMT Subject: RFR: 8316104: Open source several Swing SplitPane and RadioButton related tests Message-ID: Open sourcing these Swing SplitPane and RadioButton related tests: javax/swing/JSplitPane/4147653/bug4147653.java javax/swing/JSplitPane/4870674/bug4870674.java javax/swing/JRadioButton/4823809/bug4823809.java ------------- Commit messages: - Open sourcing few SplitPane and RadioButton test Changes: https://git.openjdk.org/jdk/pull/15738/files Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=15738&range=00 Issue: https://bugs.openjdk.org/browse/JDK-8316104 Stats: 332 lines in 3 files changed: 332 ins; 0 del; 0 mod Patch: https://git.openjdk.org/jdk/pull/15738.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/15738/head:pull/15738 PR: https://git.openjdk.org/jdk/pull/15738 From jdv at openjdk.org Thu Sep 14 09:48:39 2023 From: jdv at openjdk.org (Jayathirth D V) Date: Thu, 14 Sep 2023 09:48:39 GMT Subject: RFR: 8316164: Opensource JMenuBar manual test In-Reply-To: References: Message-ID: On Wed, 13 Sep 2023 13:00:28 GMT, Prasanta Sadhukhan wrote: > JMenubar manual applet test converted to automated and opensourced Marked as reviewed by jdv (Reviewer). ------------- PR Review: https://git.openjdk.org/jdk/pull/15717#pullrequestreview-1626489285 From abhiscxk at openjdk.org Thu Sep 14 09:49:42 2023 From: abhiscxk at openjdk.org (Abhishek Kumar) Date: Thu, 14 Sep 2023 09:49:42 GMT Subject: RFR: 8315834: Open source several Swing JSpinner related tests [v3] In-Reply-To: References: Message-ID: On Thu, 14 Sep 2023 09:35:37 GMT, Tejesh R wrote: >> Open source these Swing JSpinner related tests: >> >> javax/swing/JSpinner/4522737/bug4522737.java >> javax/swing/JSpinner/4656590/bug4656590.java >> javax/swing/JSpinner/4680204/bug4680204.java >> javax/swing/JSpinner/4862257/bug4862257.java >> javax/swing/JSpinner/5104421/bug5104421.java > > Tejesh R has updated the pull request incrementally with one additional commit since the last revision: > > Review fix LGTM. Assuming you have run the CI tests after moving to open repo. ------------- Marked as reviewed by abhiscxk (Committer). PR Review: https://git.openjdk.org/jdk/pull/15678#pullrequestreview-1626491112 From psadhukhan at openjdk.org Thu Sep 14 10:11:49 2023 From: psadhukhan at openjdk.org (Prasanta Sadhukhan) Date: Thu, 14 Sep 2023 10:11:49 GMT Subject: Integrated: 8316154: Opensource JTextArea manual tests In-Reply-To: References: Message-ID: On Wed, 13 Sep 2023 07:32:04 GMT, Prasanta Sadhukhan wrote: > JTextArea manual applet test converted to automated and opensourced This pull request has now been integrated. Changeset: 33c62e4f Author: Prasanta Sadhukhan URL: https://git.openjdk.org/jdk/commit/33c62e4fffe33a7593fd0c01de53507bfd01dc3b Stats: 90 lines in 1 file changed: 90 ins; 0 del; 0 mod 8316154: Opensource JTextArea manual tests Reviewed-by: abhiscxk, jdv ------------- PR: https://git.openjdk.org/jdk/pull/15700 From psadhukhan at openjdk.org Thu Sep 14 10:24:49 2023 From: psadhukhan at openjdk.org (Prasanta Sadhukhan) Date: Thu, 14 Sep 2023 10:24:49 GMT Subject: Integrated: 8316164: Opensource JMenuBar manual test In-Reply-To: References: Message-ID: On Wed, 13 Sep 2023 13:00:28 GMT, Prasanta Sadhukhan wrote: > JMenubar manual applet test converted to automated and opensourced This pull request has now been integrated. Changeset: 8f4dfc44 Author: Prasanta Sadhukhan URL: https://git.openjdk.org/jdk/commit/8f4dfc443ba5820f5799fff1418d6632d502d57b Stats: 128 lines in 1 file changed: 128 ins; 0 del; 0 mod 8316164: Opensource JMenuBar manual test Reviewed-by: tr, jdv ------------- PR: https://git.openjdk.org/jdk/pull/15717 From psadhukhan at openjdk.org Thu Sep 14 13:14:12 2023 From: psadhukhan at openjdk.org (Prasanta Sadhukhan) Date: Thu, 14 Sep 2023 13:14:12 GMT Subject: RFR: 8316242: Opensource SwingGraphics manual test Message-ID: Swing Translate manual applet test is opensourced ------------- Commit messages: - 8316242: Opensource SwingGraphics manual test Changes: https://git.openjdk.org/jdk/pull/15741/files Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=15741&range=00 Issue: https://bugs.openjdk.org/browse/JDK-8316242 Stats: 170 lines in 1 file changed: 170 ins; 0 del; 0 mod Patch: https://git.openjdk.org/jdk/pull/15741.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/15741/head:pull/15741 PR: https://git.openjdk.org/jdk/pull/15741 From aivanov at openjdk.org Thu Sep 14 14:55:41 2023 From: aivanov at openjdk.org (Alexey Ivanov) Date: Thu, 14 Sep 2023 14:55:41 GMT Subject: RFR: 8294156: Demo positioning of multiple test windows [v2] In-Reply-To: References: Message-ID: On Wed, 13 Sep 2023 21:17:46 GMT, Alexander Zvegintsev wrote: >> Alexey Ivanov has updated the pull request incrementally with one additional commit since the last revision: >> >> 8294156: Additional layouts for vertically positioned test windows > > test/jdk/java/awt/Window/8294156/manyWindows/TwoWindowColumnsH.java line 96: > >> 94: private static final int COLUMNS = 3; >> 95: >> 96: public static void positionTestUI(List windows, > > When I thought about adding more than one window, I thought about simply placing everything in a row. > > Looking at all this I have mixed feelings. > On the one hand a person using all this for the first time will have to spend some time to understand how it works, or take the easy way out and manually arrange the windows. > On the other hand, the result is impressive, and can make life easier if you don't have to write positionTestUI every time. > > I think if we do go this way, we should add some standard positionTestUI implementations to PassFailJFrame so that we don't have to reinvent the wheel every time. > > It is also worth considering that looks like we don't have many tests with more than 2-3 windows. Isn't it the problem? If we allow adding more than one window, there should be a way to position them? as we have a way to position one test window. Do you agree? > When I thought about adding more than one window, I thought about simply placing everything in a row. This is pretty easy. If you look at `TwoWindowsHH.java` https://github.com/openjdk/jdk/blob/4c0e4d097e3a484698bee0356ba36557ccc9e96c/test/jdk/java/awt/Window/8294156/twoWindows/TwoWindowsHH.java#L64-L69 It implements positioning of test windows in a row, either to the right of the instructions or below it. Then `TwoWindowsHV.java` does the same for placing test windows in a column to the right or below the instructions. This still requires refinement. > Looking at all this I have mixed feelings. I do too. When Lawrence @lawrence-andrew and I started on the manual test framework ([JDK-8283712](https://bugs.openjdk.org/browse/JDK-8283712)), I envisioned it as something light that provided a quick and easy replacement for applet-based manual Yes/No test, that also gave a unified look to manual tests. If I remember correctly, we took inspiration from your code. ;) As new scenarios emerged, the framework grew? Yet it wasn't as easy to use, it still required manually creating test UI, registering test windows. The idea of disposing of all the frames was rejected on [the code review](https://github.com/openjdk/jdk/pull/7966#discussion_r835700911). I truly believe Lawrence's idea of the builder pattern ([JDK-8294535](https://bugs.openjdk.org/browse/JDK-8294535)) is a *game-changer*. With the addition of the `testUI` method, the entire `main` method becomes simple, *streamlined*. I think it makes using the framework easier. I had this idea of passing a method reference to create a test window from the start. But I never thought about supporting two test windows or more. As you can see, handling one test window is much simpler, the internals have grown dramatically with multiple windows. At the same time, I must **thank you** for raising this problem. Adding support for multiple windows would've been harder if I'd handled only one test window. > On the one hand a person using all this for the first time will have to spend some time to understand how it works, or take the easy way out and manually arrange the windows. The hardest part is making it easy to use? and flexible at the same time. Manually arranging windows could be easier as the developer knows more about their intentions. Harshitha @honkar-jdk positioned the test windows manually in #12447. It's always an option. Framework methods on the other hand should handle everything you throw at them. > On the other hand, the result is impressive, and can make life easier if you don't have to write positionTestUI every time. I've had fun writing this code. > I think if we do go this way, we should add some standard positionTestUI implementations to PassFailJFrame so that we don't have to reinvent the wheel every time. I didn't even think about not providing any default implementations of `positionTestUI` ? that's the idea! The framework should support simple layouts. Implementing common layouts each time they're used would be a waste of time. A method reference to an implementation in `PassFailJFrame` could be passed. Alternatively, we can add helper methods to builder which selects the `Position` and `positionTestUI`. The code in `TwoWindowsHH.java` and `TwoWindowsHV.java` needs refining. Yet it's a great foundation. I created two-column and two-row layouts for fun. At the same, they're somewhat generic, there are no assumptions that all the windows are of the same size. If there's a need, we can also include them after refining the code. I spent a couple of hours on it, the code can be improved. These layouts could be in a separate source file, one more `@build` line in the test tags. Thus, the interface allows a pluggable flexibility. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/15721#discussion_r1326082796 From kizune at openjdk.org Thu Sep 14 15:27:48 2023 From: kizune at openjdk.org (Alexander Zuev) Date: Thu, 14 Sep 2023 15:27:48 GMT Subject: RFR: 8315871: Opensource five more Swing regression tests [v2] In-Reply-To: References: Message-ID: > Clean up and move to open source five tests. > javax/swing/AncestorNotifier/4817630/bug4817630.java > javax/swing/BoxLayout/4191948/bug4191948.java > javax/swing/ComponentInputMap/4248723/bug4248723.java > javax/swing/DefaultBoundedRangeModel/4297953/bug4297953.java > javax/swing/DefaultButtonModel/4097723/bug4097723.java Alexander Zuev has updated the pull request incrementally with two additional commits since the last revision: - Update test/jdk/javax/swing/AncestorNotifier/4817630/bug4817630.java Co-authored-by: Andrey Turbanov - Update test/jdk/javax/swing/DefaultBoundedRangeModel/4297953/bug4297953.java Co-authored-by: Andrey Turbanov ------------- Changes: - all: https://git.openjdk.org/jdk/pull/15702/files - new: https://git.openjdk.org/jdk/pull/15702/files/2e8c852f..d9d32378 Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=15702&range=01 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=15702&range=00-01 Stats: 2 lines in 2 files changed: 0 ins; 0 del; 2 mod Patch: https://git.openjdk.org/jdk/pull/15702.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/15702/head:pull/15702 PR: https://git.openjdk.org/jdk/pull/15702 From kizune at openjdk.org Thu Sep 14 15:28:40 2023 From: kizune at openjdk.org (Alexander Zuev) Date: Thu, 14 Sep 2023 15:28:40 GMT Subject: RFR: 8315981: Opensource five more random Swing tests [v2] In-Reply-To: References: Message-ID: > Clean up and open source five tests: > javax/swing/DefaultListCellRenderer/4180943/bug4180943.java > javax/swing/DefaultListModel/4466250/bug4466250.java > javax/swing/DefaultListSelectionModel/4140619/bug4140619.java > javax/swing/DefaultListSelectionModel/4177723/bug4177723.java > javax/swing/ImageIcon/4827074/bug4827074.java Alexander Zuev has updated the pull request incrementally with one additional commit since the last revision: Update test/jdk/javax/swing/ImageIcon/4827074/bug4827074.java Co-authored-by: Andrey Turbanov ------------- Changes: - all: https://git.openjdk.org/jdk/pull/15724/files - new: https://git.openjdk.org/jdk/pull/15724/files/f37abfdc..e604f234 Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=15724&range=01 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=15724&range=00-01 Stats: 1 line in 1 file changed: 0 ins; 0 del; 1 mod Patch: https://git.openjdk.org/jdk/pull/15724.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/15724/head:pull/15724 PR: https://git.openjdk.org/jdk/pull/15724 From kizune at openjdk.org Thu Sep 14 15:36:40 2023 From: kizune at openjdk.org (Alexander Zuev) Date: Thu, 14 Sep 2023 15:36:40 GMT Subject: RFR: 8316061: Open source several Swing RootPane and Slider related tests In-Reply-To: References: Message-ID: <0R8PPV7xM1VXv9HJ0QBNZvnq1H6xbZOBtkNyi61tVdA=.c5b2c354-1844-4d7e-ad57-4825d3bdba3d@github.com> On Thu, 14 Sep 2023 07:29:57 GMT, Tejesh R wrote: > Open sourcing these Swing RootPane and Slider related tests: > > javax/swing/JRootPane/4207333/bug4207333.java > javax/swing/JRootPane/4224113/bug4224113.java > javax/swing/JRootPane/4627806/bug4627806.java > javax/swing/JSlider/4200901/bug4200901.java > javax/swing/JSlider/4203754/bug4203754.java Looks good. ------------- Marked as reviewed by kizune (Reviewer). PR Review: https://git.openjdk.org/jdk/pull/15734#pullrequestreview-1627200836 From kizune at openjdk.org Thu Sep 14 15:37:43 2023 From: kizune at openjdk.org (Alexander Zuev) Date: Thu, 14 Sep 2023 15:37:43 GMT Subject: RFR: 8316106: Open source few swing JInternalFrame and JMenuBar tests In-Reply-To: References: Message-ID: On Thu, 14 Sep 2023 08:05:58 GMT, Abhishek Kumar wrote: > Few closed JInternalFrame and JMenuBar swing tests are open sourced. LGTM ------------- Marked as reviewed by kizune (Reviewer). PR Review: https://git.openjdk.org/jdk/pull/15735#pullrequestreview-1627204092 From kizune at openjdk.org Thu Sep 14 15:41:43 2023 From: kizune at openjdk.org (Alexander Zuev) Date: Thu, 14 Sep 2023 15:41:43 GMT Subject: RFR: 8315741: Open source few swing JFormattedTextField and JPopupMenu tests In-Reply-To: <2DFnCpyLpvQoknmNL2F9m4Ow7ByPO0mb3sCwD3rzqrQ=.caa086fe-aeb7-4457-8d58-1bea75c2e1aa@github.com> References: <2DFnCpyLpvQoknmNL2F9m4Ow7ByPO0mb3sCwD3rzqrQ=.caa086fe-aeb7-4457-8d58-1bea75c2e1aa@github.com> Message-ID: On Thu, 14 Sep 2023 09:02:51 GMT, Abhishek Kumar wrote: > Few closed JFormattedTextField and JPopupMenu tests are open sourced. Looks good to me. ------------- Marked as reviewed by kizune (Reviewer). PR Review: https://git.openjdk.org/jdk/pull/15737#pullrequestreview-1627215450 From kizune at openjdk.org Thu Sep 14 15:43:41 2023 From: kizune at openjdk.org (Alexander Zuev) Date: Thu, 14 Sep 2023 15:43:41 GMT Subject: RFR: 8316242: Opensource SwingGraphics manual test In-Reply-To: References: Message-ID: On Thu, 14 Sep 2023 13:06:18 GMT, Prasanta Sadhukhan wrote: > Swing Translate manual applet test is opensourced Looks good ------------- Marked as reviewed by kizune (Reviewer). PR Review: https://git.openjdk.org/jdk/pull/15741#pullrequestreview-1627224077 From kizune at openjdk.org Thu Sep 14 15:43:42 2023 From: kizune at openjdk.org (Alexander Zuev) Date: Thu, 14 Sep 2023 15:43:42 GMT Subject: RFR: 8316104: Open source several Swing SplitPane and RadioButton related tests In-Reply-To: References: Message-ID: <0aemJsCCBBOx12vD105R0Om3l0pwTrgkU1aUjueu4_Q=.c517543b-aeae-4fae-a781-ad5c5db8a1d3@github.com> On Thu, 14 Sep 2023 09:33:03 GMT, Tejesh R wrote: > Open sourcing these Swing SplitPane and RadioButton related tests: > > javax/swing/JSplitPane/4147653/bug4147653.java > javax/swing/JSplitPane/4870674/bug4870674.java > javax/swing/JRadioButton/4823809/bug4823809.java Looks fine ------------- Marked as reviewed by kizune (Reviewer). PR Review: https://git.openjdk.org/jdk/pull/15738#pullrequestreview-1627223012 From abhiscxk at openjdk.org Thu Sep 14 15:54:11 2023 From: abhiscxk at openjdk.org (Abhishek Kumar) Date: Thu, 14 Sep 2023 15:54:11 GMT Subject: RFR: 8316242: Opensource SwingGraphics manual test In-Reply-To: References: Message-ID: On Thu, 14 Sep 2023 13:06:18 GMT, Prasanta Sadhukhan wrote: > Swing Translate manual applet test is opensourced LGTM. ------------- Marked as reviewed by abhiscxk (Committer). PR Review: https://git.openjdk.org/jdk/pull/15741#pullrequestreview-1627238953 From psadhukhan at openjdk.org Thu Sep 14 15:54:12 2023 From: psadhukhan at openjdk.org (Prasanta Sadhukhan) Date: Thu, 14 Sep 2023 15:54:12 GMT Subject: Integrated: 8316242: Opensource SwingGraphics manual test In-Reply-To: References: Message-ID: <9wjjU-3hfwBZ-8U6CuB6I_FGypLzvtK0HzgI84sp_LY=.2a2fa9b9-08de-4f28-8e39-cf0d603163a6@github.com> On Thu, 14 Sep 2023 13:06:18 GMT, Prasanta Sadhukhan wrote: > Swing Translate manual applet test is opensourced This pull request has now been integrated. Changeset: a57b9dab Author: Prasanta Sadhukhan URL: https://git.openjdk.org/jdk/commit/a57b9dab6c02c313f3975f47d502dae270c67508 Stats: 170 lines in 1 file changed: 170 ins; 0 del; 0 mod 8316242: Opensource SwingGraphics manual test Reviewed-by: kizune, abhiscxk ------------- PR: https://git.openjdk.org/jdk/pull/15741 From dnguyen at openjdk.org Thu Sep 14 16:44:17 2023 From: dnguyen at openjdk.org (Damon Nguyen) Date: Thu, 14 Sep 2023 16:44:17 GMT Subject: RFR: 8315804: Open source several Swing JTabbedPane JTextArea JTextField tests Message-ID: These are the tests being converted: javax/swing/JTabbedPane/4703690/bug4703690.java javax/swing/JTabbedPane/GetComponentAt/GetComponentAtTest.java javax/swing/JTabbedPane/ReplaceCompTab/ReplaceCompTab.java javax/swing/JTextArea/4849868/bug4849868.java javax/swing/JTextField/4244613/bug4244613.java ------------- Commit messages: - Initial commit to add tests to open Changes: https://git.openjdk.org/jdk/pull/15747/files Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=15747&range=00 Issue: https://bugs.openjdk.org/browse/JDK-8315804 Stats: 512 lines in 5 files changed: 512 ins; 0 del; 0 mod Patch: https://git.openjdk.org/jdk/pull/15747.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/15747/head:pull/15747 PR: https://git.openjdk.org/jdk/pull/15747 From dnguyen at openjdk.org Thu Sep 14 16:51:08 2023 From: dnguyen at openjdk.org (Damon Nguyen) Date: Thu, 14 Sep 2023 16:51:08 GMT Subject: RFR: 8315883: Open source several Swing JToolbar tests Message-ID: These are the tests being converted: javax/swing/JToolBar/4138694/bug4138694.java javax/swing/JToolBar/4140421/bug4140421.java javax/swing/JToolBar/4196662/bug4196662.java javax/swing/JToolBar/4243930/bug4243930.java ------------- Commit messages: - Initial test conversion to open Changes: https://git.openjdk.org/jdk/pull/15748/files Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=15748&range=00 Issue: https://bugs.openjdk.org/browse/JDK-8315883 Stats: 209 lines in 4 files changed: 209 ins; 0 del; 0 mod Patch: https://git.openjdk.org/jdk/pull/15748.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/15748/head:pull/15748 PR: https://git.openjdk.org/jdk/pull/15748 From honkar at openjdk.org Thu Sep 14 17:54:54 2023 From: honkar at openjdk.org (Harshitha Onkar) Date: Thu, 14 Sep 2023 17:54:54 GMT Subject: Integrated: JDK-8315824: Open source several Swing Text/HTML related tests In-Reply-To: References: Message-ID: On Tue, 12 Sep 2023 00:34:16 GMT, Harshitha Onkar wrote: > This PR open sources few Swing Text/HTML related tests. This pull request has now been integrated. Changeset: c11f8352 Author: Harshitha Onkar URL: https://git.openjdk.org/jdk/commit/c11f8352e96a01b39e54080716030ec96f717cae Stats: 485 lines in 6 files changed: 485 ins; 0 del; 0 mod 8315824: Open source several Swing Text/HTML related tests Reviewed-by: psadhukhan, azvegint ------------- PR: https://git.openjdk.org/jdk/pull/15675 From aivanov at openjdk.org Thu Sep 14 18:52:09 2023 From: aivanov at openjdk.org (Alexey Ivanov) Date: Thu, 14 Sep 2023 18:52:09 GMT Subject: RFR: 4622866: javax.swing.text.Document.remove(int, int) has a misleading picture [v2] In-Reply-To: References: Message-ID: <4eTL1u_sxP7zK5lSmCVQLfw1ApieFVzY6KhVWAZSJQo=.7aeb391e-9b6c-4da0-8093-b08ff7b035f8@github.com> > The image in the [documentation for `Document.remove`](https://docs.oracle.com/en/java/javase/17/docs/api/java.desktop/javax/swing/text/Document.html#remove(int,int)) looks as if the portion between the offsets 6 and 10 is removed. However, the entire region for _?quick ?_ is highlighted. > > I updated the image to mark the start offset 4 and the end offset 10. The new image is in SVG format which looks crisp on modern High DPI displays. > > I added a sentence that describes the image, which makes the documentation accessible and clearer. > > Also, I marked up references to classes and members with `{@code}`. > > Look at the updated version: [`Document.remove` in JDK 22](https://cr.openjdk.org/~aivanov/4622866/api/java.desktop/javax/swing/text/Document.html#remove(int,int)). Alexey Ivanov has updated the pull request incrementally with one additional commit since the last revision: Moved all rects and lines 0.5 pixel The 'shape-rendering: crispEdges' did give crisp edges in 100% scale, but in 200% scale some edges are 3-pixel wide and others are 2-pixel. Using 0.5 pixel offset solves both problems. I verified rendering on 100%-scale display as well as on 150%- and 200%-scale displays. ------------- Changes: - all: https://git.openjdk.org/jdk/pull/15701/files - new: https://git.openjdk.org/jdk/pull/15701/files/6c57445b..9ccad364 Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=15701&range=01 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=15701&range=00-01 Stats: 26 lines in 1 file changed: 0 ins; 3 del; 23 mod Patch: https://git.openjdk.org/jdk/pull/15701.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/15701/head:pull/15701 PR: https://git.openjdk.org/jdk/pull/15701 From honkar at openjdk.org Thu Sep 14 18:53:24 2023 From: honkar at openjdk.org (Harshitha Onkar) Date: Thu, 14 Sep 2023 18:53:24 GMT Subject: RFR: JDK-8315951: Open source several Swing HTMLEditorKit related tests Message-ID: <6kTx7IUAwD2sL8vUfqaOJhVF8vXDI8imvOuGBvgnG4U=.41946952-8e97-4a5c-aaa8-d1cf430ee0d4@github.com> Following tests are open sourced as part of this PR. 1. java/awt/event/PaintEvent/RepaintTest/RepaintTest.java 2. javax/swing/text/html/HTMLEditorKit/4214848/bug4214848.java 3. javax/swing/text/html/HTMLEditorKit/4230197/bug4230197.java 4. javax/swing/text/html/HTMLEditorKit/4238223/bug4238223.java ------------- Commit messages: - summary tag updated - HTMLEditorKit test changes Changes: https://git.openjdk.org/jdk/pull/15751/files Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=15751&range=00 Issue: https://bugs.openjdk.org/browse/JDK-8315951 Stats: 367 lines in 4 files changed: 367 ins; 0 del; 0 mod Patch: https://git.openjdk.org/jdk/pull/15751.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/15751/head:pull/15751 PR: https://git.openjdk.org/jdk/pull/15751 From azvegint at openjdk.org Thu Sep 14 20:03:40 2023 From: azvegint at openjdk.org (Alexander Zvegintsev) Date: Thu, 14 Sep 2023 20:03:40 GMT Subject: RFR: JDK-8315889: Open source several Swing HTMLDocument related tests In-Reply-To: References: Message-ID: <-6y3C53B5X8zZauVlpyIL3twRXH0YpyH7_Smesvs9ek=.65655e91-74b0-4f75-b5a4-03ce3b5e817e@github.com> On Tue, 12 Sep 2023 17:05:47 GMT, Harshitha Onkar wrote: > Following tests are being open sourced as part of this PR. > > javax/swing/text/html/HTMLDocument/4251593/bug4251593.java > javax/swing/text/html/HTMLDocument/4687405/bug4687405.java > javax/swing/text/html/HTMLDocument/4226914/bug4226914.java > javax/swing/text/html/HTMLEditorKit/4213373/bug4213373.java Marked as reviewed by azvegint (Reviewer). test/jdk/javax/swing/text/html/HTMLDocument/bug4687405.java line 2: > 1: /* > 2: * Copyright (c) 1999, 2023, Oracle and/or its affiliates. All rights reserved. 2003 - https://bugs.openjdk.org/browse/JDK-4687405 ------------- PR Review: https://git.openjdk.org/jdk/pull/15687#pullrequestreview-1627657408 PR Review Comment: https://git.openjdk.org/jdk/pull/15687#discussion_r1326455516 From azvegint at openjdk.org Thu Sep 14 20:26:10 2023 From: azvegint at openjdk.org (Alexander Zvegintsev) Date: Thu, 14 Sep 2023 20:26:10 GMT Subject: RFR: 8315965: Open source various AWT applet tests Message-ID: Open sourcing few applet tests: java/awt/ScrollPane/ScrollPaneTest.java java/awt/TextArea/Length.java java/awt/Window/WindowOwner.java java/awt/font/Rotate/RotateTest3.java ------------- Commit messages: - initial Changes: https://git.openjdk.org/jdk/pull/15754/files Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=15754&range=00 Issue: https://bugs.openjdk.org/browse/JDK-8315965 Stats: 548 lines in 4 files changed: 548 ins; 0 del; 0 mod Patch: https://git.openjdk.org/jdk/pull/15754.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/15754/head:pull/15754 PR: https://git.openjdk.org/jdk/pull/15754 From dnguyen at openjdk.org Thu Sep 14 21:42:05 2023 From: dnguyen at openjdk.org (Damon Nguyen) Date: Thu, 14 Sep 2023 21:42:05 GMT Subject: RFR: 8315952: Open source several Swing JToolbar JTooltip JTree tests Message-ID: These are the tests being converted: javax/swing/JToolBar/4368050/bug4368050.java javax/swing/JToolBar/4465534/bug4465534.java javax/swing/JToolBar/4700351/bug4700351.java javax/swing/JToolTip/4107843/bug4107843.java javax/swing/JTree/4161685/bug4161685.java ------------- Commit messages: - Initial test conversion to open Changes: https://git.openjdk.org/jdk/pull/15755/files Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=15755&range=00 Issue: https://bugs.openjdk.org/browse/JDK-8315952 Stats: 271 lines in 5 files changed: 271 ins; 0 del; 0 mod Patch: https://git.openjdk.org/jdk/pull/15755.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/15755/head:pull/15755 PR: https://git.openjdk.org/jdk/pull/15755 From dnguyen at openjdk.org Thu Sep 14 21:48:39 2023 From: dnguyen at openjdk.org (Damon Nguyen) Date: Thu, 14 Sep 2023 21:48:39 GMT Subject: RFR: 8315871: Opensource five more Swing regression tests [v2] In-Reply-To: References: Message-ID: On Thu, 14 Sep 2023 15:27:48 GMT, Alexander Zuev wrote: >> Clean up and move to open source five tests. >> javax/swing/AncestorNotifier/4817630/bug4817630.java >> javax/swing/BoxLayout/4191948/bug4191948.java >> javax/swing/ComponentInputMap/4248723/bug4248723.java >> javax/swing/DefaultBoundedRangeModel/4297953/bug4297953.java >> javax/swing/DefaultButtonModel/4097723/bug4097723.java > > Alexander Zuev has updated the pull request incrementally with two additional commits since the last revision: > > - Update test/jdk/javax/swing/AncestorNotifier/4817630/bug4817630.java > > Co-authored-by: Andrey Turbanov > - Update test/jdk/javax/swing/DefaultBoundedRangeModel/4297953/bug4297953.java > > Co-authored-by: Andrey Turbanov LGTM. Just move the frame dispose code blocks to EDT. test/jdk/javax/swing/AncestorNotifier/4817630/bug4817630.java line 112: > 110: test.start(); > 111: } finally { > 112: test.destroy(); Either destroy() or the if statement in destroy() for disposing the frame should be on EDT test/jdk/javax/swing/BoxLayout/4191948/bug4191948.java line 76: > 74: frame.setVisible(false); > 75: frame.dispose(); > 76: } Should this if statement be run on EDT? ------------- Marked as reviewed by dnguyen (Committer). PR Review: https://git.openjdk.org/jdk/pull/15702#pullrequestreview-1627795667 PR Review Comment: https://git.openjdk.org/jdk/pull/15702#discussion_r1326547720 PR Review Comment: https://git.openjdk.org/jdk/pull/15702#discussion_r1326547278 From dnguyen at openjdk.org Thu Sep 14 21:49:10 2023 From: dnguyen at openjdk.org (Damon Nguyen) Date: Thu, 14 Sep 2023 21:49:10 GMT Subject: RFR: 8316056: Open source several Swing JTree tests Message-ID: These are the tests being converted: javax/swing/JTree/4210432/bug4210432.java javax/swing/JTree/4213868/bug4213868.java javax/swing/JTree/4224491/bug4224491.java javax/swing/JTree/4237370/bug4237370.java javax/swing/JTree/4662505/bug4662505.java ------------- Commit messages: - Initial test conversion to open Changes: https://git.openjdk.org/jdk/pull/15756/files Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=15756&range=00 Issue: https://bugs.openjdk.org/browse/JDK-8316056 Stats: 354 lines in 5 files changed: 354 ins; 0 del; 0 mod Patch: https://git.openjdk.org/jdk/pull/15756.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/15756/head:pull/15756 PR: https://git.openjdk.org/jdk/pull/15756 From dnguyen at openjdk.org Thu Sep 14 21:51:39 2023 From: dnguyen at openjdk.org (Damon Nguyen) Date: Thu, 14 Sep 2023 21:51:39 GMT Subject: RFR: 8315669: Open source several Swing PopupMenu related tests In-Reply-To: References: Message-ID: <_si0l8McJl2fAs1LsY60UT8PshOR_pw3T6ACXy2bQs0=.82836eb7-29ec-436c-aa4d-4b2b951135de@github.com> On Wed, 13 Sep 2023 09:19:27 GMT, Tejesh R wrote: > Open source these Swing PopupMenu related tests: > > javax/swing/JPopupMenu/4236750/bug4236750.java > javax/swing/JPopupMenu/4321273/bug4321273.java > javax/swing/JPopupMenu/4711693/bug4711693.java > javax/swing/JPopupMenu/4962731/bug4962731.java > javax/swing/JPopupMenu/4966109/bug4966109.java > javax/swing/JPopupMenu/5091257/bug5091257.java Looks fine to me. One minor nit capitalization inconsistency test/jdk/javax/swing/JPopupMenu/bug4711693.java line 123: > 121: throw new RuntimeException("Test failed. Popup disposed on mouse release."); > 122: } else { > 123: System.out.println("test Passed!"); Suggestion: System.out.println("Test Passed!"); ------------- Marked as reviewed by dnguyen (Committer). PR Review: https://git.openjdk.org/jdk/pull/15704#pullrequestreview-1627798019 PR Review Comment: https://git.openjdk.org/jdk/pull/15704#discussion_r1326549091 From honkar at openjdk.org Thu Sep 14 22:06:00 2023 From: honkar at openjdk.org (Harshitha Onkar) Date: Thu, 14 Sep 2023 22:06:00 GMT Subject: Integrated: JDK-8315731: Open source several Swing Text related tests In-Reply-To: References: Message-ID: On Tue, 12 Sep 2023 21:32:58 GMT, Harshitha Onkar wrote: > Open sourcing the following tests - > > 1. javax/swing/text/CompositeView/4398059/bug4398059.java > 2. javax/swing/text/DefaultCaret/4197894/bug4197894.java > 3. javax/swing/text/DefaultCaret/4203175/bug4203175.java > 4. javax/swing/text/DefaultEditorKit/4265242/bug4265242.java > 5. javax/swing/text/DefaultStyledDocument/4472852/bug4472852.java This pull request has now been integrated. Changeset: d475f61f Author: Harshitha Onkar URL: https://git.openjdk.org/jdk/commit/d475f61fd52b7d379260811b32d3815786858411 Stats: 468 lines in 5 files changed: 468 ins; 0 del; 0 mod 8315731: Open source several Swing Text related tests Reviewed-by: psadhukhan, tr ------------- PR: https://git.openjdk.org/jdk/pull/15693 From jlu at openjdk.org Thu Sep 14 22:22:50 2023 From: jlu at openjdk.org (Justin Lu) Date: Thu, 14 Sep 2023 22:22:50 GMT Subject: Integrated: 8301991: Convert l10n properties resource bundles to UTF-8 native In-Reply-To: References: Message-ID: On Tue, 12 Sep 2023 21:57:31 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). This pull request has now been integrated. Changeset: b55e418a Author: Justin Lu URL: https://git.openjdk.org/jdk/commit/b55e418a077791b39992042411cde97f68dc39fe Stats: 28964 lines in 488 files changed: 12 ins; 0 del; 28952 mod 8301991: Convert l10n properties resource bundles to UTF-8 native Reviewed-by: naoto ------------- PR: https://git.openjdk.org/jdk/pull/15694 From jdv at openjdk.org Fri Sep 15 02:50:05 2023 From: jdv at openjdk.org (Jayathirth D V) Date: Fri, 15 Sep 2023 02:50:05 GMT Subject: RFR: 8316326: ProblemList java/awt/Mouse/EnterExitEvents/DragWindowTest.java on macosx-all again Message-ID: java/awt/Mouse/EnterExitEvents/DragWindowTest.java was de-problemlisted wrongly under https://bugs.openjdk.org/browse/JDK-8315990. This is creating lot of noise in our CI. Need to problemlist this test again. ------------- Commit messages: - 8316326: ProblemList java/awt/Mouse/EnterExitEvents/DragWindowTest.java on macosx-all again Changes: https://git.openjdk.org/jdk/pull/15758/files Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=15758&range=00 Issue: https://bugs.openjdk.org/browse/JDK-8316326 Stats: 1 line in 1 file changed: 1 ins; 0 del; 0 mod Patch: https://git.openjdk.org/jdk/pull/15758.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/15758/head:pull/15758 PR: https://git.openjdk.org/jdk/pull/15758 From dholmes at openjdk.org Fri Sep 15 02:59:43 2023 From: dholmes at openjdk.org (David Holmes) Date: Fri, 15 Sep 2023 02:59:43 GMT Subject: RFR: 8316326: ProblemList java/awt/Mouse/EnterExitEvents/DragWindowTest.java on macosx-all again In-Reply-To: References: Message-ID: <1CnrQtU5c22c-Ex-Xr_leyOo7da9jFV61G7gcdAQauE=.c6e73510-69e9-48e6-8eb0-ecb4c623fb4f@github.com> On Fri, 15 Sep 2023 02:41:19 GMT, Jayathirth D V wrote: > java/awt/Mouse/EnterExitEvents/DragWindowTest.java was de-problemlisted wrongly under https://bugs.openjdk.org/browse/JDK-8315990. > This is creating lot of noise in our CI. Need to problemlist this test again. Looks good and trivial. Thanks. ------------- Marked as reviewed by dholmes (Reviewer). PR Review: https://git.openjdk.org/jdk/pull/15758#pullrequestreview-1628120565 From jdv at openjdk.org Fri Sep 15 03:07:49 2023 From: jdv at openjdk.org (Jayathirth D V) Date: Fri, 15 Sep 2023 03:07:49 GMT Subject: RFR: 8316326: ProblemList java/awt/Mouse/EnterExitEvents/DragWindowTest.java on macosx-all again In-Reply-To: <1CnrQtU5c22c-Ex-Xr_leyOo7da9jFV61G7gcdAQauE=.c6e73510-69e9-48e6-8eb0-ecb4c623fb4f@github.com> References: <1CnrQtU5c22c-Ex-Xr_leyOo7da9jFV61G7gcdAQauE=.c6e73510-69e9-48e6-8eb0-ecb4c623fb4f@github.com> Message-ID: On Fri, 15 Sep 2023 02:57:10 GMT, David Holmes wrote: >> java/awt/Mouse/EnterExitEvents/DragWindowTest.java was de-problemlisted wrongly under https://bugs.openjdk.org/browse/JDK-8315990. >> This is creating lot of noise in our CI. Need to problemlist this test again. > > Looks good and trivial. > > Thanks. Thanks @dholmes-ora ------------- PR Comment: https://git.openjdk.org/jdk/pull/15758#issuecomment-1720418457 From jdv at openjdk.org Fri Sep 15 03:07:50 2023 From: jdv at openjdk.org (Jayathirth D V) Date: Fri, 15 Sep 2023 03:07:50 GMT Subject: Integrated: 8316326: ProblemList java/awt/Mouse/EnterExitEvents/DragWindowTest.java on macosx-all again In-Reply-To: References: Message-ID: <77xjUqyxXiLyftEA_NnEqbzK04G0Qj9VFyz8KWOvKKc=.d7470419-2c14-4d16-a780-32703f4a89d2@github.com> On Fri, 15 Sep 2023 02:41:19 GMT, Jayathirth D V wrote: > java/awt/Mouse/EnterExitEvents/DragWindowTest.java was de-problemlisted wrongly under https://bugs.openjdk.org/browse/JDK-8315990. > This is creating lot of noise in our CI. Need to problemlist this test again. This pull request has now been integrated. Changeset: 783e44d0 Author: Jayathirth D V URL: https://git.openjdk.org/jdk/commit/783e44d07ee9dccf46c5df1c604290fd311cdb18 Stats: 1 line in 1 file changed: 1 ins; 0 del; 0 mod 8316326: ProblemList java/awt/Mouse/EnterExitEvents/DragWindowTest.java on macosx-all again Reviewed-by: dholmes ------------- PR: https://git.openjdk.org/jdk/pull/15758 From tr at openjdk.org Fri Sep 15 04:59:46 2023 From: tr at openjdk.org (Tejesh R) Date: Fri, 15 Sep 2023 04:59:46 GMT Subject: RFR: 8316106: Open source few swing JInternalFrame and JMenuBar tests In-Reply-To: References: Message-ID: On Thu, 14 Sep 2023 08:05:58 GMT, Abhishek Kumar wrote: > Few closed JInternalFrame and JMenuBar swing tests are open sourced. test/jdk/javax/swing/JInternalFrame/bug4268949.java line 52: > 50: || !((if2.getContentPane().getBackground()).equals(Color.blue)) > 51: || !((if3.getContentPane().getBackground()).equals(Color.green))) { > 52: throw new RuntimeException("Test failed: JInternalFrame " + Moving out of SwingUtilities would avoid InvovationTarget Exception. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/15735#discussion_r1326789754 From tr at openjdk.org Fri Sep 15 05:05:39 2023 From: tr at openjdk.org (Tejesh R) Date: Fri, 15 Sep 2023 05:05:39 GMT Subject: RFR: 8316106: Open source few swing JInternalFrame and JMenuBar tests In-Reply-To: References: Message-ID: On Thu, 14 Sep 2023 08:05:58 GMT, Abhishek Kumar wrote: > Few closed JInternalFrame and JMenuBar swing tests are open sourced. test/jdk/javax/swing/JInternalFrame/bug4309079.java line 58: > 56: try { > 57: Robot robot = new Robot(); > 58: robot.setAutoDelay(100); Inconsistent w.r.t other tests (test/jdk/javax/swing/JInternalFrame/bug4732229.java) ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/15735#discussion_r1326792426 From tr at openjdk.org Fri Sep 15 05:09:39 2023 From: tr at openjdk.org (Tejesh R) Date: Fri, 15 Sep 2023 05:09:39 GMT Subject: RFR: 8315741: Open source few swing JFormattedTextField and JPopupMenu tests In-Reply-To: <2DFnCpyLpvQoknmNL2F9m4Ow7ByPO0mb3sCwD3rzqrQ=.caa086fe-aeb7-4457-8d58-1bea75c2e1aa@github.com> References: <2DFnCpyLpvQoknmNL2F9m4Ow7ByPO0mb3sCwD3rzqrQ=.caa086fe-aeb7-4457-8d58-1bea75c2e1aa@github.com> Message-ID: On Thu, 14 Sep 2023 09:02:51 GMT, Abhishek Kumar wrote: > Few closed JFormattedTextField and JPopupMenu tests are open sourced. Marked as reviewed by tr (Committer). test/jdk/javax/swing/JFormattedTextField/bug4741926.java line 30: > 28: * @key headful > 29: * @run main bug4741926 > 30: */ Alignment can corrected. ------------- PR Review: https://git.openjdk.org/jdk/pull/15737#pullrequestreview-1628196405 PR Review Comment: https://git.openjdk.org/jdk/pull/15737#discussion_r1326793522 From tr at openjdk.org Fri Sep 15 05:36:30 2023 From: tr at openjdk.org (Tejesh R) Date: Fri, 15 Sep 2023 05:36:30 GMT Subject: RFR: 8315669: Open source several Swing PopupMenu related tests [v2] In-Reply-To: References: Message-ID: > Open source these Swing PopupMenu related tests: > > javax/swing/JPopupMenu/4236750/bug4236750.java > javax/swing/JPopupMenu/4321273/bug4321273.java > javax/swing/JPopupMenu/4711693/bug4711693.java > javax/swing/JPopupMenu/4962731/bug4962731.java > javax/swing/JPopupMenu/4966109/bug4966109.java > javax/swing/JPopupMenu/5091257/bug5091257.java Tejesh R has updated the pull request incrementally with one additional commit since the last revision: Review fix ------------- Changes: - all: https://git.openjdk.org/jdk/pull/15704/files - new: https://git.openjdk.org/jdk/pull/15704/files/71d2598c..42af3a0b Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=15704&range=01 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=15704&range=00-01 Stats: 1 line in 1 file changed: 0 ins; 0 del; 1 mod Patch: https://git.openjdk.org/jdk/pull/15704.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/15704/head:pull/15704 PR: https://git.openjdk.org/jdk/pull/15704 From abhiscxk at openjdk.org Fri Sep 15 05:49:41 2023 From: abhiscxk at openjdk.org (Abhishek Kumar) Date: Fri, 15 Sep 2023 05:49:41 GMT Subject: RFR: 8315741: Open source few swing JFormattedTextField and JPopupMenu tests In-Reply-To: References: <2DFnCpyLpvQoknmNL2F9m4Ow7ByPO0mb3sCwD3rzqrQ=.caa086fe-aeb7-4457-8d58-1bea75c2e1aa@github.com> Message-ID: On Fri, 15 Sep 2023 05:04:10 GMT, Tejesh R wrote: >> Few closed JFormattedTextField and JPopupMenu tests are open sourced. > > test/jdk/javax/swing/JFormattedTextField/bug4741926.java line 30: > >> 28: * @key headful >> 29: * @run main bug4741926 >> 30: */ > > Alignment can corrected. I guess it should be ok. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/15737#discussion_r1326817554 From abhiscxk at openjdk.org Fri Sep 15 05:51:38 2023 From: abhiscxk at openjdk.org (Abhishek Kumar) Date: Fri, 15 Sep 2023 05:51:38 GMT Subject: RFR: 8316106: Open source few swing JInternalFrame and JMenuBar tests [v2] In-Reply-To: References: Message-ID: > Few closed JInternalFrame and JMenuBar swing tests are open sourced. Abhishek Kumar has updated the pull request incrementally with one additional commit since the last revision: Review comment update ------------- Changes: - all: https://git.openjdk.org/jdk/pull/15735/files - new: https://git.openjdk.org/jdk/pull/15735/files/9c6e3254..5a458d99 Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=15735&range=01 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=15735&range=00-01 Stats: 16 lines in 2 files changed: 10 ins; 3 del; 3 mod Patch: https://git.openjdk.org/jdk/pull/15735.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/15735/head:pull/15735 PR: https://git.openjdk.org/jdk/pull/15735 From abhiscxk at openjdk.org Fri Sep 15 05:51:41 2023 From: abhiscxk at openjdk.org (Abhishek Kumar) Date: Fri, 15 Sep 2023 05:51:41 GMT Subject: RFR: 8316106: Open source few swing JInternalFrame and JMenuBar tests [v2] In-Reply-To: References: Message-ID: On Fri, 15 Sep 2023 04:56:25 GMT, Tejesh R wrote: >> Abhishek Kumar has updated the pull request incrementally with one additional commit since the last revision: >> >> Review comment update > > test/jdk/javax/swing/JInternalFrame/bug4268949.java line 52: > >> 50: || !((if2.getContentPane().getBackground()).equals(Color.blue)) >> 51: || !((if3.getContentPane().getBackground()).equals(Color.green))) { >> 52: throw new RuntimeException("Test failed: JInternalFrame " + > > Moving out of SwingUtilities would avoid InvovationTarget Exception. Updated. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/15735#discussion_r1326815889 From tr at openjdk.org Fri Sep 15 06:10:42 2023 From: tr at openjdk.org (Tejesh R) Date: Fri, 15 Sep 2023 06:10:42 GMT Subject: RFR: 8316106: Open source few swing JInternalFrame and JMenuBar tests [v2] In-Reply-To: References: Message-ID: On Fri, 15 Sep 2023 05:51:38 GMT, Abhishek Kumar wrote: >> Few closed JInternalFrame and JMenuBar swing tests are open sourced. > > Abhishek Kumar has updated the pull request incrementally with one additional commit since the last revision: > > Review comment update Marked as reviewed by tr (Committer). ------------- PR Review: https://git.openjdk.org/jdk/pull/15735#pullrequestreview-1628257783 From tr at openjdk.org Fri Sep 15 06:11:51 2023 From: tr at openjdk.org (Tejesh R) Date: Fri, 15 Sep 2023 06:11:51 GMT Subject: Integrated: 8315834: Open source several Swing JSpinner related tests In-Reply-To: References: Message-ID: <3sbP955iAAf-k8ytSg9Oi1BZYoO5GCBlXAk9hm7Azoo=.23d2803d-7a0c-4534-a0e8-b4290ebf8796@github.com> On Tue, 12 Sep 2023 05:46:23 GMT, Tejesh R wrote: > Open source these Swing JSpinner related tests: > > javax/swing/JSpinner/4522737/bug4522737.java > javax/swing/JSpinner/4656590/bug4656590.java > javax/swing/JSpinner/4680204/bug4680204.java > javax/swing/JSpinner/4862257/bug4862257.java > javax/swing/JSpinner/5104421/bug5104421.java This pull request has now been integrated. Changeset: 4a63eb05 Author: Tejesh R URL: https://git.openjdk.org/jdk/commit/4a63eb05221c1829b157a025a4d35cdd77a9fe04 Stats: 370 lines in 5 files changed: 370 ins; 0 del; 0 mod 8315834: Open source several Swing JSpinner related tests Reviewed-by: psadhukhan, abhiscxk ------------- PR: https://git.openjdk.org/jdk/pull/15678 From abhiscxk at openjdk.org Fri Sep 15 06:21:56 2023 From: abhiscxk at openjdk.org (Abhishek Kumar) Date: Fri, 15 Sep 2023 06:21:56 GMT Subject: Integrated: 8316106: Open source few swing JInternalFrame and JMenuBar tests In-Reply-To: References: Message-ID: On Thu, 14 Sep 2023 08:05:58 GMT, Abhishek Kumar wrote: > Few closed JInternalFrame and JMenuBar swing tests are open sourced. This pull request has now been integrated. Changeset: 0775bf2f Author: Abhishek Kumar URL: https://git.openjdk.org/jdk/commit/0775bf2f0375b1bc63c187399cbc3fdc5a192bce Stats: 457 lines in 5 files changed: 457 ins; 0 del; 0 mod 8316106: Open source few swing JInternalFrame and JMenuBar tests Reviewed-by: kizune, tr ------------- PR: https://git.openjdk.org/jdk/pull/15735 From abhiscxk at openjdk.org Fri Sep 15 06:26:51 2023 From: abhiscxk at openjdk.org (Abhishek Kumar) Date: Fri, 15 Sep 2023 06:26:51 GMT Subject: Integrated: 8315741: Open source few swing JFormattedTextField and JPopupMenu tests In-Reply-To: <2DFnCpyLpvQoknmNL2F9m4Ow7ByPO0mb3sCwD3rzqrQ=.caa086fe-aeb7-4457-8d58-1bea75c2e1aa@github.com> References: <2DFnCpyLpvQoknmNL2F9m4Ow7ByPO0mb3sCwD3rzqrQ=.caa086fe-aeb7-4457-8d58-1bea75c2e1aa@github.com> Message-ID: On Thu, 14 Sep 2023 09:02:51 GMT, Abhishek Kumar wrote: > Few closed JFormattedTextField and JPopupMenu tests are open sourced. This pull request has now been integrated. Changeset: bfbc41c1 Author: Abhishek Kumar URL: https://git.openjdk.org/jdk/commit/bfbc41c1f177c7a2b8e91351ac41eaffaab2d8fc Stats: 486 lines in 5 files changed: 486 ins; 0 del; 0 mod 8315741: Open source few swing JFormattedTextField and JPopupMenu tests Reviewed-by: kizune, tr ------------- PR: https://git.openjdk.org/jdk/pull/15737 From abhiscxk at openjdk.org Fri Sep 15 06:33:46 2023 From: abhiscxk at openjdk.org (Abhishek Kumar) Date: Fri, 15 Sep 2023 06:33:46 GMT Subject: RFR: 8316104: Open source several Swing SplitPane and RadioButton related tests In-Reply-To: References: Message-ID: <5ZyjcbeK3FzzlS5csvXs_8FPTF1AECwi9IzJCeK57Lk=.7d644e25-0f15-4e3b-8788-0fd6999e216e@github.com> On Thu, 14 Sep 2023 09:33:03 GMT, Tejesh R wrote: > Open sourcing these Swing SplitPane and RadioButton related tests: > > javax/swing/JSplitPane/4147653/bug4147653.java > javax/swing/JSplitPane/4870674/bug4870674.java > javax/swing/JRadioButton/4823809/bug4823809.java test/jdk/javax/swing/JRadioButton/bug4823809.java line 52: > 50: robot = new Robot(); > 51: SwingUtilities.invokeAndWait(() -> { > 52: frame = new JFrame(); Please add frame title. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/15738#discussion_r1326855001 From abhiscxk at openjdk.org Fri Sep 15 06:50:38 2023 From: abhiscxk at openjdk.org (Abhishek Kumar) Date: Fri, 15 Sep 2023 06:50:38 GMT Subject: RFR: 8316104: Open source several Swing SplitPane and RadioButton related tests In-Reply-To: References: Message-ID: <3b4-kld-TjBEzLLgjfBnvm1T6x1IX4MpuuePs0cLNtk=.44d952bc-157b-4e0c-a033-ce22be9162ed@github.com> On Thu, 14 Sep 2023 09:33:03 GMT, Tejesh R wrote: > Open sourcing these Swing SplitPane and RadioButton related tests: > > javax/swing/JSplitPane/4147653/bug4147653.java > javax/swing/JSplitPane/4870674/bug4870674.java > javax/swing/JRadioButton/4823809/bug4823809.java Do we need to add auto delay also for the tests? `robot.setAutoDelay(100);` ------------- PR Comment: https://git.openjdk.org/jdk/pull/15738#issuecomment-1720764302 From abhiscxk at openjdk.org Fri Sep 15 06:54:39 2023 From: abhiscxk at openjdk.org (Abhishek Kumar) Date: Fri, 15 Sep 2023 06:54:39 GMT Subject: RFR: 8316061: Open source several Swing RootPane and Slider related tests In-Reply-To: References: Message-ID: On Thu, 14 Sep 2023 07:29:57 GMT, Tejesh R wrote: > Open sourcing these Swing RootPane and Slider related tests: > > javax/swing/JRootPane/4207333/bug4207333.java > javax/swing/JRootPane/4224113/bug4224113.java > javax/swing/JRootPane/4627806/bug4627806.java > javax/swing/JSlider/4200901/bug4200901.java > javax/swing/JSlider/4203754/bug4203754.java test/jdk/javax/swing/JSlider/bug4200901.java line 1: > 1: /* I think you can add summary in jtreg tag. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/15734#discussion_r1326873358 From aturbanov at openjdk.org Fri Sep 15 08:11:40 2023 From: aturbanov at openjdk.org (Andrey Turbanov) Date: Fri, 15 Sep 2023 08:11:40 GMT Subject: RFR: 8315669: Open source several Swing PopupMenu related tests [v2] In-Reply-To: References: Message-ID: On Fri, 15 Sep 2023 05:36:30 GMT, Tejesh R wrote: >> Open source these Swing PopupMenu related tests: >> >> javax/swing/JPopupMenu/4236750/bug4236750.java >> javax/swing/JPopupMenu/4321273/bug4321273.java >> javax/swing/JPopupMenu/4711693/bug4711693.java >> javax/swing/JPopupMenu/4962731/bug4962731.java >> javax/swing/JPopupMenu/4966109/bug4966109.java >> javax/swing/JPopupMenu/5091257/bug5091257.java > > Tejesh R has updated the pull request incrementally with one additional commit since the last revision: > > Review fix test/jdk/javax/swing/JPopupMenu/bug4321273.java line 50: > 48: public static void main(String[] args) throws Exception { > 49: try > 50: { Suggestion: try { ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/15704#discussion_r1326952838 From aturbanov at openjdk.org Fri Sep 15 09:21:52 2023 From: aturbanov at openjdk.org (Andrey Turbanov) Date: Fri, 15 Sep 2023 09:21:52 GMT Subject: Integrated: 8312165: Fix typos in java.desktop Swing In-Reply-To: References: Message-ID: On Wed, 12 Jul 2023 08:33:30 GMT, Andrey Turbanov wrote: > Found many typos in java.desktop by IDEA's inspection `Proofreading | Typo` This pull request has now been integrated. Changeset: 89cb290b Author: Andrey Turbanov URL: https://git.openjdk.org/jdk/commit/89cb290bb0b3947126d836789f0f68a6b98215cd Stats: 313 lines in 106 files changed: 6 ins; 4 del; 303 mod 8312165: Fix typos in java.desktop Swing Co-authored-by: Alexey Ivanov Reviewed-by: aivanov ------------- PR: https://git.openjdk.org/jdk/pull/14847 From tr at openjdk.org Fri Sep 15 11:45:42 2023 From: tr at openjdk.org (Tejesh R) Date: Fri, 15 Sep 2023 11:45:42 GMT Subject: RFR: 8316104: Open source several Swing SplitPane and RadioButton related tests In-Reply-To: <3b4-kld-TjBEzLLgjfBnvm1T6x1IX4MpuuePs0cLNtk=.44d952bc-157b-4e0c-a033-ce22be9162ed@github.com> References: <3b4-kld-TjBEzLLgjfBnvm1T6x1IX4MpuuePs0cLNtk=.44d952bc-157b-4e0c-a033-ce22be9162ed@github.com> Message-ID: On Fri, 15 Sep 2023 06:48:17 GMT, Abhishek Kumar wrote: > Do we need to add auto delay also for the tests? `robot.setAutoDelay(100);` I don't think its mandatory, no keyboard events are there here. > test/jdk/javax/swing/JRadioButton/bug4823809.java line 52: > >> 50: robot = new Robot(); >> 51: SwingUtilities.invokeAndWait(() -> { >> 52: frame = new JFrame(); > > Please add frame title. It wont be visible, no point in adding title. ------------- PR Comment: https://git.openjdk.org/jdk/pull/15738#issuecomment-1721138402 PR Review Comment: https://git.openjdk.org/jdk/pull/15738#discussion_r1327174036 From abhiscxk at openjdk.org Fri Sep 15 12:00:41 2023 From: abhiscxk at openjdk.org (Abhishek Kumar) Date: Fri, 15 Sep 2023 12:00:41 GMT Subject: RFR: 8316104: Open source several Swing SplitPane and RadioButton related tests In-Reply-To: References: <3b4-kld-TjBEzLLgjfBnvm1T6x1IX4MpuuePs0cLNtk=.44d952bc-157b-4e0c-a033-ce22be9162ed@github.com> Message-ID: On Fri, 15 Sep 2023 11:42:30 GMT, Tejesh R wrote: >> test/jdk/javax/swing/JRadioButton/bug4823809.java line 52: >> >>> 50: robot = new Robot(); >>> 51: SwingUtilities.invokeAndWait(() -> { >>> 52: frame = new JFrame(); >> >> Please add frame title. > > It wont be visible, no point in adding title. I think to maintain consistency across tests we should add title. Many of the tests were not visible but still frame title added. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/15738#discussion_r1327188893 From tr at openjdk.org Fri Sep 15 12:06:37 2023 From: tr at openjdk.org (Tejesh R) Date: Fri, 15 Sep 2023 12:06:37 GMT Subject: RFR: 8316061: Open source several Swing RootPane and Slider related tests [v2] In-Reply-To: References: Message-ID: > Open sourcing these Swing RootPane and Slider related tests: > > javax/swing/JRootPane/4207333/bug4207333.java > javax/swing/JRootPane/4224113/bug4224113.java > javax/swing/JRootPane/4627806/bug4627806.java > javax/swing/JSlider/4200901/bug4200901.java > javax/swing/JSlider/4203754/bug4203754.java Tejesh R has updated the pull request incrementally with one additional commit since the last revision: Review fix ------------- Changes: - all: https://git.openjdk.org/jdk/pull/15734/files - new: https://git.openjdk.org/jdk/pull/15734/files/96d10af7..2511bdc4 Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=15734&range=01 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=15734&range=00-01 Stats: 1 line in 1 file changed: 1 ins; 0 del; 0 mod Patch: https://git.openjdk.org/jdk/pull/15734.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/15734/head:pull/15734 PR: https://git.openjdk.org/jdk/pull/15734 From abhiscxk at openjdk.org Fri Sep 15 12:06:38 2023 From: abhiscxk at openjdk.org (Abhishek Kumar) Date: Fri, 15 Sep 2023 12:06:38 GMT Subject: RFR: 8316061: Open source several Swing RootPane and Slider related tests [v2] In-Reply-To: References: Message-ID: <1UtoLaiyze_i6l4ScX8oWPv-7lINz2x0CsbjKJikrJA=.0a27f03b-9329-4f81-9070-c464a3187dfe@github.com> On Fri, 15 Sep 2023 12:00:43 GMT, Tejesh R wrote: >> Open sourcing these Swing RootPane and Slider related tests: >> >> javax/swing/JRootPane/4207333/bug4207333.java >> javax/swing/JRootPane/4224113/bug4224113.java >> javax/swing/JRootPane/4627806/bug4627806.java >> javax/swing/JSlider/4200901/bug4200901.java >> javax/swing/JSlider/4203754/bug4203754.java > > Tejesh R has updated the pull request incrementally with one additional commit since the last revision: > > Review fix LGTM. ------------- Marked as reviewed by abhiscxk (Committer). PR Review: https://git.openjdk.org/jdk/pull/15734#pullrequestreview-1628795032 From abhiscxk at openjdk.org Fri Sep 15 12:07:40 2023 From: abhiscxk at openjdk.org (Abhishek Kumar) Date: Fri, 15 Sep 2023 12:07:40 GMT Subject: RFR: 8316104: Open source several Swing SplitPane and RadioButton related tests In-Reply-To: References: Message-ID: On Thu, 14 Sep 2023 09:33:03 GMT, Tejesh R wrote: > Open sourcing these Swing SplitPane and RadioButton related tests: > > javax/swing/JSplitPane/4147653/bug4147653.java > javax/swing/JSplitPane/4870674/bug4870674.java > javax/swing/JRadioButton/4823809/bug4823809.java Marked as reviewed by abhiscxk (Committer). ------------- PR Review: https://git.openjdk.org/jdk/pull/15738#pullrequestreview-1628801921 From tr at openjdk.org Fri Sep 15 12:16:39 2023 From: tr at openjdk.org (Tejesh R) Date: Fri, 15 Sep 2023 12:16:39 GMT Subject: RFR: 8316104: Open source several Swing SplitPane and RadioButton related tests In-Reply-To: References: <3b4-kld-TjBEzLLgjfBnvm1T6x1IX4MpuuePs0cLNtk=.44d952bc-157b-4e0c-a033-ce22be9162ed@github.com> Message-ID: On Fri, 15 Sep 2023 11:58:15 GMT, Abhishek Kumar wrote: >> test/jdk/javax/swing/JRadioButton/bug4823809.java line 52: >> >>> 50: robot = new Robot(); >>> 51: SwingUtilities.invokeAndWait(() -> { >>> 52: frame = new JFrame(); >> >> Please add frame title. > > I think to maintain consistency across tests we should add title. Many of the tests were not visible but still frame title added. Will add it. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/15738#discussion_r1327203919 From tr at openjdk.org Fri Sep 15 12:23:19 2023 From: tr at openjdk.org (Tejesh R) Date: Fri, 15 Sep 2023 12:23:19 GMT Subject: RFR: 8316104: Open source several Swing SplitPane and RadioButton related tests [v2] In-Reply-To: References: Message-ID: > Open sourcing these Swing SplitPane and RadioButton related tests: > > javax/swing/JSplitPane/4147653/bug4147653.java > javax/swing/JSplitPane/4870674/bug4870674.java > javax/swing/JRadioButton/4823809/bug4823809.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: - Review fix - Merge branch 'master' of https://github.com/openjdk/jdk into branch_8316104 - Open sourcing few SplitPane and RadioButton test ------------- Changes: - all: https://git.openjdk.org/jdk/pull/15738/files - new: https://git.openjdk.org/jdk/pull/15738/files/4671cd9f..fe25033c Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=15738&range=01 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=15738&range=00-01 Stats: 83825 lines in 3215 files changed: 47893 ins; 18833 del; 17099 mod Patch: https://git.openjdk.org/jdk/pull/15738.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/15738/head:pull/15738 PR: https://git.openjdk.org/jdk/pull/15738 From aivanov at openjdk.org Fri Sep 15 18:20:44 2023 From: aivanov at openjdk.org (Alexey Ivanov) Date: Fri, 15 Sep 2023 18:20:44 GMT Subject: RFR: 8301846: Invalid TargetDataLine after screen lock when using JFileChooser or COM library [v7] In-Reply-To: References: Message-ID: On Thu, 3 Aug 2023 04:02:16 GMT, Renjith Kannath Pariyangad wrote: >> src/java.desktop/windows/native/libjsound/PLATFORM_API_WinOS_DirectSound.cpp line 183: >> >>> 181: INT32 cacheIndex; >>> 182: >>> 183: if (!DS_lockCache() || FAILED(::CoInitialize(NULL))) { >> >> I believe this is incorrect: `::CoInitialize` may return `S_OK` or `S_FALSE`; the value of `S_FALSE` indicates a success too but flags that COM is already initialised. The only real error is `RPC_E_CHANGED_MODE` which also indicates *COM is already initialised* but with a different threading model. >> >> Thus, we can proceed in *all* the cases but we need to call `::CoUninitialize` only if `::CoInitialize` returns `S_OK` or `S_FALSE`. > > Microsoft recommended to use [SUCCEEDED or FAILED](https://learn.microsoft.com/en-us/windows/win32/learnwin32/error-handling-in-com) macro for error handling. Based on our finding without COM Initialization remaining function call may fail, I thought better not to proceed further in case of failure. > > FAILED macro defined as : #define FAILED(hr) (((HRESULT)(hr)) < 0) > Constant defined as **S_OK =0x0** and **S_FALSE = 0x1** all other errors are -ve > > I thought this will be covered, let me know if I missed anything. Thank you for clarification, I forgot that `FAILED` handled both `S_OK` and `S_FALSE`. Yet we also need to handle `RPC_E_CHANGED_MODE` error code in which case we can proceed but we don't call `::CoUninitialize`. If another error code is returned, we back out. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/14898#discussion_r1327639556 From aivanov at openjdk.org Fri Sep 15 18:38:42 2023 From: aivanov at openjdk.org (Alexey Ivanov) Date: Fri, 15 Sep 2023 18:38:42 GMT Subject: RFR: 8301846: Invalid TargetDataLine after screen lock when using JFileChooser or COM library [v8] In-Reply-To: References: Message-ID: On Thu, 3 Aug 2023 10:35:50 GMT, Renjith Kannath Pariyangad wrote: >> Hi Reviewers, >> >> Observations : >> 1. Without com initialize if we access Mixer for recording, library loaded invalid GUID and clipped description in windows(ID not found in registry). With com initialization library load proper GUID (same as registry). >> 2. For Play back device always loading proper device GUID irrespective of com Initialization. >> >> Test: >> Since screen lock and unlock workflow required for reproducing this issue, did coupe of iteration of manual testing post fix and confirmed its resolving the problem. >> To reconfirm nothing is broken, executed all audio related test cases on test bench post fix and all are green. >> >> Please review the changes and let me know your comments if any. >> >> Regards, >> Renjith. > > Renjith Kannath Pariyangad has updated the pull request incrementally with one additional commit since the last revision: > > Replaced CoInitialize with CoInitializeEx An update: we have received a clarification from Microsoft. Both `DirectSoundEnumerate` and `DirectSoundCaptureEnumerate` require COM to be initialised. DirectSound APIs support both MTA and STA. So, we should initialise COM in MTA. Initialising and uninitialising COM aren't heavy. As such, moving sound enumeration to a helper thread *would cost more*. So, we'll follow the current approach. ------------- PR Comment: https://git.openjdk.org/jdk/pull/14898#issuecomment-1721687912 From aivanov at openjdk.org Fri Sep 15 18:38:44 2023 From: aivanov at openjdk.org (Alexey Ivanov) Date: Fri, 15 Sep 2023 18:38:44 GMT Subject: RFR: 8301846: Invalid TargetDataLine after screen lock when using JFileChooser or COM library [v6] In-Reply-To: <4eMoT0TlXMelZm5FCQGkJtoCNOxa6leRwggr9lP4l5k=.a02a1018-d227-47fc-85d5-74457d30f257@github.com> References: <4eMoT0TlXMelZm5FCQGkJtoCNOxa6leRwggr9lP4l5k=.a02a1018-d227-47fc-85d5-74457d30f257@github.com> Message-ID: <0BStTZFnwsDI7fH50e6MnxwGkJCR4zLz2XEw0aO_R8c=.c7547ea2-70cc-4fd8-9ed4-47b30d2fdd3b@github.com> On Tue, 1 Aug 2023 04:16:30 GMT, Renjith Kannath Pariyangad wrote: >> Renjith Kannath Pariyangad has updated the pull request incrementally with one additional commit since the last revision: >> >> Added CoInitialize status check > > Did further investigation on JDK-7116070 (name truncation issue) and found its [MS structure](https://learn.microsoft.com/en-us/windows-hardware/drivers/audio/extended-capabilities-from-a-wdm-audio-driver) limitation, this structure can accommodate max 31 char only for _szPname_ . > > Workflow : > **PLATFORM_API_WinOS_Ports.c** loading the description with the help of _mixerGetDevCapsW_ function and result will be stored into the [MIXERCAPSW](https://learn.microsoft.com/en-us/windows/win32/api/mmeapi/ns-mmeapi-mixercapsw) structure and in this max size for _szPname_ is 31 char. > In my analysis this is a limitation and we can't do anything more, let me know if you are aware any alternative solution for this. @Renjithkannath Could you please add a manual test for this issue? You can use the sample attached to the JBS issue as the base for the test. ------------- PR Comment: https://git.openjdk.org/jdk/pull/14898#issuecomment-1721689612 From honkar at openjdk.org Fri Sep 15 19:42:07 2023 From: honkar at openjdk.org (Harshitha Onkar) Date: Fri, 15 Sep 2023 19:42:07 GMT Subject: RFR: JDK-8315876 Open source several Swing CSS related tests Message-ID: <5z0tnBVggYqlegmOHcIZhw9aoGeRo2XMaHwkVz9WNCQ=.44da2e5a-9dfa-44b1-b8b2-c8e285007ec1@github.com> Following tests are open sourced as part of this PR. 1. javax/swing/text/html/CSS/4174871/bug4174871.java 2. javax/swing/text/html/CSS/4174874/bug4174874.java 3. javax/swing/text/html/CSS/4284162/bug4284162.java 4. javax/swing/text/html/CSS/4764897/bug4764897.java 5. javax/swing/text/html/HTMLDocument/4209280/bug4209280.java ------------- Commit messages: - CSS files Changes: https://git.openjdk.org/jdk/pull/15769/files Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=15769&range=00 Issue: https://bugs.openjdk.org/browse/JDK-8315876 Stats: 456 lines in 5 files changed: 456 ins; 0 del; 0 mod Patch: https://git.openjdk.org/jdk/pull/15769.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/15769/head:pull/15769 PR: https://git.openjdk.org/jdk/pull/15769 From georgewangari44 at gmail.com Fri Sep 15 20:28:45 2023 From: georgewangari44 at gmail.com (George Wangari) Date: Fri, 15 Sep 2023 23:28:45 +0300 Subject: Open Message-ID: open From honkar at openjdk.org Fri Sep 15 20:31:53 2023 From: honkar at openjdk.org (Harshitha Onkar) Date: Fri, 15 Sep 2023 20:31:53 GMT Subject: RFR: JDK-8315889: Open source several Swing HTMLDocument related tests [v2] In-Reply-To: References: Message-ID: <3PgXMqySZhVt73RoZ908uM4OnSikb8Uta7I9dwZgfRI=.bc3030d5-026b-4004-8e99-ea65f1ec6794@github.com> > Following tests are being open sourced as part of this PR. > > javax/swing/text/html/HTMLDocument/4251593/bug4251593.java > javax/swing/text/html/HTMLDocument/4687405/bug4687405.java > javax/swing/text/html/HTMLDocument/4226914/bug4226914.java > javax/swing/text/html/HTMLEditorKit/4213373/bug4213373.java Harshitha Onkar has updated the pull request incrementally with one additional commit since the last revision: copyright year updated ------------- Changes: - all: https://git.openjdk.org/jdk/pull/15687/files - new: https://git.openjdk.org/jdk/pull/15687/files/fa02522b..ed4b47d5 Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=15687&range=01 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=15687&range=00-01 Stats: 1 line in 1 file changed: 0 ins; 0 del; 1 mod Patch: https://git.openjdk.org/jdk/pull/15687.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/15687/head:pull/15687 PR: https://git.openjdk.org/jdk/pull/15687 From honkar at openjdk.org Fri Sep 15 20:35:52 2023 From: honkar at openjdk.org (Harshitha Onkar) Date: Fri, 15 Sep 2023 20:35:52 GMT Subject: Integrated: JDK-8315889: Open source several Swing HTMLDocument related tests In-Reply-To: References: Message-ID: On Tue, 12 Sep 2023 17:05:47 GMT, Harshitha Onkar wrote: > Following tests are being open sourced as part of this PR. > > javax/swing/text/html/HTMLDocument/4251593/bug4251593.java > javax/swing/text/html/HTMLDocument/4687405/bug4687405.java > javax/swing/text/html/HTMLDocument/4226914/bug4226914.java > javax/swing/text/html/HTMLEditorKit/4213373/bug4213373.java This pull request has now been integrated. Changeset: 8f46abc9 Author: Harshitha Onkar URL: https://git.openjdk.org/jdk/commit/8f46abc938ffe338e25d5fdbdcfa0aaa12edfa58 Stats: 250 lines in 4 files changed: 250 ins; 0 del; 0 mod 8315889: Open source several Swing HTMLDocument related tests Reviewed-by: tr, azvegint ------------- PR: https://git.openjdk.org/jdk/pull/15687 From azvegint at openjdk.org Fri Sep 15 21:40:38 2023 From: azvegint at openjdk.org (Alexander Zvegintsev) Date: Fri, 15 Sep 2023 21:40:38 GMT Subject: RFR: JDK-8315876 Open source several Swing CSS related tests In-Reply-To: <5z0tnBVggYqlegmOHcIZhw9aoGeRo2XMaHwkVz9WNCQ=.44da2e5a-9dfa-44b1-b8b2-c8e285007ec1@github.com> References: <5z0tnBVggYqlegmOHcIZhw9aoGeRo2XMaHwkVz9WNCQ=.44da2e5a-9dfa-44b1-b8b2-c8e285007ec1@github.com> Message-ID: On Fri, 15 Sep 2023 19:35:15 GMT, Harshitha Onkar wrote: > Following tests are open sourced as part of this PR. > > 1. test/jdk/javax/swing/text/html/CSS/bug4174871.java > 2. test/jdk/javax/swing/text/html/CSS/bug4174874.java > 3. test/jdk/javax/swing/text/html/CSS/bug4284162.java > 4. test/jdk/javax/swing/text/html/CSS/bug4764897.java > 5. test/jdk/javax/swing/text/html/HTMLDocument/bug4209280.java Marked as reviewed by azvegint (Reviewer). ------------- PR Review: https://git.openjdk.org/jdk/pull/15769#pullrequestreview-1629758490 From dnguyen at openjdk.org Fri Sep 15 21:57:41 2023 From: dnguyen at openjdk.org (Damon Nguyen) Date: Fri, 15 Sep 2023 21:57:41 GMT Subject: RFR: JDK-8315876 Open source several Swing CSS related tests In-Reply-To: <5z0tnBVggYqlegmOHcIZhw9aoGeRo2XMaHwkVz9WNCQ=.44da2e5a-9dfa-44b1-b8b2-c8e285007ec1@github.com> References: <5z0tnBVggYqlegmOHcIZhw9aoGeRo2XMaHwkVz9WNCQ=.44da2e5a-9dfa-44b1-b8b2-c8e285007ec1@github.com> Message-ID: On Fri, 15 Sep 2023 19:35:15 GMT, Harshitha Onkar wrote: > Following tests are open sourced as part of this PR. > > 1. test/jdk/javax/swing/text/html/CSS/bug4174871.java > 2. test/jdk/javax/swing/text/html/CSS/bug4174874.java > 3. test/jdk/javax/swing/text/html/CSS/bug4284162.java > 4. test/jdk/javax/swing/text/html/CSS/bug4764897.java > 5. test/jdk/javax/swing/text/html/HTMLDocument/bug4209280.java LGTM. Minor spacing nit test/jdk/javax/swing/text/html/CSS/bug4174871.java line 78: > 76: frame = new JFrame("Table CellSpacing Test"); > 77: frame.getContentPane().add(pane); > 78: frame.setSize(600,200); Suggestion: frame.setSize(600, 200); test/jdk/javax/swing/text/html/CSS/bug4174874.java line 78: > 76: frame = new JFrame("Table Border Test"); > 77: frame.getContentPane().add(pane); > 78: frame.setSize(600,200); Suggestion: frame.setSize(600, 200); test/jdk/javax/swing/text/html/CSS/bug4284162.java line 82: > 80: > 81: frame.getContentPane().add(jep); > 82: frame.setSize(200,200); Suggestion: frame.setSize(200, 200); test/jdk/javax/swing/text/html/CSS/bug4764897.java line 81: > 79: frame = new JFrame("Table Border Test"); > 80: frame.getContentPane().add(pane); > 81: frame.setSize(600,200); Suggestion: frame.setSize(600, 200); ------------- Marked as reviewed by dnguyen (Committer). PR Review: https://git.openjdk.org/jdk/pull/15769#pullrequestreview-1629769889 PR Review Comment: https://git.openjdk.org/jdk/pull/15769#discussion_r1327823435 PR Review Comment: https://git.openjdk.org/jdk/pull/15769#discussion_r1327823611 PR Review Comment: https://git.openjdk.org/jdk/pull/15769#discussion_r1327823713 PR Review Comment: https://git.openjdk.org/jdk/pull/15769#discussion_r1327823887 From dnguyen at openjdk.org Fri Sep 15 22:15:40 2023 From: dnguyen at openjdk.org (Damon Nguyen) Date: Fri, 15 Sep 2023 22:15:40 GMT Subject: RFR: JDK-8315951: Open source several Swing HTMLEditorKit related tests In-Reply-To: <6kTx7IUAwD2sL8vUfqaOJhVF8vXDI8imvOuGBvgnG4U=.41946952-8e97-4a5c-aaa8-d1cf430ee0d4@github.com> References: <6kTx7IUAwD2sL8vUfqaOJhVF8vXDI8imvOuGBvgnG4U=.41946952-8e97-4a5c-aaa8-d1cf430ee0d4@github.com> Message-ID: On Thu, 14 Sep 2023 18:45:34 GMT, Harshitha Onkar wrote: > Following tests are open sourced as part of this PR. > > 1. java/awt/event/PaintEvent/RepaintTest/RepaintTest.java > 2. javax/swing/text/html/HTMLEditorKit/4214848/bug4214848.java > 3. javax/swing/text/html/HTMLEditorKit/4230197/bug4230197.java > 4. javax/swing/text/html/HTMLEditorKit/4238223/bug4238223.java Looks fine to me. test/jdk/java/awt/event/PaintEvent/RepaintTest.java line 67: > 65: EventQueue.invokeAndWait(() -> panel.repaint()); > 66: robot.waitForIdle(); > 67: robot.delay(1000); I see 3 different delay ms values. Looks like it works, but can this be standardized into 1 or 2 values? ------------- Marked as reviewed by dnguyen (Committer). PR Review: https://git.openjdk.org/jdk/pull/15751#pullrequestreview-1629772633 PR Review Comment: https://git.openjdk.org/jdk/pull/15751#discussion_r1327824958 From honkar at openjdk.org Fri Sep 15 23:00:42 2023 From: honkar at openjdk.org (Harshitha Onkar) Date: Fri, 15 Sep 2023 23:00:42 GMT Subject: RFR: 8315804: Open source several Swing JTabbedPane JTextArea JTextField tests In-Reply-To: References: Message-ID: <7_JCeooEjRd3cxv21aVGX7lYtuZByGPp68RTOirta5U=.198e4b19-640a-4f35-af80-24776f32324c@github.com> On Thu, 14 Sep 2023 16:35:44 GMT, Damon Nguyen wrote: > These are the tests being converted: > > javax/swing/JTabbedPane/4703690/bug4703690.java > javax/swing/JTabbedPane/GetComponentAt/GetComponentAtTest.java > javax/swing/JTabbedPane/ReplaceCompTab/ReplaceCompTab.java > javax/swing/JTextArea/4849868/bug4849868.java > javax/swing/JTextField/4244613/bug4244613.java LGTM with some minor nits test/jdk/javax/swing/JTabbedPane/ReplaceCompTab.java line 46: > 44: static JFrame f; > 45: > 46: public static void main(String[] args) throws InterruptedException, Generic Exception can be thrown test/jdk/javax/swing/JTabbedPane/ReplaceCompTab.java line 75: > 73: } catch (Exception e) { > 74: System.out.println(e); > 75: e.printStackTrace(); These lines are not required since RuntimeException is being thrown subsequently. test/jdk/javax/swing/JTabbedPane/bug4703690.java line 129: > 127: robot.mouseRelease(InputEvent.BUTTON1_DOWN_MASK); > 128: > 129: robot.delay(1000); Do we require a large amount of delay here? ideally ~200-300 would work I guess. ------------- Marked as reviewed by honkar (Committer). PR Review: https://git.openjdk.org/jdk/pull/15747#pullrequestreview-1629805315 PR Review Comment: https://git.openjdk.org/jdk/pull/15747#discussion_r1327845819 PR Review Comment: https://git.openjdk.org/jdk/pull/15747#discussion_r1327846278 PR Review Comment: https://git.openjdk.org/jdk/pull/15747#discussion_r1327846856 From honkar at openjdk.org Fri Sep 15 23:06:39 2023 From: honkar at openjdk.org (Harshitha Onkar) Date: Fri, 15 Sep 2023 23:06:39 GMT Subject: RFR: 8315883: Open source several Swing JToolbar tests In-Reply-To: References: Message-ID: <_FJTNy276T6FkvzL7f16IT0jGnxY9XcFKRmsIm78IKA=.cf0b748b-826b-44e6-8e01-4e5e8f740459@github.com> On Thu, 14 Sep 2023 16:43:29 GMT, Damon Nguyen wrote: > These are the tests being converted: > > javax/swing/JToolBar/4138694/bug4138694.java > javax/swing/JToolBar/4140421/bug4140421.java > javax/swing/JToolBar/4196662/bug4196662.java > javax/swing/JToolBar/4243930/bug4243930.java LGTM. I suppose all the main() can throw generic Exception test/jdk/javax/swing/JToolBar/bug4138694.java line 47: > 45: > 46: public static void main(String[] args) throws InterruptedException, > 47: InvocationTargetException { Suggestion: public static void main(String[] args) throws Exception { ------------- Marked as reviewed by honkar (Committer). PR Review: https://git.openjdk.org/jdk/pull/15748#pullrequestreview-1629812902 PR Review Comment: https://git.openjdk.org/jdk/pull/15748#discussion_r1327849822 From honkar at openjdk.org Fri Sep 15 23:17:37 2023 From: honkar at openjdk.org (Harshitha Onkar) Date: Fri, 15 Sep 2023 23:17:37 GMT Subject: RFR: 8316056: Open source several Swing JTree tests In-Reply-To: References: Message-ID: On Thu, 14 Sep 2023 21:40:55 GMT, Damon Nguyen wrote: > These are the tests being converted: > > javax/swing/JTree/4210432/bug4210432.java > javax/swing/JTree/4213868/bug4213868.java > javax/swing/JTree/4224491/bug4224491.java > javax/swing/JTree/4237370/bug4237370.java > javax/swing/JTree/4662505/bug4662505.java Tests look good. test/jdk/javax/swing/JTree/bug4213868.java line 44: > 42: JTree tree = new JTree(root); > 43: for (int i = 1; i < 10; i++) { > 44: root.add(new DefaultMutableTreeNode(Integer.valueOf(i))); Suggestion: new DefaultMutableTreeNode(0, true); JTree tree = new JTree(root); for (int i = 1; i < 10; i++) { root.add(new DefaultMutableTreeNode(i)); ------------- Marked as reviewed by honkar (Committer). PR Review: https://git.openjdk.org/jdk/pull/15756#pullrequestreview-1629828791 PR Review Comment: https://git.openjdk.org/jdk/pull/15756#discussion_r1327853316 From duke at openjdk.org Fri Sep 15 23:54:50 2023 From: duke at openjdk.org (duke) Date: Fri, 15 Sep 2023 23:54:50 GMT Subject: Withdrawn: JDK-8303950: [macos]Translucent Windows Flicker on Repaint In-Reply-To: <1rA84rf1wIPIOVRjBWMZpPcRf9FE2rMSZ0hu0xla1i0=.0ac7cdf8-42d8-4bcd-b521-f386d46fa107@github.com> References: <1rA84rf1wIPIOVRjBWMZpPcRf9FE2rMSZ0hu0xla1i0=.0ac7cdf8-42d8-4bcd-b521-f386d46fa107@github.com> Message-ID: On Wed, 7 Jun 2023 17:15:50 GMT, Jeremy wrote: > # Problem Summary > > For non-opaque windows, Window#paint calls `gg.fillRect(0, 0, getWidth(), getHeight())` before `super.paint(g)`. > > This can cause flickering on Mac, and the flickering seems to have gotten much worse in recent JVMs. (See movie attachments to original ticket.) > > # Discussion > > This is my 2nd PR for this ticket. The original is [here](https://github.com/openjdk/jdk/pull/12993); that proposed change was IMO more invasive/scarier. It was auto-closed after 8 weeks of inactivity, and I'd rather offer this PR instead. > > In that previous discussion Alan Snyder framed the core problem as a "lack of synchronization" (see [comment here](https://github.com/openjdk/jdk/pull/12993#issuecomment-1467528061)). If the monitor refreshes/flushes after we've called `fillRect` *but before we finish `super.paint`*: it makes sense that we'd see a flicker. > > I agree with Alan, but I think the problem can also be framed as a mixing-Swing-with-AWT issue. (Which IMO will involve an easier fix.) > > This PR is a low-risk change (relative to the previous PR) that intercepts calls to repaint a Window that is also RootPaneContainer. Now we'll redirect those calls to paint the JRootPane instead. This means we'll exclusively paint within Swing's/RepaintManager's double-buffered architecture, so we bypass the risky call to `fillRect` on the screen's Graphics2D. (And this change occurs within RepaintManager, so we're clearly already in Swing's architecture.) > > So with this change: we paint everything to the double-buffer, and the *only time* we paint to the Window's Graphics2D is when have set up a AlphaComposite.Src and replace its contents with our buffer's contents. > > # Tests > > This PR includes a new test for 8303950 itself. This is pretty self-explanatory: we repaint a trivial animation for a few seconds and use the Robot to see if a pixel is the expected color. > > This PR also includes a test called `bug8303950_legacyWindowPaintBehavior` that creates a grid of 4 windows with varying opacity/backgrounds: > > image > > I was surprised by how these windows rendered, but I don't think that's worth debating here. This test simply makes sure that we preserve this preexisting behavior. The broad "rules" appear to be: > 1. If a JComponent identifies as opaque (see `JComponent.isOpaque`) then the JComponent's background is used. (In this case: that's the opaque green top two windows.) T... This pull request has been closed without being integrated. ------------- PR: https://git.openjdk.org/jdk/pull/14363 From duke at openjdk.org Sat Sep 16 23:56:26 2023 From: duke at openjdk.org (=?UTF-8?B?5p+z6bKy6bmP?=) Date: Sat, 16 Sep 2023 23:56:26 GMT Subject: RFR: 8264728: When use chinese IME, the candidate box isn't moved with caret of JTextArea [v9] In-Reply-To: <4JjGitYNWd7jQbHa4_1M6awOvkgtpfd2AY5LKS3MnUM=.8126670d-c076-4756-98be-9b6c7b7a565d@github.com> References: <4JjGitYNWd7jQbHa4_1M6awOvkgtpfd2AY5LKS3MnUM=.8126670d-c076-4756-98be-9b6c7b7a565d@github.com> Message-ID: <2EKEnJHyyNRaK2J-D74dxolrchS59M2b3YROeMNlx9k=.a9abb3b3-a5d5-49e0-8833-365c9e708708@github.com> > Candidat box can moving with caret on windows version. Someone must wrote codes for linux(ubuntu), but it doesn't work, so he didn't commit the codes. Why it doesn't work, is the key problem. > > 1, I wrote a example for linux: > https://github.com/quantum6/X11InputMethod > > I tried all parameters to test and as my research: > If you use XIMPreeditCallbacks to initiate, the box can't be moved with caret. > If you use XIMPreeditNothing, it works. > All examples use XIMPreeditCallbacks to initiate input method and candidate box can't moving. So I understand why he didn't commit the codes. > > 2, I traced the route of transfering caret coordites on windows version, then add codes for linux. > 3, Taishan Office(like Microsoft Office Word) is running on jdk, we tested for a long time, it works OK. > 4, I am not sure for AIX( no environment). > > > JDK-8264728 : When use chinese IME, the candidate box isn't moved with caret of JTextArea > Type: Bug > Component: client-libs > Sub-Component: java.awt:i18n > Affected Version: 8,9,15,16 > Priority: P3 > Status: Open > Resolution: Unresolved > OS: linux > CPU: x86_64 ??? 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: - Merge branch 'master' of https://github.com/openjdk/jdk into quantum6 - Merge branch 'master' of https://github.com/openjdk/jdk into quantum6 - Update to lastest - Merge branch 'master' of https://github.com/openjdk/jdk into quantum6 - Remove tab - Update to latest and make code safer - Merge branch 'master' of https://github.com/openjdk/jdk into quantum6 - 8264728: When use chinese IME, the candidate box isn't moved with caret of JTextArea ------------- Changes: - all: https://git.openjdk.org/jdk/pull/13055/files - new: https://git.openjdk.org/jdk/pull/13055/files/882a939f..97450047 Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=13055&range=08 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=13055&range=07-08 Stats: 85429 lines in 2739 files changed: 35012 ins; 13600 del; 36817 mod Patch: https://git.openjdk.org/jdk/pull/13055.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/13055/head:pull/13055 PR: https://git.openjdk.org/jdk/pull/13055 From duke at openjdk.org Sat Sep 16 23:57:41 2023 From: duke at openjdk.org (=?UTF-8?B?5p+z6bKy6bmP?=) Date: Sat, 16 Sep 2023 23:57:41 GMT Subject: RFR: 8264728: When use chinese IME, the candidate box isn't moved with caret of JTextArea [v8] In-Reply-To: References: <4JjGitYNWd7jQbHa4_1M6awOvkgtpfd2AY5LKS3MnUM=.8126670d-c076-4756-98be-9b6c7b7a565d@github.com> Message-ID: On Tue, 22 Aug 2023 10:23:52 GMT, ??? wrote: >> Candidat box can moving with caret on windows version. Someone must wrote codes for linux(ubuntu), but it doesn't work, so he didn't commit the codes. Why it doesn't work, is the key problem. >> >> 1, I wrote a example for linux: >> https://github.com/quantum6/X11InputMethod >> >> I tried all parameters to test and as my research: >> If you use XIMPreeditCallbacks to initiate, the box can't be moved with caret. >> If you use XIMPreeditNothing, it works. >> All examples use XIMPreeditCallbacks to initiate input method and candidate box can't moving. So I understand why he didn't commit the codes. >> >> 2, I traced the route of transfering caret coordites on windows version, then add codes for linux. >> 3, Taishan Office(like Microsoft Office Word) is running on jdk, we tested for a long time, it works OK. >> 4, I am not sure for AIX( no environment). >> >> >> JDK-8264728 : When use chinese IME, the candidate box isn't moved with caret of JTextArea >> Type: Bug >> Component: client-libs >> Sub-Component: java.awt:i18n >> Affected Version: 8,9,15,16 >> Priority: P3 >> Status: Open >> Resolution: Unresolved >> OS: linux >> CPU: x86_64 > > ??? 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 seven additional commits since the last revision: > > - Merge branch 'master' of https://github.com/openjdk/jdk into quantum6 > - Update to lastest > - Merge branch 'master' of https://github.com/openjdk/jdk into quantum6 > - Remove tab > - Update to latest and make code safer > - Merge branch 'master' of https://github.com/openjdk/jdk into quantum6 > - 8264728: When use chinese IME, the candidate box isn't moved with caret of JTextArea Hello! Can anyone review the code? Thanks. ------------- PR Comment: https://git.openjdk.org/jdk/pull/13055#issuecomment-1722344139 From azeller at openjdk.org Mon Sep 18 06:25:55 2023 From: azeller at openjdk.org (Arno Zeller) Date: Mon, 18 Sep 2023 06:25:55 GMT Subject: RFR: 8219641: java/awt/font/Rotate/RotatedTextTest.java fails on Linux: Test failed for angle 15.0 Message-ID: The test fails on newer SLES versions that have RobotoSlab-Regular.ttf as default font. I suggest to try getting a DejaVu font as default on Linux because it is known to work without issues. ------------- Commit messages: - Merge branch 'openjdk:master' into JDK-8219641 - Merge branch 'openjdk:master' into JDK-8219641 - JDK-8219641 Changes: https://git.openjdk.org/jdk/pull/15780/files Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=15780&range=00 Issue: https://bugs.openjdk.org/browse/JDK-8219641 Stats: 9 lines in 1 file changed: 8 ins; 1 del; 0 mod Patch: https://git.openjdk.org/jdk/pull/15780.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/15780/head:pull/15780 PR: https://git.openjdk.org/jdk/pull/15780 From clanger at openjdk.org Mon Sep 18 06:51:42 2023 From: clanger at openjdk.org (Christoph Langer) Date: Mon, 18 Sep 2023 06:51:42 GMT Subject: RFR: 8219641: java/awt/font/Rotate/RotatedTextTest.java fails on Linux: Test failed for angle 15.0 In-Reply-To: References: Message-ID: On Mon, 18 Sep 2023 06:19:05 GMT, Arno Zeller wrote: > The test fails on newer SLES versions that have RobotoSlab-Regular.ttf as default font. I suggest to try getting a DejaVu font as default on Linux because it is known to work without issues. To me this looks pragmatic. I made a few suggestions for cleanup of the coding. test/jdk/java/awt/font/Rotate/RotatedTextTest.java line 51: > 49: static void drawRotatedText(Graphics g) { > 50: Font fnt = fnt = new Font(Font.SERIF, Font.PLAIN, 12); > 51: String os = System.getProperty("os.name").toLowerCase(); Suggestion: boolean isLinux = System.getProperty("os.name").toLowerCase().startsWith("linux"); Font fnt = isLinux ? new Font("DejaVu Serif", Font.PLAIN, 12) : new Font(Font.SERIF, Font.PLAIN, 12); test/jdk/java/awt/font/Rotate/RotatedTextTest.java line 56: > 54: fnt = new Font("DejaVu Serif", Font.PLAIN, 12); > 55: } > 56: System.out.println(fnt); Suggestion: System.out.println("Using font: " + fnt); ------------- PR Review: https://git.openjdk.org/jdk/pull/15780#pullrequestreview-1630365935 PR Review Comment: https://git.openjdk.org/jdk/pull/15780#discussion_r1328300498 PR Review Comment: https://git.openjdk.org/jdk/pull/15780#discussion_r1328300872 From mbaesken at openjdk.org Mon Sep 18 06:56:38 2023 From: mbaesken at openjdk.org (Matthias Baesken) Date: Mon, 18 Sep 2023 06:56:38 GMT Subject: RFR: 8219641: java/awt/font/Rotate/RotatedTextTest.java fails on Linux: Test failed for angle 15.0 In-Reply-To: References: Message-ID: <-qvNV4lvIfDgAJKVDFmWSiYfNWkp4FS4cFdi-mmmPCU=.6fd5e765-b0d7-4078-887f-a308760db9c1@github.com> On Mon, 18 Sep 2023 06:19:05 GMT, Arno Zeller wrote: > The test fails on newer SLES versions that have RobotoSlab-Regular.ttf as default font. I suggest to try getting a DejaVu font as default on Linux because it is known to work without issues. You could use `Platform.isLinux()` . ------------- PR Comment: https://git.openjdk.org/jdk/pull/15780#issuecomment-1722843506 From aivanov at openjdk.org Mon Sep 18 10:37:52 2023 From: aivanov at openjdk.org (Alexey Ivanov) Date: Mon, 18 Sep 2023 10:37:52 GMT Subject: RFR: JDK-8315876 Open source several Swing CSS related tests In-Reply-To: <5z0tnBVggYqlegmOHcIZhw9aoGeRo2XMaHwkVz9WNCQ=.44da2e5a-9dfa-44b1-b8b2-c8e285007ec1@github.com> References: <5z0tnBVggYqlegmOHcIZhw9aoGeRo2XMaHwkVz9WNCQ=.44da2e5a-9dfa-44b1-b8b2-c8e285007ec1@github.com> Message-ID: On Fri, 15 Sep 2023 19:35:15 GMT, Harshitha Onkar wrote: > Following tests are open sourced as part of this PR. > > 1. test/jdk/javax/swing/text/html/CSS/bug4174871.java > 2. test/jdk/javax/swing/text/html/CSS/bug4174874.java > 3. test/jdk/javax/swing/text/html/CSS/bug4284162.java > 4. test/jdk/javax/swing/text/html/CSS/bug4764897.java > 5. test/jdk/javax/swing/text/html/HTMLDocument/bug4209280.java I wonder if any these tests could be made headless. I think there's a potential to do so. Yet it's out of scope of migration, I guess. test/jdk/javax/swing/text/html/CSS/bug4174871.java line 29: > 27: import javax.swing.text.View; > 28: import java.awt.Robot; > 29: import java.awt.Shape; Did we agree on the order of imports, which one goes first `java.*` packages or `javax.*` packages. Does it depend on the test? test/jdk/javax/swing/text/html/CSS/bug4174871.java line 41: > 39: private static JFrame frame; > 40: private static JTextPane pane; > 41: private static volatile boolean passed = false; Explicitly assigning the default value is redundant. Moreover, you always assign a value in the `testUI` method. This comment also applies to the tests below. test/jdk/javax/swing/text/html/CSS/bug4174871.java line 53: > 51: SwingUtilities.invokeAndWait(bug4174871::testUI); > 52: robot.waitForIdle(); > 53: robot.delay(200); After you've performed all the actions, waiting doesn't seem to affect anything, and therefore it could be removed. This comment also applies to the tests below. test/jdk/javax/swing/text/html/CSS/bug4284162.java line 59: > 57: if (!passed) { > 58: throw new RuntimeException("Test failed!!" + > 59: " Borders of HTML table not rendered correctly"); The error message seems to come from the previous test above. test/jdk/javax/swing/text/html/CSS/bug4284162.java line 95: > 93: AttributeSet attrs = v.getAttributes(); > 94: Object attr = attrs.getAttribute(StyleConstants.FirstLineIndent); > 95: passed = (attr.toString().contains("-")); `startsWith`? test/jdk/javax/swing/text/html/CSS/bug4764897.java line 58: > 56: if (!passed) { > 57: throw new RuntimeException("Test failed!!" + > 58: " Borders of HTML table not rendered correctly"); The error message seems to be copied from a previous test. test/jdk/javax/swing/text/html/CSS/bug4764897.java line 99: > 97: > 98: if (viewName.endsWith("CellView")) { > 99: cellsWidth = r.getBounds().x + r.getBounds().width; This looks weird to me: why does `cellWidth` include the `x` coordinate in its width? Perhaps, the variable is named incorrectly. It looks we care about the last cell in the table only, and it is to be positioned so that it fits inside the table. In other words, the last cell is within table bounds, that's why `x + width` is used. test/jdk/javax/swing/text/html/HTMLDocument/bug4209280.java line 39: > 37: public static void main(String[] args) throws Exception { > 38: SwingUtilities.invokeAndWait(() -> { > 39: JFrame jFrame = new JFrame("Unknown HTML tag Test"); I prefer omitting the `j-` prefix from variable name. Frames in the tests above were named simply `frame`. test/jdk/javax/swing/text/html/HTMLDocument/bug4209280.java line 41: > 39: JFrame jFrame = new JFrame("Unknown HTML tag Test"); > 40: String html = "Foo"; > 41: JLabel label = new JLabel(html); I wonder if the test could be headless. I presume the exception is thrown when HTML is parsed. Does it happen in constructor? Does it happen when the label is added to a container? Is it enough to create the label? ------------- Changes requested by aivanov (Reviewer). PR Review: https://git.openjdk.org/jdk/pull/15769#pullrequestreview-1630692732 PR Review Comment: https://git.openjdk.org/jdk/pull/15769#discussion_r1328516488 PR Review Comment: https://git.openjdk.org/jdk/pull/15769#discussion_r1328504280 PR Review Comment: https://git.openjdk.org/jdk/pull/15769#discussion_r1328505337 PR Review Comment: https://git.openjdk.org/jdk/pull/15769#discussion_r1328514114 PR Review Comment: https://git.openjdk.org/jdk/pull/15769#discussion_r1328513644 PR Review Comment: https://git.openjdk.org/jdk/pull/15769#discussion_r1328527469 PR Review Comment: https://git.openjdk.org/jdk/pull/15769#discussion_r1328526628 PR Review Comment: https://git.openjdk.org/jdk/pull/15769#discussion_r1328529606 PR Review Comment: https://git.openjdk.org/jdk/pull/15769#discussion_r1328531344 From aivanov at openjdk.org Mon Sep 18 11:09:48 2023 From: aivanov at openjdk.org (Alexey Ivanov) Date: Mon, 18 Sep 2023 11:09:48 GMT Subject: RFR: JDK-8315951: Open source several Swing HTMLEditorKit related tests In-Reply-To: <6kTx7IUAwD2sL8vUfqaOJhVF8vXDI8imvOuGBvgnG4U=.41946952-8e97-4a5c-aaa8-d1cf430ee0d4@github.com> References: <6kTx7IUAwD2sL8vUfqaOJhVF8vXDI8imvOuGBvgnG4U=.41946952-8e97-4a5c-aaa8-d1cf430ee0d4@github.com> Message-ID: On Thu, 14 Sep 2023 18:45:34 GMT, Harshitha Onkar wrote: > Following tests are open sourced as part of this PR. > > 1. java/awt/event/PaintEvent/RepaintTest/RepaintTest.java > 2. javax/swing/text/html/HTMLEditorKit/4214848/bug4214848.java > 3. javax/swing/text/html/HTMLEditorKit/4230197/bug4230197.java > 4. javax/swing/text/html/HTMLEditorKit/4238223/bug4238223.java Changes requested by aivanov (Reviewer). test/jdk/java/awt/event/PaintEvent/RepaintTest.java line 44: > 42: // invoking setBounds, and the other that invokes repaint directly on > 43: // the Frame to repaint a Component. The Component displays an integer > 44: // that increments everytime paint is invoked on it. This comment seems confusing because no buttons are created in the test. test/jdk/java/awt/event/PaintEvent/RepaintTest.java line 63: > 61: > 62: int count = counter.getCount(); > 63: robot.delay(300); Does this delay affect anything? I think it can be safely removed. test/jdk/java/awt/event/PaintEvent/RepaintTest.java line 65: > 63: robot.delay(300); > 64: > 65: EventQueue.invokeAndWait(() -> panel.repaint()); Use method reference too? Suggestion: EventQueue.invokeAndWait(panel::repaint); test/jdk/java/awt/event/PaintEvent/RepaintTest.java line 71: > 69: if (counter.getCount() == count) { > 70: throw new RuntimeException("Failed"); > 71: } This is not thread-safe. The `paintCount` in `IncrementComponent` needs to be volatile. Better yet, use `AtomicInteger` and its [`incrementAndGet`](https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/util/concurrent/atomic/AtomicInteger.html#incrementAndGet()) or [`getAndIncrement`](https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/util/concurrent/atomic/AtomicInteger.html#getAndIncrement()) as well as [`get`](https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/util/concurrent/atomic/AtomicInteger.html#get()), it will make the test code thread-safe. test/jdk/javax/swing/text/html/HTMLEditorKit/bug4214848.java line 40: > 38: StringWriter sw = new StringWriter(); > 39: String test1=""; > 40: HTMLEditorKit c= new HTMLEditorKit(); Suggestion: String test1 = ""; HTMLEditorKit c = new HTMLEditorKit(); Using `c` for the editor kit doesn't seem a good idea, `k` or `kit` would be better. `test1` could be just `test`, there are no other test strings. test/jdk/javax/swing/text/html/HTMLEditorKit/bug4214848.java line 44: > 42: c.read(new StringReader(test1), doc, 0); // prepare test document > 43: c.write(sw, doc, 0, 10); > 44: String au=sw.toString().toLowerCase(); Suggestion: String au = sw.toString().toLowerCase(); I'd also rename the variable to `out` which is more meaningful. test/jdk/javax/swing/text/html/HTMLEditorKit/bug4230197.java line 41: > 39: StringWriter sw = new StringWriter(); > 40: HTMLDocument doc = (HTMLDocument) kit.createDefaultDocument(); > 41: kit.insertHTML(doc, 0, "0", 0, 0, HTML.Tag.SUB); Suggestion: kit.insertHTML(doc, doc.getLenth(), "0", 0, 0, HTML.Tag.SUB); for consistency? It shouldn't change the logic, yet it's better to verify whether this update still reproduces the original problem. test/jdk/javax/swing/text/html/HTMLEditorKit/bug4230197.java line 48: > 46: kit.write(sw, doc, 0, doc.getLength()); > 47: > 48: String au = sw.toString().toLowerCase(); Suggestion: String out = sw.toString().toLowerCase(); test/jdk/javax/swing/text/html/HTMLEditorKit/bug4230197.java line 51: > 49: if ((!au.contains("0")) || (!au.contains("0")) > 50: || (!au.contains("0")) || (!au.contains("0")) > 51: || (!au.contains("0"))) { I'd put each condition on its own line for easier parsing: Suggestion: if ((!au.contains("0")) || (!au.contains("0")) || (!au.contains("0")) || (!au.contains("0")) || (!au.contains("0"))) { test/jdk/javax/swing/text/html/HTMLEditorKit/bug4238223.java line 53: > 51: public void handleComment(char[] data, int pos) { > 52: if (! (new String(data)).equals(commentData) || > 53: pos != commentIndex) { Suggestion: if (!(new String(data)).equals(commentData) || pos != commentIndex) { There are no spaces after the `!` operator in the following `if` statements. I would also suggest wrapping before the operator. test/jdk/javax/swing/text/html/HTMLEditorKit/bug4238223.java line 65: > 63: public void handleEndTag(HTML.Tag tag, int pos) { > 64: if (! tag.equals(endTags[endTagIndex]) || > 65: pos != endTagPositions[endTagIndex]) { Suggestion: if (!tag.equals(endTags[endTagIndex]) || pos != endTagPositions[endTagIndex]) { No space after `!`, wrap before the operator. ------------- PR Review: https://git.openjdk.org/jdk/pull/15751#pullrequestreview-1630751026 PR Review Comment: https://git.openjdk.org/jdk/pull/15751#discussion_r1328542244 PR Review Comment: https://git.openjdk.org/jdk/pull/15751#discussion_r1328539646 PR Review Comment: https://git.openjdk.org/jdk/pull/15751#discussion_r1328540293 PR Review Comment: https://git.openjdk.org/jdk/pull/15751#discussion_r1328538649 PR Review Comment: https://git.openjdk.org/jdk/pull/15751#discussion_r1328547079 PR Review Comment: https://git.openjdk.org/jdk/pull/15751#discussion_r1328550046 PR Review Comment: https://git.openjdk.org/jdk/pull/15751#discussion_r1328554453 PR Review Comment: https://git.openjdk.org/jdk/pull/15751#discussion_r1328555225 PR Review Comment: https://git.openjdk.org/jdk/pull/15751#discussion_r1328556251 PR Review Comment: https://git.openjdk.org/jdk/pull/15751#discussion_r1328561252 PR Review Comment: https://git.openjdk.org/jdk/pull/15751#discussion_r1328562325 From aturbanov at openjdk.org Mon Sep 18 11:47:42 2023 From: aturbanov at openjdk.org (Andrey Turbanov) Date: Mon, 18 Sep 2023 11:47:42 GMT Subject: RFR: JDK-8315876 Open source several Swing CSS related tests In-Reply-To: <5z0tnBVggYqlegmOHcIZhw9aoGeRo2XMaHwkVz9WNCQ=.44da2e5a-9dfa-44b1-b8b2-c8e285007ec1@github.com> References: <5z0tnBVggYqlegmOHcIZhw9aoGeRo2XMaHwkVz9WNCQ=.44da2e5a-9dfa-44b1-b8b2-c8e285007ec1@github.com> Message-ID: On Fri, 15 Sep 2023 19:35:15 GMT, Harshitha Onkar wrote: > Following tests are open sourced as part of this PR. > > 1. test/jdk/javax/swing/text/html/CSS/bug4174871.java > 2. test/jdk/javax/swing/text/html/CSS/bug4174874.java > 3. test/jdk/javax/swing/text/html/CSS/bug4284162.java > 4. test/jdk/javax/swing/text/html/CSS/bug4764897.java > 5. test/jdk/javax/swing/text/html/HTMLDocument/bug4209280.java test/jdk/javax/swing/text/html/CSS/bug4174871.java line 89: > 87: while (!(v instanceof javax.swing.text.html.ParagraphView)) { > 88: int n = v.getViewCount(); > 89: Shape sh = v.getChildAllocation(n - 1, r); Suggestion: Shape sh = v.getChildAllocation(n - 1, r); test/jdk/javax/swing/text/html/CSS/bug4174874.java line 88: > 86: while (!(v instanceof javax.swing.text.html.ParagraphView)) { > 87: int n = v.getViewCount(); > 88: Shape sh = v.getChildAllocation(n - 1, r); Suggestion: Shape sh = v.getChildAllocation(n - 1, r); ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/15769#discussion_r1328597822 PR Review Comment: https://git.openjdk.org/jdk/pull/15769#discussion_r1328598073 From azvegint at openjdk.org Mon Sep 18 12:44:08 2023 From: azvegint at openjdk.org (Alexander Zvegintsev) Date: Mon, 18 Sep 2023 12:44:08 GMT Subject: RFR: 8316389: Open source few AWT applet tests Message-ID: <18fnIFEUM9J1uSTp3HXXpEWl55jRkBRmKaaHkuLuY9Y=.059437ba-d9d0-44be-bf02-d3091eaf2d39@github.com> Open sourcing few tests: java/awt/Frame/FrameRepackTest.java java/awt/Frame/FrameResizeTest/FrameResizeTest_1.java java/awt/Frame/FrameResizeTest/FrameResizeTest_2.java java/awt/Frame/WindowMoveTest.java ------------- Commit messages: - initial Changes: https://git.openjdk.org/jdk/pull/15787/files Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=15787&range=00 Issue: https://bugs.openjdk.org/browse/JDK-8316389 Stats: 582 lines in 4 files changed: 582 ins; 0 del; 0 mod Patch: https://git.openjdk.org/jdk/pull/15787.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/15787/head:pull/15787 PR: https://git.openjdk.org/jdk/pull/15787 From aivanov at openjdk.org Mon Sep 18 13:49:53 2023 From: aivanov at openjdk.org (Alexey Ivanov) Date: Mon, 18 Sep 2023 13:49:53 GMT Subject: RFR: 8315804: Open source several Swing JTabbedPane JTextArea JTextField tests In-Reply-To: References: Message-ID: <478CQyCgOlwR8RT1Gyj7-VfD9ELOHiBORo-96yz-UBI=.46cf43f9-bc64-42f0-8545-32493d97d318@github.com> On Thu, 14 Sep 2023 16:35:44 GMT, Damon Nguyen wrote: > These are the tests being converted: > > javax/swing/JTabbedPane/4703690/bug4703690.java > javax/swing/JTabbedPane/GetComponentAt/GetComponentAtTest.java > javax/swing/JTabbedPane/ReplaceCompTab/ReplaceCompTab.java > javax/swing/JTextArea/4849868/bug4849868.java > javax/swing/JTextField/4244613/bug4244613.java Changes requested by aivanov (Reviewer). test/jdk/javax/swing/JTabbedPane/GetComponentAtTest.java line 48: > 46: > 47: public static void main(String[] args) throws InterruptedException, > 48: InvocationTargetException, AWTException { Suggestion: public static void main(String[] args) throws Exception { should be enough. test/jdk/javax/swing/JTabbedPane/ReplaceCompTab.java line 78: > 76: throw new RuntimeException("Adding first null " + > 77: "component failed:"); > 78: } Suggestion: } catch (Exception e) { throw new RuntimeException("Adding first null " + "component failed:", e); } Pass the original exception as the `cause` parameter if you catch an exception to provide a more specific error message. test/jdk/javax/swing/JTabbedPane/bug4703690.java line 47: > 45: > 46: public class bug4703690 { > 47: static JFrame fr; Suggestion: static JFrame frame; It's global after all, it doesn't save typing, yet improves the readability. test/jdk/javax/swing/JTabbedPane/bug4703690.java line 49: > 47: static JFrame fr; > 48: static JTabbedPane tabbedPane; > 49: static JPanel panel; The `panel` field can be local variable. test/jdk/javax/swing/JTabbedPane/bug4703690.java line 54: > 52: static volatile boolean focusButtonTwo = false; > 53: static volatile boolean switchToTabTwo = false; > 54: static volatile boolean focusButtonOne = false; Assigning the default value is redundant. Use CountDownLatch instead of boolean values: public void execute() { // Create robot two.requestFocus(); if (!focusButtonTwo.await(1, TimeUnit.SECONDS)) { throw new RuntimeException("Button two didn't receive focus"); } // Switch to tab two // do the click if (!switchToTabTwo.await(1, TimeUnit.SECONDS)) { throw new RuntimeException("Switching to tab two failed"); } // Switch to tab one // do the click if (!focusButtonOne.await(1, TimeUnit.SECONDS)) { throw new RuntimeException("The 'Button 1' button doesn't have focus"); } } The test completes much faster because there are no unneeded delays. test/jdk/javax/swing/JTabbedPane/bug4703690.java line 86: > 84: tabbedPane.addChangeListener(e -> { > 85: if (tabbedPane.getSelectedIndex() == 1) { > 86: switchToTabTwo = true; The value of `switchToTabTwo` is never read. test/jdk/javax/swing/JTabbedPane/bug4703690.java line 92: > 90: fr.setBounds(10, 10, 200, 200); > 91: fr.setVisible(true); > 92: fr.setLocationRelativeTo(null); Suggestion: fr.setSize(200, 200); fr.setLocationRelativeTo(null); fr.setVisible(true); test/jdk/javax/swing/JTabbedPane/bug4703690.java line 110: > 108: robot.setAutoDelay(50); > 109: robot.delay(1000); > 110: two.requestFocus(); It may need to be called on EDT too. Does it make sense to wait till the button receives focus? I assume the following actions depend on this to happen. test/jdk/javax/swing/JTabbedPane/bug4703690.java line 123: > 121: }); > 122: > 123: robot.delay(1000); This delay seems to be redundant. test/jdk/javax/swing/JTabbedPane/bug4703690.java line 136: > 134: }); > 135: > 136: robot.delay(1000); This delay seems redundant. test/jdk/javax/swing/JTabbedPane/bug4703690.java line 143: > 141: } catch (Exception t) { > 142: throw new RuntimeException("Test failed", t); > 143: } This catch is redundant ? declare the method to throw `Exception` and let them propagate to `main` which, in its turn, `throws Exception`. test/jdk/javax/swing/JTextArea/bug4849868.java line 54: > 52: > 53: public static void main(String[] args) throws InterruptedException, > 54: InvocationTargetException, AWTException { Suggestion: public static void main(String[] args) throws Exception { A generic `Exception` is enough for tests. test/jdk/javax/swing/JTextArea/bug4849868.java line 70: > 68: f.setSize(300, 300); > 69: f.setVisible(true); > 70: f.setLocationRelativeTo(null); Suggestion: f.setSize(300, 300); f.setLocationRelativeTo(null); f.setVisible(true); test/jdk/javax/swing/JTextArea/bug4849868.java line 73: > 71: }); > 72: > 73: robot.delay(1000); Suggestion: robot.waitForIdle(); robot.delay(1000); test/jdk/javax/swing/JTextArea/bug4849868.java line 76: > 74: > 75: SwingUtilities.invokeAndWait(() -> p = > 76: textArea.getLocationOnScreen()); Suggestion: SwingUtilities.invokeAndWait(() -> p = textArea.getLocationOnScreen()); I am absolutely sure it's better not to break the assignment in lambda expressions, especially when the variable name is a single letter. ------------- PR Review: https://git.openjdk.org/jdk/pull/15747#pullrequestreview-1630874424 PR Review Comment: https://git.openjdk.org/jdk/pull/15747#discussion_r1328615518 PR Review Comment: https://git.openjdk.org/jdk/pull/15747#discussion_r1328634584 PR Review Comment: https://git.openjdk.org/jdk/pull/15747#discussion_r1328672086 PR Review Comment: https://git.openjdk.org/jdk/pull/15747#discussion_r1328672403 PR Review Comment: https://git.openjdk.org/jdk/pull/15747#discussion_r1328635652 PR Review Comment: https://git.openjdk.org/jdk/pull/15747#discussion_r1328649916 PR Review Comment: https://git.openjdk.org/jdk/pull/15747#discussion_r1328640500 PR Review Comment: https://git.openjdk.org/jdk/pull/15747#discussion_r1328643194 PR Review Comment: https://git.openjdk.org/jdk/pull/15747#discussion_r1328644373 PR Review Comment: https://git.openjdk.org/jdk/pull/15747#discussion_r1328646166 PR Review Comment: https://git.openjdk.org/jdk/pull/15747#discussion_r1328675150 PR Review Comment: https://git.openjdk.org/jdk/pull/15747#discussion_r1328685659 PR Review Comment: https://git.openjdk.org/jdk/pull/15747#discussion_r1328684987 PR Review Comment: https://git.openjdk.org/jdk/pull/15747#discussion_r1328736989 PR Review Comment: https://git.openjdk.org/jdk/pull/15747#discussion_r1328734751 From aivanov at openjdk.org Mon Sep 18 13:49:55 2023 From: aivanov at openjdk.org (Alexey Ivanov) Date: Mon, 18 Sep 2023 13:49:55 GMT Subject: RFR: 8315804: Open source several Swing JTabbedPane JTextArea JTextField tests In-Reply-To: <7_JCeooEjRd3cxv21aVGX7lYtuZByGPp68RTOirta5U=.198e4b19-640a-4f35-af80-24776f32324c@github.com> References: <7_JCeooEjRd3cxv21aVGX7lYtuZByGPp68RTOirta5U=.198e4b19-640a-4f35-af80-24776f32324c@github.com> Message-ID: On Fri, 15 Sep 2023 22:54:32 GMT, Harshitha Onkar wrote: >> These are the tests being converted: >> >> javax/swing/JTabbedPane/4703690/bug4703690.java >> javax/swing/JTabbedPane/GetComponentAt/GetComponentAtTest.java >> javax/swing/JTabbedPane/ReplaceCompTab/ReplaceCompTab.java >> javax/swing/JTextArea/4849868/bug4849868.java >> javax/swing/JTextField/4244613/bug4244613.java > > test/jdk/javax/swing/JTabbedPane/bug4703690.java line 129: > >> 127: robot.mouseRelease(InputEvent.BUTTON1_DOWN_MASK); >> 128: >> 129: robot.delay(1000); > > Do we require a large amount of delay here? ideally ~200-300 would work I guess. `waitForIdle` and a small delay. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/15747#discussion_r1328645582 From aivanov at openjdk.org Mon Sep 18 13:59:41 2023 From: aivanov at openjdk.org (Alexey Ivanov) Date: Mon, 18 Sep 2023 13:59:41 GMT Subject: RFR: 8315804: Open source several Swing JTabbedPane JTextArea JTextField tests In-Reply-To: References: Message-ID: On Thu, 14 Sep 2023 16:35:44 GMT, Damon Nguyen wrote: > These are the tests being converted: > > javax/swing/JTabbedPane/4703690/bug4703690.java > javax/swing/JTabbedPane/GetComponentAt/GetComponentAtTest.java > javax/swing/JTabbedPane/ReplaceCompTab/ReplaceCompTab.java > javax/swing/JTextArea/4849868/bug4849868.java > javax/swing/JTextField/4244613/bug4244613.java test/jdk/javax/swing/JTextField/bug4244613.java line 40: > 38: /** Auxilliary class implementing Action > 39: */ > 40: static class NullAction implements Action { You may extend `AbstractAction` to reduce the amount of methods implemented. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/15747#discussion_r1328771683 From aivanov at openjdk.org Mon Sep 18 13:59:45 2023 From: aivanov at openjdk.org (Alexey Ivanov) Date: Mon, 18 Sep 2023 13:59:45 GMT Subject: RFR: 8315883: Open source several Swing JToolbar tests In-Reply-To: References: Message-ID: <33WxmrfxdOcZpniqxzonNmn9RkpFhJfjhH6etIW7PTs=.be4bf776-94ef-4435-a3a7-12db131a6f67@github.com> On Thu, 14 Sep 2023 16:43:29 GMT, Damon Nguyen wrote: > These are the tests being converted: > > javax/swing/JToolBar/4138694/bug4138694.java > javax/swing/JToolBar/4140421/bug4140421.java > javax/swing/JToolBar/4196662/bug4196662.java > javax/swing/JToolBar/4243930/bug4243930.java test/jdk/javax/swing/JToolBar/bug4138694.java line 48: > 46: public static void main(String[] args) throws InterruptedException, > 47: InvocationTargetException { > 48: SwingUtilities.invokeAndWait(() -> { This code can be safely run on the main thread, it does not depend on handling any events. test/jdk/javax/swing/JToolBar/bug4138694.java line 54: > 52: jtb.add(aa); > 53: JComponent c = (JComponent)jtb.getComponentAtIndex(0); > 54: if (!c.getToolTipText().equals("Action")) { You may want to introduce a constant for `"Action"`. test/jdk/javax/swing/JToolBar/bug4140421.java line 38: > 36: public static void main(String[] args) throws InterruptedException, > 37: InvocationTargetException { > 38: SwingUtilities.invokeAndWait(() -> { This code can be run safely on the main thread. test/jdk/javax/swing/JToolBar/bug4196662.java line 39: > 37: public static void main(String[] args) throws InterruptedException, > 38: InvocationTargetException { > 39: SwingUtilities.invokeAndWait(() -> { I think this can also be run on the main thread, if you like. test/jdk/javax/swing/JToolBar/bug4243930.java line 48: > 46: public static void main(String[] argv) throws InterruptedException, > 47: InvocationTargetException { > 48: SwingUtilities.invokeAndWait(() -> { Also safe to run on the main thread. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/15748#discussion_r1328761906 PR Review Comment: https://git.openjdk.org/jdk/pull/15748#discussion_r1328763099 PR Review Comment: https://git.openjdk.org/jdk/pull/15748#discussion_r1328764305 PR Review Comment: https://git.openjdk.org/jdk/pull/15748#discussion_r1328767371 PR Review Comment: https://git.openjdk.org/jdk/pull/15748#discussion_r1328770419 From aivanov at openjdk.org Mon Sep 18 14:07:45 2023 From: aivanov at openjdk.org (Alexey Ivanov) Date: Mon, 18 Sep 2023 14:07:45 GMT Subject: RFR: 8315952: Open source several Swing JToolbar JTooltip JTree tests In-Reply-To: References: Message-ID: <7ap3gH1xoBPdlAOgskZiQ95KJfDPmg1dqs0yLL18_Iw=.5cd98c00-365f-4eeb-bb3e-42bb5c26e1b2@github.com> On Thu, 14 Sep 2023 21:34:56 GMT, Damon Nguyen wrote: > These are the tests being converted: > > javax/swing/JToolBar/4368050/bug4368050.java > javax/swing/JToolBar/4465534/bug4465534.java > javax/swing/JToolBar/4700351/bug4700351.java > javax/swing/JToolTip/4107843/bug4107843.java > javax/swing/JTree/4161685/bug4161685.java test/jdk/javax/swing/JToolBar/bug4368050.java line 47: > 45: oos.writeObject(toolBar); > 46: byte[] buf = baos.toByteArray(); > 47: baos.close(); Use try-with-resources to close the streams automatically? test/jdk/javax/swing/JToolBar/bug4465534.java line 39: > 37: public static void main(String[] args) throws InterruptedException, > 38: InvocationTargetException { > 39: SwingUtilities.invokeAndWait(() -> { Safe to run on the main thread. test/jdk/javax/swing/JToolBar/bug4700351.java line 41: > 39: static JFrame fr; > 40: static JToolBar tb; > 41: static BasicToolBarUI ui; Both `tb` and `ui` can be converted to local variables. test/jdk/javax/swing/JToolBar/bug4700351.java line 46: > 44: InvocationTargetException { > 45: SwingUtilities.invokeAndWait(() -> { > 46: fr = new JFrame("bug4700351"); Dispose of the frame when the test completes? test/jdk/javax/swing/JToolTip/bug4107843.java line 45: > 43: tp.setToolTipTextAt(0, "first button"); > 44: if (!tp.getToolTipTextAt(0).equals("first button")) { > 45: throw new RuntimeException("ToolTipText doesn't set " + Suggestion: throw new RuntimeException("ToolTipText isn't set " + test/jdk/javax/swing/JToolTip/bug4107843.java line 50: > 48: tp.setToolTipTextAt(1, "second button"); > 49: if (!tp.getToolTipTextAt(1).equals("second button")) { > 50: throw new RuntimeException("ToolTipText doesn't set " + Suggestion: throw new RuntimeException("ToolTipText isn't set " + test/jdk/javax/swing/JTree/bug4161685.java line 45: > 43: tr.setAnchorSelectionPath(tp); > 44: if (tr.getAnchorSelectionPath() != tp) { > 45: throw new RuntimeException("AnchorSelectionPath doesn't " + Suggestion: throw new RuntimeException("AnchorSelectionPath isn't " + test/jdk/javax/swing/JTree/bug4161685.java line 50: > 48: tr.setLeadSelectionPath(tp); > 49: if (tr.getLeadSelectionPath() != tp) { > 50: throw new RuntimeException("LeadSelectionPath doesn't " + Suggestion: throw new RuntimeException("LeadSelectionPath isn't " + ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/15755#discussion_r1328773986 PR Review Comment: https://git.openjdk.org/jdk/pull/15755#discussion_r1328776673 PR Review Comment: https://git.openjdk.org/jdk/pull/15755#discussion_r1328779989 PR Review Comment: https://git.openjdk.org/jdk/pull/15755#discussion_r1328779142 PR Review Comment: https://git.openjdk.org/jdk/pull/15755#discussion_r1328781616 PR Review Comment: https://git.openjdk.org/jdk/pull/15755#discussion_r1328781833 PR Review Comment: https://git.openjdk.org/jdk/pull/15755#discussion_r1328783007 PR Review Comment: https://git.openjdk.org/jdk/pull/15755#discussion_r1328783312 From aivanov at openjdk.org Mon Sep 18 14:24:46 2023 From: aivanov at openjdk.org (Alexey Ivanov) Date: Mon, 18 Sep 2023 14:24:46 GMT Subject: RFR: 8316056: Open source several Swing JTree tests In-Reply-To: References: Message-ID: On Thu, 14 Sep 2023 21:40:55 GMT, Damon Nguyen wrote: > These are the tests being converted: > > javax/swing/JTree/4210432/bug4210432.java > javax/swing/JTree/4213868/bug4213868.java > javax/swing/JTree/4224491/bug4224491.java > javax/swing/JTree/4237370/bug4237370.java > javax/swing/JTree/4662505/bug4662505.java test/jdk/javax/swing/JTree/bug4213868.java line 50: > 48: > 49: public static void main(String[] args) throws InterruptedException, > 50: InvocationTargetException { Suggestion: public static void main(String[] args) throws Exception { test/jdk/javax/swing/JTree/bug4213868.java line 54: > 52: JTree parent = createTree(); > 53: AccessibleContext c = parent.getAccessibleContext() > 54: .getAccessibleChild(0).getAccessibleContext(); Suggestion: AccessibleContext c = parent.getAccessibleContext() .getAccessibleChild(0) .getAccessibleContext(); test/jdk/javax/swing/JTree/bug4213868.java line 56: > 54: .getAccessibleChild(0).getAccessibleContext(); > 55: if (c.getAccessibleChild(1).getAccessibleContext() > 56: .getAccessibleIndexInParent() != 1) { Suggestion: if (c.getAccessibleChild(1) .getAccessibleContext() .getAccessibleIndexInParent() != 1) { However, it doesn't look as good as the above. test/jdk/javax/swing/JTree/bug4224491.java line 43: > 41: > 42: public static void main(String[] args) throws InterruptedException, > 43: InvocationTargetException { Suggestion: public static void main(String[] args) throws Exception { test/jdk/javax/swing/JTree/bug4237370.java line 56: > 54: } > 55: > 56: public void treeExpanded (TreeExpansionEvent e) { Suggestion: public void treeExpanded(TreeExpansionEvent e) { ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/15756#discussion_r1328796256 PR Review Comment: https://git.openjdk.org/jdk/pull/15756#discussion_r1328792464 PR Review Comment: https://git.openjdk.org/jdk/pull/15756#discussion_r1328794420 PR Review Comment: https://git.openjdk.org/jdk/pull/15756#discussion_r1328796778 PR Review Comment: https://git.openjdk.org/jdk/pull/15756#discussion_r1328801475 From aivanov at openjdk.org Mon Sep 18 14:31:40 2023 From: aivanov at openjdk.org (Alexey Ivanov) Date: Mon, 18 Sep 2023 14:31:40 GMT Subject: RFR: 8219641: java/awt/font/Rotate/RotatedTextTest.java fails on Linux: Test failed for angle 15.0 In-Reply-To: References: Message-ID: On Mon, 18 Sep 2023 06:19:05 GMT, Arno Zeller wrote: > The test fails on newer SLES versions that have RobotoSlab-Regular.ttf as default font. I suggest to try getting a DejaVu font as default on Linux because it is known to work without issues. What is the root cause for the test failing with RobotoSlab-Regular.ttf? It doesn't look right to me to change the font without understanding why the test fails with it. Is it a bug in the JDK? Is it a bug in test? ------------- PR Comment: https://git.openjdk.org/jdk/pull/15780#issuecomment-1723542605 From mbaesken at openjdk.org Mon Sep 18 14:37:40 2023 From: mbaesken at openjdk.org (Matthias Baesken) Date: Mon, 18 Sep 2023 14:37:40 GMT Subject: RFR: 8219641: java/awt/font/Rotate/RotatedTextTest.java fails on Linux: Test failed for angle 15.0 In-Reply-To: References: Message-ID: <2U6xLbVTR_TRXHuJQxRJh0jTFwJa1xzlv80bk1flLso=.ea26fb78-3f86-4ac7-a2c9-a6088e8d15f6@github.com> On Mon, 18 Sep 2023 06:19:05 GMT, Arno Zeller wrote: > The test fails on newer SLES versions that have RobotoSlab-Regular.ttf as default font. I suggest to try getting a DejaVu font as default on Linux because it is known to work without issues. Hi Alexey, there is a bit of discussion here https://bugs.openjdk.org/browse/JDK-8219641 see the older comment .... The RobotoSlab-Regular.ttf: "Roboto Slab" "Regular" from /usr/share/fonts/truetype/RobotoSlab-Regular.ttf is indeed causing the trouble. fc-match shows this one as the preferred font for serif so probably thats why it shows up too when tracing is enabled. user at sles15-x86_64_machine:> fc-match serif RobotoSlab-Regular.ttf: "Roboto Slab" "Regular" The test RotatedTextTest shows a small width difference in the rotation (but the test assumes the width difference is 0 and fails). I wonder if the test can really assume a width difference 0 , is this really what we can expect for all fonts on the various distros ? I worked around the issue by changing the defaults stored in $HOME/.java/fonts//fcinfo-1-.... where I replaced Roboto Slab by the good old DejaVu Serif fileName=/usr/share/fonts/truetype/DejaVuSerif.ttf ; then the width difference is gone and the test passes . Is there a better way to change the font than adjusting $HOME/.java/fonts//fcinfo-1-.... ? And can we really assume a width-difference == 0 in the rotation process ? ------------- PR Comment: https://git.openjdk.org/jdk/pull/15780#issuecomment-1723562862 From aivanov at openjdk.org Mon Sep 18 14:56:39 2023 From: aivanov at openjdk.org (Alexey Ivanov) Date: Mon, 18 Sep 2023 14:56:39 GMT Subject: RFR: 8219641: java/awt/font/Rotate/RotatedTextTest.java fails on Linux: Test failed for angle 15.0 In-Reply-To: <2U6xLbVTR_TRXHuJQxRJh0jTFwJa1xzlv80bk1flLso=.ea26fb78-3f86-4ac7-a2c9-a6088e8d15f6@github.com> References: <2U6xLbVTR_TRXHuJQxRJh0jTFwJa1xzlv80bk1flLso=.ea26fb78-3f86-4ac7-a2c9-a6088e8d15f6@github.com> Message-ID: On Mon, 18 Sep 2023 14:34:31 GMT, Matthias Baesken wrote: > The test RotatedTextTest shows a small width difference in the rotation (but the test assumes the width difference is 0 and fails). I wonder if the test can really assume a width difference 0 , is this really what we can expect for all fonts on the various distros ? Perhaps, the test should allow for some small differences in widths. It could still be a bug in JDK where rounding isn't handled precisely. By choosing a different default font we may mask a problem. ------------- PR Comment: https://git.openjdk.org/jdk/pull/15780#issuecomment-1723611031 From honkar at openjdk.org Mon Sep 18 16:44:46 2023 From: honkar at openjdk.org (Harshitha Onkar) Date: Mon, 18 Sep 2023 16:44:46 GMT Subject: RFR: JDK-8311113: Remove invalid pointer cast and clean up setLabel() in awt_MenuItem.cpp [v4] In-Reply-To: References: <-UpmI9X_txepgRxGnsfSTtjwmqPQgtjeA5gqo-wmuGk=.3c84af65-e29e-4eeb-b393-efa9c990e721@github.com> Message-ID: On Thu, 14 Sep 2023 01:51:57 GMT, Sergey Bylokhov wrote: > Looks fine if the a11y things works fine, we probably can check for a possible cleanups in other places we use ownerdraw logic. I will be creating a separate issue to handle cleanup at other places. ------------- PR Comment: https://git.openjdk.org/jdk/pull/15276#issuecomment-1723923366 From honkar at openjdk.org Mon Sep 18 17:59:41 2023 From: honkar at openjdk.org (Harshitha Onkar) Date: Mon, 18 Sep 2023 17:59:41 GMT Subject: RFR: JDK-8315876 Open source several Swing CSS related tests In-Reply-To: References: <5z0tnBVggYqlegmOHcIZhw9aoGeRo2XMaHwkVz9WNCQ=.44da2e5a-9dfa-44b1-b8b2-c8e285007ec1@github.com> Message-ID: <0hfNM_4yzKFx-OCqFO5b-eCAzLBUZgcnwSnmAqTzeFI=.4093c6b2-0f73-4194-838d-8b6131f27c35@github.com> On Mon, 18 Sep 2023 10:33:24 GMT, Alexey Ivanov wrote: >> Following tests are open sourced as part of this PR. >> >> 1. test/jdk/javax/swing/text/html/CSS/bug4174871.java >> 2. test/jdk/javax/swing/text/html/CSS/bug4174874.java >> 3. test/jdk/javax/swing/text/html/CSS/bug4284162.java >> 4. test/jdk/javax/swing/text/html/CSS/bug4764897.java >> 5. test/jdk/javax/swing/text/html/HTMLDocument/bug4209280.java > > test/jdk/javax/swing/text/html/HTMLDocument/bug4209280.java line 41: > >> 39: JFrame jFrame = new JFrame("Unknown HTML tag Test"); >> 40: String html = "Foo"; >> 41: JLabel label = new JLabel(html); > > I wonder if the test could be headless. I presume the exception is thrown when HTML is parsed. Does it happen in constructor? Does it happen when the label is added to a container? > > Is it enough to create the label? I believe the original issue occurred when invalid html tags were set in the constructor -`new JLabel(html)` [JDK-4245889](https://bugs.openjdk.org/browse/JDK-4245889). For making it headless I think it is probably sufficient to just create the label with invalid html tag then? ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/15769#discussion_r1329095905 From aivanov at openjdk.org Mon Sep 18 18:06:41 2023 From: aivanov at openjdk.org (Alexey Ivanov) Date: Mon, 18 Sep 2023 18:06:41 GMT Subject: RFR: JDK-8315876 Open source several Swing CSS related tests In-Reply-To: <0hfNM_4yzKFx-OCqFO5b-eCAzLBUZgcnwSnmAqTzeFI=.4093c6b2-0f73-4194-838d-8b6131f27c35@github.com> References: <5z0tnBVggYqlegmOHcIZhw9aoGeRo2XMaHwkVz9WNCQ=.44da2e5a-9dfa-44b1-b8b2-c8e285007ec1@github.com> <0hfNM_4yzKFx-OCqFO5b-eCAzLBUZgcnwSnmAqTzeFI=.4093c6b2-0f73-4194-838d-8b6131f27c35@github.com> Message-ID: On Mon, 18 Sep 2023 17:56:28 GMT, Harshitha Onkar wrote: >> test/jdk/javax/swing/text/html/HTMLDocument/bug4209280.java line 41: >> >>> 39: JFrame jFrame = new JFrame("Unknown HTML tag Test"); >>> 40: String html = "Foo"; >>> 41: JLabel label = new JLabel(html); >> >> I wonder if the test could be headless. I presume the exception is thrown when HTML is parsed. Does it happen in constructor? Does it happen when the label is added to a container? >> >> Is it enough to create the label? > > I believe the original issue occurred when invalid html tags were set in the constructor -`new JLabel(html)` [JDK-4245889](https://bugs.openjdk.org/browse/JDK-4245889). > > For making it headless I think it is probably sufficient to just create the label with invalid html tag then? I think so. You can also run the test in jdk1.2.0 or jdk1.2.2 to ensure it still reproduces the problem and then confirm jdk1.3.0 doesn't reproduce it. Without `invokeAndWait` and the lambda expression, it should compile fine. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/15769#discussion_r1329102964 From honkar at openjdk.org Mon Sep 18 18:19:40 2023 From: honkar at openjdk.org (Harshitha Onkar) Date: Mon, 18 Sep 2023 18:19:40 GMT Subject: RFR: JDK-8315876 Open source several Swing CSS related tests In-Reply-To: References: <5z0tnBVggYqlegmOHcIZhw9aoGeRo2XMaHwkVz9WNCQ=.44da2e5a-9dfa-44b1-b8b2-c8e285007ec1@github.com> Message-ID: On Mon, 18 Sep 2023 10:05:40 GMT, Alexey Ivanov wrote: >> Following tests are open sourced as part of this PR. >> >> 1. test/jdk/javax/swing/text/html/CSS/bug4174871.java >> 2. test/jdk/javax/swing/text/html/CSS/bug4174874.java >> 3. test/jdk/javax/swing/text/html/CSS/bug4284162.java >> 4. test/jdk/javax/swing/text/html/CSS/bug4764897.java >> 5. test/jdk/javax/swing/text/html/HTMLDocument/bug4209280.java > > test/jdk/javax/swing/text/html/CSS/bug4174871.java line 41: > >> 39: private static JFrame frame; >> 40: private static JTextPane pane; >> 41: private static volatile boolean passed = false; > > Explicitly assigning the default value is redundant. > > Moreover, you always assign a value in the `testUI` method. > > This comment also applies to the tests below. I agree. There are some tests that start with passed as 'true', hence explicitly assigned 'false' to boolean var in these tests even though it is redundant as to add clarity when running the tests. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/15769#discussion_r1329114518 From dnguyen at openjdk.org Mon Sep 18 18:48:42 2023 From: dnguyen at openjdk.org (Damon Nguyen) Date: Mon, 18 Sep 2023 18:48:42 GMT Subject: RFR: 8315804: Open source several Swing JTabbedPane JTextArea JTextField tests [v2] In-Reply-To: References: Message-ID: > These are the tests being converted: > > javax/swing/JTabbedPane/4703690/bug4703690.java > javax/swing/JTabbedPane/GetComponentAt/GetComponentAtTest.java > javax/swing/JTabbedPane/ReplaceCompTab/ReplaceCompTab.java > javax/swing/JTextArea/4849868/bug4849868.java > javax/swing/JTextField/4244613/bug4244613.java Damon Nguyen has updated the pull request incrementally with one additional commit since the last revision: Review comments update ------------- Changes: - all: https://git.openjdk.org/jdk/pull/15747/files - new: https://git.openjdk.org/jdk/pull/15747/files/e2a6b227..93e3c67f Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=15747&range=01 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=15747&range=00-01 Stats: 104 lines in 5 files changed: 25 ins; 41 del; 38 mod Patch: https://git.openjdk.org/jdk/pull/15747.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/15747/head:pull/15747 PR: https://git.openjdk.org/jdk/pull/15747 From honkar at openjdk.org Mon Sep 18 18:54:39 2023 From: honkar at openjdk.org (Harshitha Onkar) Date: Mon, 18 Sep 2023 18:54:39 GMT Subject: RFR: JDK-8315876 Open source several Swing CSS related tests [v2] In-Reply-To: <5z0tnBVggYqlegmOHcIZhw9aoGeRo2XMaHwkVz9WNCQ=.44da2e5a-9dfa-44b1-b8b2-c8e285007ec1@github.com> References: <5z0tnBVggYqlegmOHcIZhw9aoGeRo2XMaHwkVz9WNCQ=.44da2e5a-9dfa-44b1-b8b2-c8e285007ec1@github.com> Message-ID: > Following tests are open sourced as part of this PR. > > 1. test/jdk/javax/swing/text/html/CSS/bug4174871.java > 2. test/jdk/javax/swing/text/html/CSS/bug4174874.java > 3. test/jdk/javax/swing/text/html/CSS/bug4284162.java > 4. test/jdk/javax/swing/text/html/CSS/bug4764897.java > 5. test/jdk/javax/swing/text/html/HTMLDocument/bug4209280.java Harshitha Onkar has updated the pull request incrementally with one additional commit since the last revision: few review change update ------------- Changes: - all: https://git.openjdk.org/jdk/pull/15769/files - new: https://git.openjdk.org/jdk/pull/15769/files/91114976..4d52fc3d Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=15769&range=01 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=15769&range=00-01 Stats: 21 lines in 4 files changed: 5 ins; 7 del; 9 mod Patch: https://git.openjdk.org/jdk/pull/15769.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/15769/head:pull/15769 PR: https://git.openjdk.org/jdk/pull/15769 From dnguyen at openjdk.org Mon Sep 18 18:55:37 2023 From: dnguyen at openjdk.org (Damon Nguyen) Date: Mon, 18 Sep 2023 18:55:37 GMT Subject: RFR: 8315883: Open source several Swing JToolbar tests [v2] In-Reply-To: References: Message-ID: > These are the tests being converted: > > javax/swing/JToolBar/4138694/bug4138694.java > javax/swing/JToolBar/4140421/bug4140421.java > javax/swing/JToolBar/4196662/bug4196662.java > javax/swing/JToolBar/4243930/bug4243930.java Damon Nguyen has updated the pull request incrementally with one additional commit since the last revision: Review comments update ------------- Changes: - all: https://git.openjdk.org/jdk/pull/15748/files - new: https://git.openjdk.org/jdk/pull/15748/files/a8c8176c..a1755a88 Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=15748&range=01 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=15748&range=00-01 Stats: 15 lines in 3 files changed: 2 ins; 8 del; 5 mod Patch: https://git.openjdk.org/jdk/pull/15748.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/15748/head:pull/15748 PR: https://git.openjdk.org/jdk/pull/15748 From dnguyen at openjdk.org Mon Sep 18 18:55:39 2023 From: dnguyen at openjdk.org (Damon Nguyen) Date: Mon, 18 Sep 2023 18:55:39 GMT Subject: RFR: 8315883: Open source several Swing JToolbar tests [v2] In-Reply-To: <_FJTNy276T6FkvzL7f16IT0jGnxY9XcFKRmsIm78IKA=.cf0b748b-826b-44e6-8e01-4e5e8f740459@github.com> References: <_FJTNy276T6FkvzL7f16IT0jGnxY9XcFKRmsIm78IKA=.cf0b748b-826b-44e6-8e01-4e5e8f740459@github.com> Message-ID: <-08NEEwMyZDbYXg4t5aD7ovGYzhc6HcfQdjn88QUTz0=.0acabb45-3af2-476e-8b2b-7690c9a13a62@github.com> On Fri, 15 Sep 2023 23:03:49 GMT, Harshitha Onkar wrote: >> Damon Nguyen has updated the pull request incrementally with one additional commit since the last revision: >> >> Review comments update > > test/jdk/javax/swing/JToolBar/bug4138694.java line 47: > >> 45: >> 46: public static void main(String[] args) throws InterruptedException, >> 47: InvocationTargetException { > > Suggestion: > > public static void main(String[] args) throws Exception { Fixed where applicable ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/15748#discussion_r1329148603 From dnguyen at openjdk.org Mon Sep 18 18:55:41 2023 From: dnguyen at openjdk.org (Damon Nguyen) Date: Mon, 18 Sep 2023 18:55:41 GMT Subject: RFR: 8315883: Open source several Swing JToolbar tests [v2] In-Reply-To: <33WxmrfxdOcZpniqxzonNmn9RkpFhJfjhH6etIW7PTs=.be4bf776-94ef-4435-a3a7-12db131a6f67@github.com> References: <33WxmrfxdOcZpniqxzonNmn9RkpFhJfjhH6etIW7PTs=.be4bf776-94ef-4435-a3a7-12db131a6f67@github.com> Message-ID: On Mon, 18 Sep 2023 13:50:20 GMT, Alexey Ivanov wrote: >> Damon Nguyen has updated the pull request incrementally with one additional commit since the last revision: >> >> Review comments update > > test/jdk/javax/swing/JToolBar/bug4138694.java line 48: > >> 46: public static void main(String[] args) throws InterruptedException, >> 47: InvocationTargetException { >> 48: SwingUtilities.invokeAndWait(() -> { > > This code can be safely run on the main thread, it does not depend on handling any events. In our group discussions, it was decided that running components on the EDT anyway was better even though the test is headless and doesn't necessarily require being run on the EDT. > test/jdk/javax/swing/JToolBar/bug4138694.java line 54: > >> 52: jtb.add(aa); >> 53: JComponent c = (JComponent)jtb.getComponentAtIndex(0); >> 54: if (!c.getToolTipText().equals("Action")) { > > You may want to introduce a constant for `"Action"`. Added. Thanks! > test/jdk/javax/swing/JToolBar/bug4140421.java line 38: > >> 36: public static void main(String[] args) throws InterruptedException, >> 37: InvocationTargetException { >> 38: SwingUtilities.invokeAndWait(() -> { > > This code can be run safely on the main thread. Response on first instance above. > test/jdk/javax/swing/JToolBar/bug4196662.java line 39: > >> 37: public static void main(String[] args) throws InterruptedException, >> 38: InvocationTargetException { >> 39: SwingUtilities.invokeAndWait(() -> { > > I think this can also be run on the main thread, if you like. Response on first instance above. > test/jdk/javax/swing/JToolBar/bug4243930.java line 48: > >> 46: public static void main(String[] argv) throws InterruptedException, >> 47: InvocationTargetException { >> 48: SwingUtilities.invokeAndWait(() -> { > > Also safe to run on the main thread. Response on first instance above. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/15748#discussion_r1329150216 PR Review Comment: https://git.openjdk.org/jdk/pull/15748#discussion_r1329150379 PR Review Comment: https://git.openjdk.org/jdk/pull/15748#discussion_r1329150620 PR Review Comment: https://git.openjdk.org/jdk/pull/15748#discussion_r1329150723 PR Review Comment: https://git.openjdk.org/jdk/pull/15748#discussion_r1329150796 From dnguyen at openjdk.org Mon Sep 18 19:00:48 2023 From: dnguyen at openjdk.org (Damon Nguyen) Date: Mon, 18 Sep 2023 19:00:48 GMT Subject: RFR: 8315804: Open source several Swing JTabbedPane JTextArea JTextField tests [v3] In-Reply-To: References: Message-ID: <8G1DhCemglIcPgoxiSK5BFe68IqY-OM2V7uCwIeb1-g=.56ff205a-2365-4648-bc1d-28f05d5e0a7f@github.com> > These are the tests being converted: > > javax/swing/JTabbedPane/4703690/bug4703690.java > javax/swing/JTabbedPane/GetComponentAt/GetComponentAtTest.java > javax/swing/JTabbedPane/ReplaceCompTab/ReplaceCompTab.java > javax/swing/JTextArea/4849868/bug4849868.java > javax/swing/JTextField/4244613/bug4244613.java Damon Nguyen has updated the pull request incrementally with one additional commit since the last revision: Add original exception ------------- Changes: - all: https://git.openjdk.org/jdk/pull/15747/files - new: https://git.openjdk.org/jdk/pull/15747/files/93e3c67f..8beaad1a Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=15747&range=02 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=15747&range=01-02 Stats: 1 line in 1 file changed: 0 ins; 0 del; 1 mod Patch: https://git.openjdk.org/jdk/pull/15747.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/15747/head:pull/15747 PR: https://git.openjdk.org/jdk/pull/15747 From dnguyen at openjdk.org Mon Sep 18 19:00:53 2023 From: dnguyen at openjdk.org (Damon Nguyen) Date: Mon, 18 Sep 2023 19:00:53 GMT Subject: RFR: 8315804: Open source several Swing JTabbedPane JTextArea JTextField tests [v3] In-Reply-To: <478CQyCgOlwR8RT1Gyj7-VfD9ELOHiBORo-96yz-UBI=.46cf43f9-bc64-42f0-8545-32493d97d318@github.com> References: <478CQyCgOlwR8RT1Gyj7-VfD9ELOHiBORo-96yz-UBI=.46cf43f9-bc64-42f0-8545-32493d97d318@github.com> Message-ID: On Mon, 18 Sep 2023 12:58:08 GMT, Alexey Ivanov wrote: >> Damon Nguyen has updated the pull request incrementally with one additional commit since the last revision: >> >> Add original exception > > test/jdk/javax/swing/JTextArea/bug4849868.java line 70: > >> 68: f.setSize(300, 300); >> 69: f.setVisible(true); >> 70: f.setLocationRelativeTo(null); > > Suggestion: > > f.setSize(300, 300); > f.setLocationRelativeTo(null); > f.setVisible(true); Thanks for catching this > test/jdk/javax/swing/JTextArea/bug4849868.java line 73: > >> 71: }); >> 72: >> 73: robot.delay(1000); > > Suggestion: > > robot.waitForIdle(); > robot.delay(1000); Added. thanks > test/jdk/javax/swing/JTextField/bug4244613.java line 40: > >> 38: /** Auxilliary class implementing Action >> 39: */ >> 40: static class NullAction implements Action { > > You may extend `AbstractAction` to reduce the amount of methods implemented. Took your advice. Thanks ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/15747#discussion_r1329154180 PR Review Comment: https://git.openjdk.org/jdk/pull/15747#discussion_r1329153650 PR Review Comment: https://git.openjdk.org/jdk/pull/15747#discussion_r1329153861 From dnguyen at openjdk.org Mon Sep 18 19:00:51 2023 From: dnguyen at openjdk.org (Damon Nguyen) Date: Mon, 18 Sep 2023 19:00:51 GMT Subject: RFR: 8315804: Open source several Swing JTabbedPane JTextArea JTextField tests [v3] In-Reply-To: <7_JCeooEjRd3cxv21aVGX7lYtuZByGPp68RTOirta5U=.198e4b19-640a-4f35-af80-24776f32324c@github.com> References: <7_JCeooEjRd3cxv21aVGX7lYtuZByGPp68RTOirta5U=.198e4b19-640a-4f35-af80-24776f32324c@github.com> Message-ID: On Fri, 15 Sep 2023 22:51:00 GMT, Harshitha Onkar wrote: >> Damon Nguyen has updated the pull request incrementally with one additional commit since the last revision: >> >> Add original exception > > test/jdk/javax/swing/JTabbedPane/ReplaceCompTab.java line 46: > >> 44: static JFrame f; >> 45: >> 46: public static void main(String[] args) throws InterruptedException, > > Generic Exception can be thrown Replaced where applicable. Thanks! > test/jdk/javax/swing/JTabbedPane/ReplaceCompTab.java line 75: > >> 73: } catch (Exception e) { >> 74: System.out.println(e); >> 75: e.printStackTrace(); > > These lines are not required since RuntimeException is being thrown subsequently. Removed ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/15747#discussion_r1329151183 PR Review Comment: https://git.openjdk.org/jdk/pull/15747#discussion_r1329151294 From aivanov at openjdk.org Mon Sep 18 19:02:41 2023 From: aivanov at openjdk.org (Alexey Ivanov) Date: Mon, 18 Sep 2023 19:02:41 GMT Subject: RFR: 8315804: Open source several Swing JTabbedPane JTextArea JTextField tests [v3] In-Reply-To: <8G1DhCemglIcPgoxiSK5BFe68IqY-OM2V7uCwIeb1-g=.56ff205a-2365-4648-bc1d-28f05d5e0a7f@github.com> References: <8G1DhCemglIcPgoxiSK5BFe68IqY-OM2V7uCwIeb1-g=.56ff205a-2365-4648-bc1d-28f05d5e0a7f@github.com> Message-ID: On Mon, 18 Sep 2023 19:00:48 GMT, Damon Nguyen wrote: >> These are the tests being converted: >> >> javax/swing/JTabbedPane/4703690/bug4703690.java >> javax/swing/JTabbedPane/GetComponentAt/GetComponentAtTest.java >> javax/swing/JTabbedPane/ReplaceCompTab/ReplaceCompTab.java >> javax/swing/JTextArea/4849868/bug4849868.java >> javax/swing/JTextField/4244613/bug4244613.java > > Damon Nguyen has updated the pull request incrementally with one additional commit since the last revision: > > Add original exception test/jdk/javax/swing/JTabbedPane/bug4703690.java line 108: > 106: robot.setAutoDelay(50); > 107: > 108: two.requestFocus(); If you say that EDT is better, this call should also be called on EDT. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/15747#discussion_r1329159094 From aivanov at openjdk.org Mon Sep 18 19:05:43 2023 From: aivanov at openjdk.org (Alexey Ivanov) Date: Mon, 18 Sep 2023 19:05:43 GMT Subject: RFR: 8315883: Open source several Swing JToolbar tests [v2] In-Reply-To: References: Message-ID: On Mon, 18 Sep 2023 18:55:37 GMT, Damon Nguyen wrote: >> These are the tests being converted: >> >> javax/swing/JToolBar/4138694/bug4138694.java >> javax/swing/JToolBar/4140421/bug4140421.java >> javax/swing/JToolBar/4196662/bug4196662.java >> javax/swing/JToolBar/4243930/bug4243930.java > > Damon Nguyen has updated the pull request incrementally with one additional commit since the last revision: > > Review comments update Marked as reviewed by aivanov (Reviewer). test/jdk/javax/swing/JToolBar/bug4138694.java line 41: > 39: > 40: public class bug4138694 { > 41: public static final String exampleText = "Action"; Suggestion: private static final String actionName = "Action"; It fits better this way, but it's unimportant. ------------- PR Review: https://git.openjdk.org/jdk/pull/15748#pullrequestreview-1631785385 PR Review Comment: https://git.openjdk.org/jdk/pull/15748#discussion_r1329162525 From dnguyen at openjdk.org Mon Sep 18 19:09:41 2023 From: dnguyen at openjdk.org (Damon Nguyen) Date: Mon, 18 Sep 2023 19:09:41 GMT Subject: RFR: 8316056: Open source several Swing JTree tests [v2] In-Reply-To: References: Message-ID: > These are the tests being converted: > > javax/swing/JTree/4210432/bug4210432.java > javax/swing/JTree/4213868/bug4213868.java > javax/swing/JTree/4224491/bug4224491.java > javax/swing/JTree/4237370/bug4237370.java > javax/swing/JTree/4662505/bug4662505.java Damon Nguyen has updated the pull request incrementally with one additional commit since the last revision: Review comments changes ------------- Changes: - all: https://git.openjdk.org/jdk/pull/15756/files - new: https://git.openjdk.org/jdk/pull/15756/files/a9bd7dcc..8e881ae7 Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=15756&range=01 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=15756&range=00-01 Stats: 20 lines in 4 files changed: 2 ins; 9 del; 9 mod Patch: https://git.openjdk.org/jdk/pull/15756.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/15756/head:pull/15756 PR: https://git.openjdk.org/jdk/pull/15756 From dnguyen at openjdk.org Mon Sep 18 19:09:45 2023 From: dnguyen at openjdk.org (Damon Nguyen) Date: Mon, 18 Sep 2023 19:09:45 GMT Subject: RFR: 8316056: Open source several Swing JTree tests [v2] In-Reply-To: References: Message-ID: On Fri, 15 Sep 2023 23:12:32 GMT, Harshitha Onkar wrote: >> Damon Nguyen has updated the pull request incrementally with one additional commit since the last revision: >> >> Review comments changes > > test/jdk/javax/swing/JTree/bug4213868.java line 44: > >> 42: JTree tree = new JTree(root); >> 43: for (int i = 1; i < 10; i++) { >> 44: root.add(new DefaultMutableTreeNode(Integer.valueOf(i))); > > Suggestion: > > new DefaultMutableTreeNode(0, true); > JTree tree = new JTree(root); > for (int i = 1; i < 10; i++) { > root.add(new DefaultMutableTreeNode(i)); Changed to normal int. Thanks! ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/15756#discussion_r1329163553 From dnguyen at openjdk.org Mon Sep 18 19:09:48 2023 From: dnguyen at openjdk.org (Damon Nguyen) Date: Mon, 18 Sep 2023 19:09:48 GMT Subject: RFR: 8316056: Open source several Swing JTree tests [v2] In-Reply-To: References: Message-ID: On Mon, 18 Sep 2023 14:10:01 GMT, Alexey Ivanov wrote: >> Damon Nguyen has updated the pull request incrementally with one additional commit since the last revision: >> >> Review comments changes > > test/jdk/javax/swing/JTree/bug4213868.java line 54: > >> 52: JTree parent = createTree(); >> 53: AccessibleContext c = parent.getAccessibleContext() >> 54: .getAccessibleChild(0).getAccessibleContext(); > > Suggestion: > > AccessibleContext c = parent.getAccessibleContext() > .getAccessibleChild(0) > .getAccessibleContext(); Added the newlines and alignments, thanks > test/jdk/javax/swing/JTree/bug4213868.java line 56: > >> 54: .getAccessibleChild(0).getAccessibleContext(); >> 55: if (c.getAccessibleChild(1).getAccessibleContext() >> 56: .getAccessibleIndexInParent() != 1) { > > Suggestion: > > if (c.getAccessibleChild(1) > .getAccessibleContext() > .getAccessibleIndexInParent() != 1) { > > However, it doesn't look as good as the above. Added the newlines and alignments, thanks > test/jdk/javax/swing/JTree/bug4224491.java line 43: > >> 41: >> 42: public static void main(String[] args) throws InterruptedException, >> 43: InvocationTargetException { > > Suggestion: > > public static void main(String[] args) throws Exception { Updated where applicable > test/jdk/javax/swing/JTree/bug4237370.java line 56: > >> 54: } >> 55: >> 56: public void treeExpanded (TreeExpansionEvent e) { > > Suggestion: > > public void treeExpanded(TreeExpansionEvent e) { Fixed ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/15756#discussion_r1329163276 PR Review Comment: https://git.openjdk.org/jdk/pull/15756#discussion_r1329163175 PR Review Comment: https://git.openjdk.org/jdk/pull/15756#discussion_r1329162846 PR Review Comment: https://git.openjdk.org/jdk/pull/15756#discussion_r1329162574 From aivanov at openjdk.org Mon Sep 18 19:10:45 2023 From: aivanov at openjdk.org (Alexey Ivanov) Date: Mon, 18 Sep 2023 19:10:45 GMT Subject: RFR: JDK-8315876 Open source several Swing CSS related tests [v2] In-Reply-To: References: <5z0tnBVggYqlegmOHcIZhw9aoGeRo2XMaHwkVz9WNCQ=.44da2e5a-9dfa-44b1-b8b2-c8e285007ec1@github.com> Message-ID: On Mon, 18 Sep 2023 18:16:38 GMT, Harshitha Onkar wrote: >> test/jdk/javax/swing/text/html/CSS/bug4174871.java line 41: >> >>> 39: private static JFrame frame; >>> 40: private static JTextPane pane; >>> 41: private static volatile boolean passed = false; >> >> Explicitly assigning the default value is redundant. >> >> Moreover, you always assign a value in the `testUI` method. >> >> This comment also applies to the tests below. > > I agree. There are some tests that start with passed as 'true', hence explicitly assigned 'false' to boolean var in these tests even though it is redundant as to add clarity when running the tests. With volatile, it makes the test slightly slower. Other than that, there's not much harm. In most of these tests, there's no need for the `passed` field at all: you can throw the exception from the code where you set the value to `passed`, however, the stack trace will be less pretty because it will come from EDT. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/15769#discussion_r1329167488 From aivanov at openjdk.org Mon Sep 18 19:14:43 2023 From: aivanov at openjdk.org (Alexey Ivanov) Date: Mon, 18 Sep 2023 19:14:43 GMT Subject: RFR: JDK-8315876 Open source several Swing CSS related tests [v2] In-Reply-To: References: <5z0tnBVggYqlegmOHcIZhw9aoGeRo2XMaHwkVz9WNCQ=.44da2e5a-9dfa-44b1-b8b2-c8e285007ec1@github.com> Message-ID: On Mon, 18 Sep 2023 18:54:39 GMT, Harshitha Onkar wrote: >> Following tests are open sourced as part of this PR. >> >> 1. test/jdk/javax/swing/text/html/CSS/bug4174871.java >> 2. test/jdk/javax/swing/text/html/CSS/bug4174874.java >> 3. test/jdk/javax/swing/text/html/CSS/bug4284162.java >> 4. test/jdk/javax/swing/text/html/CSS/bug4764897.java >> 5. test/jdk/javax/swing/text/html/HTMLDocument/bug4209280.java > > Harshitha Onkar has updated the pull request incrementally with one additional commit since the last revision: > > few review change update Changes requested by aivanov (Reviewer). test/jdk/javax/swing/text/html/CSS/bug4174871.java line 52: > 50: > 51: SwingUtilities.invokeAndWait(bug4174871::testUI); > 52: robot.waitForIdle(); `waitForIdle` isn't necessary either: the value of `passed` has been set inside, it cannot change ? nothing's left to wait for. It applies to all the tests. ------------- PR Review: https://git.openjdk.org/jdk/pull/15769#pullrequestreview-1631797824 PR Review Comment: https://git.openjdk.org/jdk/pull/15769#discussion_r1329170948 From dnguyen at openjdk.org Mon Sep 18 19:14:45 2023 From: dnguyen at openjdk.org (Damon Nguyen) Date: Mon, 18 Sep 2023 19:14:45 GMT Subject: RFR: 8315804: Open source several Swing JTabbedPane JTextArea JTextField tests [v4] In-Reply-To: <478CQyCgOlwR8RT1Gyj7-VfD9ELOHiBORo-96yz-UBI=.46cf43f9-bc64-42f0-8545-32493d97d318@github.com> References: <478CQyCgOlwR8RT1Gyj7-VfD9ELOHiBORo-96yz-UBI=.46cf43f9-bc64-42f0-8545-32493d97d318@github.com> Message-ID: On Mon, 18 Sep 2023 12:16:23 GMT, Alexey Ivanov wrote: >> Damon Nguyen has updated the pull request incrementally with one additional commit since the last revision: >> >> Add focus to EDT > > test/jdk/javax/swing/JTabbedPane/bug4703690.java line 54: > >> 52: static volatile boolean focusButtonTwo = false; >> 53: static volatile boolean switchToTabTwo = false; >> 54: static volatile boolean focusButtonOne = false; > > Assigning the default value is redundant. > > Use CountDownLatch instead of boolean values: > > > public void execute() { > // Create robot > > two.requestFocus(); > > if (!focusButtonTwo.await(1, TimeUnit.SECONDS)) { > throw new RuntimeException("Button two didn't receive focus"); > } > > // Switch to tab two > // do the click > if (!switchToTabTwo.await(1, TimeUnit.SECONDS)) { > throw new RuntimeException("Switching to tab two failed"); > } > > // Switch to tab one > // do the click > if (!focusButtonOne.await(1, TimeUnit.SECONDS)) { > throw new RuntimeException("The 'Button 1' button doesn't have focus"); > } > } > > > The test completes much faster because there are no unneeded delays. The test runs much faster with your changes. Appreciate the advice ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/15747#discussion_r1329167895 From dnguyen at openjdk.org Mon Sep 18 19:14:42 2023 From: dnguyen at openjdk.org (Damon Nguyen) Date: Mon, 18 Sep 2023 19:14:42 GMT Subject: RFR: 8315804: Open source several Swing JTabbedPane JTextArea JTextField tests [v4] In-Reply-To: References: Message-ID: <6hxyNU6nAkGy2FVxgjmBSS-EUzWxtnkXMG2Qm9w_13c=.03736764-56b9-4285-baf7-b61771b7c912@github.com> > These are the tests being converted: > > javax/swing/JTabbedPane/4703690/bug4703690.java > javax/swing/JTabbedPane/GetComponentAt/GetComponentAtTest.java > javax/swing/JTabbedPane/ReplaceCompTab/ReplaceCompTab.java > javax/swing/JTextArea/4849868/bug4849868.java > javax/swing/JTextField/4244613/bug4244613.java Damon Nguyen has updated the pull request incrementally with one additional commit since the last revision: Add focus to EDT ------------- Changes: - all: https://git.openjdk.org/jdk/pull/15747/files - new: https://git.openjdk.org/jdk/pull/15747/files/8beaad1a..7da26827 Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=15747&range=03 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=15747&range=02-03 Stats: 1 line in 1 file changed: 0 ins; 0 del; 1 mod Patch: https://git.openjdk.org/jdk/pull/15747.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/15747/head:pull/15747 PR: https://git.openjdk.org/jdk/pull/15747 From dnguyen at openjdk.org Mon Sep 18 19:14:47 2023 From: dnguyen at openjdk.org (Damon Nguyen) Date: Mon, 18 Sep 2023 19:14:47 GMT Subject: RFR: 8315804: Open source several Swing JTabbedPane JTextArea JTextField tests [v3] In-Reply-To: References: <8G1DhCemglIcPgoxiSK5BFe68IqY-OM2V7uCwIeb1-g=.56ff205a-2365-4648-bc1d-28f05d5e0a7f@github.com> Message-ID: On Mon, 18 Sep 2023 18:58:43 GMT, Alexey Ivanov wrote: >> Damon Nguyen has updated the pull request incrementally with one additional commit since the last revision: >> >> Add original exception > > test/jdk/javax/swing/JTabbedPane/bug4703690.java line 108: > >> 106: robot.setAutoDelay(50); >> 107: >> 108: two.requestFocus(); > > If you say that EDT is better, this call should also be called on EDT. Added this line to EDT. Thanks again for the help with revamping this test! ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/15747#discussion_r1329166960 From aivanov at openjdk.org Mon Sep 18 19:17:43 2023 From: aivanov at openjdk.org (Alexey Ivanov) Date: Mon, 18 Sep 2023 19:17:43 GMT Subject: RFR: 8315804: Open source several Swing JTabbedPane JTextArea JTextField tests [v4] In-Reply-To: <6hxyNU6nAkGy2FVxgjmBSS-EUzWxtnkXMG2Qm9w_13c=.03736764-56b9-4285-baf7-b61771b7c912@github.com> References: <6hxyNU6nAkGy2FVxgjmBSS-EUzWxtnkXMG2Qm9w_13c=.03736764-56b9-4285-baf7-b61771b7c912@github.com> Message-ID: On Mon, 18 Sep 2023 19:14:42 GMT, Damon Nguyen wrote: >> These are the tests being converted: >> >> javax/swing/JTabbedPane/4703690/bug4703690.java >> javax/swing/JTabbedPane/GetComponentAt/GetComponentAtTest.java >> javax/swing/JTabbedPane/ReplaceCompTab/ReplaceCompTab.java >> javax/swing/JTextArea/4849868/bug4849868.java >> javax/swing/JTextField/4244613/bug4244613.java > > Damon Nguyen has updated the pull request incrementally with one additional commit since the last revision: > > Add focus to EDT Marked as reviewed by aivanov (Reviewer). test/jdk/javax/swing/JTabbedPane/bug4703690.java line 108: > 106: robot.setAutoDelay(50); > 107: > 108: SwingUtilities.invokeAndWait(() -> two.requestFocus()); My preference is using method reference wherever possible, this fixes an IDEA warning. It's up to you though. ------------- PR Review: https://git.openjdk.org/jdk/pull/15747#pullrequestreview-1631802951 PR Review Comment: https://git.openjdk.org/jdk/pull/15747#discussion_r1329174307 From aivanov at openjdk.org Mon Sep 18 19:18:38 2023 From: aivanov at openjdk.org (Alexey Ivanov) Date: Mon, 18 Sep 2023 19:18:38 GMT Subject: RFR: 8316056: Open source several Swing JTree tests [v2] In-Reply-To: References: Message-ID: On Mon, 18 Sep 2023 19:09:41 GMT, Damon Nguyen wrote: >> These are the tests being converted: >> >> javax/swing/JTree/4210432/bug4210432.java >> javax/swing/JTree/4213868/bug4213868.java >> javax/swing/JTree/4224491/bug4224491.java >> javax/swing/JTree/4237370/bug4237370.java >> javax/swing/JTree/4662505/bug4662505.java > > Damon Nguyen has updated the pull request incrementally with one additional commit since the last revision: > > Review comments changes Marked as reviewed by aivanov (Reviewer). ------------- PR Review: https://git.openjdk.org/jdk/pull/15756#pullrequestreview-1631805149 From dnguyen at openjdk.org Mon Sep 18 19:30:46 2023 From: dnguyen at openjdk.org (Damon Nguyen) Date: Mon, 18 Sep 2023 19:30:46 GMT Subject: RFR: 8315952: Open source several Swing JToolbar JTooltip JTree tests [v2] In-Reply-To: References: Message-ID: > These are the tests being converted: > > javax/swing/JToolBar/4368050/bug4368050.java > javax/swing/JToolBar/4465534/bug4465534.java > javax/swing/JToolBar/4700351/bug4700351.java > javax/swing/JToolTip/4107843/bug4107843.java > javax/swing/JTree/4161685/bug4161685.java Damon Nguyen has updated the pull request incrementally with one additional commit since the last revision: Review comments updates ------------- Changes: - all: https://git.openjdk.org/jdk/pull/15755/files - new: https://git.openjdk.org/jdk/pull/15755/files/9af9e179..4ba1c168 Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=15755&range=01 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=15755&range=00-01 Stats: 57 lines in 5 files changed: 7 ins; 16 del; 34 mod Patch: https://git.openjdk.org/jdk/pull/15755.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/15755/head:pull/15755 PR: https://git.openjdk.org/jdk/pull/15755 From dnguyen at openjdk.org Mon Sep 18 19:30:49 2023 From: dnguyen at openjdk.org (Damon Nguyen) Date: Mon, 18 Sep 2023 19:30:49 GMT Subject: RFR: 8315952: Open source several Swing JToolbar JTooltip JTree tests [v2] In-Reply-To: <7ap3gH1xoBPdlAOgskZiQ95KJfDPmg1dqs0yLL18_Iw=.5cd98c00-365f-4eeb-bb3e-42bb5c26e1b2@github.com> References: <7ap3gH1xoBPdlAOgskZiQ95KJfDPmg1dqs0yLL18_Iw=.5cd98c00-365f-4eeb-bb3e-42bb5c26e1b2@github.com> Message-ID: On Mon, 18 Sep 2023 13:58:18 GMT, Alexey Ivanov wrote: >> Damon Nguyen has updated the pull request incrementally with one additional commit since the last revision: >> >> Review comments updates > > test/jdk/javax/swing/JToolBar/bug4368050.java line 47: > >> 45: oos.writeObject(toolBar); >> 46: byte[] buf = baos.toByteArray(); >> 47: baos.close(); > > Use try-with-resources to close the streams automatically? I implemented try-with-resources where I could with the new changes. Thanks! > test/jdk/javax/swing/JToolBar/bug4465534.java line 39: > >> 37: public static void main(String[] args) throws InterruptedException, >> 38: InvocationTargetException { >> 39: SwingUtilities.invokeAndWait(() -> { > > Safe to run on the main thread. Same with other tests. Agreed to keep components on the EDT even if test is headless and doesn't _need_ to be on the EDT. > test/jdk/javax/swing/JToolBar/bug4700351.java line 46: > >> 44: InvocationTargetException { >> 45: SwingUtilities.invokeAndWait(() -> { >> 46: fr = new JFrame("bug4700351"); > > Dispose of the frame when the test completes? Added disposal ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/15755#discussion_r1329181613 PR Review Comment: https://git.openjdk.org/jdk/pull/15755#discussion_r1329183236 PR Review Comment: https://git.openjdk.org/jdk/pull/15755#discussion_r1329181744 From aivanov at openjdk.org Mon Sep 18 19:31:13 2023 From: aivanov at openjdk.org (Alexey Ivanov) Date: Mon, 18 Sep 2023 19:31:13 GMT Subject: RFR: 8315952: Open source several Swing JToolbar JTooltip JTree tests [v2] In-Reply-To: References: Message-ID: <-0NRQDu52JZMO_5W27Rxs--K1WN4M6pvWABnMbV2B70=.1d5dd448-3c1a-4eaf-8ca4-c8d14e2ff57f@github.com> On Mon, 18 Sep 2023 19:30:46 GMT, Damon Nguyen wrote: >> These are the tests being converted: >> >> javax/swing/JToolBar/4368050/bug4368050.java >> javax/swing/JToolBar/4465534/bug4465534.java >> javax/swing/JToolBar/4700351/bug4700351.java >> javax/swing/JToolTip/4107843/bug4107843.java >> javax/swing/JTree/4161685/bug4161685.java > > Damon Nguyen has updated the pull request incrementally with one additional commit since the last revision: > > Review comments updates Marked as reviewed by aivanov (Reviewer). ------------- PR Review: https://git.openjdk.org/jdk/pull/15755#pullrequestreview-1631822092 From azvegint at openjdk.org Mon Sep 18 21:20:29 2023 From: azvegint at openjdk.org (Alexander Zvegintsev) Date: Mon, 18 Sep 2023 21:20:29 GMT Subject: RFR: 8316389: Open source few AWT applet tests [v2] In-Reply-To: <18fnIFEUM9J1uSTp3HXXpEWl55jRkBRmKaaHkuLuY9Y=.059437ba-d9d0-44be-bf02-d3091eaf2d39@github.com> References: <18fnIFEUM9J1uSTp3HXXpEWl55jRkBRmKaaHkuLuY9Y=.059437ba-d9d0-44be-bf02-d3091eaf2d39@github.com> Message-ID: > Open sourcing few tests: > > java/awt/Frame/FrameRepackTest.java > java/awt/Frame/FrameResizeTest/FrameResizeTest_1.java > java/awt/Frame/FrameResizeTest/FrameResizeTest_2.java > java/awt/Frame/WindowMoveTest.java Alexander Zvegintsev has updated the pull request incrementally with one additional commit since the last revision: fix path ------------- Changes: - all: https://git.openjdk.org/jdk/pull/15787/files - new: https://git.openjdk.org/jdk/pull/15787/files/c85ef356..a3fa4954 Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=15787&range=01 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=15787&range=00-01 Stats: 3 lines in 3 files changed: 0 ins; 0 del; 3 mod Patch: https://git.openjdk.org/jdk/pull/15787.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/15787/head:pull/15787 PR: https://git.openjdk.org/jdk/pull/15787 From azvegint at openjdk.org Mon Sep 18 21:42:09 2023 From: azvegint at openjdk.org (Alexander Zvegintsev) Date: Mon, 18 Sep 2023 21:42:09 GMT Subject: RFR: 8316240: Open source several add/remove MenuBar manual tests Message-ID: <3HGUm3chbDleVC3u8poeuU1rtjnVxhj_ktYIl-kEv-s=.82156c33-f6b5-4515-a747-4083d2138d38@github.com> Open sourcing several MenuBar manual tests java/awt/MenuBar/AddRemoveMenuBarTests/AddRemoveMenuBarTest_1.java java/awt/MenuBar/AddRemoveMenuBarTests/AddRemoveMenuBarTest_2.java java/awt/MenuBar/AddRemoveMenuBarTests/AddRemoveMenuBarTest_3.java java/awt/MenuBar/AddRemoveMenuBarTests/AddRemoveMenuBarTest_4.java ------------- Commit messages: - 8316240: Open source several add/remove MenuBar manual tests Changes: https://git.openjdk.org/jdk/pull/15800/files Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=15800&range=00 Issue: https://bugs.openjdk.org/browse/JDK-8316240 Stats: 521 lines in 4 files changed: 521 ins; 0 del; 0 mod Patch: https://git.openjdk.org/jdk/pull/15800.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/15800/head:pull/15800 PR: https://git.openjdk.org/jdk/pull/15800 From honkar at openjdk.org Mon Sep 18 21:53:36 2023 From: honkar at openjdk.org (Harshitha Onkar) Date: Mon, 18 Sep 2023 21:53:36 GMT Subject: RFR: JDK-8315951: Open source several Swing HTMLEditorKit related tests [v2] In-Reply-To: <6kTx7IUAwD2sL8vUfqaOJhVF8vXDI8imvOuGBvgnG4U=.41946952-8e97-4a5c-aaa8-d1cf430ee0d4@github.com> References: <6kTx7IUAwD2sL8vUfqaOJhVF8vXDI8imvOuGBvgnG4U=.41946952-8e97-4a5c-aaa8-d1cf430ee0d4@github.com> Message-ID: > Following tests are open sourced as part of this PR. > > 1. java/awt/event/PaintEvent/RepaintTest/RepaintTest.java > 2. javax/swing/text/html/HTMLEditorKit/4214848/bug4214848.java > 3. javax/swing/text/html/HTMLEditorKit/4230197/bug4230197.java > 4. javax/swing/text/html/HTMLEditorKit/4238223/bug4238223.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/15751/files - new: https://git.openjdk.org/jdk/pull/15751/files/a8984390..10df4fcb Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=15751&range=01 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=15751&range=00-01 Stats: 40 lines in 4 files changed: 3 ins; 5 del; 32 mod Patch: https://git.openjdk.org/jdk/pull/15751.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/15751/head:pull/15751 PR: https://git.openjdk.org/jdk/pull/15751 From honkar at openjdk.org Mon Sep 18 21:53:38 2023 From: honkar at openjdk.org (Harshitha Onkar) Date: Mon, 18 Sep 2023 21:53:38 GMT Subject: RFR: JDK-8315951: Open source several Swing HTMLEditorKit related tests [v2] In-Reply-To: References: <6kTx7IUAwD2sL8vUfqaOJhVF8vXDI8imvOuGBvgnG4U=.41946952-8e97-4a5c-aaa8-d1cf430ee0d4@github.com> Message-ID: On Mon, 18 Sep 2023 10:45:11 GMT, Alexey Ivanov wrote: >> Harshitha Onkar has updated the pull request incrementally with one additional commit since the last revision: >> >> review changes > > test/jdk/java/awt/event/PaintEvent/RepaintTest.java line 44: > >> 42: // invoking setBounds, and the other that invokes repaint directly on >> 43: // the Frame to repaint a Component. The Component displays an integer >> 44: // that increments everytime paint is invoked on it. > > This comment seems confusing because no buttons are created in the test. Removed comment > test/jdk/java/awt/event/PaintEvent/RepaintTest.java line 63: > >> 61: >> 62: int count = counter.getCount(); >> 63: robot.delay(300); > > Does this delay affect anything? I think it can be safely removed. Delay removed. > test/jdk/java/awt/event/PaintEvent/RepaintTest.java line 71: > >> 69: if (counter.getCount() == count) { >> 70: throw new RuntimeException("Failed"); >> 71: } > > This is not thread-safe. The `paintCount` in `IncrementComponent` needs to be volatile. Better yet, use `AtomicInteger` and its [`incrementAndGet`](https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/util/concurrent/atomic/AtomicInteger.html#incrementAndGet()) or [`getAndIncrement`](https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/util/concurrent/atomic/AtomicInteger.html#getAndIncrement()) as well as [`get`](https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/util/concurrent/atomic/AtomicInteger.html#get()), it will make the test code thread-safe. Updated ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/15751#discussion_r1329316851 PR Review Comment: https://git.openjdk.org/jdk/pull/15751#discussion_r1329316824 PR Review Comment: https://git.openjdk.org/jdk/pull/15751#discussion_r1329316788 From honkar at openjdk.org Mon Sep 18 21:54:00 2023 From: honkar at openjdk.org (Harshitha Onkar) Date: Mon, 18 Sep 2023 21:54:00 GMT Subject: RFR: JDK-8315951: Open source several Swing HTMLEditorKit related tests In-Reply-To: <6kTx7IUAwD2sL8vUfqaOJhVF8vXDI8imvOuGBvgnG4U=.41946952-8e97-4a5c-aaa8-d1cf430ee0d4@github.com> References: <6kTx7IUAwD2sL8vUfqaOJhVF8vXDI8imvOuGBvgnG4U=.41946952-8e97-4a5c-aaa8-d1cf430ee0d4@github.com> Message-ID: On Thu, 14 Sep 2023 18:45:34 GMT, Harshitha Onkar wrote: > Following tests are open sourced as part of this PR. > > 1. java/awt/event/PaintEvent/RepaintTest/RepaintTest.java > 2. javax/swing/text/html/HTMLEditorKit/4214848/bug4214848.java > 3. javax/swing/text/html/HTMLEditorKit/4230197/bug4230197.java > 4. javax/swing/text/html/HTMLEditorKit/4238223/bug4238223.java Review changes updated. PR ready for re-review. ------------- PR Comment: https://git.openjdk.org/jdk/pull/15751#issuecomment-1724506025 From dnguyen at openjdk.org Mon Sep 18 22:18:22 2023 From: dnguyen at openjdk.org (Damon Nguyen) Date: Mon, 18 Sep 2023 22:18:22 GMT Subject: RFR: 8316149: Open source several Swing JTree JViewport KeyboardManager tests Message-ID: These are the tests being converted: javax/swing/JTree/4696499/bug4696499.java javax/swing/JTree/5039542/bug5039542.java javax/swing/JViewport/4546474/bug4546474.java javax/swing/JViewport/4677611/bug4677611.java javax/swing/KeyboardManager/4345798/bug4345798.java ------------- Commit messages: - Initial test conversion to open Changes: https://git.openjdk.org/jdk/pull/15802/files Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=15802&range=00 Issue: https://bugs.openjdk.org/browse/JDK-8316149 Stats: 434 lines in 5 files changed: 434 ins; 0 del; 0 mod Patch: https://git.openjdk.org/jdk/pull/15802.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/15802/head:pull/15802 PR: https://git.openjdk.org/jdk/pull/15802 From azvegint at openjdk.org Mon Sep 18 22:25:42 2023 From: azvegint at openjdk.org (Alexander Zvegintsev) Date: Mon, 18 Sep 2023 22:25:42 GMT Subject: RFR: 8315981: Opensource five more random Swing tests [v2] In-Reply-To: References: Message-ID: On Thu, 14 Sep 2023 15:28:40 GMT, Alexander Zuev wrote: >> Clean up and open source five tests: >> javax/swing/DefaultListCellRenderer/4180943/bug4180943.java >> javax/swing/DefaultListModel/4466250/bug4466250.java >> javax/swing/DefaultListSelectionModel/4140619/bug4140619.java >> javax/swing/DefaultListSelectionModel/4177723/bug4177723.java >> javax/swing/ImageIcon/4827074/bug4827074.java > > Alexander Zuev has updated the pull request incrementally with one additional commit since the last revision: > > Update test/jdk/javax/swing/ImageIcon/4827074/bug4827074.java > > Co-authored-by: Andrey Turbanov Marked as reviewed by azvegint (Reviewer). test/jdk/javax/swing/DefaultListCellRenderer/4180943/bug4180943.java line 34: > 32: public class bug4180943 { > 33: public static void main(String[] argv) { > 34: DefaultListCellRenderer lcr1 = new DefaultListCellRenderer(); In this case not critical to the test, but I think it would be a good example for others to perform Swing related code on EDT. (applicable to all tests). test/jdk/javax/swing/ImageIcon/4827074/bug4827074.java line 55: > 53: synchronized static void setPassed(boolean p) { > 54: passed = p; > 55: } Why not just set `passed` to true directly on the line 100? test/jdk/javax/swing/ImageIcon/4827074/bug4827074.java line 70: > 68: ex.printStackTrace(); > 69: } > 70: return _ii; Looks like the return value is not used. ------------- PR Review: https://git.openjdk.org/jdk/pull/15724#pullrequestreview-1632048875 PR Review Comment: https://git.openjdk.org/jdk/pull/15724#discussion_r1329338740 PR Review Comment: https://git.openjdk.org/jdk/pull/15724#discussion_r1329329954 PR Review Comment: https://git.openjdk.org/jdk/pull/15724#discussion_r1329328849 From dnguyen at openjdk.org Mon Sep 18 22:29:45 2023 From: dnguyen at openjdk.org (Damon Nguyen) Date: Mon, 18 Sep 2023 22:29:45 GMT Subject: RFR: 8315804: Open source several Swing JTabbedPane JTextArea JTextField tests [v4] In-Reply-To: References: <6hxyNU6nAkGy2FVxgjmBSS-EUzWxtnkXMG2Qm9w_13c=.03736764-56b9-4285-baf7-b61771b7c912@github.com> Message-ID: On Mon, 18 Sep 2023 19:14:15 GMT, Alexey Ivanov wrote: >> Damon Nguyen has updated the pull request incrementally with one additional commit since the last revision: >> >> Add focus to EDT > > test/jdk/javax/swing/JTabbedPane/bug4703690.java line 108: > >> 106: robot.setAutoDelay(50); >> 107: >> 108: SwingUtilities.invokeAndWait(() -> two.requestFocus()); > > My preference is using method reference wherever possible, this fixes an IDEA warning. It's up to you though. Updated. Much appreciated ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/15747#discussion_r1329340922 From dnguyen at openjdk.org Mon Sep 18 22:29:42 2023 From: dnguyen at openjdk.org (Damon Nguyen) Date: Mon, 18 Sep 2023 22:29:42 GMT Subject: RFR: 8315804: Open source several Swing JTabbedPane JTextArea JTextField tests [v5] In-Reply-To: References: Message-ID: > These are the tests being converted: > > javax/swing/JTabbedPane/4703690/bug4703690.java > javax/swing/JTabbedPane/GetComponentAt/GetComponentAtTest.java > javax/swing/JTabbedPane/ReplaceCompTab/ReplaceCompTab.java > javax/swing/JTextArea/4849868/bug4849868.java > javax/swing/JTextField/4244613/bug4244613.java Damon Nguyen has updated the pull request incrementally with one additional commit since the last revision: Use method reference ------------- Changes: - all: https://git.openjdk.org/jdk/pull/15747/files - new: https://git.openjdk.org/jdk/pull/15747/files/7da26827..c4fdc7c1 Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=15747&range=04 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=15747&range=03-04 Stats: 1 line in 1 file changed: 0 ins; 0 del; 1 mod Patch: https://git.openjdk.org/jdk/pull/15747.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/15747/head:pull/15747 PR: https://git.openjdk.org/jdk/pull/15747 From dnguyen at openjdk.org Mon Sep 18 23:11:54 2023 From: dnguyen at openjdk.org (Damon Nguyen) Date: Mon, 18 Sep 2023 23:11:54 GMT Subject: Integrated: 8315804: Open source several Swing JTabbedPane JTextArea JTextField tests In-Reply-To: References: Message-ID: On Thu, 14 Sep 2023 16:35:44 GMT, Damon Nguyen wrote: > These are the tests being converted: > > javax/swing/JTabbedPane/4703690/bug4703690.java > javax/swing/JTabbedPane/GetComponentAt/GetComponentAtTest.java > javax/swing/JTabbedPane/ReplaceCompTab/ReplaceCompTab.java > javax/swing/JTextArea/4849868/bug4849868.java > javax/swing/JTextField/4244613/bug4244613.java This pull request has now been integrated. Changeset: 24c3d86f Author: Damon Nguyen URL: https://git.openjdk.org/jdk/commit/24c3d86f32a2e2d9cb24cd8827ef1f20bb53fead Stats: 496 lines in 5 files changed: 496 ins; 0 del; 0 mod 8315804: Open source several Swing JTabbedPane JTextArea JTextField tests Reviewed-by: honkar, aivanov ------------- PR: https://git.openjdk.org/jdk/pull/15747 From dnguyen at openjdk.org Mon Sep 18 23:30:26 2023 From: dnguyen at openjdk.org (Damon Nguyen) Date: Mon, 18 Sep 2023 23:30:26 GMT Subject: RFR: 8315883: Open source several Swing JToolbar tests [v3] In-Reply-To: References: Message-ID: > These are the tests being converted: > > javax/swing/JToolBar/4138694/bug4138694.java > javax/swing/JToolBar/4140421/bug4140421.java > javax/swing/JToolBar/4196662/bug4196662.java > javax/swing/JToolBar/4243930/bug4243930.java Damon Nguyen has updated the pull request incrementally with one additional commit since the last revision: Update constant name ------------- Changes: - all: https://git.openjdk.org/jdk/pull/15748/files - new: https://git.openjdk.org/jdk/pull/15748/files/a1755a88..88572ea0 Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=15748&range=02 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=15748&range=01-02 Stats: 3 lines in 1 file changed: 0 ins; 0 del; 3 mod Patch: https://git.openjdk.org/jdk/pull/15748.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/15748/head:pull/15748 PR: https://git.openjdk.org/jdk/pull/15748 From prr at openjdk.org Mon Sep 18 23:36:40 2023 From: prr at openjdk.org (Phil Race) Date: Mon, 18 Sep 2023 23:36:40 GMT Subject: RFR: 8219641: java/awt/font/Rotate/RotatedTextTest.java fails on Linux: Test failed for angle 15.0 In-Reply-To: References: Message-ID: On Mon, 18 Sep 2023 06:19:05 GMT, Arno Zeller wrote: > The test fails on newer SLES versions that have RobotoSlab-Regular.ttf as default font. I suggest to try getting a DejaVu font as default on Linux because it is known to work without issues. The bug report has "Angle: 15, width diff: -4" Over the length of the string "The quick brown fox jumps over the lazy dog" that could be the occasional rounding difference and there is a comment in the bug report claiming (suggesting?) that's the issue. It is a bit tricky to know what error to allow because if you have a case where all the glyphs are rounded differently it could be 1 pixel per glyph .. much more than "4". Even Deja Vu Sans might reproduce this given the right (or wrong) string. The JDK rounding code has been stable for a while now and changing that could cause problems elsewhere. And I'm not sure we can 100% guarantee no difference in all cases, because the rasteriser has a say in this too, and likely that's where the difference is coming from here and the rounding then exacerbates the difference. Drawing and measuring the string using fractional metrics and floating point with a tolerance might have been a better bet here but that's more surgery on the test. ------------- PR Comment: https://git.openjdk.org/jdk/pull/15780#issuecomment-1724619821 From honkar at openjdk.org Mon Sep 18 23:58:37 2023 From: honkar at openjdk.org (Harshitha Onkar) Date: Mon, 18 Sep 2023 23:58:37 GMT Subject: RFR: JDK-8315876 Open source several Swing CSS related tests [v3] In-Reply-To: <5z0tnBVggYqlegmOHcIZhw9aoGeRo2XMaHwkVz9WNCQ=.44da2e5a-9dfa-44b1-b8b2-c8e285007ec1@github.com> References: <5z0tnBVggYqlegmOHcIZhw9aoGeRo2XMaHwkVz9WNCQ=.44da2e5a-9dfa-44b1-b8b2-c8e285007ec1@github.com> Message-ID: <4HgHobvHKs0TOba3xldazc2qNUaI2R-re2NV83mZXvM=.ccfa6691-de99-40b1-8303-0661ac113a64@github.com> > Following tests are open sourced as part of this PR. > > 1. test/jdk/javax/swing/text/html/CSS/bug4174871.java > 2. test/jdk/javax/swing/text/html/CSS/bug4174874.java > 3. test/jdk/javax/swing/text/html/CSS/bug4284162.java > 4. test/jdk/javax/swing/text/html/CSS/bug4764897.java > 5. test/jdk/javax/swing/text/html/HTMLDocument/bug4209280.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/15769/files - new: https://git.openjdk.org/jdk/pull/15769/files/4d52fc3d..ba128f03 Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=15769&range=02 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=15769&range=01-02 Stats: 13 lines in 4 files changed: 0 ins; 10 del; 3 mod Patch: https://git.openjdk.org/jdk/pull/15769.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/15769/head:pull/15769 PR: https://git.openjdk.org/jdk/pull/15769 From honkar at openjdk.org Tue Sep 19 00:00:41 2023 From: honkar at openjdk.org (Harshitha Onkar) Date: Tue, 19 Sep 2023 00:00:41 GMT Subject: RFR: JDK-8315876 Open source several Swing CSS related tests [v3] In-Reply-To: References: <5z0tnBVggYqlegmOHcIZhw9aoGeRo2XMaHwkVz9WNCQ=.44da2e5a-9dfa-44b1-b8b2-c8e285007ec1@github.com> <0hfNM_4yzKFx-OCqFO5b-eCAzLBUZgcnwSnmAqTzeFI=.4093c6b2-0f73-4194-838d-8b6131f27c35@github.com> Message-ID: On Mon, 18 Sep 2023 18:04:00 GMT, Alexey Ivanov wrote: >> I believe the original issue occurred when invalid html tags were set in the constructor -`new JLabel(html)` [JDK-4245889](https://bugs.openjdk.org/browse/JDK-4245889). >> >> For making it headless I think it is probably sufficient to just create the label with invalid html tag then? > > I think so. > > You can also run the test in jdk1.2.0 or jdk1.2.2 to ensure it still reproduces the problem and then confirm jdk1.3.0 doesn't reproduce it. Without `invokeAndWait` and the lambda expression, it should compile fine. The original issue occurred at the constructor, confirmed by checking it using jdk1.2.2 Test has been made headless and reduced to following two lines. String html = "Foo"; new JLabel(html); ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/15769#discussion_r1329401495 From dnguyen at openjdk.org Tue Sep 19 00:04:40 2023 From: dnguyen at openjdk.org (Damon Nguyen) Date: Tue, 19 Sep 2023 00:04:40 GMT Subject: RFR: 8315883: Open source several Swing JToolbar tests [v2] In-Reply-To: References: Message-ID: On Mon, 18 Sep 2023 19:02:33 GMT, Alexey Ivanov wrote: >> Damon Nguyen has updated the pull request incrementally with one additional commit since the last revision: >> >> Review comments update > > test/jdk/javax/swing/JToolBar/bug4138694.java line 41: > >> 39: >> 40: public class bug4138694 { >> 41: public static final String exampleText = "Action"; > > Suggestion: > > private static final String actionName = "Action"; > > It fits better this way, but it's unimportant. Updated. Thanks ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/15748#discussion_r1329403523 From honkar at openjdk.org Tue Sep 19 00:06:42 2023 From: honkar at openjdk.org (Harshitha Onkar) Date: Tue, 19 Sep 2023 00:06:42 GMT Subject: RFR: JDK-8315876 Open source several Swing CSS related tests [v3] In-Reply-To: References: <5z0tnBVggYqlegmOHcIZhw9aoGeRo2XMaHwkVz9WNCQ=.44da2e5a-9dfa-44b1-b8b2-c8e285007ec1@github.com> Message-ID: <7iZyU1r4MVlgAseKzoIet3Zg4zYkUV8a0TCSVprOYoM=.31c13080-82c3-42d8-afef-abda9cf14665@github.com> On Mon, 18 Sep 2023 19:08:21 GMT, Alexey Ivanov wrote: >> I agree. There are some tests that start with passed as 'true', hence explicitly assigned 'false' to boolean var in these tests even though it is redundant as to add clarity when running the tests. > > With volatile, it makes the test slightly slower. Other than that, there's not much harm. > > In most of these tests, there's no need for the `passed` field at all: you can throw the exception from the code where you set the value to `passed`, however, the stack trace will be less pretty because it will come from EDT. Yes, it shows up as InvocationTarget Exception first and after looking through the stacktrace the reason for failure is evident. Hence retaining the passed boolean variable as-is for clarity. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/15769#discussion_r1329404647 From honkar at openjdk.org Tue Sep 19 00:06:44 2023 From: honkar at openjdk.org (Harshitha Onkar) Date: Tue, 19 Sep 2023 00:06:44 GMT Subject: RFR: JDK-8315876 Open source several Swing CSS related tests [v3] In-Reply-To: References: <5z0tnBVggYqlegmOHcIZhw9aoGeRo2XMaHwkVz9WNCQ=.44da2e5a-9dfa-44b1-b8b2-c8e285007ec1@github.com> Message-ID: On Mon, 18 Sep 2023 10:28:11 GMT, Alexey Ivanov wrote: >> Harshitha Onkar has updated the pull request incrementally with one additional commit since the last revision: >> >> review changes > > test/jdk/javax/swing/text/html/CSS/bug4764897.java line 99: > >> 97: >> 98: if (viewName.endsWith("CellView")) { >> 99: cellsWidth = r.getBounds().x + r.getBounds().width; > > This looks weird to me: why does `cellWidth` include the `x` coordinate in its width? Perhaps, the variable is named incorrectly. > > It looks we care about the last cell in the table only, and it is to be positioned so that it fits inside the table. In other words, the last cell is within table bounds, that's why `x + width` is used. Looks like a valid explanation as to why `x + width` is used. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/15769#discussion_r1329402886 From dnguyen at openjdk.org Tue Sep 19 00:14:53 2023 From: dnguyen at openjdk.org (Damon Nguyen) Date: Tue, 19 Sep 2023 00:14:53 GMT Subject: RFR: 8316306: Open source and convert manual Swing test Message-ID: <80OSlkBZiECg1Q2eSy3_79_7-jM2K93nF15w0LE-hmc=.94dbeadf-2b92-4590-968a-878c324e95d7@github.com> This is to convert and open source test: javax/swing/JToolBar/4203039/bug4203039.java This manual test now uses PassFailJFrame to handle the display for the instructions text as well as the pass/fail buttons. ------------- Commit messages: - Remove extra newline - Change library path - Initial test conversion to open Changes: https://git.openjdk.org/jdk/pull/15806/files Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=15806&range=00 Issue: https://bugs.openjdk.org/browse/JDK-8316306 Stats: 80 lines in 1 file changed: 80 ins; 0 del; 0 mod Patch: https://git.openjdk.org/jdk/pull/15806.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/15806/head:pull/15806 PR: https://git.openjdk.org/jdk/pull/15806 From honkar at openjdk.org Tue Sep 19 00:22:35 2023 From: honkar at openjdk.org (Harshitha Onkar) Date: Tue, 19 Sep 2023 00:22:35 GMT Subject: RFR: JDK-8315876 Open source several Swing CSS related tests [v4] In-Reply-To: <5z0tnBVggYqlegmOHcIZhw9aoGeRo2XMaHwkVz9WNCQ=.44da2e5a-9dfa-44b1-b8b2-c8e285007ec1@github.com> References: <5z0tnBVggYqlegmOHcIZhw9aoGeRo2XMaHwkVz9WNCQ=.44da2e5a-9dfa-44b1-b8b2-c8e285007ec1@github.com> Message-ID: > Following tests are open sourced as part of this PR. > > 1. test/jdk/javax/swing/text/html/CSS/bug4174871.java > 2. test/jdk/javax/swing/text/html/CSS/bug4174874.java > 3. test/jdk/javax/swing/text/html/CSS/bug4284162.java > 4. test/jdk/javax/swing/text/html/CSS/bug4764897.java > 5. test/jdk/javax/swing/text/html/HTMLDocument/bug4209280.java Harshitha Onkar has updated the pull request incrementally with one additional commit since the last revision: review updates ------------- Changes: - all: https://git.openjdk.org/jdk/pull/15769/files - new: https://git.openjdk.org/jdk/pull/15769/files/ba128f03..cb3f88c8 Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=15769&range=03 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=15769&range=02-03 Stats: 6 lines in 4 files changed: 0 ins; 2 del; 4 mod Patch: https://git.openjdk.org/jdk/pull/15769.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/15769/head:pull/15769 PR: https://git.openjdk.org/jdk/pull/15769 From honkar at openjdk.org Tue Sep 19 00:30:40 2023 From: honkar at openjdk.org (Harshitha Onkar) Date: Tue, 19 Sep 2023 00:30:40 GMT Subject: RFR: 8316306: Open source and convert manual Swing test In-Reply-To: <80OSlkBZiECg1Q2eSy3_79_7-jM2K93nF15w0LE-hmc=.94dbeadf-2b92-4590-968a-878c324e95d7@github.com> References: <80OSlkBZiECg1Q2eSy3_79_7-jM2K93nF15w0LE-hmc=.94dbeadf-2b92-4590-968a-878c324e95d7@github.com> Message-ID: <2emShgZNuzr-S50JLIdT50qoG1zI5KT6PM91e7oW118=.1bf59df6-6b19-42ff-b904-ab43cd0c5a57@github.com> On Tue, 19 Sep 2023 00:07:33 GMT, Damon Nguyen wrote: > This is to convert and open source test: javax/swing/JToolBar/4203039/bug4203039.java > > This manual test now uses PassFailJFrame to handle the display for the instructions text as well as the pass/fail buttons. test/jdk/javax/swing/JToolBar/bug4203039.java line 36: > 34: * @bug 4203039 > 35: * @summary JToolBar needs a way to limit docking to a particular orientation > 36: * @library /java/awt/regtesthelpers path to PassFailJFrame looks good. test/jdk/javax/swing/JToolBar/bug4203039.java line 47: > 45: "installed components on the SOUTH\nand EAST, so verify the " + > 46: "toolbar cannot dock in those\nlocations but can dock on the " + > 47: "NORTH and WEST"; Suggestion: private static final String instructionsText = """ This test is used to verify that application-installed components prevent the toolbar from docking in those locations. This test has installed components on the SOUTH and EAST, so verify the toolbar cannot dock in those locations but can dock on the NORTH and WEST"""; Use of text block looks cleaner here, eliminates the need of appending `\n` in between. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/15806#discussion_r1329416315 PR Review Comment: https://git.openjdk.org/jdk/pull/15806#discussion_r1329417139 From honkar at openjdk.org Tue Sep 19 00:35:38 2023 From: honkar at openjdk.org (Harshitha Onkar) Date: Tue, 19 Sep 2023 00:35:38 GMT Subject: RFR: 8316306: Open source and convert manual Swing test In-Reply-To: <80OSlkBZiECg1Q2eSy3_79_7-jM2K93nF15w0LE-hmc=.94dbeadf-2b92-4590-968a-878c324e95d7@github.com> References: <80OSlkBZiECg1Q2eSy3_79_7-jM2K93nF15w0LE-hmc=.94dbeadf-2b92-4590-968a-878c324e95d7@github.com> Message-ID: <23WcTh9klA_Bui32rrUFkII2uEcMZyDJzOZNCq5KtPE=.7a89cf1a-ce2a-4edf-9c71-2e933f103dbe@github.com> On Tue, 19 Sep 2023 00:07:33 GMT, Damon Nguyen wrote: > This is to convert and open source test: javax/swing/JToolBar/4203039/bug4203039.java > > This manual test now uses PassFailJFrame to handle the display for the instructions text as well as the pass/fail buttons. test/jdk/javax/swing/JToolBar/bug4203039.java line 55: > 53: .testTimeOut(5) > 54: .rows(10) > 55: .columns(30) Minor cosmetic change. Suggestion: .columns(35) ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/15806#discussion_r1329419523 From psadhukhan at openjdk.org Tue Sep 19 03:01:43 2023 From: psadhukhan at openjdk.org (Prasanta Sadhukhan) Date: Tue, 19 Sep 2023 03:01:43 GMT Subject: RFR: 8315669: Open source several Swing PopupMenu related tests [v2] In-Reply-To: References: Message-ID: On Fri, 15 Sep 2023 05:36:30 GMT, Tejesh R wrote: >> Open source these Swing PopupMenu related tests: >> >> javax/swing/JPopupMenu/4236750/bug4236750.java >> javax/swing/JPopupMenu/4321273/bug4321273.java >> javax/swing/JPopupMenu/4711693/bug4711693.java >> javax/swing/JPopupMenu/4962731/bug4962731.java >> javax/swing/JPopupMenu/4966109/bug4966109.java >> javax/swing/JPopupMenu/5091257/bug5091257.java > > Tejesh R has updated the pull request incrementally with one additional commit since the last revision: > > Review fix Changes requested by psadhukhan (Reviewer). test/jdk/javax/swing/JPopupMenu/bug4321273.java line 45: > 43: public static JFrame frame; > 44: public static JMenu menu; > 45: public static JMenuBar menuBar; this can be local var test/jdk/javax/swing/JPopupMenu/bug5091257.java line 40: > 38: * @test > 39: * @bug 5091257 > 40: * @summary APPLICATION KEY DOES NOT DISPLAY A POP-UP MENU IN USERS VIEW Make in lower case test/jdk/javax/swing/JPopupMenu/bug5091257.java line 132: > 130: }); > 131: robot.keyPress(KeyEvent.VK_CONTEXT_MENU); > 132: robot.setAutoDelay(10); should be delay...autoDelay should be set while creating robot instance...also if you set autoDelay there's no need of additional delay between key events.. ------------- PR Review: https://git.openjdk.org/jdk/pull/15704#pullrequestreview-1632329766 PR Review Comment: https://git.openjdk.org/jdk/pull/15704#discussion_r1329509483 PR Review Comment: https://git.openjdk.org/jdk/pull/15704#discussion_r1329510865 PR Review Comment: https://git.openjdk.org/jdk/pull/15704#discussion_r1329511500 From tr at openjdk.org Tue Sep 19 05:17:54 2023 From: tr at openjdk.org (Tejesh R) Date: Tue, 19 Sep 2023 05:17:54 GMT Subject: Integrated: 8316104: Open source several Swing SplitPane and RadioButton related tests In-Reply-To: References: Message-ID: On Thu, 14 Sep 2023 09:33:03 GMT, Tejesh R wrote: > Open sourcing these Swing SplitPane and RadioButton related tests: > > javax/swing/JSplitPane/4147653/bug4147653.java > javax/swing/JSplitPane/4870674/bug4870674.java > javax/swing/JRadioButton/4823809/bug4823809.java This pull request has now been integrated. Changeset: f52e500f Author: Tejesh R URL: https://git.openjdk.org/jdk/commit/f52e500f806085f9645cb7857cc7b4e648685351 Stats: 332 lines in 3 files changed: 332 ins; 0 del; 0 mod 8316104: Open source several Swing SplitPane and RadioButton related tests Reviewed-by: kizune, abhiscxk ------------- PR: https://git.openjdk.org/jdk/pull/15738 From tr at openjdk.org Tue Sep 19 05:19:00 2023 From: tr at openjdk.org (Tejesh R) Date: Tue, 19 Sep 2023 05:19:00 GMT Subject: Integrated: 8316061: Open source several Swing RootPane and Slider related tests In-Reply-To: References: Message-ID: On Thu, 14 Sep 2023 07:29:57 GMT, Tejesh R wrote: > Open sourcing these Swing RootPane and Slider related tests: > > javax/swing/JRootPane/4207333/bug4207333.java > javax/swing/JRootPane/4224113/bug4224113.java > javax/swing/JRootPane/4627806/bug4627806.java > javax/swing/JSlider/4200901/bug4200901.java > javax/swing/JSlider/4203754/bug4203754.java This pull request has now been integrated. Changeset: 138542de Author: Tejesh R URL: https://git.openjdk.org/jdk/commit/138542de7889e8002df0e15a79e31d824c6a0473 Stats: 303 lines in 5 files changed: 303 ins; 0 del; 0 mod 8316061: Open source several Swing RootPane and Slider related tests Reviewed-by: kizune, abhiscxk ------------- PR: https://git.openjdk.org/jdk/pull/15734 From tr at openjdk.org Tue Sep 19 05:57:39 2023 From: tr at openjdk.org (Tejesh R) Date: Tue, 19 Sep 2023 05:57:39 GMT Subject: RFR: 8315669: Open source several Swing PopupMenu related tests [v3] In-Reply-To: References: Message-ID: > Open source these Swing PopupMenu related tests: > > javax/swing/JPopupMenu/4236750/bug4236750.java > javax/swing/JPopupMenu/4321273/bug4321273.java > javax/swing/JPopupMenu/4711693/bug4711693.java > javax/swing/JPopupMenu/4962731/bug4962731.java > javax/swing/JPopupMenu/4966109/bug4966109.java > javax/swing/JPopupMenu/5091257/bug5091257.java Tejesh R has updated the pull request incrementally with one additional commit since the last revision: Review fix ------------- Changes: - all: https://git.openjdk.org/jdk/pull/15704/files - new: https://git.openjdk.org/jdk/pull/15704/files/42af3a0b..be68474d Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=15704&range=02 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=15704&range=01-02 Stats: 6 lines in 2 files changed: 1 ins; 3 del; 2 mod Patch: https://git.openjdk.org/jdk/pull/15704.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/15704/head:pull/15704 PR: https://git.openjdk.org/jdk/pull/15704 From tr at openjdk.org Tue Sep 19 06:00:55 2023 From: tr at openjdk.org (Tejesh R) Date: Tue, 19 Sep 2023 06:00:55 GMT Subject: RFR: 8315669: Open source several Swing PopupMenu related tests [v4] In-Reply-To: References: Message-ID: > Open source these Swing PopupMenu related tests: > > javax/swing/JPopupMenu/4236750/bug4236750.java > javax/swing/JPopupMenu/4321273/bug4321273.java > javax/swing/JPopupMenu/4711693/bug4711693.java > javax/swing/JPopupMenu/4962731/bug4962731.java > javax/swing/JPopupMenu/4966109/bug4966109.java > javax/swing/JPopupMenu/5091257/bug5091257.java Tejesh R has updated the pull request incrementally with one additional commit since the last revision: Review fix ------------- Changes: - all: https://git.openjdk.org/jdk/pull/15704/files - new: https://git.openjdk.org/jdk/pull/15704/files/be68474d..5ed15cdd Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=15704&range=03 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=15704&range=02-03 Stats: 2 lines in 1 file changed: 0 ins; 1 del; 1 mod Patch: https://git.openjdk.org/jdk/pull/15704.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/15704/head:pull/15704 PR: https://git.openjdk.org/jdk/pull/15704 From psadhukhan at openjdk.org Tue Sep 19 07:06:41 2023 From: psadhukhan at openjdk.org (Prasanta Sadhukhan) Date: Tue, 19 Sep 2023 07:06:41 GMT Subject: RFR: 8315669: Open source several Swing PopupMenu related tests [v4] In-Reply-To: References: Message-ID: On Tue, 19 Sep 2023 06:00:55 GMT, Tejesh R wrote: >> Open source these Swing PopupMenu related tests: >> >> javax/swing/JPopupMenu/4236750/bug4236750.java >> javax/swing/JPopupMenu/4321273/bug4321273.java >> javax/swing/JPopupMenu/4711693/bug4711693.java >> javax/swing/JPopupMenu/4962731/bug4962731.java >> javax/swing/JPopupMenu/4966109/bug4966109.java >> javax/swing/JPopupMenu/5091257/bug5091257.java > > Tejesh R has updated the pull request incrementally with one additional commit since the last revision: > > Review fix Marked as reviewed by psadhukhan (Reviewer). test/jdk/javax/swing/JPopupMenu/bug4321273.java line 45: > 43: public static JFrame frame; > 44: public static JMenu menu; > 45: public static Robot robot; I guess robot too can be made local var.. ------------- PR Review: https://git.openjdk.org/jdk/pull/15704#pullrequestreview-1632554527 PR Review Comment: https://git.openjdk.org/jdk/pull/15704#discussion_r1329663085 From tr at openjdk.org Tue Sep 19 07:37:06 2023 From: tr at openjdk.org (Tejesh R) Date: Tue, 19 Sep 2023 07:37:06 GMT Subject: RFR: 8315669: Open source several Swing PopupMenu related tests [v5] In-Reply-To: References: Message-ID: > Open source these Swing PopupMenu related tests: > > javax/swing/JPopupMenu/4236750/bug4236750.java > javax/swing/JPopupMenu/4321273/bug4321273.java > javax/swing/JPopupMenu/4711693/bug4711693.java > javax/swing/JPopupMenu/4962731/bug4962731.java > javax/swing/JPopupMenu/4966109/bug4966109.java > javax/swing/JPopupMenu/5091257/bug5091257.java Tejesh R has updated the pull request incrementally with one additional commit since the last revision: Review fix ------------- Changes: - all: https://git.openjdk.org/jdk/pull/15704/files - new: https://git.openjdk.org/jdk/pull/15704/files/5ed15cdd..1c12e593 Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=15704&range=04 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=15704&range=03-04 Stats: 2 lines in 1 file changed: 0 ins; 1 del; 1 mod Patch: https://git.openjdk.org/jdk/pull/15704.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/15704/head:pull/15704 PR: https://git.openjdk.org/jdk/pull/15704 From psadhukhan at openjdk.org Tue Sep 19 07:49:41 2023 From: psadhukhan at openjdk.org (Prasanta Sadhukhan) Date: Tue, 19 Sep 2023 07:49:41 GMT Subject: RFR: 8316149: Open source several Swing JTree JViewport KeyboardManager tests In-Reply-To: References: Message-ID: On Mon, 18 Sep 2023 22:10:54 GMT, Damon Nguyen wrote: > These are the tests being converted: > > javax/swing/JTree/4696499/bug4696499.java > javax/swing/JTree/5039542/bug5039542.java > javax/swing/JViewport/4546474/bug4546474.java > javax/swing/JViewport/4677611/bug4677611.java > javax/swing/KeyboardManager/4345798/bug4345798.java test/jdk/javax/swing/JTree/bug4696499.java line 49: > 47: try { > 48: SwingUtilities.invokeAndWait(() -> { > 49: fr = new JFrame("bug4696499"); I guess frame is not needed and can be made headless test/jdk/javax/swing/JViewport/bug4546474.java line 50: > 48: try { > 49: SwingUtilities.invokeAndWait(() -> { > 50: fr = new JFrame("bug4546474"); Guess this also can be made headless without frame test/jdk/javax/swing/KeyboardManager/bug4345798.java line 50: > 48: private static JFrame f; > 49: private static JButton b; > 50: private static JMenu menu; guess it can be local var test/jdk/javax/swing/KeyboardManager/bug4345798.java line 82: > 80: robot.setAutoDelay(100); > 81: robot.delay(1000); > 82: robot.waitForIdle(); Usually, we do waitForIdle followed by delay so that all events processing is done and then wait further 1sec to let frame visible.. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/15802#discussion_r1329694199 PR Review Comment: https://git.openjdk.org/jdk/pull/15802#discussion_r1329703581 PR Review Comment: https://git.openjdk.org/jdk/pull/15802#discussion_r1329709632 PR Review Comment: https://git.openjdk.org/jdk/pull/15802#discussion_r1329706858 From tr at openjdk.org Tue Sep 19 09:12:41 2023 From: tr at openjdk.org (Tejesh R) Date: Tue, 19 Sep 2023 09:12:41 GMT Subject: RFR: 8316149: Open source several Swing JTree JViewport KeyboardManager tests In-Reply-To: References: Message-ID: On Mon, 18 Sep 2023 22:10:54 GMT, Damon Nguyen wrote: > These are the tests being converted: > > javax/swing/JTree/4696499/bug4696499.java > javax/swing/JTree/5039542/bug5039542.java > javax/swing/JViewport/4546474/bug4546474.java > javax/swing/JViewport/4677611/bug4677611.java > javax/swing/KeyboardManager/4345798/bug4345798.java test/jdk/javax/swing/JTree/bug5039542.java line 37: > 35: > 36: public static void main(String[] args) throws Exception { > 37: SwingUtilities.invokeAndWait(() -> { `SwingUtilities.invokeAndWait` isn't required right? test/jdk/javax/swing/JTree/bug5039542.java line 37: > 35: > 36: public static void main(String[] args) throws Exception { > 37: SwingUtilities.invokeAndWait(() -> { `SwingUtilities.invokeAndWait` isn't required right? ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/15802#discussion_r1329814143 PR Review Comment: https://git.openjdk.org/jdk/pull/15802#discussion_r1329814580 From azeller at openjdk.org Tue Sep 19 09:18:39 2023 From: azeller at openjdk.org (Arno Zeller) Date: Tue, 19 Sep 2023 09:18:39 GMT Subject: RFR: 8219641: java/awt/font/Rotate/RotatedTextTest.java fails on Linux: Test failed for angle 15.0 In-Reply-To: References: Message-ID: On Mon, 18 Sep 2023 23:34:12 GMT, Phil Race wrote: > The bug report has "Angle: 15, width diff: -4" Over the length of the string "The quick brown fox jumps over the lazy dog" that could be the occasional rounding difference and there is a comment in the bug report claiming (suggesting?) that's the issue. It is a bit tricky to know what error to allow because if you have a case where all the glyphs are rounded differently it could be 1 pixel per glyph .. much more than "4". Even Deja Vu Sans might reproduce this given the right (or wrong) string. So, I guess it would be ok to change the test to allow a small difference? The question then is "What is valid allowed difference?" Do you think 5 could be fine? Up to now we only have seen 4 :-)? ------------- PR Comment: https://git.openjdk.org/jdk/pull/15780#issuecomment-1725128539 From aivanov at openjdk.org Tue Sep 19 10:10:45 2023 From: aivanov at openjdk.org (Alexey Ivanov) Date: Tue, 19 Sep 2023 10:10:45 GMT Subject: RFR: JDK-8315951: Open source several Swing HTMLEditorKit related tests [v2] In-Reply-To: References: <6kTx7IUAwD2sL8vUfqaOJhVF8vXDI8imvOuGBvgnG4U=.41946952-8e97-4a5c-aaa8-d1cf430ee0d4@github.com> Message-ID: On Mon, 18 Sep 2023 21:53:36 GMT, Harshitha Onkar wrote: >> Following tests are open sourced as part of this PR. >> >> 1. java/awt/event/PaintEvent/RepaintTest/RepaintTest.java >> 2. javax/swing/text/html/HTMLEditorKit/4214848/bug4214848.java >> 3. javax/swing/text/html/HTMLEditorKit/4230197/bug4230197.java >> 4. javax/swing/text/html/HTMLEditorKit/4238223/bug4238223.java > > Harshitha Onkar has updated the pull request incrementally with one additional commit since the last revision: > > review changes test/jdk/java/awt/event/PaintEvent/RepaintTest.java line 111: > 109: // is incremented, this counter is displayed in the component. > 110: private static class IncrementComponent extends Component { > 111: private static AtomicInteger paintCount = new AtomicInteger(0); Suggestion: private static final AtomicInteger paintCount = new AtomicInteger(0); It should be `final`. test/jdk/java/awt/event/PaintEvent/RepaintTest.java line 119: > 117: public AtomicInteger getCount() { > 118: return paintCount; > 119: } This could continue to return `int`, you could hide the internals from the `main` method. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/15751#discussion_r1329884981 PR Review Comment: https://git.openjdk.org/jdk/pull/15751#discussion_r1329885827 From aivanov at openjdk.org Tue Sep 19 10:21:41 2023 From: aivanov at openjdk.org (Alexey Ivanov) Date: Tue, 19 Sep 2023 10:21:41 GMT Subject: RFR: 8315883: Open source several Swing JToolbar tests [v3] In-Reply-To: References: Message-ID: <6y9bqgxEYOpGxSchcQ4uUUBX4UckBl2VhPXcr477E1k=.e0ac3a14-a9d0-4ac9-9fd7-edf297017398@github.com> On Mon, 18 Sep 2023 23:30:26 GMT, Damon Nguyen wrote: >> These are the tests being converted: >> >> javax/swing/JToolBar/4138694/bug4138694.java >> javax/swing/JToolBar/4140421/bug4140421.java >> javax/swing/JToolBar/4196662/bug4196662.java >> javax/swing/JToolBar/4243930/bug4243930.java > > Damon Nguyen has updated the pull request incrementally with one additional commit since the last revision: > > Update constant name Changes requested by aivanov (Reviewer). test/jdk/javax/swing/JToolBar/bug4243930.java line 44: > 42: private static class NullAction extends AbstractAction { > 43: public void actionPerformed(ActionEvent e){} > 44: } Suggestion: /** * Auxiliary class implementing Action */ private static class NullAction extends AbstractAction { public void actionPerformed(ActionEvent e) {} } Align the javadoc to class declaration. In a way, the comment is redundant, the purpose is clearly seen from the usage. test/jdk/javax/swing/JToolBar/bug4243930.java line 47: > 45: > 46: public static void main(String[] argv) throws InterruptedException, > 47: InvocationTargetException { Suggestion: public static void main(String[] argv) throws Exception { This one hasn't been updated. ------------- PR Review: https://git.openjdk.org/jdk/pull/15748#pullrequestreview-1632917786 PR Review Comment: https://git.openjdk.org/jdk/pull/15748#discussion_r1329898922 PR Review Comment: https://git.openjdk.org/jdk/pull/15748#discussion_r1329899856 From aivanov at openjdk.org Tue Sep 19 10:35:48 2023 From: aivanov at openjdk.org (Alexey Ivanov) Date: Tue, 19 Sep 2023 10:35:48 GMT Subject: RFR: JDK-8315876 Open source several Swing CSS related tests [v4] In-Reply-To: References: <5z0tnBVggYqlegmOHcIZhw9aoGeRo2XMaHwkVz9WNCQ=.44da2e5a-9dfa-44b1-b8b2-c8e285007ec1@github.com> Message-ID: <4Rz-1rw7e5GMB99uwTx2c2pvPz9vF2CHgLt8SAi3E7g=.91977caf-cab1-424a-bd59-01e7a2846e5c@github.com> On Tue, 19 Sep 2023 00:22:35 GMT, Harshitha Onkar wrote: >> Following tests are open sourced as part of this PR. >> >> 1. test/jdk/javax/swing/text/html/CSS/bug4174871.java >> 2. test/jdk/javax/swing/text/html/CSS/bug4174874.java >> 3. test/jdk/javax/swing/text/html/CSS/bug4284162.java >> 4. test/jdk/javax/swing/text/html/CSS/bug4764897.java >> 5. test/jdk/javax/swing/text/html/HTMLDocument/bug4209280.java > > Harshitha Onkar has updated the pull request incrementally with one additional commit since the last revision: > > review updates Changes requested by aivanov (Reviewer). test/jdk/javax/swing/text/html/HTMLDocument/bug4209280.java line 36: > 34: public static void main(String[] args) throws Exception { > 35: String html = "Foo"; > 36: new JLabel(html); Suggestion: // The following line should throw no exceptions new JLabel(html); This may clarify the intention of the reader skipped the summary. ------------- PR Review: https://git.openjdk.org/jdk/pull/15769#pullrequestreview-1632932610 PR Review Comment: https://git.openjdk.org/jdk/pull/15769#discussion_r1329910569 From aivanov at openjdk.org Tue Sep 19 10:35:49 2023 From: aivanov at openjdk.org (Alexey Ivanov) Date: Tue, 19 Sep 2023 10:35:49 GMT Subject: RFR: JDK-8315876 Open source several Swing CSS related tests [v4] In-Reply-To: <7iZyU1r4MVlgAseKzoIet3Zg4zYkUV8a0TCSVprOYoM=.31c13080-82c3-42d8-afef-abda9cf14665@github.com> References: <5z0tnBVggYqlegmOHcIZhw9aoGeRo2XMaHwkVz9WNCQ=.44da2e5a-9dfa-44b1-b8b2-c8e285007ec1@github.com> <7iZyU1r4MVlgAseKzoIet3Zg4zYkUV8a0TCSVprOYoM=.31c13080-82c3-42d8-afef-abda9cf14665@github.com> Message-ID: On Tue, 19 Sep 2023 00:03:34 GMT, Harshitha Onkar wrote: >> With volatile, it makes the test slightly slower. Other than that, there's not much harm. >> >> In most of these tests, there's no need for the `passed` field at all: you can throw the exception from the code where you set the value to `passed`, however, the stack trace will be less pretty because it will come from EDT. > > Yes, it shows up as InvocationTarget Exception first and after looking through the stacktrace the reason for failure is evident. Hence retaining the passed boolean variable as-is for clarity. It's up to you. However, if you don't expect the test to fail, it is safe to reduce the code size, `InvocationTargetException` still has the details one needs to diagnose the failure, and our CI shows them. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/15769#discussion_r1329913577 From aivanov at openjdk.org Tue Sep 19 10:35:50 2023 From: aivanov at openjdk.org (Alexey Ivanov) Date: Tue, 19 Sep 2023 10:35:50 GMT Subject: RFR: JDK-8315876 Open source several Swing CSS related tests [v4] In-Reply-To: References: <5z0tnBVggYqlegmOHcIZhw9aoGeRo2XMaHwkVz9WNCQ=.44da2e5a-9dfa-44b1-b8b2-c8e285007ec1@github.com> Message-ID: On Tue, 19 Sep 2023 00:00:45 GMT, Harshitha Onkar wrote: > Looks like a valid explanation as to why `x + width` is used. This is why `cellWidth` is a bad name: it doesn't convey the meaning. Consider *renaming the variable* or adding a comment to clarify the meaning. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/15769#discussion_r1329908473 From tr at openjdk.org Tue Sep 19 13:40:05 2023 From: tr at openjdk.org (Tejesh R) Date: Tue, 19 Sep 2023 13:40:05 GMT Subject: Integrated: 8315669: Open source several Swing PopupMenu related tests In-Reply-To: References: Message-ID: On Wed, 13 Sep 2023 09:19:27 GMT, Tejesh R wrote: > Open source these Swing PopupMenu related tests: > > javax/swing/JPopupMenu/4236750/bug4236750.java > javax/swing/JPopupMenu/4321273/bug4321273.java > javax/swing/JPopupMenu/4711693/bug4711693.java > javax/swing/JPopupMenu/4962731/bug4962731.java > javax/swing/JPopupMenu/4966109/bug4966109.java > javax/swing/JPopupMenu/5091257/bug5091257.java This pull request has now been integrated. Changeset: 7c5f2a2d Author: Tejesh R URL: https://git.openjdk.org/jdk/commit/7c5f2a2db941d30a5425d358607a6b4e63879ab7 Stats: 750 lines in 6 files changed: 750 ins; 0 del; 0 mod 8315669: Open source several Swing PopupMenu related tests Reviewed-by: dnguyen, psadhukhan ------------- PR: https://git.openjdk.org/jdk/pull/15704 From aivanov at openjdk.org Tue Sep 19 13:50:11 2023 From: aivanov at openjdk.org (Alexey Ivanov) Date: Tue, 19 Sep 2023 13:50:11 GMT Subject: RFR: 8316206: Test StretchedFontTest.java fails for Baekmuk font Message-ID: <4eLLluXke8q0oity_JF9axhhEeX6SX1-74Q5OOvQ8U4=.c965732f-ac78-4fe7-a584-141bf76616bc@github.com> **Root cause** The _Baekmuk Headline_ font maps `\u6f22` (?) to glyph id 16950 which has zero length. The test fails if the right half of the image with the rendered glyph contains only pixels of background colour. In this case, the left half of the image is also blank. It's somewhat false positive because of the broken font. **Fix** Ignore fonts which don't render the glyph correctly. If the left half of the image contains pixels of the background colour only, it is expected that the right half also contains background-coloured pixels only. The updated test does not fail with the _Baekmuk Headline_ font. It still detects the original problem and fails on builds without the fix for [JDK-8312555](https://bugs.openjdk.org/browse/JDK-8312555). ------------- Commit messages: - 8316206: Ignore broken fonts which render no glyph Changes: https://git.openjdk.org/jdk/pull/15818/files Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=15818&range=00 Issue: https://bugs.openjdk.org/browse/JDK-8316206 Stats: 38 lines in 1 file changed: 32 ins; 1 del; 5 mod Patch: https://git.openjdk.org/jdk/pull/15818.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/15818/head:pull/15818 PR: https://git.openjdk.org/jdk/pull/15818 From honkar at openjdk.org Tue Sep 19 16:06:42 2023 From: honkar at openjdk.org (Harshitha Onkar) Date: Tue, 19 Sep 2023 16:06:42 GMT Subject: RFR: 8315952: Open source several Swing JToolbar JTooltip JTree tests [v2] In-Reply-To: References: Message-ID: On Mon, 18 Sep 2023 19:30:46 GMT, Damon Nguyen wrote: >> These are the tests being converted: >> >> javax/swing/JToolBar/4368050/bug4368050.java >> javax/swing/JToolBar/4465534/bug4465534.java >> javax/swing/JToolBar/4700351/bug4700351.java >> javax/swing/JToolTip/4107843/bug4107843.java >> javax/swing/JTree/4161685/bug4161685.java > > Damon Nguyen has updated the pull request incrementally with one additional commit since the last revision: > > Review comments updates test/jdk/javax/swing/JToolBar/bug4368050.java line 48: > 46: ObjectInputStream ois = new ObjectInputStream(bais)) { > 47: ois.readObject(); > 48: } Better to close the stream objects in finally block in case of Exception. finally { if (oos != null) { oos.close(); } if (ois != null) { ois.close(); } } ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/15755#discussion_r1330365805 From aivanov at openjdk.org Tue Sep 19 16:13:41 2023 From: aivanov at openjdk.org (Alexey Ivanov) Date: Tue, 19 Sep 2023 16:13:41 GMT Subject: RFR: 8315952: Open source several Swing JToolbar JTooltip JTree tests [v2] In-Reply-To: References: Message-ID: On Tue, 19 Sep 2023 16:02:21 GMT, Harshitha Onkar wrote: > Better to close the stream objects in finally block in case of Exception. > > ``` > finally { > if (oos != null) { > oos.close(); > } > if (ois != null) { > ois.close(); > } > } > ``` No, *it's not better.* If `oos.close()` throws an exception, then `ois` is left open. In addition to that, any exception thrown from the finally block will replace the exception thrown from the try block. *The best way is using [**try-with-resources**](https://docs.oracle.com/javase/tutorial/essential/exceptions/tryResourceClose.html)*: it handles all the above correctly. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/15755#discussion_r1330381649 From aivanov at openjdk.org Tue Sep 19 16:32:44 2023 From: aivanov at openjdk.org (Alexey Ivanov) Date: Tue, 19 Sep 2023 16:32:44 GMT Subject: RFR: 8219641: java/awt/font/Rotate/RotatedTextTest.java fails on Linux: Test failed for angle 15.0 In-Reply-To: References: Message-ID: <6WFc8d0RJOwEotai2hRvsPcKbazcC_8DpIYZ-6CgFSo=.9f19c1ac-7f45-4dcc-b236-10944ec35464@github.com> On Tue, 19 Sep 2023 09:15:41 GMT, Arno Zeller wrote: > > The bug report has "Angle: 15, width diff: -4" Over the length of the string "The quick brown fox jumps over the lazy dog" that could be the occasional rounding difference and there is a comment in the bug report claiming (suggesting?) that's the issue. It is a bit tricky to know what error to allow because if you have a case where all the glyphs are rounded differently it could be 1 pixel per glyph .. much more than "4". Even Deja Vu Sans might reproduce this given the right (or wrong) string. > > So, I guess it would be ok to change the test to allow a small difference? The question then is "What is valid allowed difference?" Do you think 5 could be fine? Up to now we only have seen 4 :-)? It looks 5 wouldn't be enough. On Ubuntu, using the *Roboto* font, I get `width diff: -13`. With the *Roboto Slab* font, the test does not fail me. I attached the images and logs to the JBS issue. ------------- PR Comment: https://git.openjdk.org/jdk/pull/15780#issuecomment-1726042218 From honkar at openjdk.org Tue Sep 19 16:35:49 2023 From: honkar at openjdk.org (Harshitha Onkar) Date: Tue, 19 Sep 2023 16:35:49 GMT Subject: RFR: 8315952: Open source several Swing JToolbar JTooltip JTree tests [v2] In-Reply-To: References: Message-ID: On Mon, 18 Sep 2023 19:30:46 GMT, Damon Nguyen wrote: >> These are the tests being converted: >> >> javax/swing/JToolBar/4368050/bug4368050.java >> javax/swing/JToolBar/4465534/bug4465534.java >> javax/swing/JToolBar/4700351/bug4700351.java >> javax/swing/JToolTip/4107843/bug4107843.java >> javax/swing/JTree/4161685/bug4161685.java > > Damon Nguyen has updated the pull request incrementally with one additional commit since the last revision: > > Review comments updates Marked as reviewed by honkar (Committer). ------------- PR Review: https://git.openjdk.org/jdk/pull/15755#pullrequestreview-1633731073 From honkar at openjdk.org Tue Sep 19 16:35:53 2023 From: honkar at openjdk.org (Harshitha Onkar) Date: Tue, 19 Sep 2023 16:35:53 GMT Subject: RFR: 8315952: Open source several Swing JToolbar JTooltip JTree tests [v2] In-Reply-To: References: Message-ID: On Tue, 19 Sep 2023 16:10:38 GMT, Alexey Ivanov wrote: >> test/jdk/javax/swing/JToolBar/bug4368050.java line 48: >> >>> 46: ObjectInputStream ois = new ObjectInputStream(bais)) { >>> 47: ois.readObject(); >>> 48: } >> >> Better to close the stream objects in finally block in case of Exception. >> >> >> finally { >> if (oos != null) { >> oos.close(); >> } >> if (ois != null) { >> ois.close(); >> } >> } > >> Better to close the stream objects in finally block in case of Exception. >> >> ``` >> finally { >> if (oos != null) { >> oos.close(); >> } >> if (ois != null) { >> ois.close(); >> } >> } >> ``` > > No, *it's not better.* If `oos.close()` throws an exception, then `ois` is left open. In addition to that, any exception thrown from the finally block will replace the exception thrown from the try block. > > *The best way is using [**try-with-resources**](https://docs.oracle.com/javase/tutorial/essential/exceptions/tryResourceClose.html)*: it handles all the above correctly. Noted. Thanks! ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/15755#discussion_r1330408622 From dnguyen at openjdk.org Tue Sep 19 16:35:53 2023 From: dnguyen at openjdk.org (Damon Nguyen) Date: Tue, 19 Sep 2023 16:35:53 GMT Subject: RFR: 8315952: Open source several Swing JToolbar JTooltip JTree tests [v2] In-Reply-To: References: Message-ID: On Tue, 19 Sep 2023 16:30:07 GMT, Harshitha Onkar wrote: >>> Better to close the stream objects in finally block in case of Exception. >>> >>> ``` >>> finally { >>> if (oos != null) { >>> oos.close(); >>> } >>> if (ois != null) { >>> ois.close(); >>> } >>> } >>> ``` >> >> No, *it's not better.* If `oos.close()` throws an exception, then `ois` is left open. In addition to that, any exception thrown from the finally block will replace the exception thrown from the try block. >> >> *The best way is using [**try-with-resources**](https://docs.oracle.com/javase/tutorial/essential/exceptions/tryResourceClose.html)*: it handles all the above correctly. > > Noted. Thanks! Right, I looked into Aleksey's suggestion for try-with-resources and learned that this should handle things correctly. This is applicable when objects like streams or writers need to be closed for example. Thanks for taking a look! ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/15755#discussion_r1330411187 From honkar at openjdk.org Tue Sep 19 16:37:41 2023 From: honkar at openjdk.org (Harshitha Onkar) Date: Tue, 19 Sep 2023 16:37:41 GMT Subject: RFR: 8316240: Open source several add/remove MenuBar manual tests In-Reply-To: <3HGUm3chbDleVC3u8poeuU1rtjnVxhj_ktYIl-kEv-s=.82156c33-f6b5-4515-a747-4083d2138d38@github.com> References: <3HGUm3chbDleVC3u8poeuU1rtjnVxhj_ktYIl-kEv-s=.82156c33-f6b5-4515-a747-4083d2138d38@github.com> Message-ID: On Mon, 18 Sep 2023 21:35:01 GMT, Alexander Zvegintsev wrote: > Open sourcing several MenuBar manual tests > > java/awt/MenuBar/AddRemoveMenuBarTests/AddRemoveMenuBarTest_1.java > java/awt/MenuBar/AddRemoveMenuBarTests/AddRemoveMenuBarTest_2.java > java/awt/MenuBar/AddRemoveMenuBarTests/AddRemoveMenuBarTest_3.java > java/awt/MenuBar/AddRemoveMenuBarTests/AddRemoveMenuBarTest_4.java LGTM ------------- Marked as reviewed by honkar (Committer). PR Review: https://git.openjdk.org/jdk/pull/15800#pullrequestreview-1633738101 From dnguyen at openjdk.org Tue Sep 19 16:41:42 2023 From: dnguyen at openjdk.org (Damon Nguyen) Date: Tue, 19 Sep 2023 16:41:42 GMT Subject: RFR: 8316149: Open source several Swing JTree JViewport KeyboardManager tests In-Reply-To: References: Message-ID: On Tue, 19 Sep 2023 07:46:20 GMT, Prasanta Sadhukhan wrote: >> These are the tests being converted: >> >> javax/swing/JTree/4696499/bug4696499.java >> javax/swing/JTree/5039542/bug5039542.java >> javax/swing/JViewport/4546474/bug4546474.java >> javax/swing/JViewport/4677611/bug4677611.java >> javax/swing/KeyboardManager/4345798/bug4345798.java > > test/jdk/javax/swing/KeyboardManager/bug4345798.java line 50: > >> 48: private static JFrame f; >> 49: private static JButton b; >> 50: private static JMenu menu; > > guess it can be local var JFrame needs to be disposed in the finally block. JButton is needed in the TestActionListener. And the JMenu is needed for the getLocationOnScreen call on line 84. I believe these need to be static instead of local vars. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/15802#discussion_r1330419106 From dnguyen at openjdk.org Tue Sep 19 16:44:42 2023 From: dnguyen at openjdk.org (Damon Nguyen) Date: Tue, 19 Sep 2023 16:44:42 GMT Subject: RFR: 8316149: Open source several Swing JTree JViewport KeyboardManager tests In-Reply-To: References: Message-ID: On Tue, 19 Sep 2023 09:08:16 GMT, Tejesh R wrote: >> These are the tests being converted: >> >> javax/swing/JTree/4696499/bug4696499.java >> javax/swing/JTree/5039542/bug5039542.java >> javax/swing/JViewport/4546474/bug4546474.java >> javax/swing/JViewport/4677611/bug4677611.java >> javax/swing/KeyboardManager/4345798/bug4345798.java > > test/jdk/javax/swing/JTree/bug5039542.java line 37: > >> 35: >> 36: public static void main(String[] args) throws Exception { >> 37: SwingUtilities.invokeAndWait(() -> { > > `SwingUtilities.invokeAndWait` isn't required right? I brought up the question if these headless tests should/shouldn't be on the EDT if it doesn't need it in last weeks meeting. The answer I received is to use it anyway as it sets a good example for tests with these components. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/15802#discussion_r1330422628 From honkar at openjdk.org Tue Sep 19 16:51:31 2023 From: honkar at openjdk.org (Harshitha Onkar) Date: Tue, 19 Sep 2023 16:51:31 GMT Subject: RFR: JDK-8315951: Open source several Swing HTMLEditorKit related tests [v3] In-Reply-To: <6kTx7IUAwD2sL8vUfqaOJhVF8vXDI8imvOuGBvgnG4U=.41946952-8e97-4a5c-aaa8-d1cf430ee0d4@github.com> References: <6kTx7IUAwD2sL8vUfqaOJhVF8vXDI8imvOuGBvgnG4U=.41946952-8e97-4a5c-aaa8-d1cf430ee0d4@github.com> Message-ID: > Following tests are open sourced as part of this PR. > > 1. java/awt/event/PaintEvent/RepaintTest/RepaintTest.java > 2. javax/swing/text/html/HTMLEditorKit/4214848/bug4214848.java > 3. javax/swing/text/html/HTMLEditorKit/4230197/bug4230197.java > 4. javax/swing/text/html/HTMLEditorKit/4238223/bug4238223.java Harshitha Onkar has updated the pull request incrementally with one additional commit since the last revision: review change ------------- Changes: - all: https://git.openjdk.org/jdk/pull/15751/files - new: https://git.openjdk.org/jdk/pull/15751/files/10df4fcb..b7b10e02 Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=15751&range=02 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=15751&range=01-02 Stats: 1 line in 1 file changed: 0 ins; 0 del; 1 mod Patch: https://git.openjdk.org/jdk/pull/15751.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/15751/head:pull/15751 PR: https://git.openjdk.org/jdk/pull/15751 From dnguyen at openjdk.org Tue Sep 19 16:58:10 2023 From: dnguyen at openjdk.org (Damon Nguyen) Date: Tue, 19 Sep 2023 16:58:10 GMT Subject: RFR: 8316149: Open source several Swing JTree JViewport KeyboardManager tests [v2] In-Reply-To: References: Message-ID: > These are the tests being converted: > > javax/swing/JTree/4696499/bug4696499.java > javax/swing/JTree/5039542/bug5039542.java > javax/swing/JViewport/4546474/bug4546474.java > javax/swing/JViewport/4677611/bug4677611.java > javax/swing/KeyboardManager/4345798/bug4345798.java Damon Nguyen has updated the pull request incrementally with one additional commit since the last revision: Review comments changes ------------- Changes: - all: https://git.openjdk.org/jdk/pull/15802/files - new: https://git.openjdk.org/jdk/pull/15802/files/2f71c4d4..ba7fc98b Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=15802&range=01 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=15802&range=00-01 Stats: 94 lines in 5 files changed: 9 ins; 49 del; 36 mod Patch: https://git.openjdk.org/jdk/pull/15802.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/15802/head:pull/15802 PR: https://git.openjdk.org/jdk/pull/15802 From dnguyen at openjdk.org Tue Sep 19 16:59:58 2023 From: dnguyen at openjdk.org (Damon Nguyen) Date: Tue, 19 Sep 2023 16:59:58 GMT Subject: Integrated: 8316056: Open source several Swing JTree tests In-Reply-To: References: Message-ID: On Thu, 14 Sep 2023 21:40:55 GMT, Damon Nguyen wrote: > These are the tests being converted: > > javax/swing/JTree/4210432/bug4210432.java > javax/swing/JTree/4213868/bug4213868.java > javax/swing/JTree/4224491/bug4224491.java > javax/swing/JTree/4237370/bug4237370.java > javax/swing/JTree/4662505/bug4662505.java This pull request has now been integrated. Changeset: 5f6cee86 Author: Damon Nguyen URL: https://git.openjdk.org/jdk/commit/5f6cee86ef765677b0b9dc3662f4f20b636732bc Stats: 347 lines in 5 files changed: 347 ins; 0 del; 0 mod 8316056: Open source several Swing JTree tests Reviewed-by: honkar, aivanov ------------- PR: https://git.openjdk.org/jdk/pull/15756 From honkar at openjdk.org Tue Sep 19 17:02:54 2023 From: honkar at openjdk.org (Harshitha Onkar) Date: Tue, 19 Sep 2023 17:02:54 GMT Subject: RFR: JDK-8315876 Open source several Swing CSS related tests [v5] In-Reply-To: <5z0tnBVggYqlegmOHcIZhw9aoGeRo2XMaHwkVz9WNCQ=.44da2e5a-9dfa-44b1-b8b2-c8e285007ec1@github.com> References: <5z0tnBVggYqlegmOHcIZhw9aoGeRo2XMaHwkVz9WNCQ=.44da2e5a-9dfa-44b1-b8b2-c8e285007ec1@github.com> Message-ID: > Following tests are open sourced as part of this PR. > > 1. test/jdk/javax/swing/text/html/CSS/bug4174871.java > 2. test/jdk/javax/swing/text/html/CSS/bug4174874.java > 3. test/jdk/javax/swing/text/html/CSS/bug4284162.java > 4. test/jdk/javax/swing/text/html/CSS/bug4764897.java > 5. test/jdk/javax/swing/text/html/HTMLDocument/bug4209280.java Harshitha Onkar has updated the pull request incrementally with one additional commit since the last revision: added comment ------------- Changes: - all: https://git.openjdk.org/jdk/pull/15769/files - new: https://git.openjdk.org/jdk/pull/15769/files/cb3f88c8..b438f095 Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=15769&range=04 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=15769&range=03-04 Stats: 1 line in 1 file changed: 1 ins; 0 del; 0 mod Patch: https://git.openjdk.org/jdk/pull/15769.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/15769/head:pull/15769 PR: https://git.openjdk.org/jdk/pull/15769 From honkar at openjdk.org Tue Sep 19 17:02:57 2023 From: honkar at openjdk.org (Harshitha Onkar) Date: Tue, 19 Sep 2023 17:02:57 GMT Subject: RFR: JDK-8315876 Open source several Swing CSS related tests [v4] In-Reply-To: <4Rz-1rw7e5GMB99uwTx2c2pvPz9vF2CHgLt8SAi3E7g=.91977caf-cab1-424a-bd59-01e7a2846e5c@github.com> References: <5z0tnBVggYqlegmOHcIZhw9aoGeRo2XMaHwkVz9WNCQ=.44da2e5a-9dfa-44b1-b8b2-c8e285007ec1@github.com> <4Rz-1rw7e5GMB99uwTx2c2pvPz9vF2CHgLt8SAi3E7g=.91977caf-cab1-424a-bd59-01e7a2846e5c@github.com> Message-ID: On Tue, 19 Sep 2023 10:29:02 GMT, Alexey Ivanov wrote: >> Harshitha Onkar has updated the pull request incrementally with one additional commit since the last revision: >> >> review updates > > test/jdk/javax/swing/text/html/HTMLDocument/bug4209280.java line 36: > >> 34: public static void main(String[] args) throws Exception { >> 35: String html = "Foo"; >> 36: new JLabel(html); > > Suggestion: > > // The following line should throw no exceptions > new JLabel(html); > > This may clarify the intention of the reader skipped the summary. Agreed. Adds more clarity. Updated. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/15769#discussion_r1330437794 From dnguyen at openjdk.org Tue Sep 19 17:04:59 2023 From: dnguyen at openjdk.org (Damon Nguyen) Date: Tue, 19 Sep 2023 17:04:59 GMT Subject: RFR: 8315883: Open source several Swing JToolbar tests [v4] In-Reply-To: References: Message-ID: > These are the tests being converted: > > javax/swing/JToolBar/4138694/bug4138694.java > javax/swing/JToolBar/4140421/bug4140421.java > javax/swing/JToolBar/4196662/bug4196662.java > javax/swing/JToolBar/4243930/bug4243930.java Damon Nguyen has updated the pull request incrementally with one additional commit since the last revision: Remove redundant test comment and update exception ------------- Changes: - all: https://git.openjdk.org/jdk/pull/15748/files - new: https://git.openjdk.org/jdk/pull/15748/files/88572ea0..faae15ed Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=15748&range=03 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=15748&range=02-03 Stats: 5 lines in 1 file changed: 0 ins; 4 del; 1 mod Patch: https://git.openjdk.org/jdk/pull/15748.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/15748/head:pull/15748 PR: https://git.openjdk.org/jdk/pull/15748 From dnguyen at openjdk.org Tue Sep 19 17:05:02 2023 From: dnguyen at openjdk.org (Damon Nguyen) Date: Tue, 19 Sep 2023 17:05:02 GMT Subject: RFR: 8315883: Open source several Swing JToolbar tests [v3] In-Reply-To: <6y9bqgxEYOpGxSchcQ4uUUBX4UckBl2VhPXcr477E1k=.e0ac3a14-a9d0-4ac9-9fd7-edf297017398@github.com> References: <6y9bqgxEYOpGxSchcQ4uUUBX4UckBl2VhPXcr477E1k=.e0ac3a14-a9d0-4ac9-9fd7-edf297017398@github.com> Message-ID: On Tue, 19 Sep 2023 10:17:33 GMT, Alexey Ivanov wrote: >> Damon Nguyen has updated the pull request incrementally with one additional commit since the last revision: >> >> Update constant name > > test/jdk/javax/swing/JToolBar/bug4243930.java line 44: > >> 42: private static class NullAction extends AbstractAction { >> 43: public void actionPerformed(ActionEvent e){} >> 44: } > > Suggestion: > > /** > * Auxiliary class implementing Action > */ > private static class NullAction extends AbstractAction { > public void actionPerformed(ActionEvent e) {} > } > > > Align the javadoc to class declaration. > > In a way, the comment is redundant, the purpose is clearly seen from the usage. Very true. I just removed the comment altogether. Thanks > test/jdk/javax/swing/JToolBar/bug4243930.java line 47: > >> 45: >> 46: public static void main(String[] argv) throws InterruptedException, >> 47: InvocationTargetException { > > Suggestion: > > public static void main(String[] argv) throws Exception { > > This one hasn't been updated. Nice catch. Thanks, updated ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/15748#discussion_r1330442754 PR Review Comment: https://git.openjdk.org/jdk/pull/15748#discussion_r1330442111 From dnguyen at openjdk.org Tue Sep 19 17:36:43 2023 From: dnguyen at openjdk.org (Damon Nguyen) Date: Tue, 19 Sep 2023 17:36:43 GMT Subject: RFR: 8316149: Open source several Swing JTree JViewport KeyboardManager tests [v2] In-Reply-To: References: Message-ID: On Tue, 19 Sep 2023 07:44:39 GMT, Prasanta Sadhukhan wrote: >> Damon Nguyen has updated the pull request incrementally with one additional commit since the last revision: >> >> Review comments changes > > test/jdk/javax/swing/KeyboardManager/bug4345798.java line 82: > >> 80: robot.setAutoDelay(100); >> 81: robot.delay(1000); >> 82: robot.waitForIdle(); > > Usually, we do waitForIdle followed by delay so that all events processing is done and then wait further 1sec to let frame visible.. Fixed, thanks ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/15802#discussion_r1330485926 From dnguyen at openjdk.org Tue Sep 19 17:36:54 2023 From: dnguyen at openjdk.org (Damon Nguyen) Date: Tue, 19 Sep 2023 17:36:54 GMT Subject: Integrated: 8315952: Open source several Swing JToolbar JTooltip JTree tests In-Reply-To: References: Message-ID: On Thu, 14 Sep 2023 21:34:56 GMT, Damon Nguyen wrote: > These are the tests being converted: > > javax/swing/JToolBar/4368050/bug4368050.java > javax/swing/JToolBar/4465534/bug4465534.java > javax/swing/JToolBar/4700351/bug4700351.java > javax/swing/JToolTip/4107843/bug4107843.java > javax/swing/JTree/4161685/bug4161685.java This pull request has now been integrated. Changeset: d2b2f675 Author: Damon Nguyen URL: https://git.openjdk.org/jdk/commit/d2b2f6759f7b9eb6df8eaa84b88e064c636b24a8 Stats: 262 lines in 5 files changed: 262 ins; 0 del; 0 mod 8315952: Open source several Swing JToolbar JTooltip JTree tests Reviewed-by: aivanov, honkar ------------- PR: https://git.openjdk.org/jdk/pull/15755 From aivanov at openjdk.org Tue Sep 19 17:37:41 2023 From: aivanov at openjdk.org (Alexey Ivanov) Date: Tue, 19 Sep 2023 17:37:41 GMT Subject: RFR: JDK-8315951: Open source several Swing HTMLEditorKit related tests [v3] In-Reply-To: References: <6kTx7IUAwD2sL8vUfqaOJhVF8vXDI8imvOuGBvgnG4U=.41946952-8e97-4a5c-aaa8-d1cf430ee0d4@github.com> Message-ID: On Tue, 19 Sep 2023 16:51:31 GMT, Harshitha Onkar wrote: >> Following tests are open sourced as part of this PR. >> >> 1. java/awt/event/PaintEvent/RepaintTest/RepaintTest.java >> 2. javax/swing/text/html/HTMLEditorKit/4214848/bug4214848.java >> 3. javax/swing/text/html/HTMLEditorKit/4230197/bug4230197.java >> 4. javax/swing/text/html/HTMLEditorKit/4238223/bug4238223.java > > Harshitha Onkar has updated the pull request incrementally with one additional commit since the last revision: > > review change Marked as reviewed by aivanov (Reviewer). ------------- PR Review: https://git.openjdk.org/jdk/pull/15751#pullrequestreview-1633857030 From aivanov at openjdk.org Tue Sep 19 17:40:42 2023 From: aivanov at openjdk.org (Alexey Ivanov) Date: Tue, 19 Sep 2023 17:40:42 GMT Subject: RFR: JDK-8315876 Open source several Swing CSS related tests [v5] In-Reply-To: References: <5z0tnBVggYqlegmOHcIZhw9aoGeRo2XMaHwkVz9WNCQ=.44da2e5a-9dfa-44b1-b8b2-c8e285007ec1@github.com> Message-ID: On Tue, 19 Sep 2023 17:02:54 GMT, Harshitha Onkar wrote: >> Following tests are open sourced as part of this PR. >> >> 1. test/jdk/javax/swing/text/html/CSS/bug4174871.java >> 2. test/jdk/javax/swing/text/html/CSS/bug4174874.java >> 3. test/jdk/javax/swing/text/html/CSS/bug4284162.java >> 4. test/jdk/javax/swing/text/html/CSS/bug4764897.java >> 5. test/jdk/javax/swing/text/html/HTMLDocument/bug4209280.java > > Harshitha Onkar has updated the pull request incrementally with one additional commit since the last revision: > > added comment Marked as reviewed by aivanov (Reviewer). ------------- PR Review: https://git.openjdk.org/jdk/pull/15769#pullrequestreview-1633861465 From aivanov at openjdk.org Tue Sep 19 17:40:45 2023 From: aivanov at openjdk.org (Alexey Ivanov) Date: Tue, 19 Sep 2023 17:40:45 GMT Subject: RFR: JDK-8315876 Open source several Swing CSS related tests [v4] In-Reply-To: References: <5z0tnBVggYqlegmOHcIZhw9aoGeRo2XMaHwkVz9WNCQ=.44da2e5a-9dfa-44b1-b8b2-c8e285007ec1@github.com> <4Rz-1rw7e5GMB99uwTx2c2pvPz9vF2CHgLt8SAi3E7g=.91977caf-cab1-424a-bd59-01e7a2846e5c@github.com> Message-ID: On Tue, 19 Sep 2023 16:55:02 GMT, Harshitha Onkar wrote: >> test/jdk/javax/swing/text/html/HTMLDocument/bug4209280.java line 36: >> >>> 34: public static void main(String[] args) throws Exception { >>> 35: String html = "Foo"; >>> 36: new JLabel(html); >> >> Suggestion: >> >> // The following line should throw no exceptions >> new JLabel(html); >> >> This may clarify the intention of the reader skipped the summary. > > Agreed. Adds more clarity. Updated. Usually full stops aren't used in comments, unless it consists of several sentences. I'm nitpicking. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/15769#discussion_r1330489466 From honkar at openjdk.org Tue Sep 19 17:40:57 2023 From: honkar at openjdk.org (Harshitha Onkar) Date: Tue, 19 Sep 2023 17:40:57 GMT Subject: Integrated: JDK-8311113: Remove invalid pointer cast and clean up setLabel() in awt_MenuItem.cpp In-Reply-To: <-UpmI9X_txepgRxGnsfSTtjwmqPQgtjeA5gqo-wmuGk=.3c84af65-e29e-4eeb-b393-efa9c990e721@github.com> References: <-UpmI9X_txepgRxGnsfSTtjwmqPQgtjeA5gqo-wmuGk=.3c84af65-e29e-4eeb-b393-efa9c990e721@github.com> Message-ID: On Mon, 14 Aug 2023 18:03:21 GMT, Harshitha Onkar wrote: > In awt_MenuItem.cpp (712,22): ` mii.dwTypeData = (LPTSTR)(*sb)` produces invalid pointer cast warning when complied on clang and moreover this is a no-op. > > `mii.dwTypeData` is used only when **MIIM_STRING** flag is set in the fMask (as per [Docs](https://learn.microsoft.com/en-us/windows/win32/api/winuser/ns-winuser-menuiteminfoa)), which is not the case in JDK [Ln#705](https://github.com/openjdk/jdk/blob/e56d3bc2dab3d32453b6eda66e8434953c436084/src/java.desktop/windows/native/libawt/windows/awt_MenuItem.cpp#L706). Hence the assignment ` mii.dwTypeData = (LPTSTR)(*sb)` is not required and so is the label parameter. Additionally necessary cleanup is done at the following places - > > - WMenuItemPeer.java - to the native function call > - awt_MenuItem.cpp - `WMenuItemPeer__1setLabel() ,_SetLabel(), SetLabel()` > - awt_MenuItem.h > > Added a test which checks setLabel() functionality on Menu, MenuItem and PopupMenu. This pull request has now been integrated. Changeset: 0c972468 Author: Harshitha Onkar URL: https://git.openjdk.org/jdk/commit/0c972468e7d72c991f28943f602232e0317ea21d Stats: 254 lines in 4 files changed: 186 ins; 57 del; 11 mod 8311113: Remove invalid pointer cast and clean up setLabel() in awt_MenuItem.cpp Reviewed-by: aivanov, serb ------------- PR: https://git.openjdk.org/jdk/pull/15276 From dnguyen at openjdk.org Tue Sep 19 17:49:19 2023 From: dnguyen at openjdk.org (Damon Nguyen) Date: Tue, 19 Sep 2023 17:49:19 GMT Subject: RFR: 8316306: Open source and convert manual Swing test [v2] In-Reply-To: <80OSlkBZiECg1Q2eSy3_79_7-jM2K93nF15w0LE-hmc=.94dbeadf-2b92-4590-968a-878c324e95d7@github.com> References: <80OSlkBZiECg1Q2eSy3_79_7-jM2K93nF15w0LE-hmc=.94dbeadf-2b92-4590-968a-878c324e95d7@github.com> Message-ID: > This is to convert and open source test: javax/swing/JToolBar/4203039/bug4203039.java > > This manual test now uses PassFailJFrame to handle the display for the instructions text as well as the pass/fail buttons. Damon Nguyen has updated the pull request incrementally with one additional commit since the last revision: Review comments changes ------------- Changes: - all: https://git.openjdk.org/jdk/pull/15806/files - new: https://git.openjdk.org/jdk/pull/15806/files/13ff5052..b6ae9b98 Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=15806&range=01 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=15806&range=00-01 Stats: 9 lines in 1 file changed: 2 ins; 0 del; 7 mod Patch: https://git.openjdk.org/jdk/pull/15806.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/15806/head:pull/15806 PR: https://git.openjdk.org/jdk/pull/15806 From dnguyen at openjdk.org Tue Sep 19 17:49:20 2023 From: dnguyen at openjdk.org (Damon Nguyen) Date: Tue, 19 Sep 2023 17:49:20 GMT Subject: RFR: 8316306: Open source and convert manual Swing test [v2] In-Reply-To: <2emShgZNuzr-S50JLIdT50qoG1zI5KT6PM91e7oW118=.1bf59df6-6b19-42ff-b904-ab43cd0c5a57@github.com> References: <80OSlkBZiECg1Q2eSy3_79_7-jM2K93nF15w0LE-hmc=.94dbeadf-2b92-4590-968a-878c324e95d7@github.com> <2emShgZNuzr-S50JLIdT50qoG1zI5KT6PM91e7oW118=.1bf59df6-6b19-42ff-b904-ab43cd0c5a57@github.com> Message-ID: On Tue, 19 Sep 2023 00:27:28 GMT, Harshitha Onkar wrote: >> Damon Nguyen has updated the pull request incrementally with one additional commit since the last revision: >> >> Review comments changes > > test/jdk/javax/swing/JToolBar/bug4203039.java line 47: > >> 45: "installed components on the SOUTH\nand EAST, so verify the " + >> 46: "toolbar cannot dock in those\nlocations but can dock on the " + >> 47: "NORTH and WEST"; > > Suggestion: > > private static final String instructionsText = """ > This test is used to verify that application-installed > components prevent the toolbar from docking in > those locations. > > This test has installed components on the SOUTH > and EAST, so verify the toolbar cannot dock in those > locations but can dock on the NORTH and WEST"""; > > Use of text block looks cleaner here, eliminates the need of appending `\n` in between. Thanks for the suggestion, implemented. > test/jdk/javax/swing/JToolBar/bug4203039.java line 55: > >> 53: .testTimeOut(5) >> 54: .rows(10) >> 55: .columns(30) > > Minor cosmetic change. > > Suggestion: > > .columns(35) Updated. 30 was a cleaner look for my device, but the extra space probably looks better for other systems where the sizing may vary slightly. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/15806#discussion_r1330497870 PR Review Comment: https://git.openjdk.org/jdk/pull/15806#discussion_r1330498584 From honkar at openjdk.org Tue Sep 19 17:52:44 2023 From: honkar at openjdk.org (Harshitha Onkar) Date: Tue, 19 Sep 2023 17:52:44 GMT Subject: RFR: 8316306: Open source and convert manual Swing test [v2] In-Reply-To: References: <80OSlkBZiECg1Q2eSy3_79_7-jM2K93nF15w0LE-hmc=.94dbeadf-2b92-4590-968a-878c324e95d7@github.com> Message-ID: <7evorWGJN_V-Ku_hsQxEAaZuPrDBsvml6ORyzGvnw5Y=.52c7b1d0-4dd5-40b5-b04d-588616c7f8b2@github.com> On Tue, 19 Sep 2023 17:49:19 GMT, Damon Nguyen wrote: >> This is to convert and open source test: javax/swing/JToolBar/4203039/bug4203039.java >> >> This manual test now uses PassFailJFrame to handle the display for the instructions text as well as the pass/fail buttons. > > Damon Nguyen has updated the pull request incrementally with one additional commit since the last revision: > > Review comments changes LGTM ------------- Marked as reviewed by honkar (Committer). PR Review: https://git.openjdk.org/jdk/pull/15806#pullrequestreview-1633884876 From prr at openjdk.org Tue Sep 19 18:15:42 2023 From: prr at openjdk.org (Phil Race) Date: Tue, 19 Sep 2023 18:15:42 GMT Subject: RFR: 4622866: javax.swing.text.Document.remove(int, int) has a misleading picture [v2] In-Reply-To: <4eTL1u_sxP7zK5lSmCVQLfw1ApieFVzY6KhVWAZSJQo=.7aeb391e-9b6c-4da0-8093-b08ff7b035f8@github.com> References: <4eTL1u_sxP7zK5lSmCVQLfw1ApieFVzY6KhVWAZSJQo=.7aeb391e-9b6c-4da0-8093-b08ff7b035f8@github.com> Message-ID: On Thu, 14 Sep 2023 18:52:09 GMT, Alexey Ivanov wrote: >> The image in the [documentation for `Document.remove`](https://docs.oracle.com/en/java/javase/17/docs/api/java.desktop/javax/swing/text/Document.html#remove(int,int)) looks as if the portion between the offsets 6 and 10 is removed. However, the entire region for _?quick ?_ is highlighted. >> >> I updated the image to mark the start offset 4 and the end offset 10. The new image is in SVG format which looks crisp on modern High DPI displays. >> >> I added a sentence that describes the image, which makes the documentation accessible and clearer. >> >> Also, I marked up references to classes and members with `{@code}`. >> >> Look at the updated version: [`Document.remove` in JDK 22](https://cr.openjdk.org/~aivanov/4622866/api/java.desktop/javax/swing/text/Document.html#remove(int,int)). > > Alexey Ivanov has updated the pull request incrementally with one additional commit since the last revision: > > Moved all rects and lines 0.5 pixel > > The 'shape-rendering: crispEdges' did give crisp edges in 100% scale, > but in 200% scale some edges are 3-pixel wide and others are 2-pixel. > Using 0.5 pixel offset solves both problems. I verified rendering on > 100%-scale display as well as on 150%- and 200%-scale displays. Marked as reviewed by prr (Reviewer). ------------- PR Review: https://git.openjdk.org/jdk/pull/15701#pullrequestreview-1633918934 From aivanov at openjdk.org Tue Sep 19 18:18:42 2023 From: aivanov at openjdk.org (Alexey Ivanov) Date: Tue, 19 Sep 2023 18:18:42 GMT Subject: RFR: 8315883: Open source several Swing JToolbar tests [v4] In-Reply-To: References: Message-ID: On Tue, 19 Sep 2023 17:04:59 GMT, Damon Nguyen wrote: >> These are the tests being converted: >> >> javax/swing/JToolBar/4138694/bug4138694.java >> javax/swing/JToolBar/4140421/bug4140421.java >> javax/swing/JToolBar/4196662/bug4196662.java >> javax/swing/JToolBar/4243930/bug4243930.java > > Damon Nguyen has updated the pull request incrementally with one additional commit since the last revision: > > Remove redundant test comment and update exception Marked as reviewed by aivanov (Reviewer). ------------- PR Review: https://git.openjdk.org/jdk/pull/15748#pullrequestreview-1633922980 From dnguyen at openjdk.org Tue Sep 19 18:18:45 2023 From: dnguyen at openjdk.org (Damon Nguyen) Date: Tue, 19 Sep 2023 18:18:45 GMT Subject: RFR: 8315883: Open source several Swing JToolbar tests [v3] In-Reply-To: <6y9bqgxEYOpGxSchcQ4uUUBX4UckBl2VhPXcr477E1k=.e0ac3a14-a9d0-4ac9-9fd7-edf297017398@github.com> References: <6y9bqgxEYOpGxSchcQ4uUUBX4UckBl2VhPXcr477E1k=.e0ac3a14-a9d0-4ac9-9fd7-edf297017398@github.com> Message-ID: On Tue, 19 Sep 2023 10:18:32 GMT, Alexey Ivanov wrote: >> Damon Nguyen has updated the pull request incrementally with one additional commit since the last revision: >> >> Update constant name > > test/jdk/javax/swing/JToolBar/bug4243930.java line 47: > >> 45: >> 46: public static void main(String[] argv) throws InterruptedException, >> 47: InvocationTargetException { > > Suggestion: > > public static void main(String[] argv) throws Exception { > > This one hasn't been updated. Thanks again for the review comments and your time @aivanov-jdk . Could you re-review this? ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/15748#discussion_r1330526642 From dnguyen at openjdk.org Tue Sep 19 18:31:59 2023 From: dnguyen at openjdk.org (Damon Nguyen) Date: Tue, 19 Sep 2023 18:31:59 GMT Subject: Integrated: 8315883: Open source several Swing JToolbar tests In-Reply-To: References: Message-ID: On Thu, 14 Sep 2023 16:43:29 GMT, Damon Nguyen wrote: > These are the tests being converted: > > javax/swing/JToolBar/4138694/bug4138694.java > javax/swing/JToolBar/4140421/bug4140421.java > javax/swing/JToolBar/4196662/bug4196662.java > javax/swing/JToolBar/4243930/bug4243930.java This pull request has now been integrated. Changeset: 62c0a1b9 Author: Damon Nguyen URL: https://git.openjdk.org/jdk/commit/62c0a1b9ac6462233f3ee06af470be9844e9e226 Stats: 199 lines in 4 files changed: 199 ins; 0 del; 0 mod 8315883: Open source several Swing JToolbar tests Reviewed-by: honkar, aivanov ------------- PR: https://git.openjdk.org/jdk/pull/15748 From prr at openjdk.org Tue Sep 19 18:37:40 2023 From: prr at openjdk.org (Phil Race) Date: Tue, 19 Sep 2023 18:37:40 GMT Subject: RFR: 8316017: Refactor timeout handler in PassFailJFrame In-Reply-To: References: Message-ID: On Mon, 11 Sep 2023 18:18:28 GMT, Alexey Ivanov wrote: > Refactored timeout handling in PassFailJFrame: > > 1. Managing the timer and formatting the time left is inside `TimeoutHandler` class. > 2. The class handles timer events and updates the label accordingly. > > This is implemented on top of #15665. test/jdk/java/awt/regtesthelpers/PassFailJFrame.java line 329: > 327: timer.stop(); > 328: testFailedReason = FAILURE_REASON > 329: + "Timeout User did not perform testing."; If the test was explicitly failed by the user (ie failed==true), why does the reason say that there was a time out ? ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/15668#discussion_r1330548806 From prr at openjdk.org Tue Sep 19 18:39:39 2023 From: prr at openjdk.org (Phil Race) Date: Tue, 19 Sep 2023 18:39:39 GMT Subject: RFR: 8316003: Update FileChooserSymLinkTest.java to HTML instructions [v3] In-Reply-To: References: Message-ID: On Tue, 12 Sep 2023 15:27:18 GMT, Alexey Ivanov wrote: >> To demonstrate the functionality of HTML formatting in `PassFailJFrame`, I updated the instructions for the `test/jdk/javax/swing/JFileChooser/FileChooserSymLinkTest.java` test. The commands to create the symbolic links are marked up with monospace font, which makes them stand out. The test instructions for single- and multi-selection are emphasised with bold text. >> >> This change depends on #15660 and [JDK-8294158](https://bugs.openjdk.org/browse/JDK-8294158). > > Alexey Ivanov has updated the pull request incrementally with one additional commit since the last revision: > > Amend indentation of nested
  • elements Marked as reviewed by prr (Reviewer). ------------- PR Review: https://git.openjdk.org/jdk/pull/15661#pullrequestreview-1633957153 From honkar at openjdk.org Tue Sep 19 18:45:54 2023 From: honkar at openjdk.org (Harshitha Onkar) Date: Tue, 19 Sep 2023 18:45:54 GMT Subject: Integrated: JDK-8315951: Open source several Swing HTMLEditorKit related tests In-Reply-To: <6kTx7IUAwD2sL8vUfqaOJhVF8vXDI8imvOuGBvgnG4U=.41946952-8e97-4a5c-aaa8-d1cf430ee0d4@github.com> References: <6kTx7IUAwD2sL8vUfqaOJhVF8vXDI8imvOuGBvgnG4U=.41946952-8e97-4a5c-aaa8-d1cf430ee0d4@github.com> Message-ID: On Thu, 14 Sep 2023 18:45:34 GMT, Harshitha Onkar wrote: > Following tests are open sourced as part of this PR. > > 1. java/awt/event/PaintEvent/RepaintTest/RepaintTest.java > 2. javax/swing/text/html/HTMLEditorKit/4214848/bug4214848.java > 3. javax/swing/text/html/HTMLEditorKit/4230197/bug4230197.java > 4. javax/swing/text/html/HTMLEditorKit/4238223/bug4238223.java This pull request has now been integrated. Changeset: d19e017d Author: Harshitha Onkar URL: https://git.openjdk.org/jdk/commit/d19e017d3fd87a6b7613f44a3757d574a6560680 Stats: 365 lines in 4 files changed: 365 ins; 0 del; 0 mod 8315951: Open source several Swing HTMLEditorKit related tests Reviewed-by: dnguyen, aivanov ------------- PR: https://git.openjdk.org/jdk/pull/15751 From aivanov at openjdk.org Tue Sep 19 18:56:44 2023 From: aivanov at openjdk.org (Alexey Ivanov) Date: Tue, 19 Sep 2023 18:56:44 GMT Subject: RFR: 8316017: Refactor timeout handler in PassFailJFrame In-Reply-To: References: Message-ID: On Tue, 19 Sep 2023 18:35:12 GMT, Phil Race wrote: >> Refactored timeout handling in PassFailJFrame: >> >> 1. Managing the timer and formatting the time left is inside `TimeoutHandler` class. >> 2. The class handles timer events and updates the label accordingly. >> >> This is implemented on top of #15665. > > test/jdk/java/awt/regtesthelpers/PassFailJFrame.java line 329: > >> 327: timer.stop(); >> 328: testFailedReason = FAILURE_REASON >> 329: + "Timeout User did not perform testing."; > > If the test was explicitly failed by the user (ie failed==true), why does the reason say that there was a time out ? Huh, it's a good question. I didn't notice it. It's the original code that I moved into a dedicated class. It shouldn't change the failure reason if it's already set. The timer isn't stopped in handlers for the failure, so it's possible that timer changes it. We should also stop the timer explicitly when failure or success is handled. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/15668#discussion_r1330570808 From dnguyen at openjdk.org Tue Sep 19 19:57:45 2023 From: dnguyen at openjdk.org (Damon Nguyen) Date: Tue, 19 Sep 2023 19:57:45 GMT Subject: RFR: 8316149: Open source several Swing JTree JViewport KeyboardManager tests [v2] In-Reply-To: References: Message-ID: On Tue, 19 Sep 2023 07:33:11 GMT, Prasanta Sadhukhan wrote: >> Damon Nguyen has updated the pull request incrementally with one additional commit since the last revision: >> >> Review comments changes > > test/jdk/javax/swing/JTree/bug4696499.java line 49: > >> 47: try { >> 48: SwingUtilities.invokeAndWait(() -> { >> 49: fr = new JFrame("bug4696499"); > > I guess frame is not needed and can be made headless Test is now headless. Thanks! > test/jdk/javax/swing/JViewport/bug4546474.java line 50: > >> 48: try { >> 49: SwingUtilities.invokeAndWait(() -> { >> 50: fr = new JFrame("bug4546474"); > > Guess this also can be made headless without frame Test is now headless. Thanks! ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/15802#discussion_r1330634913 PR Review Comment: https://git.openjdk.org/jdk/pull/15802#discussion_r1330634987 From dnguyen at openjdk.org Tue Sep 19 19:57:46 2023 From: dnguyen at openjdk.org (Damon Nguyen) Date: Tue, 19 Sep 2023 19:57:46 GMT Subject: RFR: 8316149: Open source several Swing JTree JViewport KeyboardManager tests [v2] In-Reply-To: References: Message-ID: <_i_5DCnDv_K0-iA2KWR8-M1S1oTwZHWzcRxZ3D_LUyw=.e26e2704-aff7-4348-84fd-f7f17219490e@github.com> On Tue, 19 Sep 2023 19:54:01 GMT, Damon Nguyen wrote: >> test/jdk/javax/swing/JTree/bug4696499.java line 49: >> >>> 47: try { >>> 48: SwingUtilities.invokeAndWait(() -> { >>> 49: fr = new JFrame("bug4696499"); >> >> I guess frame is not needed and can be made headless > > Test is now headless. Thanks! Worth noting, I also re-ran tests for both of the suggested test conversions to headless with 50 repeats. and it still passes. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/15802#discussion_r1330635834 From prr at openjdk.org Tue Sep 19 20:00:44 2023 From: prr at openjdk.org (Phil Race) Date: Tue, 19 Sep 2023 20:00:44 GMT Subject: RFR: 8219641: java/awt/font/Rotate/RotatedTextTest.java fails on Linux: Test failed for angle 15.0 In-Reply-To: References: Message-ID: On Mon, 18 Sep 2023 06:19:05 GMT, Arno Zeller wrote: > The test fails on newer SLES versions that have RobotoSlab-Regular.ttf as default font. I suggest to try getting a DejaVu font as default on Linux because it is known to work without issues. Sounds like (1) we don't have any reasonable idea of a small error to allow and (2) we don't know that this test isn't just getting lucky with the fonts for which it does pass. So I am not comfortable with either solution. And looking at the image we have a badly wandering baseline which seems like rounding (from somewhere) is partly to blame. I'd really like to dig into the specifics of what's happening here for the advances of the code points here - and see what they are before truncation (ie what is the 26.6 value) as well as afterwards. I don't know what we'll find but I'd like to make a more informed decision. ------------- PR Comment: https://git.openjdk.org/jdk/pull/15780#issuecomment-1726386340 From aturbanov at openjdk.org Tue Sep 19 20:16:00 2023 From: aturbanov at openjdk.org (Andrey Turbanov) Date: Tue, 19 Sep 2023 20:16:00 GMT Subject: RFR: 8316556: Fix typos in java.desktop Message-ID: PR with non-swing changes extracted from initial #14847 ------------- Commit messages: - [PATCH] Fix typos in java.desktop - [PATCH] Fix typos in java.desktop Changes: https://git.openjdk.org/jdk/pull/15773/files Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=15773&range=00 Issue: https://bugs.openjdk.org/browse/JDK-8316556 Stats: 195 lines in 81 files changed: 0 ins; 0 del; 195 mod Patch: https://git.openjdk.org/jdk/pull/15773.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/15773/head:pull/15773 PR: https://git.openjdk.org/jdk/pull/15773 From honkar at openjdk.org Tue Sep 19 20:43:41 2023 From: honkar at openjdk.org (Harshitha Onkar) Date: Tue, 19 Sep 2023 20:43:41 GMT Subject: RFR: JDK-8315876 Open source several Swing CSS related tests [v6] In-Reply-To: <5z0tnBVggYqlegmOHcIZhw9aoGeRo2XMaHwkVz9WNCQ=.44da2e5a-9dfa-44b1-b8b2-c8e285007ec1@github.com> References: <5z0tnBVggYqlegmOHcIZhw9aoGeRo2XMaHwkVz9WNCQ=.44da2e5a-9dfa-44b1-b8b2-c8e285007ec1@github.com> Message-ID: > Following tests are open sourced as part of this PR. > > 1. test/jdk/javax/swing/text/html/CSS/bug4174871.java > 2. test/jdk/javax/swing/text/html/CSS/bug4174874.java > 3. test/jdk/javax/swing/text/html/CSS/bug4284162.java > 4. test/jdk/javax/swing/text/html/CSS/bug4764897.java > 5. test/jdk/javax/swing/text/html/HTMLDocument/bug4209280.java Harshitha Onkar has updated the pull request incrementally with one additional commit since the last revision: minor change ------------- Changes: - all: https://git.openjdk.org/jdk/pull/15769/files - new: https://git.openjdk.org/jdk/pull/15769/files/b438f095..3f53fee4 Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=15769&range=05 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=15769&range=04-05 Stats: 1 line in 1 file changed: 0 ins; 0 del; 1 mod Patch: https://git.openjdk.org/jdk/pull/15769.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/15769/head:pull/15769 PR: https://git.openjdk.org/jdk/pull/15769 From prr at openjdk.org Tue Sep 19 20:46:43 2023 From: prr at openjdk.org (Phil Race) Date: Tue, 19 Sep 2023 20:46:43 GMT Subject: RFR: 8316556: Fix typos in java.desktop In-Reply-To: References: Message-ID: On Sat, 16 Sep 2023 16:22:40 GMT, Andrey Turbanov wrote: > PR with non-swing changes extracted from initial #14847 Marked as reviewed by prr (Reviewer). ------------- PR Review: https://git.openjdk.org/jdk/pull/15773#pullrequestreview-1634160520 From honkar at openjdk.org Tue Sep 19 20:46:56 2023 From: honkar at openjdk.org (Harshitha Onkar) Date: Tue, 19 Sep 2023 20:46:56 GMT Subject: Integrated: JDK-8315876 Open source several Swing CSS related tests In-Reply-To: <5z0tnBVggYqlegmOHcIZhw9aoGeRo2XMaHwkVz9WNCQ=.44da2e5a-9dfa-44b1-b8b2-c8e285007ec1@github.com> References: <5z0tnBVggYqlegmOHcIZhw9aoGeRo2XMaHwkVz9WNCQ=.44da2e5a-9dfa-44b1-b8b2-c8e285007ec1@github.com> Message-ID: <0Gui-T_iTjX7HDX0guhxQ8N0AWyQqX3QizwMBYVuZXA=.556811da-adef-4631-b423-0b7e83756c3d@github.com> On Fri, 15 Sep 2023 19:35:15 GMT, Harshitha Onkar wrote: > Following tests are open sourced as part of this PR. > > 1. test/jdk/javax/swing/text/html/CSS/bug4174871.java > 2. test/jdk/javax/swing/text/html/CSS/bug4174874.java > 3. test/jdk/javax/swing/text/html/CSS/bug4284162.java > 4. test/jdk/javax/swing/text/html/CSS/bug4764897.java > 5. test/jdk/javax/swing/text/html/HTMLDocument/bug4209280.java This pull request has now been integrated. Changeset: 833a8287 Author: Harshitha Onkar URL: https://git.openjdk.org/jdk/commit/833a82872c0b2517c7f4ae5d512cff3a428a071c Stats: 443 lines in 5 files changed: 443 ins; 0 del; 0 mod 8315876: Open source several Swing CSS related tests Reviewed-by: azvegint, dnguyen, aivanov ------------- PR: https://git.openjdk.org/jdk/pull/15769 From prr at openjdk.org Tue Sep 19 20:57:43 2023 From: prr at openjdk.org (Phil Race) Date: Tue, 19 Sep 2023 20:57:43 GMT Subject: RFR: 8316206: Test StretchedFontTest.java fails for Baekmuk font In-Reply-To: <4eLLluXke8q0oity_JF9axhhEeX6SX1-74Q5OOvQ8U4=.c965732f-ac78-4fe7-a584-141bf76616bc@github.com> References: <4eLLluXke8q0oity_JF9axhhEeX6SX1-74Q5OOvQ8U4=.c965732f-ac78-4fe7-a584-141bf76616bc@github.com> Message-ID: On Tue, 19 Sep 2023 13:41:27 GMT, Alexey Ivanov wrote: > **Root cause** > > The _Baekmuk Headline_ font maps `\u6f22` (?) to glyph id 16950 which has zero length. > > The test fails if the right half of the image with the rendered glyph contains only pixels of background colour. In this case, the left half of the image is also blank. It's somewhat false positive because of the broken font. > > **Fix** > > Ignore fonts which don't render the glyph correctly. If the left half of the image contains pixels of the background colour only, it is expected that the right half also contains background-coloured pixels only. > > The updated test does not fail with the _Baekmuk Headline_ font. It still detects the original problem and fails on builds without the fix for [JDK-8312555](https://bugs.openjdk.org/browse/JDK-8312555). I was thinking of a more direct font-oriented verification like this import java.awt.*; import java.awt.font.*; public class GO { public static void main(String args[]) { Font font = new Font(Font.SANS_SERIF, Font.PLAIN, 20); FontRenderContext frc = new FontRenderContext(null, false, false); GlyphVector gv = font.createGlyphVector(frc, "o"); boolean empty = gv.getVisualBounds().isEmpty(); System.out.println("empty="+empty); } } % java GO empty=true ------------- PR Comment: https://git.openjdk.org/jdk/pull/15818#issuecomment-1726453146 From azvegint at openjdk.org Tue Sep 19 21:00:21 2023 From: azvegint at openjdk.org (Alexander Zvegintsev) Date: Tue, 19 Sep 2023 21:00:21 GMT Subject: RFR: 8316211: Open source several manual applet tests Message-ID: <76b2-b6qr-MNBiDvTuZYs1bKZAbC21UMhoFxTZDJAGc=.2af94b7b-2a4d-4724-a08a-08a162ef1d4c@github.com> Open sourcing several manual applet tests test/jdk/java/awt/Frame/DefaultSizeTest.java test/jdk/java/awt/LightweightComponent/LightweightCliprect.java test/jdk/java/awt/event/KeyEvent/FunctionKeyTest.java test/jdk/javax/swing/JFrame/DefaultCloseOperation.java ------------- Commit messages: - initial Changes: https://git.openjdk.org/jdk/pull/15827/files Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=15827&range=00 Issue: https://bugs.openjdk.org/browse/JDK-8316211 Stats: 529 lines in 4 files changed: 529 ins; 0 del; 0 mod Patch: https://git.openjdk.org/jdk/pull/15827.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/15827/head:pull/15827 PR: https://git.openjdk.org/jdk/pull/15827 From prr at openjdk.org Tue Sep 19 21:10:41 2023 From: prr at openjdk.org (Phil Race) Date: Tue, 19 Sep 2023 21:10:41 GMT Subject: RFR: JDK-8315897: some PrivilegedActions missing in JDK code for getting properties In-Reply-To: References: Message-ID: On Tue, 12 Sep 2023 08:21:35 GMT, Matthias Baesken wrote: > > > So what about FontConfiguration? Is that something using the class directly too? > > > > > > I think this is not needed either. As far as I can see, the instance of `FontConfiguration` is created from `doPrivileged`, therefore these two system properties are read inside `doPrivileged` already. > > Hi there is a public constructor ` public FontConfiguration(SunFontManager fm) {` calling setOsNameAndVersion(), so is it really always called from `doPrivileged` ? (however it is currently only exported in a qualified way) Regardless of that, these properties are allowed to be read without permissions. See java.policy grant { ... // "standard" properies that can be read by anyone .... permission java.util.PropertyPermission "os.name", "read"; permission java.util.PropertyPermission "os.version", "read"; .... ------------- PR Comment: https://git.openjdk.org/jdk/pull/15629#issuecomment-1726467543 From azvegint at openjdk.org Tue Sep 19 21:12:41 2023 From: azvegint at openjdk.org (Alexander Zvegintsev) Date: Tue, 19 Sep 2023 21:12:41 GMT Subject: RFR: 8316206: Test StretchedFontTest.java fails for Baekmuk font In-Reply-To: <4eLLluXke8q0oity_JF9axhhEeX6SX1-74Q5OOvQ8U4=.c965732f-ac78-4fe7-a584-141bf76616bc@github.com> References: <4eLLluXke8q0oity_JF9axhhEeX6SX1-74Q5OOvQ8U4=.c965732f-ac78-4fe7-a584-141bf76616bc@github.com> Message-ID: <17E3Vps0-1kjkLi87NoxRQrr_lfAZk7T7QtfpY5eNTQ=.fa4c859c-7fd9-47b5-b912-517d7fbb45cd@github.com> On Tue, 19 Sep 2023 13:41:27 GMT, Alexey Ivanov wrote: > **Root cause** > > The _Baekmuk Headline_ font maps `\u6f22` (?) to glyph id 16950 which has zero length. > > The test fails if the right half of the image with the rendered glyph contains only pixels of background colour. In this case, the left half of the image is also blank. It's somewhat false positive because of the broken font. > > **Fix** > > Ignore fonts which don't render the glyph correctly. If the left half of the image contains pixels of the background colour only, it is expected that the right half also contains background-coloured pixels only. > > The updated test does not fail with the _Baekmuk Headline_ font. It still detects the original problem and fails on builds without the fix for [JDK-8312555](https://bugs.openjdk.org/browse/JDK-8312555). Marked as reviewed by azvegint (Reviewer). ------------- PR Review: https://git.openjdk.org/jdk/pull/15818#pullrequestreview-1634192925 From prr at openjdk.org Tue Sep 19 21:19:42 2023 From: prr at openjdk.org (Phil Race) Date: Tue, 19 Sep 2023 21:19:42 GMT Subject: RFR: 8313220: Remove Windows specific workaround in LCMS.c for _snprintf In-Reply-To: References: Message-ID: On Wed, 23 Aug 2023 00:42:47 GMT, Sergey Bylokhov wrote: > This patch addresses two issues: > * For Windows: The snprintf is available with Visual Studio 2015 and above, so we do not need to use the windows speciific "_snprintf". We also do not need to set a zero at the end of the string since the "new" snprintf works according c99: see this [link](https://learn.microsoft.com/en-us/cpp/c-runtime-library/reference/snprintf-snprintf-snprintf-l-snwprintf-snwprintf-l?view=msvc-170#behavior-summary) for details. > * For unix: It seems the standard snprintf does not guaratier that the zero is set at the start of the string if error is occured and the negative value is returned. It could be fixed by checking the return value and set zero manually, but I just decided to memset the whole array to zero, that is shorte and should not affect the performance in this error handler. > > See some discussin at the end of [this](https://github.com/openjdk/jdk/pull/10625) PR > > The new test just covered the changed code path and verifies that it works as expected. Marked as reviewed by prr (Reviewer). ------------- PR Review: https://git.openjdk.org/jdk/pull/15396#pullrequestreview-1634202965 From honkar at openjdk.org Tue Sep 19 21:44:43 2023 From: honkar at openjdk.org (Harshitha Onkar) Date: Tue, 19 Sep 2023 21:44:43 GMT Subject: RFR: 8315965: Open source various AWT applet tests In-Reply-To: References: Message-ID: On Thu, 14 Sep 2023 20:18:26 GMT, Alexander Zvegintsev wrote: > Open sourcing few applet tests: > > java/awt/ScrollPane/ScrollPaneTest.java > java/awt/TextArea/Length.java > java/awt/Window/WindowOwner.java > java/awt/font/Rotate/RotateTest3.java test/jdk/java/awt/TextArea/Length.java line 30: > 28: * @test > 29: * @bug 4120876 > 30: * @key headful Since we are not displaying anything, can this test be made headless? ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/15754#discussion_r1330731774 From prr at openjdk.org Tue Sep 19 21:53:41 2023 From: prr at openjdk.org (Phil Race) Date: Tue, 19 Sep 2023 21:53:41 GMT Subject: RFR: 8315584 : java/awt/print/Dialog/DialogType.java fails with option not supported: yesno [v2] In-Reply-To: References: Message-ID: On Wed, 6 Sep 2023 01:00:17 GMT, lawrence.andrews wrote: >> Test was failing with "test result: Error. Parse Exception: Arguments to `manual' option not supported: yesno" >> Following are fixed >> 1) Removed yesno >> 2) Used PassFailJFrame manual test framework to show the test instruction & allow the user to decide test execution result. >> 3) Added SkippedException in case Printer is not configured on the test host. >> 4) Updated the instruction how to close the print dialog that test is showing to the user. >> 5) Added an extra line to the file that was missing. > > lawrence.andrews has updated the pull request incrementally with one additional commit since the last revision: > > Removed the unused import statement and comma test/jdk/java/awt/print/Dialog/DialogType.java line 52: > 50: The test passes as long as no exceptions are thrown, *AND*, > 51: if running on Windows only, the first dialog is a native windows > 52: control which differs in appearance from the second dialog. The above comment is out of date. It is from before we had macOS which also has a native dialog. Please update it. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/15554#discussion_r1330742441 From prr at openjdk.org Tue Sep 19 21:53:44 2023 From: prr at openjdk.org (Phil Race) Date: Tue, 19 Sep 2023 21:53:44 GMT Subject: RFR: 8315584 : java/awt/print/Dialog/DialogType.java fails with option not supported: yesno [v2] In-Reply-To: References: Message-ID: On Wed, 6 Sep 2023 19:16:22 GMT, Alexey Ivanov wrote: >> lawrence.andrews has updated the pull request incrementally with one additional commit since the last revision: >> >> Removed the unused import statement and comma > > test/jdk/java/awt/print/Dialog/DialogType.java line 54: > >> 52: control which differs in appearance from the second dialog. >> 53: Note: You can either press 'ESCAPE' button or click on the 'Cancel' >> 54: to close print dialog. > > Basically, the only thing that's required from the user is to close the dialogs shown by pressing Esc or clicking Cancel? > > Once they're dismissed, the test could finish automatically. If it's the case, it's better to explain it in the instructions. > > If an exception is thrown, the test will finish automatically. > > --- > > It looks such a scenario is not covered by PassFailJFrame well: the instructions need to be shown for a short while before the test starts. After the user reads the instructions, the user clicks **Start** button. Then the instructions can be hidden or left on the screen (it depends on how long and complex the instructions are), and the test continues with its execution. > > As soon as the test logic finishes, the test dismisses the instructions if they're still visible, and exits. > > I know about at least three cases where a reduced functionality is required. Are you saying this test would be better with an enhancement to PassFailJFrame ? But it is OK right, just more clunky than it could be .. ? ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/15554#discussion_r1330743505 From honkar at openjdk.org Tue Sep 19 22:10:39 2023 From: honkar at openjdk.org (Harshitha Onkar) Date: Tue, 19 Sep 2023 22:10:39 GMT Subject: RFR: 8316211: Open source several manual applet tests In-Reply-To: <76b2-b6qr-MNBiDvTuZYs1bKZAbC21UMhoFxTZDJAGc=.2af94b7b-2a4d-4724-a08a-08a162ef1d4c@github.com> References: <76b2-b6qr-MNBiDvTuZYs1bKZAbC21UMhoFxTZDJAGc=.2af94b7b-2a4d-4724-a08a-08a162ef1d4c@github.com> Message-ID: On Tue, 19 Sep 2023 20:52:41 GMT, Alexander Zvegintsev wrote: > Open sourcing several manual applet tests > > > test/jdk/java/awt/Frame/DefaultSizeTest.java > test/jdk/java/awt/LightweightComponent/LightweightCliprect.java > test/jdk/java/awt/event/KeyEvent/FunctionKeyTest.java > test/jdk/javax/swing/JFrame/DefaultCloseOperation.java test/jdk/java/awt/event/KeyEvent/FunctionKeyTest.java line 50: > 48: If the above is true, then click Pass, else click Fail. > 49: """; > 50: This can be converted to automated test using robot's Key events `(VK_F11, VK_F12)`. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/15827#discussion_r1330755292 From azvegint at openjdk.org Wed Sep 20 00:06:41 2023 From: azvegint at openjdk.org (Alexander Zvegintsev) Date: Wed, 20 Sep 2023 00:06:41 GMT Subject: RFR: 8315965: Open source various AWT applet tests In-Reply-To: References: Message-ID: <9_FfkhgeOyAwqJHbN4pBAWVWBDbQm2BTeCmkG7n9RPU=.2cfa8f31-a9af-4b88-9e1b-49b746aa06a0@github.com> On Tue, 19 Sep 2023 21:36:14 GMT, Harshitha Onkar wrote: >> Open sourcing few applet tests: >> >> java/awt/ScrollPane/ScrollPaneTest.java >> java/awt/TextArea/Length.java >> java/awt/Window/WindowOwner.java >> java/awt/font/Rotate/RotateTest3.java > > test/jdk/java/awt/TextArea/Length.java line 30: > >> 28: * @test >> 29: * @bug 4120876 >> 30: * @key headful > > Since we are not displaying anything, can this test be made headless? No, `TextArea` a heavyweight component and cannot be created in headless environment. https://github.com/openjdk/jdk/blob/master/src/java.desktop/share/classes/java/awt/TextComponent.java#L150 ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/15754#discussion_r1330816253 From honkar at openjdk.org Wed Sep 20 00:14:40 2023 From: honkar at openjdk.org (Harshitha Onkar) Date: Wed, 20 Sep 2023 00:14:40 GMT Subject: RFR: 8315965: Open source various AWT applet tests In-Reply-To: References: Message-ID: On Thu, 14 Sep 2023 20:18:26 GMT, Alexander Zvegintsev wrote: > Open sourcing few applet tests: > > java/awt/ScrollPane/ScrollPaneTest.java > java/awt/TextArea/Length.java > java/awt/Window/WindowOwner.java > java/awt/font/Rotate/RotateTest3.java LGTM test/jdk/java/awt/font/Rotate/RotateTest3.java line 93: > 91: Dimension d = this.getSize(); > 92: g.setColor(this.getBackground()); > 93: g.fillRect(0,0,d.width,d.height); Suggestion: g.fillRect(0, 0, d.width, d.height); ------------- Marked as reviewed by honkar (Committer). PR Review: https://git.openjdk.org/jdk/pull/15754#pullrequestreview-1634363075 PR Review Comment: https://git.openjdk.org/jdk/pull/15754#discussion_r1330817605 From achung at openjdk.org Wed Sep 20 01:06:38 2023 From: achung at openjdk.org (Alisen Chung) Date: Wed, 20 Sep 2023 01:06:38 GMT Subject: RFR: 8315825: Open some swing tests Message-ID: <5ZBDsmjcSPidebRo12IiqHjrirKBpdfpD5K5BVsBhms=.b300c086-f00c-429f-82c2-5efc24e51cd3@github.com> Opening some swing tests: 1 javax/swing/LayoutComparator/4907772/bug4907772.java 2 javax/swing/LayoutComparator/4979794/bug4979794.java 3 javax/swing/LegacyGlueFocusTraversalPolicy/4765272/bug4765272.java 4 javax/swing/RootPaneChecking/RootPaneChecking.java ------------- Commit messages: - moving tests to open - named test frames - init commit Changes: https://git.openjdk.org/jdk/pull/15830/files Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=15830&range=00 Issue: https://bugs.openjdk.org/browse/JDK-8315825 Stats: 445 lines in 4 files changed: 445 ins; 0 del; 0 mod Patch: https://git.openjdk.org/jdk/pull/15830.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/15830/head:pull/15830 PR: https://git.openjdk.org/jdk/pull/15830 From azvegint at openjdk.org Wed Sep 20 01:46:35 2023 From: azvegint at openjdk.org (Alexander Zvegintsev) Date: Wed, 20 Sep 2023 01:46:35 GMT Subject: RFR: 8316211: Open source several manual applet tests [v2] In-Reply-To: <76b2-b6qr-MNBiDvTuZYs1bKZAbC21UMhoFxTZDJAGc=.2af94b7b-2a4d-4724-a08a-08a162ef1d4c@github.com> References: <76b2-b6qr-MNBiDvTuZYs1bKZAbC21UMhoFxTZDJAGc=.2af94b7b-2a4d-4724-a08a-08a162ef1d4c@github.com> Message-ID: > Open sourcing several manual applet tests > > > test/jdk/java/awt/Frame/DefaultSizeTest.java > test/jdk/java/awt/LightweightComponent/LightweightCliprect.java > test/jdk/java/awt/event/KeyEvent/FunctionKeyTest.java > test/jdk/javax/swing/JFrame/DefaultCloseOperation.java Alexander Zvegintsev has updated the pull request incrementally with one additional commit since the last revision: FunctionKeyTest converted to automated ------------- Changes: - all: https://git.openjdk.org/jdk/pull/15827/files - new: https://git.openjdk.org/jdk/pull/15827/files/a9345d83..69a125fa Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=15827&range=01 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=15827&range=00-01 Stats: 75 lines in 1 file changed: 44 ins; 19 del; 12 mod Patch: https://git.openjdk.org/jdk/pull/15827.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/15827/head:pull/15827 PR: https://git.openjdk.org/jdk/pull/15827 From azvegint at openjdk.org Wed Sep 20 01:46:37 2023 From: azvegint at openjdk.org (Alexander Zvegintsev) Date: Wed, 20 Sep 2023 01:46:37 GMT Subject: RFR: 8316211: Open source several manual applet tests [v2] In-Reply-To: References: <76b2-b6qr-MNBiDvTuZYs1bKZAbC21UMhoFxTZDJAGc=.2af94b7b-2a4d-4724-a08a-08a162ef1d4c@github.com> Message-ID: On Tue, 19 Sep 2023 22:07:59 GMT, Harshitha Onkar wrote: >> Alexander Zvegintsev has updated the pull request incrementally with one additional commit since the last revision: >> >> FunctionKeyTest converted to automated > > test/jdk/java/awt/event/KeyEvent/FunctionKeyTest.java line 50: > >> 48: If the above is true, then click Pass, else click Fail. >> 49: """; >> 50: > > This can be converted to automated test using robot's Key events `(VK_F11, VK_F12)`. Sure, converted. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/15827#discussion_r1330860774 From azvegint at openjdk.org Wed Sep 20 01:50:36 2023 From: azvegint at openjdk.org (Alexander Zvegintsev) Date: Wed, 20 Sep 2023 01:50:36 GMT Subject: RFR: 8315965: Open source various AWT applet tests [v2] In-Reply-To: References: Message-ID: > Open sourcing few applet tests: > > java/awt/ScrollPane/ScrollPaneTest.java > java/awt/TextArea/Length.java > java/awt/Window/WindowOwner.java > java/awt/font/Rotate/RotateTest3.java Alexander Zvegintsev has updated the pull request incrementally with one additional commit since the last revision: add spaces ------------- Changes: - all: https://git.openjdk.org/jdk/pull/15754/files - new: https://git.openjdk.org/jdk/pull/15754/files/7089abe6..9e537cc8 Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=15754&range=01 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=15754&range=00-01 Stats: 1 line in 1 file changed: 0 ins; 0 del; 1 mod Patch: https://git.openjdk.org/jdk/pull/15754.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/15754/head:pull/15754 PR: https://git.openjdk.org/jdk/pull/15754 From abhiscxk at openjdk.org Wed Sep 20 03:32:35 2023 From: abhiscxk at openjdk.org (Abhishek Kumar) Date: Wed, 20 Sep 2023 03:32:35 GMT Subject: RFR: 8316285: Opensource JButton manual tests Message-ID: <4RBkumIR5Vp7SR6WZNus4bFhKsHBoGRew1FZ5uJlwEM=.f0673967-95e6-45f0-96de-6906e1a28878@github.com> Few closed JButton swing manual test converted to automated and open sourced. ------------- Commit messages: - Opensource JButton manual tests - Open source few swing JFormattedTextField and JPopupMenu tests Changes: https://git.openjdk.org/jdk/pull/15831/files Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=15831&range=00 Issue: https://bugs.openjdk.org/browse/JDK-8316285 Stats: 783 lines in 8 files changed: 783 ins; 0 del; 0 mod Patch: https://git.openjdk.org/jdk/pull/15831.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/15831/head:pull/15831 PR: https://git.openjdk.org/jdk/pull/15831 From psadhukhan at openjdk.org Wed Sep 20 03:55:40 2023 From: psadhukhan at openjdk.org (Prasanta Sadhukhan) Date: Wed, 20 Sep 2023 03:55:40 GMT Subject: RFR: 8316149: Open source several Swing JTree JViewport KeyboardManager tests [v2] In-Reply-To: References: Message-ID: On Tue, 19 Sep 2023 16:58:10 GMT, Damon Nguyen wrote: >> These are the tests being converted: >> >> javax/swing/JTree/4696499/bug4696499.java >> javax/swing/JTree/5039542/bug5039542.java >> javax/swing/JViewport/4546474/bug4546474.java >> javax/swing/JViewport/4677611/bug4677611.java >> javax/swing/KeyboardManager/4345798/bug4345798.java > > Damon Nguyen has updated the pull request incrementally with one additional commit since the last revision: > > Review comments changes Marked as reviewed by psadhukhan (Reviewer). test/jdk/javax/swing/JTree/bug5039542.java line 33: > 31: > 32: public class bug5039542 { > 33: public static final String exampleStr = "TEST"; this can be local var ------------- PR Review: https://git.openjdk.org/jdk/pull/15802#pullrequestreview-1634546713 PR Review Comment: https://git.openjdk.org/jdk/pull/15802#discussion_r1330945215 From tr at openjdk.org Wed Sep 20 04:44:39 2023 From: tr at openjdk.org (Tejesh R) Date: Wed, 20 Sep 2023 04:44:39 GMT Subject: RFR: 8316285: Opensource JButton manual tests In-Reply-To: <4RBkumIR5Vp7SR6WZNus4bFhKsHBoGRew1FZ5uJlwEM=.f0673967-95e6-45f0-96de-6906e1a28878@github.com> References: <4RBkumIR5Vp7SR6WZNus4bFhKsHBoGRew1FZ5uJlwEM=.f0673967-95e6-45f0-96de-6906e1a28878@github.com> Message-ID: On Wed, 20 Sep 2023 03:25:25 GMT, Abhishek Kumar wrote: > Few closed JButton swing manual test converted to automated and open sourced. test/jdk/javax/swing/JButton/bug4234034.java line 41: > 39: static JFrame frame; > 40: static JButton button; > 41: static Robot robot; static `robot ` can be removed ( applicable for other test too) ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/15831#discussion_r1330982339 From tr at openjdk.org Wed Sep 20 04:50:38 2023 From: tr at openjdk.org (Tejesh R) Date: Wed, 20 Sep 2023 04:50:38 GMT Subject: RFR: 8316285: Opensource JButton manual tests In-Reply-To: <4RBkumIR5Vp7SR6WZNus4bFhKsHBoGRew1FZ5uJlwEM=.f0673967-95e6-45f0-96de-6906e1a28878@github.com> References: <4RBkumIR5Vp7SR6WZNus4bFhKsHBoGRew1FZ5uJlwEM=.f0673967-95e6-45f0-96de-6906e1a28878@github.com> Message-ID: <3KqDo58TWn5jseXOc-aUhXctZI5lNjLQpaZbtZpzkEw=.8322b46a-c3b8-48f3-b4e5-a832a035ddde@github.com> On Wed, 20 Sep 2023 03:25:25 GMT, Abhishek Kumar wrote: > Few closed JButton swing manual test converted to automated and open sourced. test/jdk/javax/swing/JPopupMenu/bug4197019.java line 47: > 45: public class bug4197019 { > 46: static volatile JMenuItem mi1; > 47: static volatile JMenuItem mi2; Both JMenuItems can be local. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/15831#discussion_r1330986431 From abhiscxk at openjdk.org Wed Sep 20 04:59:48 2023 From: abhiscxk at openjdk.org (Abhishek Kumar) Date: Wed, 20 Sep 2023 04:59:48 GMT Subject: Withdrawn: 8316285: Opensource JButton manual tests In-Reply-To: <4RBkumIR5Vp7SR6WZNus4bFhKsHBoGRew1FZ5uJlwEM=.f0673967-95e6-45f0-96de-6906e1a28878@github.com> References: <4RBkumIR5Vp7SR6WZNus4bFhKsHBoGRew1FZ5uJlwEM=.f0673967-95e6-45f0-96de-6906e1a28878@github.com> Message-ID: On Wed, 20 Sep 2023 03:25:25 GMT, Abhishek Kumar wrote: > Few closed JButton swing manual test converted to automated and open sourced. This pull request has been closed without being integrated. ------------- PR: https://git.openjdk.org/jdk/pull/15831 From tr at openjdk.org Wed Sep 20 05:10:39 2023 From: tr at openjdk.org (Tejesh R) Date: Wed, 20 Sep 2023 05:10:39 GMT Subject: RFR: 8316149: Open source several Swing JTree JViewport KeyboardManager tests [v2] In-Reply-To: References: Message-ID: On Tue, 19 Sep 2023 16:58:10 GMT, Damon Nguyen wrote: >> These are the tests being converted: >> >> javax/swing/JTree/4696499/bug4696499.java >> javax/swing/JTree/5039542/bug5039542.java >> javax/swing/JViewport/4546474/bug4546474.java >> javax/swing/JViewport/4677611/bug4677611.java >> javax/swing/KeyboardManager/4345798/bug4345798.java > > Damon Nguyen has updated the pull request incrementally with one additional commit since the last revision: > > Review comments changes Marked as reviewed by tr (Committer). ------------- PR Review: https://git.openjdk.org/jdk/pull/15802#pullrequestreview-1634640510 From psadhukhan at openjdk.org Wed Sep 20 05:13:39 2023 From: psadhukhan at openjdk.org (Prasanta Sadhukhan) Date: Wed, 20 Sep 2023 05:13:39 GMT Subject: RFR: 8316240: Open source several add/remove MenuBar manual tests In-Reply-To: <3HGUm3chbDleVC3u8poeuU1rtjnVxhj_ktYIl-kEv-s=.82156c33-f6b5-4515-a747-4083d2138d38@github.com> References: <3HGUm3chbDleVC3u8poeuU1rtjnVxhj_ktYIl-kEv-s=.82156c33-f6b5-4515-a747-4083d2138d38@github.com> Message-ID: <_dQ3x9V0L4bGSxHr5fap5N2NcC9KkX2_ANB3btt435A=.b21484a6-0890-4e91-ae16-59fb40ff47c7@github.com> On Mon, 18 Sep 2023 21:35:01 GMT, Alexander Zvegintsev wrote: > Open sourcing several MenuBar manual tests > > java/awt/MenuBar/AddRemoveMenuBarTests/AddRemoveMenuBarTest_1.java > java/awt/MenuBar/AddRemoveMenuBarTests/AddRemoveMenuBarTest_2.java > java/awt/MenuBar/AddRemoveMenuBarTests/AddRemoveMenuBarTest_3.java > java/awt/MenuBar/AddRemoveMenuBarTests/AddRemoveMenuBarTest_4.java Marked as reviewed by psadhukhan (Reviewer). test/jdk/java/awt/MenuBar/AddRemoveMenuBarTests/AddRemoveMenuBarTest_1.java line 29: > 27: import java.awt.MenuBar; > 28: import java.awt.event.MouseAdapter; > 29: import java.awt.event.MouseEvent; seems consistency suggests to put awt imports before swing..applicable for all tests test/jdk/java/awt/MenuBar/AddRemoveMenuBarTests/AddRemoveMenuBarTest_4.java line 59: > 57: > 58: After a menubar has been replaced with another menubar, > 59: the frame should not be resized nor repositioned on the screen. Can we not automate it? I mean we can do the click by robot and then check frame.getSize and getLocationOnScreen before and after click, no? Probably applicable for all tests which tests "frame should not be resized nor repositioned on the screen" ------------- PR Review: https://git.openjdk.org/jdk/pull/15800#pullrequestreview-1634633829 PR Review Comment: https://git.openjdk.org/jdk/pull/15800#discussion_r1330994831 PR Review Comment: https://git.openjdk.org/jdk/pull/15800#discussion_r1330998459 From abhiscxk at openjdk.org Wed Sep 20 05:37:17 2023 From: abhiscxk at openjdk.org (Abhishek Kumar) Date: Wed, 20 Sep 2023 05:37:17 GMT Subject: RFR: 8316285: Opensource JButton manual tests Message-ID: <3VndIzpQ7JpLOjY3dzxkoiABE7f_mflvEH7DVFDsIEg=.e57bbe6a-fd03-4454-9a72-aad7401afe11@github.com> Few closed JButton swing manual test converted to automated and open sourced. ------------- Commit messages: - Opensource JButton manual tests Changes: https://git.openjdk.org/jdk/pull/15835/files Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=15835&range=00 Issue: https://bugs.openjdk.org/browse/JDK-8316285 Stats: 297 lines in 3 files changed: 297 ins; 0 del; 0 mod Patch: https://git.openjdk.org/jdk/pull/15835.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/15835/head:pull/15835 PR: https://git.openjdk.org/jdk/pull/15835 From tr at openjdk.org Wed Sep 20 05:51:41 2023 From: tr at openjdk.org (Tejesh R) Date: Wed, 20 Sep 2023 05:51:41 GMT Subject: RFR: 8316285: Opensource JButton manual tests In-Reply-To: <3VndIzpQ7JpLOjY3dzxkoiABE7f_mflvEH7DVFDsIEg=.e57bbe6a-fd03-4454-9a72-aad7401afe11@github.com> References: <3VndIzpQ7JpLOjY3dzxkoiABE7f_mflvEH7DVFDsIEg=.e57bbe6a-fd03-4454-9a72-aad7401afe11@github.com> Message-ID: <0KeY6_wysxOc85X-Zhko264iMYR8O9b9QUZdxCakF6Y=.abaa8ae6-b961-4a5e-bf07-59de71b2d6e1@github.com> On Wed, 20 Sep 2023 05:29:30 GMT, Abhishek Kumar wrote: > Few closed JButton swing manual test converted to automated and open sourced. test/jdk/javax/swing/JButton/bug4234034.java line 41: > 39: static JFrame frame; > 40: static JButton button; > 41: static Robot robot; Can remove `static Robot` since local is created. (Applicable to other test) ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/15835#discussion_r1331030643 From abhiscxk at openjdk.org Wed Sep 20 05:51:45 2023 From: abhiscxk at openjdk.org (Abhishek Kumar) Date: Wed, 20 Sep 2023 05:51:45 GMT Subject: RFR: 8315825: Open some swing tests In-Reply-To: <5ZBDsmjcSPidebRo12IiqHjrirKBpdfpD5K5BVsBhms=.b300c086-f00c-429f-82c2-5efc24e51cd3@github.com> References: <5ZBDsmjcSPidebRo12IiqHjrirKBpdfpD5K5BVsBhms=.b300c086-f00c-429f-82c2-5efc24e51cd3@github.com> Message-ID: On Wed, 20 Sep 2023 00:57:57 GMT, Alisen Chung wrote: > Opening some swing tests: > 1 javax/swing/LayoutComparator/4907772/bug4907772.java > 2 javax/swing/LayoutComparator/4979794/bug4979794.java > 3 javax/swing/LegacyGlueFocusTraversalPolicy/4765272/bug4765272.java > 4 javax/swing/RootPaneChecking/RootPaneChecking.java test/jdk/javax/swing/JComponent/bug4765272.java line 24: > 22: */ > 23: > 24: /* @test Suggestion: /* * @test To maintain consistency across all tests. Applies to other tests as well. test/jdk/javax/swing/JComponent/bug4765272.java line 43: > 41: > 42: public class bug4765272 { > 43: static boolean focusGained = false; volatile? test/jdk/javax/swing/JComponent/bug4765272.java line 109: > 107: Robot r = new Robot(); > 108: r.delay(1000); > 109: r.waitForIdle(); waitForIdle before delay test/jdk/javax/swing/JComponent/bug4979794.java line 71: > 69: Robot r = new Robot(); > 70: r.delay(1000); > 71: r.waitForIdle(); waitForIdle before delay test/jdk/javax/swing/JComponent/bug4979794.java line 79: > 77: Component next2 = policy.getComponentAfter(fr, btn2); > 78: if (next1 == next2) { > 79: throw new Error("btn1 and btn2 have the same next Component."); `RuntimeException` instead of `Error`? test/jdk/javax/swing/JPanel/bug4907772.java line 70: > 68: Robot r = new Robot(); > 69: r.delay(1000); > 70: r.waitForIdle(); waitForIdle before delay test/jdk/javax/swing/RootPaneChecking/RootPaneChecking.java line 45: > 43: public static void main(String[] args) throws Exception { > 44: SwingUtilities.invokeAndWait(() -> { > 45: MyJFrame frame = new MyJFrame(); Title can be added. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/15830#discussion_r1331023318 PR Review Comment: https://git.openjdk.org/jdk/pull/15830#discussion_r1331024924 PR Review Comment: https://git.openjdk.org/jdk/pull/15830#discussion_r1331025553 PR Review Comment: https://git.openjdk.org/jdk/pull/15830#discussion_r1331026964 PR Review Comment: https://git.openjdk.org/jdk/pull/15830#discussion_r1331027687 PR Review Comment: https://git.openjdk.org/jdk/pull/15830#discussion_r1331028207 PR Review Comment: https://git.openjdk.org/jdk/pull/15830#discussion_r1331030956 From abhiscxk at openjdk.org Wed Sep 20 05:58:11 2023 From: abhiscxk at openjdk.org (Abhishek Kumar) Date: Wed, 20 Sep 2023 05:58:11 GMT Subject: RFR: 8316285: Opensource JButton manual tests [v2] In-Reply-To: <3VndIzpQ7JpLOjY3dzxkoiABE7f_mflvEH7DVFDsIEg=.e57bbe6a-fd03-4454-9a72-aad7401afe11@github.com> References: <3VndIzpQ7JpLOjY3dzxkoiABE7f_mflvEH7DVFDsIEg=.e57bbe6a-fd03-4454-9a72-aad7401afe11@github.com> Message-ID: > Few closed JButton swing manual test converted to automated and open sourced. Abhishek Kumar has updated the pull request incrementally with one additional commit since the last revision: Removed unused robot instance ------------- Changes: - all: https://git.openjdk.org/jdk/pull/15835/files - new: https://git.openjdk.org/jdk/pull/15835/files/0043dc59..802eadb9 Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=15835&range=01 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=15835&range=00-01 Stats: 3 lines in 3 files changed: 0 ins; 3 del; 0 mod Patch: https://git.openjdk.org/jdk/pull/15835.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/15835/head:pull/15835 PR: https://git.openjdk.org/jdk/pull/15835 From abhiscxk at openjdk.org Wed Sep 20 06:26:41 2023 From: abhiscxk at openjdk.org (Abhishek Kumar) Date: Wed, 20 Sep 2023 06:26:41 GMT Subject: RFR: 8316389: Open source few AWT applet tests [v2] In-Reply-To: References: <18fnIFEUM9J1uSTp3HXXpEWl55jRkBRmKaaHkuLuY9Y=.059437ba-d9d0-44be-bf02-d3091eaf2d39@github.com> Message-ID: On Mon, 18 Sep 2023 21:20:29 GMT, Alexander Zvegintsev wrote: >> Open sourcing few tests: >> >> java/awt/Frame/FrameRepackTest.java >> java/awt/Frame/FrameResizeTest/FrameResizeTest_1.java >> java/awt/Frame/FrameResizeTest/FrameResizeTest_2.java >> java/awt/Frame/WindowMoveTest.java > > Alexander Zvegintsev has updated the pull request incrementally with one additional commit since the last revision: > > fix path test/jdk/java/awt/Frame/FrameRepackTest.java line 25: > 23: > 24: import javax.swing.SwingUtilities; > 25: import java.awt.BorderLayout; awt imports first here and others also. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/15787#discussion_r1331054098 From psadhukhan at openjdk.org Wed Sep 20 06:28:49 2023 From: psadhukhan at openjdk.org (Prasanta Sadhukhan) Date: Wed, 20 Sep 2023 06:28:49 GMT Subject: RFR: 8316285: Opensource JButton manual tests [v2] In-Reply-To: References: <3VndIzpQ7JpLOjY3dzxkoiABE7f_mflvEH7DVFDsIEg=.e57bbe6a-fd03-4454-9a72-aad7401afe11@github.com> Message-ID: On Wed, 20 Sep 2023 05:58:11 GMT, Abhishek Kumar wrote: >> Few closed JButton swing manual test converted to automated and open sourced. > > Abhishek Kumar has updated the pull request incrementally with one additional commit since the last revision: > > Removed unused robot instance Changes requested by psadhukhan (Reviewer). test/jdk/javax/swing/JButton/bug4234034.java line 2: > 1: /* > 2: * Copyright (c) 2000, 2023 Oracle and/or its affiliates. All rights reserved. should be 1999 and a "," after 2023 else validate-source probably will fail, you can check mach5 -j tier1 test/jdk/javax/swing/JButton/bug4234034.java line 27: > 25: * @test > 26: * @bug 4234034 > 27: * @summary Tests add proper summary test/jdk/javax/swing/JButton/bug4234034.java line 47: > 45: try { > 46: SwingUtilities.invokeAndWait(() -> { > 47: frame = new JFrame("bug4323121"); seems like indent is wrong test/jdk/javax/swing/JButton/bug4234034.java line 52: > 50: frame.getContentPane().add(button); > 51: frame.pack(); > 52: frame.setSize(250, 200); pack and setSize together doesn't make sense...Use one or the other, probably pack will do... test/jdk/javax/swing/JButton/bug4234034.java line 64: > 62: robot.keyPress(KeyEvent.VK_F1); > 63: robot.keyRelease(KeyEvent.VK_F1); > 64: robot.keyRelease(KeyEvent.VK_CONTROL); there is no failure check...what should happen with ctrl+F1 without the fix, will it crash? test/jdk/javax/swing/JButton/bug4323121.java line 2: > 1: /* > 2: * Copyright (c) 2000, 2023 Oracle and/or its affiliates. All rights reserved. a "," after 2023 test/jdk/javax/swing/JButton/bug4323121.java line 61: > 59: frame.getContentPane().add(button); > 60: frame.pack(); > 61: frame.setSize(250, 200); try either pack or setSize test/jdk/javax/swing/JButton/bug4323121.java line 74: > 72: }); > 73: robot.mouseMove(pt.x + buttonW / 2, pt.y + buttonH / 2); > 74: better to use waitForIdle here test/jdk/javax/swing/JButton/bug4490179.java line 2: > 1: /* > 2: * Copyright (c) 2002, 2023 Oracle and/or its affiliates. All rights reserved. a "," after 2023 test/jdk/javax/swing/JButton/bug4490179.java line 48: > 46: static volatile int buttonH; > 47: static volatile boolean passed = true; > 48: public static void main(String[] args) throws Exception { give 1 line gap before main test/jdk/javax/swing/JButton/bug4490179.java line 62: > 60: }); > 61: frame.pack(); > 62: frame.setSize(250, 200); use pack or setSize test/jdk/javax/swing/JButton/bug4490179.java line 76: > 74: > 75: robot.mouseMove(pt.x + buttonW / 2, pt.y + buttonH / 2); > 76: robot.delay(100); no need of this delay as setAutpDelay is there, you can put waitForIdle instead.. ------------- PR Review: https://git.openjdk.org/jdk/pull/15835#pullrequestreview-1634733934 PR Review Comment: https://git.openjdk.org/jdk/pull/15835#discussion_r1331048251 PR Review Comment: https://git.openjdk.org/jdk/pull/15835#discussion_r1331048424 PR Review Comment: https://git.openjdk.org/jdk/pull/15835#discussion_r1331048803 PR Review Comment: https://git.openjdk.org/jdk/pull/15835#discussion_r1331049402 PR Review Comment: https://git.openjdk.org/jdk/pull/15835#discussion_r1331051365 PR Review Comment: https://git.openjdk.org/jdk/pull/15835#discussion_r1331051901 PR Review Comment: https://git.openjdk.org/jdk/pull/15835#discussion_r1331052458 PR Review Comment: https://git.openjdk.org/jdk/pull/15835#discussion_r1331053098 PR Review Comment: https://git.openjdk.org/jdk/pull/15835#discussion_r1331054487 PR Review Comment: https://git.openjdk.org/jdk/pull/15835#discussion_r1331055384 PR Review Comment: https://git.openjdk.org/jdk/pull/15835#discussion_r1331056330 PR Review Comment: https://git.openjdk.org/jdk/pull/15835#discussion_r1331057714 From azeller at openjdk.org Wed Sep 20 07:08:51 2023 From: azeller at openjdk.org (Arno Zeller) Date: Wed, 20 Sep 2023 07:08:51 GMT Subject: RFR: 8219641: java/awt/font/Rotate/RotatedTextTest.java fails on Linux: Test failed for angle 15.0 In-Reply-To: References: Message-ID: <3BPknGnn8UvIBUj4lUpwDevy7PQGCKj34sFOPpT1HmY=.10d325f7-ca14-4820-b38f-37423365b89d@github.com> On Tue, 19 Sep 2023 19:57:25 GMT, Phil Race wrote: > I'd really like to dig into the specifics of what's happening here for the advances of the code points here - and see what they are before truncation (ie what is the 26.6 value) as well as afterwards. I don't know what we'll find but I'd like to make a more informed decision. That sounds reasonable to me - I suspected it to be just an issue with some fonts and small differences, but it now looks like a bigger thing. I will close this PR. ------------- PR Comment: https://git.openjdk.org/jdk/pull/15780#issuecomment-1727094702 From azeller at openjdk.org Wed Sep 20 07:08:54 2023 From: azeller at openjdk.org (Arno Zeller) Date: Wed, 20 Sep 2023 07:08:54 GMT Subject: Withdrawn: 8219641: java/awt/font/Rotate/RotatedTextTest.java fails on Linux: Test failed for angle 15.0 In-Reply-To: References: Message-ID: On Mon, 18 Sep 2023 06:19:05 GMT, Arno Zeller wrote: > The test fails on newer SLES versions that have RobotoSlab-Regular.ttf as default font. I suggest to try getting a DejaVu font as default on Linux because it is known to work without issues. This pull request has been closed without being integrated. ------------- PR: https://git.openjdk.org/jdk/pull/15780 From mbaesken at openjdk.org Wed Sep 20 07:16:48 2023 From: mbaesken at openjdk.org (Matthias Baesken) Date: Wed, 20 Sep 2023 07:16:48 GMT Subject: Withdrawn: JDK-8315897: some PrivilegedActions missing in JDK code for getting properties In-Reply-To: References: Message-ID: On Fri, 8 Sep 2023 08:26:16 GMT, Matthias Baesken wrote: > There are some remaining places in 'general' JDK code (= code not related to e.g. a specific tool) getting properties like : > > osName = System.getProperty(os.name) > > https://github.com/openjdk/jdk/blob/master/src/java.management/share/classes/sun/management/VMManagementImpl.java#L225 > > https://github.com/openjdk/jdk/blob/master/src/java.desktop/share/classes/sun/awt/FontConfiguration.java#L134 > > Those should be a PrivilegedAction . This pull request has been closed without being integrated. ------------- PR: https://git.openjdk.org/jdk/pull/15629 From bdutheil at openjdk.org Wed Sep 20 07:55:57 2023 From: bdutheil at openjdk.org (Brice Dutheil) Date: Wed, 20 Sep 2023 07:55:57 GMT Subject: RFR: JDK-8303950: [macos]Translucent Windows Flicker on Repaint [v3] In-Reply-To: References: <1rA84rf1wIPIOVRjBWMZpPcRf9FE2rMSZ0hu0xla1i0=.0ac7cdf8-42d8-4bcd-b521-f386d46fa107@github.com> Message-ID: On Fri, 16 Jun 2023 23:16:53 GMT, Jeremy wrote: >> # Problem Summary >> >> For non-opaque windows, Window#paint calls `gg.fillRect(0, 0, getWidth(), getHeight())` before `super.paint(g)`. >> >> This can cause flickering on Mac, and the flickering seems to have gotten much worse in recent JVMs. (See movie attachments to original ticket.) >> >> # Discussion >> >> This is my 2nd PR for this ticket. The original is [here](https://github.com/openjdk/jdk/pull/12993); that proposed change was IMO more invasive/scarier. It was auto-closed after 8 weeks of inactivity, and I'd rather offer this PR instead. >> >> In that previous discussion Alan Snyder framed the core problem as a "lack of synchronization" (see [comment here](https://github.com/openjdk/jdk/pull/12993#issuecomment-1467528061)). If the monitor refreshes/flushes after we've called `fillRect` *but before we finish `super.paint`*: it makes sense that we'd see a flicker. >> >> I agree with Alan, but I think the problem can also be framed as a mixing-Swing-with-AWT issue. (Which IMO will involve an easier fix.) >> >> This PR is a low-risk change (relative to the previous PR) that intercepts calls to repaint a Window that is also RootPaneContainer. Now we'll redirect those calls to paint the JRootPane instead. This means we'll exclusively paint within Swing's/RepaintManager's double-buffered architecture, so we bypass the risky call to `fillRect` on the screen's Graphics2D. (And this change occurs within RepaintManager, so we're clearly already in Swing's architecture.) >> >> So with this change: we paint everything to the double-buffer, and the *only time* we paint to the Window's Graphics2D is when have set up a AlphaComposite.Src and replace its contents with our buffer's contents. >> >> # Tests >> >> This PR includes a new test for 8303950 itself. This is pretty self-explanatory: we repaint a trivial animation for a few seconds and use the Robot to see if a pixel is the expected color. >> >> This PR also includes a test called `bug8303950_legacyWindowPaintBehavior` that creates a grid of 4 windows with varying opacity/backgrounds: >> >> image >> >> I was surprised by how these windows rendered, but I don't think that's worth debating here. This test simply makes sure that we preserve this preexisting behavior. The broad "rules" appear to be: >> 1. If a JComponent identifies as opaque (see `JComponent.isOpaque`) then the JComponent's background is used. (I... > > Jeremy has updated the pull request incrementally with one additional commit since the last revision: > > 8303950: removing unnecessary whitespace in unit test > > See https://github.com/openjdk/jdk/pull/14363#pullrequestreview-1484315506 I encountered an issue very similar to this problem, is there any chance to see progress on the fix ? ------------- PR Comment: https://git.openjdk.org/jdk/pull/14363#issuecomment-1727165297 From tr at openjdk.org Wed Sep 20 09:45:27 2023 From: tr at openjdk.org (Tejesh R) Date: Wed, 20 Sep 2023 09:45:27 GMT Subject: RFR: 8315742: Open source several Swing Scroll related tests Message-ID: Open sourcing these Swing Scroll related tests: javax/swing/JScrollBar/4495822/bug4495822.java javax/swing/JScrollBar/4696826/bug4696826.java javax/swing/JScrollBar/4842792/bug4842792.java javax/swing/JScrollPane/4247092/bug4247092.java javax/swing/JScrollPane/4264640/bug4264640.java javax/swing/JScrollPane/4467063/bug4467063.java ------------- Commit messages: - Open source few ScrollPane and ScrollBar related Test Changes: https://git.openjdk.org/jdk/pull/15839/files Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=15839&range=00 Issue: https://bugs.openjdk.org/browse/JDK-8315742 Stats: 419 lines in 6 files changed: 419 ins; 0 del; 0 mod Patch: https://git.openjdk.org/jdk/pull/15839.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/15839/head:pull/15839 PR: https://git.openjdk.org/jdk/pull/15839 From abhiscxk at openjdk.org Wed Sep 20 09:47:36 2023 From: abhiscxk at openjdk.org (Abhishek Kumar) Date: Wed, 20 Sep 2023 09:47:36 GMT Subject: RFR: 8316285: Opensource JButton manual tests [v3] In-Reply-To: <3VndIzpQ7JpLOjY3dzxkoiABE7f_mflvEH7DVFDsIEg=.e57bbe6a-fd03-4454-9a72-aad7401afe11@github.com> References: <3VndIzpQ7JpLOjY3dzxkoiABE7f_mflvEH7DVFDsIEg=.e57bbe6a-fd03-4454-9a72-aad7401afe11@github.com> Message-ID: <0xdv_QKJuTJ5a5k0hb00uj8Hv75xcWXtDSyOOSTWBiM=.c78122f7-c170-489c-a02c-6358b8ec72ea@github.com> > Few closed JButton swing manual test converted to automated and open sourced. Abhishek Kumar has updated the pull request incrementally with one additional commit since the last revision: Review comment update ------------- Changes: - all: https://git.openjdk.org/jdk/pull/15835/files - new: https://git.openjdk.org/jdk/pull/15835/files/802eadb9..10d6b10a Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=15835&range=02 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=15835&range=01-02 Stats: 18 lines in 3 files changed: 1 ins; 3 del; 14 mod Patch: https://git.openjdk.org/jdk/pull/15835.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/15835/head:pull/15835 PR: https://git.openjdk.org/jdk/pull/15835 From abhiscxk at openjdk.org Wed Sep 20 09:47:39 2023 From: abhiscxk at openjdk.org (Abhishek Kumar) Date: Wed, 20 Sep 2023 09:47:39 GMT Subject: RFR: 8316285: Opensource JButton manual tests [v2] In-Reply-To: References: <3VndIzpQ7JpLOjY3dzxkoiABE7f_mflvEH7DVFDsIEg=.e57bbe6a-fd03-4454-9a72-aad7401afe11@github.com> Message-ID: On Wed, 20 Sep 2023 06:16:21 GMT, Prasanta Sadhukhan wrote: >> Abhishek Kumar has updated the pull request incrementally with one additional commit since the last revision: >> >> Removed unused robot instance > > test/jdk/javax/swing/JButton/bug4234034.java line 64: > >> 62: robot.keyPress(KeyEvent.VK_F1); >> 63: robot.keyRelease(KeyEvent.VK_F1); >> 64: robot.keyRelease(KeyEvent.VK_CONTROL); > > there is no failure check...what should happen with ctrl+F1 without the fix, will it crash? It should throw `NullPointerException`. It was fixed in 1.3.0 and affects 1.2.0 I tried checking modified test with 1.2.1 but it seems **Robot is available since 1.3**, getting compile error. Didn't get 1.2.0 binary. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/15835#discussion_r1331361541 From psadhukhan at openjdk.org Wed Sep 20 10:15:42 2023 From: psadhukhan at openjdk.org (Prasanta Sadhukhan) Date: Wed, 20 Sep 2023 10:15:42 GMT Subject: RFR: 8316285: Opensource JButton manual tests [v3] In-Reply-To: <0xdv_QKJuTJ5a5k0hb00uj8Hv75xcWXtDSyOOSTWBiM=.c78122f7-c170-489c-a02c-6358b8ec72ea@github.com> References: <3VndIzpQ7JpLOjY3dzxkoiABE7f_mflvEH7DVFDsIEg=.e57bbe6a-fd03-4454-9a72-aad7401afe11@github.com> <0xdv_QKJuTJ5a5k0hb00uj8Hv75xcWXtDSyOOSTWBiM=.c78122f7-c170-489c-a02c-6358b8ec72ea@github.com> Message-ID: <-IteOrTO4ekx38fIpP9cJ81mVnYg3cnGgVNAaN6uR5o=.32d0aeb4-ea55-4c8a-bf7a-d619a14d880f@github.com> On Wed, 20 Sep 2023 09:47:36 GMT, Abhishek Kumar wrote: >> Few closed JButton swing manual test converted to automated and open sourced. > > Abhishek Kumar has updated the pull request incrementally with one additional commit since the last revision: > > Review comment update Marked as reviewed by psadhukhan (Reviewer). ------------- PR Review: https://git.openjdk.org/jdk/pull/15835#pullrequestreview-1635271933 From aivanov at openjdk.org Wed Sep 20 11:16:57 2023 From: aivanov at openjdk.org (Alexey Ivanov) Date: Wed, 20 Sep 2023 11:16:57 GMT Subject: RFR: JDK-8303950: [macos]Translucent Windows Flicker on Repaint [v3] In-Reply-To: References: <1rA84rf1wIPIOVRjBWMZpPcRf9FE2rMSZ0hu0xla1i0=.0ac7cdf8-42d8-4bcd-b521-f386d46fa107@github.com> Message-ID: On Wed, 20 Sep 2023 07:52:33 GMT, Brice Dutheil wrote: > I encountered an issue very similar to this problem, is there any chance to see progress on the fix ? @bric3 This is not how it works? Yet feel free to propose a patch that addresses the problem. It could be based on this PR. I looks @mickleness couldn't run the tests. I haven't looked into the code changes or tests? ------------- PR Comment: https://git.openjdk.org/jdk/pull/14363#issuecomment-1727518371 From bdutheil at openjdk.org Wed Sep 20 11:21:57 2023 From: bdutheil at openjdk.org (Brice Dutheil) Date: Wed, 20 Sep 2023 11:21:57 GMT Subject: RFR: JDK-8303950: [macos]Translucent Windows Flicker on Repaint [v3] In-Reply-To: References: <1rA84rf1wIPIOVRjBWMZpPcRf9FE2rMSZ0hu0xla1i0=.0ac7cdf8-42d8-4bcd-b521-f386d46fa107@github.com> Message-ID: On Fri, 16 Jun 2023 23:16:53 GMT, Jeremy wrote: >> # Problem Summary >> >> For non-opaque windows, Window#paint calls `gg.fillRect(0, 0, getWidth(), getHeight())` before `super.paint(g)`. >> >> This can cause flickering on Mac, and the flickering seems to have gotten much worse in recent JVMs. (See movie attachments to original ticket.) >> >> # Discussion >> >> This is my 2nd PR for this ticket. The original is [here](https://github.com/openjdk/jdk/pull/12993); that proposed change was IMO more invasive/scarier. It was auto-closed after 8 weeks of inactivity, and I'd rather offer this PR instead. >> >> In that previous discussion Alan Snyder framed the core problem as a "lack of synchronization" (see [comment here](https://github.com/openjdk/jdk/pull/12993#issuecomment-1467528061)). If the monitor refreshes/flushes after we've called `fillRect` *but before we finish `super.paint`*: it makes sense that we'd see a flicker. >> >> I agree with Alan, but I think the problem can also be framed as a mixing-Swing-with-AWT issue. (Which IMO will involve an easier fix.) >> >> This PR is a low-risk change (relative to the previous PR) that intercepts calls to repaint a Window that is also RootPaneContainer. Now we'll redirect those calls to paint the JRootPane instead. This means we'll exclusively paint within Swing's/RepaintManager's double-buffered architecture, so we bypass the risky call to `fillRect` on the screen's Graphics2D. (And this change occurs within RepaintManager, so we're clearly already in Swing's architecture.) >> >> So with this change: we paint everything to the double-buffer, and the *only time* we paint to the Window's Graphics2D is when have set up a AlphaComposite.Src and replace its contents with our buffer's contents. >> >> # Tests >> >> This PR includes a new test for 8303950 itself. This is pretty self-explanatory: we repaint a trivial animation for a few seconds and use the Robot to see if a pixel is the expected color. >> >> This PR also includes a test called `bug8303950_legacyWindowPaintBehavior` that creates a grid of 4 windows with varying opacity/backgrounds: >> >> image >> >> I was surprised by how these windows rendered, but I don't think that's worth debating here. This test simply makes sure that we preserve this preexisting behavior. The broad "rules" appear to be: >> 1. If a JComponent identifies as opaque (see `JComponent.isOpaque`) then the JComponent's background is used. (I... > > Jeremy has updated the pull request incrementally with one additional commit since the last revision: > > 8303950: removing unnecessary whitespace in unit test > > See https://github.com/openjdk/jdk/pull/14363#pullrequestreview-1484315506 Yes, I was more thinking about discussing the patch and PR than expecting the PR to be.erged right away, since the last comments don't really address the technical issue. ------------- PR Comment: https://git.openjdk.org/jdk/pull/14363#issuecomment-1727525135 From aivanov at openjdk.org Wed Sep 20 11:35:43 2023 From: aivanov at openjdk.org (Alexey Ivanov) Date: Wed, 20 Sep 2023 11:35:43 GMT Subject: RFR: 8313403: Remove unused 'mask' field from JFormattedTextField In-Reply-To: References: <4fl_xrqZnBAxg014rvHQuI_7K-YP2QouKSzr76fcOX4=.2823965d-9be5-4b9d-ab02-038658b3469c@github.com> Message-ID: On Thu, 17 Aug 2023 21:37:17 GMT, Phil Race wrote: >> The private field `mask` is never used in `JFormattedTextField`. >> >> I couldn't find any usages of the field, including JNI. Therefore, it is safe to remove. > > Marked as reviewed by prr (Reviewer). > @prrace could you confirm, please? No CSR is required to remove an unused private field from classes in Swing because the specification for Swing classes states, ?Serialized objects of this class will not be compatible with future Swing releases.? > > I believe your approval means just that. I still want an additional confirmation to avoid any confusion. > > It is to resolve @mrserb's concern raised above. I haven't gotten any reply? The PR has two approvals now. If don't hear any objections, I'll integrate it in a day or two. ------------- PR Comment: https://git.openjdk.org/jdk/pull/15088#issuecomment-1727544166 From aivanov at openjdk.org Wed Sep 20 14:07:17 2023 From: aivanov at openjdk.org (Alexey Ivanov) Date: Wed, 20 Sep 2023 14:07:17 GMT Subject: RFR: 8316206: Test StretchedFontTest.java fails for Baekmuk font [v2] In-Reply-To: <4eLLluXke8q0oity_JF9axhhEeX6SX1-74Q5OOvQ8U4=.c965732f-ac78-4fe7-a584-141bf76616bc@github.com> References: <4eLLluXke8q0oity_JF9axhhEeX6SX1-74Q5OOvQ8U4=.c965732f-ac78-4fe7-a584-141bf76616bc@github.com> Message-ID: > **Root cause** > > The _Baekmuk Headline_ font maps `\u6f22` (?) to glyph id 16950 which has zero length. > > The test fails if the right half of the image with the rendered glyph contains only pixels of background colour. In this case, the left half of the image is also blank. It's somewhat false positive because of the broken font. > > **Fix** > > Ignore fonts which don't render the glyph correctly. If the left half of the image contains pixels of the background colour only, it is expected that the right half also contains background-coloured pixels only. > > The updated test does not fail with the _Baekmuk Headline_ font. It still detects the original problem and fails on builds without the fix for [JDK-8312555](https://bugs.openjdk.org/browse/JDK-8312555). Alexey Ivanov has updated the pull request incrementally with one additional commit since the last revision: 8316206: Use GlyphVector.getVisualBounds().isEmpty() Filter out broken fonts by GlyphVector.getVisualBounds().isEmpty() ------------- Changes: - all: https://git.openjdk.org/jdk/pull/15818/files - new: https://git.openjdk.org/jdk/pull/15818/files/6c866aea..0f8b78f4 Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=15818&range=01 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=15818&range=00-01 Stats: 65 lines in 1 file changed: 26 ins; 32 del; 7 mod Patch: https://git.openjdk.org/jdk/pull/15818.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/15818/head:pull/15818 PR: https://git.openjdk.org/jdk/pull/15818 From aivanov at openjdk.org Wed Sep 20 14:19:41 2023 From: aivanov at openjdk.org (Alexey Ivanov) Date: Wed, 20 Sep 2023 14:19:41 GMT Subject: RFR: 8316206: Test StretchedFontTest.java fails for Baekmuk font [v2] In-Reply-To: References: <4eLLluXke8q0oity_JF9axhhEeX6SX1-74Q5OOvQ8U4=.c965732f-ac78-4fe7-a584-141bf76616bc@github.com> Message-ID: On Wed, 20 Sep 2023 14:07:17 GMT, Alexey Ivanov wrote: >> **Root cause** >> >> The _Baekmuk Headline_ font maps `\u6f22` (?) to glyph id 16950 which has zero length. >> >> The test fails if the right half of the image with the rendered glyph contains only pixels of background colour. In this case, the left half of the image is also blank. It's somewhat false positive because of the broken font. >> >> **Fix** >> >> Ignore fonts which don't render the glyph correctly. If the left half of the image contains pixels of the background colour only, it is expected that the right half also contains background-coloured pixels only. >> >> The updated test does not fail with the _Baekmuk Headline_ font. It still detects the original problem and fails on builds without the fix for [JDK-8312555](https://bugs.openjdk.org/browse/JDK-8312555). > > Alexey Ivanov has updated the pull request incrementally with one additional commit since the last revision: > > 8316206: Use GlyphVector.getVisualBounds().isEmpty() > > Filter out broken fonts by GlyphVector.getVisualBounds().isEmpty() > I was thinking of a more direct font-oriented verification like this > > ```java > import java.awt.*; > import java.awt.font.*; > > public class GO { > public static void main(String args[]) { > Font font = new Font(Font.SANS_SERIF, Font.PLAIN, 20); > FontRenderContext frc = new FontRenderContext(null, false, false); > GlyphVector gv = font.createGlyphVector(frc, "o"); > boolean empty = gv.getVisualBounds().isEmpty(); > System.out.println("empty="+empty); > } > } > ``` > ```text > % java GO > empty=true > ``` @prrace Thank you! It's a much cleaner approach. I've updated the PR. When I run the test on Linux with, I get the a diagnostic message: ~/work/jdk-dev$ ~/dev/tools/jdk20/bin/java test/jdk/java/awt/Font/FontScaling/StretchedFontTest.java Broken font: Baekmuk Headline ------------- PR Comment: https://git.openjdk.org/jdk/pull/15818#issuecomment-1727824472 From kizune at openjdk.org Wed Sep 20 14:35:01 2023 From: kizune at openjdk.org (Alexander Zuev) Date: Wed, 20 Sep 2023 14:35:01 GMT Subject: Integrated: 8315981: Opensource five more random Swing tests In-Reply-To: References: Message-ID: On Wed, 13 Sep 2023 15:53:30 GMT, Alexander Zuev wrote: > Clean up and open source five tests: > javax/swing/DefaultListCellRenderer/4180943/bug4180943.java > javax/swing/DefaultListModel/4466250/bug4466250.java > javax/swing/DefaultListSelectionModel/4140619/bug4140619.java > javax/swing/DefaultListSelectionModel/4177723/bug4177723.java > javax/swing/ImageIcon/4827074/bug4827074.java This pull request has now been integrated. Changeset: c43ebd34 Author: Alexander Zuev URL: https://git.openjdk.org/jdk/commit/c43ebd34afeab9ece9dee05f0da184a20e487a12 Stats: 297 lines in 5 files changed: 297 ins; 0 del; 0 mod 8315981: Opensource five more random Swing tests Reviewed-by: tr, azvegint ------------- PR: https://git.openjdk.org/jdk/pull/15724 From azvegint at openjdk.org Wed Sep 20 16:08:40 2023 From: azvegint at openjdk.org (Alexander Zvegintsev) Date: Wed, 20 Sep 2023 16:08:40 GMT Subject: RFR: 8316389: Open source few AWT applet tests [v3] In-Reply-To: <18fnIFEUM9J1uSTp3HXXpEWl55jRkBRmKaaHkuLuY9Y=.059437ba-d9d0-44be-bf02-d3091eaf2d39@github.com> References: <18fnIFEUM9J1uSTp3HXXpEWl55jRkBRmKaaHkuLuY9Y=.059437ba-d9d0-44be-bf02-d3091eaf2d39@github.com> Message-ID: > Open sourcing few tests: > > java/awt/Frame/FrameRepackTest.java > java/awt/Frame/FrameResizeTest/FrameResizeTest_1.java > java/awt/Frame/FrameResizeTest/FrameResizeTest_2.java > java/awt/Frame/WindowMoveTest.java Alexander Zvegintsev has updated the pull request incrementally with two additional commits since the last revision: - fix imports - new line ------------- Changes: - all: https://git.openjdk.org/jdk/pull/15787/files - new: https://git.openjdk.org/jdk/pull/15787/files/a3fa4954..edf8f551 Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=15787&range=02 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=15787&range=01-02 Stats: 14 lines in 4 files changed: 2 ins; 10 del; 2 mod Patch: https://git.openjdk.org/jdk/pull/15787.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/15787/head:pull/15787 PR: https://git.openjdk.org/jdk/pull/15787 From tr at openjdk.org Wed Sep 20 16:16:43 2023 From: tr at openjdk.org (Tejesh R) Date: Wed, 20 Sep 2023 16:16:43 GMT Subject: RFR: 8316285: Opensource JButton manual tests [v3] In-Reply-To: <0xdv_QKJuTJ5a5k0hb00uj8Hv75xcWXtDSyOOSTWBiM=.c78122f7-c170-489c-a02c-6358b8ec72ea@github.com> References: <3VndIzpQ7JpLOjY3dzxkoiABE7f_mflvEH7DVFDsIEg=.e57bbe6a-fd03-4454-9a72-aad7401afe11@github.com> <0xdv_QKJuTJ5a5k0hb00uj8Hv75xcWXtDSyOOSTWBiM=.c78122f7-c170-489c-a02c-6358b8ec72ea@github.com> Message-ID: On Wed, 20 Sep 2023 09:47:36 GMT, Abhishek Kumar wrote: >> Few closed JButton swing manual test converted to automated and open sourced. > > Abhishek Kumar has updated the pull request incrementally with one additional commit since the last revision: > > Review comment update Marked as reviewed by tr (Committer). ------------- PR Review: https://git.openjdk.org/jdk/pull/15835#pullrequestreview-1636042354 From dnguyen at openjdk.org Wed Sep 20 16:19:05 2023 From: dnguyen at openjdk.org (Damon Nguyen) Date: Wed, 20 Sep 2023 16:19:05 GMT Subject: RFR: 8316149: Open source several Swing JTree JViewport KeyboardManager tests [v3] In-Reply-To: References: Message-ID: > These are the tests being converted: > > javax/swing/JTree/4696499/bug4696499.java > javax/swing/JTree/5039542/bug5039542.java > javax/swing/JViewport/4546474/bug4546474.java > javax/swing/JViewport/4677611/bug4677611.java > javax/swing/KeyboardManager/4345798/bug4345798.java Damon Nguyen has updated the pull request incrementally with one additional commit since the last revision: Move static var to local ------------- Changes: - all: https://git.openjdk.org/jdk/pull/15802/files - new: https://git.openjdk.org/jdk/pull/15802/files/ba7fc98b..9f8feb95 Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=15802&range=02 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=15802&range=01-02 Stats: 3 lines in 1 file changed: 1 ins; 2 del; 0 mod Patch: https://git.openjdk.org/jdk/pull/15802.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/15802/head:pull/15802 PR: https://git.openjdk.org/jdk/pull/15802 From dnguyen at openjdk.org Wed Sep 20 16:19:07 2023 From: dnguyen at openjdk.org (Damon Nguyen) Date: Wed, 20 Sep 2023 16:19:07 GMT Subject: RFR: 8316149: Open source several Swing JTree JViewport KeyboardManager tests [v2] In-Reply-To: References: Message-ID: <2Or5rpJ6G42izMLmFmrGIy12j-rDXeYWwbVwlHD8es4=.dc9d7f5d-b866-4af2-acdb-2c5d282cb023@github.com> On Wed, 20 Sep 2023 03:50:38 GMT, Prasanta Sadhukhan wrote: >> Damon Nguyen has updated the pull request incrementally with one additional commit since the last revision: >> >> Review comments changes > > test/jdk/javax/swing/JTree/bug5039542.java line 33: > >> 31: >> 32: public class bug5039542 { >> 33: public static final String exampleStr = "TEST"; > > this can be local var Updated ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/15802#discussion_r1331884483 From dnguyen at openjdk.org Wed Sep 20 16:23:03 2023 From: dnguyen at openjdk.org (Damon Nguyen) Date: Wed, 20 Sep 2023 16:23:03 GMT Subject: Integrated: 8316149: Open source several Swing JTree JViewport KeyboardManager tests In-Reply-To: References: Message-ID: On Mon, 18 Sep 2023 22:10:54 GMT, Damon Nguyen wrote: > These are the tests being converted: > > javax/swing/JTree/4696499/bug4696499.java > javax/swing/JTree/5039542/bug5039542.java > javax/swing/JViewport/4546474/bug4546474.java > javax/swing/JViewport/4677611/bug4677611.java > javax/swing/KeyboardManager/4345798/bug4345798.java This pull request has now been integrated. Changeset: a021dbcb Author: Damon Nguyen URL: https://git.openjdk.org/jdk/commit/a021dbcb9e58ab60abfc8c46ff25f3aa8ce3cc9f Stats: 393 lines in 5 files changed: 393 ins; 0 del; 0 mod 8316149: Open source several Swing JTree JViewport KeyboardManager tests Reviewed-by: psadhukhan, tr ------------- PR: https://git.openjdk.org/jdk/pull/15802 From dnguyen at openjdk.org Wed Sep 20 16:31:55 2023 From: dnguyen at openjdk.org (Damon Nguyen) Date: Wed, 20 Sep 2023 16:31:55 GMT Subject: RFR: 8315742: Open source several Swing Scroll related tests In-Reply-To: References: Message-ID: On Wed, 20 Sep 2023 09:38:19 GMT, Tejesh R wrote: > Open sourcing these Swing Scroll related tests: > > javax/swing/JScrollBar/4495822/bug4495822.java > javax/swing/JScrollBar/4696826/bug4696826.java > javax/swing/JScrollBar/4842792/bug4842792.java > javax/swing/JScrollPane/4247092/bug4247092.java > javax/swing/JScrollPane/4264640/bug4264640.java > javax/swing/JScrollPane/4467063/bug4467063.java LGTM after the minor changes suggested. test/jdk/javax/swing/JScrollBar/bug4495822.java line 60: > 58: throw new RuntimeException("adjustmentValueChanged() not invoked!"); > 59: } > 60: System.out.println("test Passed!"); Suggestion: System.out.println("Test Passed!"); test/jdk/javax/swing/JScrollBar/bug4696826.java line 40: > 38: > 39: public class bug4696826 { > 40: public static void main(String[] argv) throws Exception { Suggestion: public static void main(String[] args) throws Exception { test/jdk/javax/swing/JScrollBar/bug4696826.java line 55: > 53: sb.paint(g); > 54: }); > 55: System.out.println("test Passed!"); Suggestion: System.out.println("Test Passed!"); test/jdk/javax/swing/JScrollBar/bug4842792.java line 40: > 38: public static TestScrollBar scrollBar; > 39: > 40: public static void main(String[] argv) throws Exception { Suggestion: public static void main(String[] args) throws Exception { test/jdk/javax/swing/JScrollBar/bug4842792.java line 50: > 48: } > 49: }); > 50: System.out.println("test Passed!"); Suggestion: System.out.println("Test Passed!"); test/jdk/javax/swing/JScrollBar/bug4842792.java line 65: > 63: MouseEvent.BUTTON1_DOWN_MASK, > 64: 150, 10, > 65: 1, true); I see you're making a newline per argument, but here you start a newline after 2 since these arguments are shorter. I think it's OK to put all 4 in one line if you're doing this already. Suggestion: 150, 10, 1, true); test/jdk/javax/swing/JScrollPane/bug4247092.java line 40: > 38: throw new RuntimeException("The corner component should be null"); > 39: } > 40: System.out.println("test Passed!"); Suggestion: System.out.println("Test Passed!"); test/jdk/javax/swing/JScrollPane/bug4264640.java line 79: > 77: }); > 78: } > 79: System.out.println("test Passed!"); Suggestion: System.out.println("Test Passed!"); test/jdk/javax/swing/JScrollPane/bug4467063.java line 96: > 94: } > 95: }); > 96: System.out.println("test Passed!"); Suggestion: System.out.println("Test Passed!"); ------------- Marked as reviewed by dnguyen (Committer). PR Review: https://git.openjdk.org/jdk/pull/15839#pullrequestreview-1636070878 PR Review Comment: https://git.openjdk.org/jdk/pull/15839#discussion_r1331893608 PR Review Comment: https://git.openjdk.org/jdk/pull/15839#discussion_r1331894728 PR Review Comment: https://git.openjdk.org/jdk/pull/15839#discussion_r1331894443 PR Review Comment: https://git.openjdk.org/jdk/pull/15839#discussion_r1331895496 PR Review Comment: https://git.openjdk.org/jdk/pull/15839#discussion_r1331895776 PR Review Comment: https://git.openjdk.org/jdk/pull/15839#discussion_r1331897823 PR Review Comment: https://git.openjdk.org/jdk/pull/15839#discussion_r1331898300 PR Review Comment: https://git.openjdk.org/jdk/pull/15839#discussion_r1331899239 PR Review Comment: https://git.openjdk.org/jdk/pull/15839#discussion_r1331900936 From aivanov at openjdk.org Wed Sep 20 16:33:40 2023 From: aivanov at openjdk.org (Alexey Ivanov) Date: Wed, 20 Sep 2023 16:33:40 GMT Subject: RFR: 8315584 : java/awt/print/Dialog/DialogType.java fails with option not supported: yesno [v2] In-Reply-To: References: Message-ID: <87imlTfzx87dgDvSXnu-pfhM-s0CaiI9Hjq67787GwQ=.cbd2e16a-ab9d-4232-a93a-80423a555b54@github.com> On Tue, 19 Sep 2023 21:51:01 GMT, Phil Race wrote: > Are you saying this test would be better with an enhancement to PassFailJFrame ? @prrace Yes. Or perhaps, with a reduced set implemented as another class. > But it is OK right, just more clunky than it could be .. ? Yes, it is OK. Yet I'd like to get more details from Lawrence @lawrence-andrew, and I think the instructions could spell out the required steps better. > I know about at least three cases where a reduced functionality is required. I remember Harshitha @honkar-jdk needs a similar functionality in #14744, specifically [here](https://github.com/openjdk/jdk/pull/14744#discussion_r1258875171) and [here](https://github.com/openjdk/jdk/pull/14744#discussion_r1258876531). The instructions are shown to the user. Once they read the instructions and click Start, the test runs automatically; in Harshitha's case the user is expected to be moving mouse while the test is running. The second test is for #14898. Renjith @Renjithkannath is working on it. In his case, the test is semi-automatic, the only thing required from the user is to lock screen and unlock it. I can't remember what was the third test I had in mind. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/15554#discussion_r1331906433 From dnguyen at openjdk.org Wed Sep 20 16:37:42 2023 From: dnguyen at openjdk.org (Damon Nguyen) Date: Wed, 20 Sep 2023 16:37:42 GMT Subject: RFR: 8316389: Open source few AWT applet tests [v3] In-Reply-To: References: <18fnIFEUM9J1uSTp3HXXpEWl55jRkBRmKaaHkuLuY9Y=.059437ba-d9d0-44be-bf02-d3091eaf2d39@github.com> Message-ID: On Wed, 20 Sep 2023 16:08:40 GMT, Alexander Zvegintsev wrote: >> Open sourcing few tests: >> >> java/awt/Frame/FrameRepackTest.java >> java/awt/Frame/FrameResizeTest/FrameResizeTest_1.java >> java/awt/Frame/FrameResizeTest/FrameResizeTest_2.java >> java/awt/Frame/WindowMoveTest.java > > Alexander Zvegintsev has updated the pull request incrementally with two additional commits since the last revision: > > - fix imports > - new line Changes look good. One minor asterisk alignment found test/jdk/java/awt/Frame/FrameRepackTest.java line 44: > 42: * @build PassFailJFrame > 43: * @run main/manual FrameRepackTest > 44: */ Suggestion: * @summary Test dynamically changing frame component visibility and repacking * @library /java/awt/regtesthelpers * @build PassFailJFrame * @run main/manual FrameRepackTest */ ------------- Marked as reviewed by dnguyen (Committer). PR Review: https://git.openjdk.org/jdk/pull/15787#pullrequestreview-1636081397 PR Review Comment: https://git.openjdk.org/jdk/pull/15787#discussion_r1331908387 From dnguyen at openjdk.org Wed Sep 20 16:40:42 2023 From: dnguyen at openjdk.org (Damon Nguyen) Date: Wed, 20 Sep 2023 16:40:42 GMT Subject: RFR: 8315825: Open some swing tests In-Reply-To: References: <5ZBDsmjcSPidebRo12IiqHjrirKBpdfpD5K5BVsBhms=.b300c086-f00c-429f-82c2-5efc24e51cd3@github.com> Message-ID: On Wed, 20 Sep 2023 05:41:01 GMT, Abhishek Kumar wrote: >> Opening some swing tests: >> 1 javax/swing/LayoutComparator/4907772/bug4907772.java >> 2 javax/swing/LayoutComparator/4979794/bug4979794.java >> 3 javax/swing/LegacyGlueFocusTraversalPolicy/4765272/bug4765272.java >> 4 javax/swing/RootPaneChecking/RootPaneChecking.java > > test/jdk/javax/swing/JComponent/bug4765272.java line 43: > >> 41: >> 42: public class bug4765272 { >> 43: static boolean focusGained = false; > > volatile? Looks like focusGained is only accessed on the EDT unless I'm missing an instance. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/15830#discussion_r1331915737 From honkar at openjdk.org Wed Sep 20 16:43:41 2023 From: honkar at openjdk.org (Harshitha Onkar) Date: Wed, 20 Sep 2023 16:43:41 GMT Subject: RFR: 8316211: Open source several manual applet tests [v2] In-Reply-To: References: <76b2-b6qr-MNBiDvTuZYs1bKZAbC21UMhoFxTZDJAGc=.2af94b7b-2a4d-4724-a08a-08a162ef1d4c@github.com> Message-ID: On Wed, 20 Sep 2023 01:40:54 GMT, Alexander Zvegintsev wrote: >> test/jdk/java/awt/event/KeyEvent/FunctionKeyTest.java line 50: >> >>> 48: If the above is true, then click Pass, else click Fail. >>> 49: """; >>> 50: >> >> This can be converted to automated test using robot's Key events `(VK_F11, VK_F12)`. > > Sure, converted. Automated test changes look good. `handleEvent` and `keyDown` is marked for deprecation, should it be replaced with `processEvent()`? ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/15827#discussion_r1331919257 From duke at openjdk.org Wed Sep 20 16:48:08 2023 From: duke at openjdk.org (Michal Sobierski) Date: Wed, 20 Sep 2023 16:48:08 GMT Subject: RFR: 8316412: javax/print tests fail without printer set up Message-ID: For NullClipARGB we are throwing SkippedException only if instance of caught exception is PrinterException. All other exceptions are considered unrelated to printer configuration. For CountPrintServices we want to throw SkippedException in the case when lpstat is not installed, where an IOException is caught in that case. For ExceptionTest we want to throw SkippedException for all PrinterExceptions which were not caused by IndexOutOfBoundsException. For rest of the tests if PrintService was not created instead RuntimeException we are throwing now SkippedException. Tested on environment without printer installed. Test are passing with skipped exception as expected. Passed: java/awt/print/PrinterJob/ExceptionTest.java Passed: java/awt/print/PrinterJob/ImagePrinting/NullClipARGB.java Passed: java/awt/print/PrinterJob/PrtException.java Passed: javax/print/attribute/AttributeTest.java Passed: javax/print/attribute/GetCopiesSupported.java Passed: javax/print/attribute/SidesPageRangesTest.java Passed: javax/print/attribute/SupportedPrintableAreas.java Passed: javax/print/PrintServiceLookup/CountPrintServices.java Passed: javax/print/CheckDupFlavor.java Additionally unused imports have been removed. ------------- Commit messages: - Reverted indentation. - Reverting code cleanup changes. - Added PrintService check. - Updated copyright years. - 8316412: javax/print tests fail without printer set up Changes: https://git.openjdk.org/jdk/pull/15821/files Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=15821&range=00 Issue: https://bugs.openjdk.org/browse/JDK-8316412 Stats: 49 lines in 9 files changed: 31 ins; 0 del; 18 mod Patch: https://git.openjdk.org/jdk/pull/15821.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/15821/head:pull/15821 PR: https://git.openjdk.org/jdk/pull/15821 From shade at openjdk.org Wed Sep 20 16:48:09 2023 From: shade at openjdk.org (Aleksey Shipilev) Date: Wed, 20 Sep 2023 16:48:09 GMT Subject: RFR: 8316412: javax/print tests fail without printer set up In-Reply-To: References: Message-ID: On Tue, 19 Sep 2023 14:45:47 GMT, Michal Sobierski wrote: > For NullClipARGB we are throwing SkippedException only if instance of caught exception is PrinterException. All other exceptions are considered unrelated to printer configuration. > > For CountPrintServices we want to throw SkippedException in the case when lpstat is not installed, where an IOException is caught in that case. > > For ExceptionTest we want to throw SkippedException for all PrinterExceptions which were not caused by IndexOutOfBoundsException. > > For rest of the tests if PrintService was not created instead RuntimeException we are throwing now SkippedException. > > Tested on environment without printer installed. > Test are passing with skipped exception as expected. > > Passed: java/awt/print/PrinterJob/ExceptionTest.java > Passed: java/awt/print/PrinterJob/ImagePrinting/NullClipARGB.java > Passed: java/awt/print/PrinterJob/PrtException.java > Passed: javax/print/attribute/AttributeTest.java > Passed: javax/print/attribute/GetCopiesSupported.java > Passed: javax/print/attribute/SidesPageRangesTest.java > Passed: javax/print/attribute/SupportedPrintableAreas.java > Passed: javax/print/PrintServiceLookup/CountPrintServices.java > Passed: javax/print/CheckDupFlavor.java > > Additionally unused imports have been removed. The copyright years need to be adjusted a bit. Copyright (c) 2007, Oracle and/or its affiliates. All rights reserved. ...should become: Copyright (c) 2007, 2023, Oracle and/or its affiliates. All rights reserved. Apart from stylistic comments, this looks good. Looks good to me. Once OCA clears, someone familiar with this area would need to take a look too. test/jdk/java/awt/print/PrinterJob/ImagePrinting/NullClipARGB.java line 43: > 41: > 42: public static void main( String[] args ) { > 43: PrintService[] svc = PrintServiceLookup.lookupPrintServices(DocFlavor.SERVICE_FORMATTED.PRINTABLE, null); Do we need to ask for `DocFlavor.SERVICE_FORMATTED.PRINTABLE` here? Can we just ask for `null`? test/jdk/java/awt/print/PrinterJob/ImagePrinting/NullClipARGB.java line 43: > 41: try { > 42: PrinterJob pj = PrinterJob.getPrinterJob(); > 43: pj.setPrintable(new NullClipARGB()); I see this is a cleanup, but we don't need to do it here, to keep patch simple and backportable. test/jdk/java/awt/print/PrinterJob/ImagePrinting/NullClipARGB.java line 47: > 45: } catch (Exception ex) { > 46: if (ex instanceof PrinterException) { > 47: throw new SkippedException("Printer is required for this test. TEST ABORTED"); I think for this test, we need to check `PrintServiceLookup.lookupPrintServices(DocFlavor.SERVICE_FORMATTED.PRINTABLE, null);`, like other tests do it. Let's not assume that `PrinterException` is thrown here only when printer is not configured. Add the block right at the beginning of `main`? test/jdk/java/awt/print/PrinterJob/ImagePrinting/NullClipARGB.java line 53: > 51: pj.print(); > 52: } catch (Exception ex) { > 53: throw new RuntimeException(ex); One more redundant whitespace change. test/jdk/java/awt/print/PrinterJob/ImagePrinting/NullClipARGB.java line 58: > 56: > 57: public int print(Graphics g, PageFormat pf, int pageIndex) > 58: throws PrinterException{ Redundant whitespace change. test/jdk/java/awt/print/PrinterJob/ImagePrinting/NullClipARGB.java line 58: > 56: > 57: public int print(Graphics g, PageFormat pf, int pageIndex) > 58: throws PrinterException{ One more redundant whitespace change. test/jdk/java/awt/print/PrinterJob/ImagePrinting/NullClipARGB.java line 71: > 69: g2.drawString("This text should be visible through the image", 0, 20); > 70: BufferedImage bi = new BufferedImage(100, 100, > 71: BufferedImage.TYPE_INT_ARGB ); Redundant whitespace change. test/jdk/javax/print/CheckDupFlavor.java line 33: > 31: > 32: import javax.print.*; > 33: import javax.print.attribute.*; Here and later, keep the imports in place, for the same reason: targeted backportable patch. ------------- PR Review: https://git.openjdk.org/jdk/pull/15821#pullrequestreview-1633824490 PR Review: https://git.openjdk.org/jdk/pull/15821#pullrequestreview-1635371892 Marked as reviewed by shade (Reviewer). PR Review: https://git.openjdk.org/jdk/pull/15821#pullrequestreview-1635892563 PR Review Comment: https://git.openjdk.org/jdk/pull/15821#discussion_r1331464422 PR Review Comment: https://git.openjdk.org/jdk/pull/15821#discussion_r1331465944 PR Review Comment: https://git.openjdk.org/jdk/pull/15821#discussion_r1330467074 PR Review Comment: https://git.openjdk.org/jdk/pull/15821#discussion_r1331726090 PR Review Comment: https://git.openjdk.org/jdk/pull/15821#discussion_r1331462305 PR Review Comment: https://git.openjdk.org/jdk/pull/15821#discussion_r1331726158 PR Review Comment: https://git.openjdk.org/jdk/pull/15821#discussion_r1331462355 PR Review Comment: https://git.openjdk.org/jdk/pull/15821#discussion_r1331466547 From duke at openjdk.org Wed Sep 20 16:48:09 2023 From: duke at openjdk.org (Michal Sobierski) Date: Wed, 20 Sep 2023 16:48:09 GMT Subject: RFR: 8316412: javax/print tests fail without printer set up In-Reply-To: References: Message-ID: On Wed, 20 Sep 2023 11:04:17 GMT, Aleksey Shipilev wrote: >> For NullClipARGB we are throwing SkippedException only if instance of caught exception is PrinterException. All other exceptions are considered unrelated to printer configuration. >> >> For CountPrintServices we want to throw SkippedException in the case when lpstat is not installed, where an IOException is caught in that case. >> >> For ExceptionTest we want to throw SkippedException for all PrinterExceptions which were not caused by IndexOutOfBoundsException. >> >> For rest of the tests if PrintService was not created instead RuntimeException we are throwing now SkippedException. >> >> Tested on environment without printer installed. >> Test are passing with skipped exception as expected. >> >> Passed: java/awt/print/PrinterJob/ExceptionTest.java >> Passed: java/awt/print/PrinterJob/ImagePrinting/NullClipARGB.java >> Passed: java/awt/print/PrinterJob/PrtException.java >> Passed: javax/print/attribute/AttributeTest.java >> Passed: javax/print/attribute/GetCopiesSupported.java >> Passed: javax/print/attribute/SidesPageRangesTest.java >> Passed: javax/print/attribute/SupportedPrintableAreas.java >> Passed: javax/print/PrintServiceLookup/CountPrintServices.java >> Passed: javax/print/CheckDupFlavor.java >> >> Additionally unused imports have been removed. > > test/jdk/java/awt/print/PrinterJob/ImagePrinting/NullClipARGB.java line 43: > >> 41: >> 42: public static void main( String[] args ) { >> 43: PrintService[] svc = PrintServiceLookup.lookupPrintServices(DocFlavor.SERVICE_FORMATTED.PRINTABLE, null); > > Do we need to ask for `DocFlavor.SERVICE_FORMATTED.PRINTABLE` here? Can we just ask for `null`? Correct me if I'm wrong, but I think if we ask for null here it may find a PrintService that does not support PRINTABLE flavor so SkippedException will not be thrown because svc.length will be greater than 0 and we may end up with an exception thrown later in pj.print(). ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/15821#discussion_r1331608828 From shade at openjdk.org Wed Sep 20 16:48:09 2023 From: shade at openjdk.org (Aleksey Shipilev) Date: Wed, 20 Sep 2023 16:48:09 GMT Subject: RFR: 8316412: javax/print tests fail without printer set up In-Reply-To: References: Message-ID: On Wed, 20 Sep 2023 13:09:55 GMT, Michal Sobierski wrote: >> test/jdk/java/awt/print/PrinterJob/ImagePrinting/NullClipARGB.java line 43: >> >>> 41: >>> 42: public static void main( String[] args ) { >>> 43: PrintService[] svc = PrintServiceLookup.lookupPrintServices(DocFlavor.SERVICE_FORMATTED.PRINTABLE, null); >> >> Do we need to ask for `DocFlavor.SERVICE_FORMATTED.PRINTABLE` here? Can we just ask for `null`? > > Correct me if I'm wrong, but I think if we ask for null here it may find a PrintService that does not support PRINTABLE flavor so SkippedException will not be thrown because svc.length will be greater than 0 and we may end up with an exception thrown later in pj.print(). Oh, OK. So the idea is that if we use `setPrintable`, we need to lookup the service that accepts `.PRINTABLE`? ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/15821#discussion_r1331724860 From duke at openjdk.org Wed Sep 20 16:48:09 2023 From: duke at openjdk.org (Michal Sobierski) Date: Wed, 20 Sep 2023 16:48:09 GMT Subject: RFR: 8316412: javax/print tests fail without printer set up In-Reply-To: References: Message-ID: On Wed, 20 Sep 2023 14:27:58 GMT, Aleksey Shipilev wrote: >> Correct me if I'm wrong, but I think if we ask for null here it may find a PrintService that does not support PRINTABLE flavor so SkippedException will not be thrown because svc.length will be greater than 0 and we may end up with an exception thrown later in pj.print(). > > Oh, OK. So the idea is that if we use `setPrintable`, we need to lookup the service that accepts `.PRINTABLE`? This is my understanding. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/15821#discussion_r1331777555 From azvegint at openjdk.org Wed Sep 20 16:48:42 2023 From: azvegint at openjdk.org (Alexander Zvegintsev) Date: Wed, 20 Sep 2023 16:48:42 GMT Subject: RFR: 8316211: Open source several manual applet tests [v2] In-Reply-To: References: <76b2-b6qr-MNBiDvTuZYs1bKZAbC21UMhoFxTZDJAGc=.2af94b7b-2a4d-4724-a08a-08a162ef1d4c@github.com> Message-ID: On Wed, 20 Sep 2023 16:41:10 GMT, Harshitha Onkar wrote: >> Sure, converted. > > Automated test changes look good. > `handleEvent` and `keyDown` is marked for deprecation, should it be replaced with `processEvent()`? I'm not sure that in this case we will test the same thing that the test was written for. So I've left things as they are intentionally. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/15827#discussion_r1331924722 From azvegint at openjdk.org Wed Sep 20 16:55:30 2023 From: azvegint at openjdk.org (Alexander Zvegintsev) Date: Wed, 20 Sep 2023 16:55:30 GMT Subject: RFR: 8316389: Open source few AWT applet tests [v4] In-Reply-To: <18fnIFEUM9J1uSTp3HXXpEWl55jRkBRmKaaHkuLuY9Y=.059437ba-d9d0-44be-bf02-d3091eaf2d39@github.com> References: <18fnIFEUM9J1uSTp3HXXpEWl55jRkBRmKaaHkuLuY9Y=.059437ba-d9d0-44be-bf02-d3091eaf2d39@github.com> Message-ID: > Open sourcing few tests: > > java/awt/Frame/FrameRepackTest.java > java/awt/Frame/FrameResizeTest/FrameResizeTest_1.java > java/awt/Frame/FrameResizeTest/FrameResizeTest_2.java > java/awt/Frame/WindowMoveTest.java Alexander Zvegintsev has updated the pull request incrementally with one additional commit since the last revision: space added ------------- Changes: - all: https://git.openjdk.org/jdk/pull/15787/files - new: https://git.openjdk.org/jdk/pull/15787/files/edf8f551..57cfd0bd Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=15787&range=03 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=15787&range=02-03 Stats: 1 line in 1 file changed: 0 ins; 0 del; 1 mod Patch: https://git.openjdk.org/jdk/pull/15787.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/15787/head:pull/15787 PR: https://git.openjdk.org/jdk/pull/15787 From honkar at openjdk.org Wed Sep 20 16:56:41 2023 From: honkar at openjdk.org (Harshitha Onkar) Date: Wed, 20 Sep 2023 16:56:41 GMT Subject: RFR: 8316211: Open source several manual applet tests [v2] In-Reply-To: References: <76b2-b6qr-MNBiDvTuZYs1bKZAbC21UMhoFxTZDJAGc=.2af94b7b-2a4d-4724-a08a-08a162ef1d4c@github.com> Message-ID: <6em7QVipjd7pd9ebJ35N-X_udt4EX93torjn5J83NlY=.745574bb-bbee-454b-ac85-b666dd06343d@github.com> On Wed, 20 Sep 2023 01:46:35 GMT, Alexander Zvegintsev wrote: >> Open sourcing several manual applet tests >> >> >> test/jdk/java/awt/Frame/DefaultSizeTest.java >> test/jdk/java/awt/LightweightComponent/LightweightCliprect.java >> test/jdk/java/awt/event/KeyEvent/FunctionKeyTest.java >> test/jdk/javax/swing/JFrame/DefaultCloseOperation.java > > Alexander Zvegintsev has updated the pull request incrementally with one additional commit since the last revision: > > FunctionKeyTest converted to automated LGTM ------------- Marked as reviewed by honkar (Committer). PR Review: https://git.openjdk.org/jdk/pull/15827#pullrequestreview-1636117027 From prr at openjdk.org Wed Sep 20 18:09:40 2023 From: prr at openjdk.org (Phil Race) Date: Wed, 20 Sep 2023 18:09:40 GMT Subject: RFR: 8294158: HTML formatting for PassFailJFrame instructions In-Reply-To: References: <_66glVfDeTgdOjLf6UFWUpvbLliLuQh-vhHmQnYaHBg=.a6500a45-7b96-4cff-b14d-cf0375becb72@github.com> Message-ID: On Tue, 12 Sep 2023 14:11:15 GMT, Alexey Ivanov wrote: >>> Could be? On the other hand, in post XHTML era, the elements are usually in lower-case. Thus we should stick with it and use lowercase HTML elements anyway. >> >> https://www.w3schools.com/html/html_elements.asp >> >>> HTML is Not Case Sensitive >>> >>> HTML tags are not case sensitive: `

    ` means the same as `

    `. >>> >>> The HTML standard does not require lowercase tags, but W3C recommends lowercase in HTML, and demands lowercase for stricter document types like XHTML. >>> >>> At W3Schools we always use lowercase tag names. >> >> So this is still a recommendation, not a requirement (we don't use XHTML). >> But I agree that this can be helpful for a certain amount of consistency across tests(they can still use other tags in uppercase). >> >> >>> Although neither nor are required, I prefer to always add them. These two elements don't add much overhead, do they? >> >> It is a matter of personal taste. >> Normally, I prefer to indent a content of such tags by extra spaces, andThis can create additional formatting difficulties under the 80(120) character limit per line. >> In those cases, I would prefer to omit those tags. > > I know HTML is *not case sensitive*. It's just HTML tags are always in lower case in recent years. > >> But I agree that this can be helpful for a certain amount of consistency across tests(they can still use other tags in uppercase). > > Yep! In a way, this will enforce `` in lower case, and I hope all other tags in the instructions. > > > >> > Although neither nor are required, I prefer to always add them. These two elements don't add much overhead, do they? >> >> It is a matter of personal taste. > > Yes, it is? which could create inconsistencies. > >> Normally, I prefer to indent a content of such tags by extra spaces, and >> This can create additional formatting difficulties under the 80(120) character limit per line. >> In those cases, I would prefer to omit those tags. > > I don't expect too many nesting levels in instructions. However, I agree it could be problematic? > > In the sample in #15661, I keep `` and the content on the same level. > > Now that I looked at it again, I realised that I didn't follow the indentation consistently: first-level `

  • ` aren't indented but third-level `
  • ` are. I should correct this. > > Because `
    ` is used to format pieces of code, I decided not to indent the first-level `
  • ` elements to avoid indentation of the code inside. I don't have a problem with keeping it simple. If some one writing a test doesn't see the HTML interpreted, they'll quickly be able to figure out why. One thing about these and the other enhancements I see is that there's an (increasing) need for a nice bit of documentation in PassFailJFrame itself about all its features. Easiest to do this as you are adding them, so a doc comment block can be started with this one. Probably as a class comment. Suggested text /** * PassFailJFrame documentation * * Instructions for the user can be either plain text or HTML as supported by Swing. * Text beginning with is presumed to be HTML. */ ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/15660#discussion_r1332006327 From prr at openjdk.org Wed Sep 20 18:15:40 2023 From: prr at openjdk.org (Phil Race) Date: Wed, 20 Sep 2023 18:15:40 GMT Subject: RFR: 8294156: Allow PassFailJFrame.Builder to create test UI [v2] In-Reply-To: References: Message-ID: <80EWWL3FSNahyei94fPqu9XLOceu_wt-Xw7abes--_8=.a3b5ec1b-b0b2-4f76-847e-36a31af83976@github.com> On Tue, 12 Sep 2023 13:43:40 GMT, Alexey Ivanov wrote: > > Shouldn't we mention here a window added by `testUI` via builder? > > I don't think it's necessary: the builder uses `addTestWindow` under the hood. It's the builder that requires documentation. > > In fact, the entire class requires a bit of TLC for documentation. I even wrote some after Lawrence @lawrence-andrew created the first version of `PassFailJFrame` but I never finished it. Even this part was implemented nearly a year ago. > > I plan to create a wiki page on the [client-libs wiki](https://wiki.openjdk.org/display/ClientLibs) to describe creating manual tests with `PassFailJFrame`. Just saw this, and it mirrors what I wrote in another PR that we need docs, but I believe they are best placed inside the source itself. Not everyone who can update this source can update the wiki. That doesn't preclude you from putting more examples on the wiki and a reference to it from the source but I still think there should be docs in the source. Include how to use this feature and something like to the builder example you have here might be good too. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/15665#discussion_r1332013383 From prr at openjdk.org Wed Sep 20 18:16:41 2023 From: prr at openjdk.org (Phil Race) Date: Wed, 20 Sep 2023 18:16:41 GMT Subject: RFR: 8316003: Update FileChooserSymLinkTest.java to HTML instructions [v3] In-Reply-To: References: Message-ID: On Tue, 12 Sep 2023 15:27:18 GMT, Alexey Ivanov wrote: >> To demonstrate the functionality of HTML formatting in `PassFailJFrame`, I updated the instructions for the `test/jdk/javax/swing/JFileChooser/FileChooserSymLinkTest.java` test. The commands to create the symbolic links are marked up with monospace font, which makes them stand out. The test instructions for single- and multi-selection are emphasised with bold text. >> >> This change depends on #15660 and [JDK-8294158](https://bugs.openjdk.org/browse/JDK-8294158). > > Alexey Ivanov has updated the pull request incrementally with one additional commit since the last revision: > > Amend indentation of nested
  • elements Noted that this depends on other PRs ------------- Marked as reviewed by prr (Reviewer). PR Review: https://git.openjdk.org/jdk/pull/15661#pullrequestreview-1636244915 From prr at openjdk.org Wed Sep 20 18:34:44 2023 From: prr at openjdk.org (Phil Race) Date: Wed, 20 Sep 2023 18:34:44 GMT Subject: RFR: 8311922: [macOS] right-Option key fails to generate release event [v5] In-Reply-To: <7up425zS1Lqn-tv682RjKQI0XixPUyzSsrZsl74w1LQ=.6fdb0021-406f-4c9b-b5e4-e92d1a233c0b@github.com> References: <7up425zS1Lqn-tv682RjKQI0XixPUyzSsrZsl74w1LQ=.6fdb0021-406f-4c9b-b5e4-e92d1a233c0b@github.com> Message-ID: On Wed, 30 Aug 2023 18:23:11 GMT, Damon Nguyen wrote: >> Previously, a new key combination involving the option key was added to Aqua LAF for JTextAreas. In doing so, some code was removed that created this regression. The regression caused the right option key on Mac OS to incorrectly show another KeyPressed event instead of a KeyReleased event when pressing and releasing the key. Additionally, the location of the key was 'standard' instead of 'right'. Adding back the key mask and its following code resolves the issue and doesn't cause any other CI tests to fail. >> >> The headful test included displays the key events as they're pressed. After the changes, the test correctly shows the right option key's KeyPressed and KeyReleased events and shows the location as 'right'. > > Damon Nguyen has updated the pull request incrementally with one additional commit since the last revision: > > Modified test for easier use Marked as reviewed by prr (Reviewer). ------------- PR Review: https://git.openjdk.org/jdk/pull/15432#pullrequestreview-1636272397 From prr at openjdk.org Wed Sep 20 18:37:41 2023 From: prr at openjdk.org (Phil Race) Date: Wed, 20 Sep 2023 18:37:41 GMT Subject: RFR: 8312191: ColorConvertOp.filter for the default destination is too slow In-Reply-To: References: Message-ID: On Mon, 17 Jul 2023 20:59:05 GMT, Sergey Bylokhov wrote: > I have found that MTPerLineTransformValidation - one of our slowest stress test spends most of the time not in the code related to the colors conversion(as it was intended) but in the initialization of the native cmm-transforms. > > > ColorConvertOp sharedOp = new ColorConvertOp(srcCS, dstCS, null); <-- slow > BufferedImage dst = sharedOp.filter(src, null); > > > The code above triggers the next sequence: > 1. The destination buffered image is not set so it should be created [automatically](https://github.com/openjdk/jdk/blob/master/src/java.desktop/share/classes/java/awt/image/ColorConvertOp.java#L551) ->> > 2. The buffered image requires the new color [model](https://github.com/openjdk/jdk/blob/master/src/java.desktop/share/classes/java/awt/image/ColorConvertOp.java#L588) ->> > 3. The color model requires new color [space](https://github.com/openjdk/jdk/blob/master/src/java.desktop/share/classes/java/awt/image/ColorConvertOp.java#L563) ->> > 4. The color model initialize some [LUTs](https://github.com/openjdk/jdk/blob/master/src/java.desktop/share/classes/java/awt/image/ColorModel.java#L1816), **and cache it per color space** ->> > 5. When the ColorConvertOp is used for the first time the color space caches some state internally if the format of the src/dst image is not changed > > So the critical thing above is to minimize the creation of the new color spaces, since for each new space all optimizations above should be repeated. Unfortunately, when we create the ColorConvertOp using standard icc_profile/icc_colorspace we store the profile only and [lost](https://github.com/openjdk/jdk/blob/master/src/java.desktop/share/classes/java/awt/image/ColorConvertOp.java#L150) the reference to the initial color space. And when later we decide to create a color model we create the new icc_color space->all optimizations resets. > > We do not save the reference to the color space because that way we distinguish the icc_colorspace saved using profiles, and non-icc_color spaces used as is. I think all that code should be reworked to take into account the current issue. But for now, we can fix it at least for standard types. > > **Important notes**: > * Performance of MTPerLineTransformValidation test is increased(on my system from 3m30s to the 14s) - the number of used native transforms changed from 80000 to ~500. It can have a side effect since a few crashes(exit code 134) were reported for this test. The crashes of this test and others may disappear since the memory pressure is decreased, o... Marked as reviewed by prr (Reviewer). ------------- PR Review: https://git.openjdk.org/jdk/pull/14910#pullrequestreview-1636276274 From prr at openjdk.org Wed Sep 20 18:46:41 2023 From: prr at openjdk.org (Phil Race) Date: Wed, 20 Sep 2023 18:46:41 GMT Subject: RFR: 6928542: Chinese characters in RTF are not decoded [v5] In-Reply-To: References: Message-ID: On Sun, 20 Aug 2023 17:53:52 GMT, Ichiroh Takiguchi wrote: >> "character set of font" (font charset) table was created by "Rich Text Format Specification 1.9.1" >> https://interoperability.blob.core.windows.net/files/Archive_References/[MSFT-RTF].pdf >> It refers windgi.h >> https://learn.microsoft.com/en-us/windows/win32/api/wingdi/ns-wingdi-textmetrica >> >> Test files and testcase are in bugid [JDK-6928542](https://bugs.openjdk.org/browse/JDK-6928542) >> >> Additional change: >> Special character `\line` should `\n` >> >> Additional information: >> >> Add 2 hash tables >> - fcharsetToCP: Predefined conversion table, `fcharset` with number control word, from control word to Java charset name, `fcharset0` refers `windows-1252` Java charset name >> - fcharsetTable: Conversion table for each RTF file, `f` control word with number, from integer font numbers to Charset font charsets, In case of `{\f0\fnil\fcharset0 Segoe UI;}`, `0` refers Java Charset `windows-1252` >> >> When RTF Character Set control word (like `\mac`) is used, unmappable character returns \u0000 and it's not written into RTF text.. >> When fcharset control word is used, unmappable character returns \uFFFD (it's the same as replacement character on decoder), \u0000 is used for DBCS lead byte detection. >> If `f` or `par` control word is there and lead byte is remains on byte buffer for decoder, this byte data is as invalid character and write \uFFFD into RTF text. >> >> If `f` control word is used without `fcharset`, `translationTable` char array is used. >> If `f` control word is used with `fcharset`, predefined Java Charset name is used (if missing, ISO8859_1 is used for fallback). >> >> **Note:** Following GitHub actions were failed >> linux-cross-compile / build (riscv64), I opened following JBS. >>> [JDK-8314624](https://bugs.openjdk.org/browse/JDK-8314624) GHA: RISC-V cross-build was failed > > Ichiroh Takiguchi has updated the pull request incrementally with one additional commit since the last revision: > > 6928542: Chinese characters in RTF are not decoded Marked as reviewed by prr (Reviewer). ------------- PR Review: https://git.openjdk.org/jdk/pull/13553#pullrequestreview-1636288668 From prr at openjdk.org Wed Sep 20 18:46:50 2023 From: prr at openjdk.org (Phil Race) Date: Wed, 20 Sep 2023 18:46:50 GMT Subject: RFR: 6928542: Chinese characters in RTF are not decoded [v4] In-Reply-To: References: Message-ID: On Sun, 20 Aug 2023 17:51:06 GMT, Ichiroh Takiguchi wrote: >> "character set of font" (font charset) table was created by "Rich Text Format Specification 1.9.1" >> https://interoperability.blob.core.windows.net/files/Archive_References/[MSFT-RTF].pdf >> It refers windgi.h >> https://learn.microsoft.com/en-us/windows/win32/api/wingdi/ns-wingdi-textmetrica >> >> Test files and testcase are in bugid [JDK-6928542](https://bugs.openjdk.org/browse/JDK-6928542) >> >> Additional change: >> Special character `\line` should `\n` >> >> Additional information: >> >> Add 2 hash tables >> - fcharsetToCP: Predefined conversion table, `fcharset` with number control word, from control word to Java charset name, `fcharset0` refers `windows-1252` Java charset name >> - fcharsetTable: Conversion table for each RTF file, `f` control word with number, from integer font numbers to Charset font charsets, In case of `{\f0\fnil\fcharset0 Segoe UI;}`, `0` refers Java Charset `windows-1252` >> >> When RTF Character Set control word (like `\mac`) is used, unmappable character returns \u0000 and it's not written into RTF text.. >> When fcharset control word is used, unmappable character returns \uFFFD (it's the same as replacement character on decoder), \u0000 is used for DBCS lead byte detection. >> If `f` or `par` control word is there and lead byte is remains on byte buffer for decoder, this byte data is as invalid character and write \uFFFD into RTF text. >> >> If `f` control word is used without `fcharset`, `translationTable` char array is used. >> If `f` control word is used with `fcharset`, predefined Java Charset name is used (if missing, ISO8859_1 is used for fallback). >> >> **Note:** Following GitHub actions were failed >> linux-cross-compile / build (riscv64), I opened following JBS. >>> [JDK-8314624](https://bugs.openjdk.org/browse/JDK-8314624) GHA: RISC-V cross-build was failed > > Ichiroh Takiguchi 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: > > - 6928542: Chinese characters in RTF are not decoded > - Merge branch 'master' of https://github.com/openjdk/jdk into HEAD > - 6928542: Chinese characters in RTF are not decoded src/java.desktop/share/classes/javax/swing/text/rtf/RTFParser.java line 401: > 399: return ca[0]; > 400: } else { > 401: // Detectied lead byte Minor: detectied -> detected ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/13553#discussion_r1332041341 From prr at openjdk.org Wed Sep 20 18:53:40 2023 From: prr at openjdk.org (Phil Race) Date: Wed, 20 Sep 2023 18:53:40 GMT Subject: RFR: 6415065: Submenu is shown on wrong screen in multiple monitor environment In-Reply-To: References: Message-ID: On Tue, 8 Aug 2023 08:44:25 GMT, Sergei Tachenov wrote: > Hello! > > I'm a member of the UI team in JetBrains IntelliJ department, and we have this bug with popup menus being shown on the wrong monitor in multi-monitor environments: > > https://youtrack.jetbrains.com/issue/JBR-5824/Dual-monitor-bug-on-the-context-menu > > I managed to track it down to this JDK bug: > > https://bugs.openjdk.org/browse/JDK-6415065 > > I've described the cause and the fix in the commit message, but in short, what happens here is that `JMenu.getPopupMenuOrigin` sometimes returns coordinates outside (usually above) of the current screen, and later `JPopupMenu.adjustPopupLocationToFitScreen` uses those coordinates to fit the entire popup menu into the screen, which goes wrong because at that point it's no longer known which screen the menu was initially invoked on. > > I've fixed this by making sure the Y coordinate is still within the correct screen when it's returned from `JMenu.getPopupMenuOrigin`. Looks reasonable to me. Clearly what's seen in the JB tracker is odd .. ------------- Marked as reviewed by prr (Reviewer). PR Review: https://git.openjdk.org/jdk/pull/15185#pullrequestreview-1636299935 From azvegint at openjdk.org Wed Sep 20 19:57:39 2023 From: azvegint at openjdk.org (Alexander Zvegintsev) Date: Wed, 20 Sep 2023 19:57:39 GMT Subject: RFR: 8316306: Open source and convert manual Swing test [v2] In-Reply-To: References: <80OSlkBZiECg1Q2eSy3_79_7-jM2K93nF15w0LE-hmc=.94dbeadf-2b92-4590-968a-878c324e95d7@github.com> Message-ID: On Tue, 19 Sep 2023 17:49:19 GMT, Damon Nguyen wrote: >> This is to convert and open source test: javax/swing/JToolBar/4203039/bug4203039.java >> >> This manual test now uses PassFailJFrame to handle the display for the instructions text as well as the pass/fail buttons. > > Damon Nguyen has updated the pull request incrementally with one additional commit since the last revision: > > Review comments changes Marked as reviewed by azvegint (Reviewer). ------------- PR Review: https://git.openjdk.org/jdk/pull/15806#pullrequestreview-1636392255 From prr at openjdk.org Wed Sep 20 20:07:41 2023 From: prr at openjdk.org (Phil Race) Date: Wed, 20 Sep 2023 20:07:41 GMT Subject: RFR: 8313403: Remove unused 'mask' field from JFormattedTextField In-Reply-To: References: <4fl_xrqZnBAxg014rvHQuI_7K-YP2QouKSzr76fcOX4=.2823965d-9be5-4b9d-ab02-038658b3469c@github.com> Message-ID: On Thu, 17 Aug 2023 21:37:17 GMT, Phil Race wrote: >> The private field `mask` is never used in `JFormattedTextField`. >> >> I couldn't find any usages of the field, including JNI. Therefore, it is safe to remove. > > Marked as reviewed by prr (Reviewer). > > @prrace could you confirm, please? No CSR is required to remove an unused private field from classes in Swing because the specification for Swing classes states, ?Serialized objects of this class will not be compatible with future Swing releases.? > > I believe your approval means just that. I still want an additional confirmation to avoid any confusion. > > It is to resolve @mrserb's concern raised above. > > I haven't gotten any reply? > > The PR has two approvals now. If don't hear any objections, I'll integrate it in a day or two. Swing isn't serializable across releases, so I see no need for a CSR. ------------- PR Comment: https://git.openjdk.org/jdk/pull/15088#issuecomment-1728353758 From duke at openjdk.org Wed Sep 20 20:17:55 2023 From: duke at openjdk.org (Jeremy) Date: Wed, 20 Sep 2023 20:17:55 GMT Subject: RFR: JDK-8303950: [macos]Translucent Windows Flicker on Repaint [v3] In-Reply-To: References: <1rA84rf1wIPIOVRjBWMZpPcRf9FE2rMSZ0hu0xla1i0=.0ac7cdf8-42d8-4bcd-b521-f386d46fa107@github.com> Message-ID: On Fri, 16 Jun 2023 23:16:53 GMT, Jeremy wrote: >> # Problem Summary >> >> For non-opaque windows, Window#paint calls `gg.fillRect(0, 0, getWidth(), getHeight())` before `super.paint(g)`. >> >> This can cause flickering on Mac, and the flickering seems to have gotten much worse in recent JVMs. (See movie attachments to original ticket.) >> >> # Discussion >> >> This is my 2nd PR for this ticket. The original is [here](https://github.com/openjdk/jdk/pull/12993); that proposed change was IMO more invasive/scarier. It was auto-closed after 8 weeks of inactivity, and I'd rather offer this PR instead. >> >> In that previous discussion Alan Snyder framed the core problem as a "lack of synchronization" (see [comment here](https://github.com/openjdk/jdk/pull/12993#issuecomment-1467528061)). If the monitor refreshes/flushes after we've called `fillRect` *but before we finish `super.paint`*: it makes sense that we'd see a flicker. >> >> I agree with Alan, but I think the problem can also be framed as a mixing-Swing-with-AWT issue. (Which IMO will involve an easier fix.) >> >> This PR is a low-risk change (relative to the previous PR) that intercepts calls to repaint a Window that is also RootPaneContainer. Now we'll redirect those calls to paint the JRootPane instead. This means we'll exclusively paint within Swing's/RepaintManager's double-buffered architecture, so we bypass the risky call to `fillRect` on the screen's Graphics2D. (And this change occurs within RepaintManager, so we're clearly already in Swing's architecture.) >> >> So with this change: we paint everything to the double-buffer, and the *only time* we paint to the Window's Graphics2D is when have set up a AlphaComposite.Src and replace its contents with our buffer's contents. >> >> # Tests >> >> This PR includes a new test for 8303950 itself. This is pretty self-explanatory: we repaint a trivial animation for a few seconds and use the Robot to see if a pixel is the expected color. >> >> This PR also includes a test called `bug8303950_legacyWindowPaintBehavior` that creates a grid of 4 windows with varying opacity/backgrounds: >> >> image >> >> I was surprised by how these windows rendered, but I don't think that's worth debating here. This test simply makes sure that we preserve this preexisting behavior. The broad "rules" appear to be: >> 1. If a JComponent identifies as opaque (see `JComponent.isOpaque`) then the JComponent's background is used. (I... > > Jeremy has updated the pull request incrementally with one additional commit since the last revision: > > 8303950: removing unnecessary whitespace in unit test > > See https://github.com/openjdk/jdk/pull/14363#pullrequestreview-1484315506 I'm happy to help with/discuss anything if anyone has any questions. This PR currently resolves the original issue I was seeing and it preserves the legacy painting behavior. Tested on Mac. ------------- PR Comment: https://git.openjdk.org/jdk/pull/14363#issuecomment-1728365769 From vladimir.petko at canonical.com Wed Sep 20 20:33:38 2023 From: vladimir.petko at canonical.com (Vladimir Petko) Date: Thu, 21 Sep 2023 08:33:38 +1200 Subject: Accessibility provider classpath Message-ID: Hi, Java accessibility.properties (.accessibility.properties) allows setting the class name of the accessibility provider but not the jar file containing it. Was there any consideration that prevents this feature from being implemented, such as security? It would be nice to have it implemented to allow system-wide/per-user configuration of the accessibility provider without rebuilding the runtime image. If this is something acceptable, I am happy to create an enhancement issue and work on it. Best Regards, Vladimir. From dnguyen at openjdk.org Wed Sep 20 21:20:04 2023 From: dnguyen at openjdk.org (Damon Nguyen) Date: Wed, 20 Sep 2023 21:20:04 GMT Subject: RFR: 8316627: JViewport Test headless failure Message-ID: Converted test needs headful tag added to avoid failures. ------------- Commit messages: - Add headful tag Changes: https://git.openjdk.org/jdk/pull/15847/files Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=15847&range=00 Issue: https://bugs.openjdk.org/browse/JDK-8316627 Stats: 1 line in 1 file changed: 1 ins; 0 del; 0 mod Patch: https://git.openjdk.org/jdk/pull/15847.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/15847/head:pull/15847 PR: https://git.openjdk.org/jdk/pull/15847 From dcubed at openjdk.org Wed Sep 20 21:24:39 2023 From: dcubed at openjdk.org (Daniel D. Daugherty) Date: Wed, 20 Sep 2023 21:24:39 GMT Subject: RFR: 8316627: JViewport Test headless failure In-Reply-To: References: Message-ID: On Wed, 20 Sep 2023 21:12:55 GMT, Damon Nguyen wrote: > Converted test needs headful tag added to avoid failures. Thumbs up. This is a trivial fix and does not need to wait 24 hours. ------------- Marked as reviewed by dcubed (Reviewer). PR Review: https://git.openjdk.org/jdk/pull/15847#pullrequestreview-1636530884 From prr at openjdk.org Wed Sep 20 21:31:38 2023 From: prr at openjdk.org (Phil Race) Date: Wed, 20 Sep 2023 21:31:38 GMT Subject: RFR: 8316627: JViewport Test headless failure In-Reply-To: References: Message-ID: On Wed, 20 Sep 2023 21:12:55 GMT, Damon Nguyen wrote: > Converted test needs headful tag added to avoid failures. How did this get through ? Was it not tested before pushing ? And if a test needs "Robot" it surely expects a headful envt ? In fact I am going to say that the problem here is using Robot at all. You don't need to add headful, you just need to get rid of Robot which is just being used to do unnecessary Thread.sleep() calls. ------------- Changes requested by prr (Reviewer). PR Review: https://git.openjdk.org/jdk/pull/15847#pullrequestreview-1636539616 From dnguyen at openjdk.org Wed Sep 20 21:36:41 2023 From: dnguyen at openjdk.org (Damon Nguyen) Date: Wed, 20 Sep 2023 21:36:41 GMT Subject: RFR: 8316627: JViewport Test headless failure In-Reply-To: References: Message-ID: On Wed, 20 Sep 2023 21:29:21 GMT, Phil Race wrote: > How did this get through ? Was it not tested before pushing ? And if a test needs "Robot" it surely expects a headful envt ? In fact I am going to say that the problem here is using Robot at all. You don't need to add headful, you just need to get rid of Robot which is just being used to do unnecessary Thread.sleep() calls. I believe a review comment was suggested to change Thread.sleeps to robot delays after testing at some point. I did re-test what I thought were all the tests after moving them to open. @azvegint suggested the same change back to Thread.sleep. I have a current test ongoing for this change instead. Waiting for completion before updating the PR once more ------------- PR Comment: https://git.openjdk.org/jdk/pull/15847#issuecomment-1728454358 From kcr at openjdk.org Wed Sep 20 21:36:42 2023 From: kcr at openjdk.org (Kevin Rushforth) Date: Wed, 20 Sep 2023 21:36:42 GMT Subject: RFR: 8316627: JViewport Test headless failure In-Reply-To: References: Message-ID: <8zfp5FklUfou7Wq8IczIZoQZXzE4EztjDqYX2z6mz3g=.92e087ad-b47d-4632-a009-4a78ba202642@github.com> On Wed, 20 Sep 2023 21:12:55 GMT, Damon Nguyen wrote: > Converted test needs headful tag added to avoid failures. Given the CI test failure, this is probably the right fix so that it can be integrated quickly. As a follow-onto this, I see that PR #15802 deliberately tried to make this test headless by removing the unneeded `JFrame`. See [this comment](https://github.com/openjdk/jdk/pull/15802#discussion_r1329703581). What wasn't done is the removal of Robot, which is only being used for a sleep (and thus could be replaced with `Thread.sleep`). You might consider filing a low-priority follow-on bug to finish the job of making this test headless. Ignore my comment. It crossed Phil's in the mail. ------------- PR Comment: https://git.openjdk.org/jdk/pull/15847#issuecomment-1728454932 PR Comment: https://git.openjdk.org/jdk/pull/15847#issuecomment-1728457043 From prr at openjdk.org Wed Sep 20 21:36:43 2023 From: prr at openjdk.org (Phil Race) Date: Wed, 20 Sep 2023 21:36:43 GMT Subject: RFR: 8316627: JViewport Test headless failure In-Reply-To: References: Message-ID: <3on_fOBnJjKiIb7PlTk9W88CunFUzGvJx06XyDr3UbI=.764881c4-60b7-464b-ac24-a99058e8e2fe@github.com> On Wed, 20 Sep 2023 21:12:55 GMT, Damon Nguyen wrote: > Converted test needs headful tag added to avoid failures. No this is not the right fix. Do not push it. ------------- PR Comment: https://git.openjdk.org/jdk/pull/15847#issuecomment-1728455652 From prr at openjdk.org Wed Sep 20 21:40:41 2023 From: prr at openjdk.org (Phil Race) Date: Wed, 20 Sep 2023 21:40:41 GMT Subject: RFR: 8316627: JViewport Test headless failure In-Reply-To: References: Message-ID: On Wed, 20 Sep 2023 21:12:55 GMT, Damon Nguyen wrote: > Converted test needs headful tag added to avoid failures. Since this test doesn't display anything I don't see why it needs sleep at all Nor does it need invokeAndWait. Its a simple unit test. If the test needs real events to fire then it would become quite different. It would need to be shown in a JFrame etc and become a full headful test but that isn't apparent to me. And remember: testing avoids fire drills. ------------- PR Comment: https://git.openjdk.org/jdk/pull/15847#issuecomment-1728461004 From dnguyen at openjdk.org Wed Sep 20 21:48:24 2023 From: dnguyen at openjdk.org (Damon Nguyen) Date: Wed, 20 Sep 2023 21:48:24 GMT Subject: RFR: 8316627: JViewport Test headless failure [v2] In-Reply-To: References: Message-ID: <6FPJqsjsWuE-VG2EZHvY0sHgIe0yu2lrK0ale32ABRs=.8786702b-feb3-444e-b052-1cb9d86dbbc5@github.com> > Converted test needs headful tag added to avoid failures. Damon Nguyen has updated the pull request incrementally with one additional commit since the last revision: Remove invokeAndWait and sleep entirely ------------- Changes: - all: https://git.openjdk.org/jdk/pull/15847/files - new: https://git.openjdk.org/jdk/pull/15847/files/01358e68..d36d6a13 Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=15847&range=01 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=15847&range=00-01 Stats: 26 lines in 1 file changed: 0 ins; 13 del; 13 mod Patch: https://git.openjdk.org/jdk/pull/15847.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/15847/head:pull/15847 PR: https://git.openjdk.org/jdk/pull/15847 From philip.race at oracle.com Wed Sep 20 21:48:45 2023 From: philip.race at oracle.com (Philip Race) Date: Wed, 20 Sep 2023 14:48:45 -0700 Subject: Accessibility provider classpath In-Reply-To: References: Message-ID: <9c169b73-cf45-03cd-f7ac-8508ac0f866f@oracle.com> Can you explain your need for this (a lot) better ? The location and loading is specified to be done by java.util.ServiceLoader. Whilst this might be possible by some enhanced syntax, which if present invokes ServiceLoader specifying a ClassLoader for this jar file, it would clearly be new API and only for future releases. NB it would also be fiddly to implement as the value of the property is a list of class names and you can't add jar names to that without breaking older JDKs and so you'd need some way to match new lines referencing the JAR file for each class .. And likely we'd want to have new APIs like this - if they make sense - to be focused on a module, not a jar, but building a runtime image from modules using jlink is a normal thing to do, so I'm not sure what such an API would look like and seems to be not what you want. I also don't understand? the use case / problem. Whatever launches your application can set -Djavax.accessibility.assistive_technologies=<..> and? set the -cp to include your jar and you don't need to do anything to the runtime image. -phil On 9/20/23 1:33 PM, Vladimir Petko wrote: > Hi, > > Java accessibility.properties (.accessibility.properties) allows > setting the class name of the accessibility provider but not the jar > file containing it. > > Was there any consideration that prevents this feature from being > implemented, such as security? > > It would be nice to have it implemented to allow system-wide/per-user > configuration of the accessibility provider without rebuilding the > runtime image. > > If this is something acceptable, I am happy to create an enhancement > issue and work on it. > > Best Regards, > Vladimir. From dnguyen at openjdk.org Wed Sep 20 21:54:17 2023 From: dnguyen at openjdk.org (Damon Nguyen) Date: Wed, 20 Sep 2023 21:54:17 GMT Subject: RFR: 8316627: JViewport Test headless failure [v3] In-Reply-To: References: Message-ID: > Converted test needs headful tag added to avoid failures. Damon Nguyen has updated the pull request incrementally with one additional commit since the last revision: Remove size ------------- Changes: - all: https://git.openjdk.org/jdk/pull/15847/files - new: https://git.openjdk.org/jdk/pull/15847/files/d36d6a13..46abf98e Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=15847&range=02 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=15847&range=01-02 Stats: 3 lines in 1 file changed: 0 ins; 3 del; 0 mod Patch: https://git.openjdk.org/jdk/pull/15847.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/15847/head:pull/15847 PR: https://git.openjdk.org/jdk/pull/15847 From prr at openjdk.org Wed Sep 20 21:55:40 2023 From: prr at openjdk.org (Phil Race) Date: Wed, 20 Sep 2023 21:55:40 GMT Subject: RFR: 8316627: JViewport Test headless failure [v3] In-Reply-To: References: Message-ID: On Wed, 20 Sep 2023 21:54:17 GMT, Damon Nguyen wrote: >> Converted test needs headful tag added to avoid failures. > > Damon Nguyen has updated the pull request incrementally with one additional commit since the last revision: > > Remove size test/jdk/javax/swing/JViewport/bug4546474.java line 51: > 49: if (!viewChanged) { > 50: viewChanged = true; > 51: } What purpose does viewChanged have ? Its set but never read. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/15847#discussion_r1332220503 From prr at openjdk.org Wed Sep 20 21:55:41 2023 From: prr at openjdk.org (Phil Race) Date: Wed, 20 Sep 2023 21:55:41 GMT Subject: RFR: 8316627: JViewport Test headless failure [v3] In-Reply-To: References: Message-ID: On Wed, 20 Sep 2023 21:52:37 GMT, Phil Race wrote: >> Damon Nguyen has updated the pull request incrementally with one additional commit since the last revision: >> >> Remove size > > test/jdk/javax/swing/JViewport/bug4546474.java line 51: > >> 49: if (!viewChanged) { >> 50: viewChanged = true; >> 51: } > > What purpose does viewChanged have ? > Its set but never read. The adjustmentListener therefore seems irrelevant too. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/15847#discussion_r1332220853 From prr at openjdk.org Wed Sep 20 22:03:26 2023 From: prr at openjdk.org (Phil Race) Date: Wed, 20 Sep 2023 22:03:26 GMT Subject: RFR: 8316627: JViewport Test headless failure [v3] In-Reply-To: References: Message-ID: On Wed, 20 Sep 2023 21:53:09 GMT, Phil Race wrote: >> test/jdk/javax/swing/JViewport/bug4546474.java line 51: >> >>> 49: if (!viewChanged) { >>> 50: viewChanged = true; >>> 51: } >> >> What purpose does viewChanged have ? >> Its set but never read. > > The adjustmentListener therefore seems irrelevant too. Seems to me the test reduces to import javax.swing.JPanel; import javax.swing.JScrollBar; import javax.swing.JScrollPane; public class bug4546474 { public static void main(String[] args) { JPanel panel = new JPanel(); JScrollPane scrollpane = new JScrollPane(panel, JScrollPane.VERTICAL_SCROLLBAR_ALWAYS, JScrollPane.HORIZONTAL_SCROLLBAR_NEVER); JScrollBar sbar = scrollpane.getVerticalScrollBar(); scrollpane.setViewportView(null); if (sbar.getVisibleAmount() > 0) { throw new RuntimeException("Vertical scrollbar is not " + "updated when viewport is replaced"); } } } ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/15847#discussion_r1332223256 From dnguyen at openjdk.org Wed Sep 20 22:03:27 2023 From: dnguyen at openjdk.org (Damon Nguyen) Date: Wed, 20 Sep 2023 22:03:27 GMT Subject: RFR: 8316627: JViewport Test headless failure [v3] In-Reply-To: References: Message-ID: On Wed, 20 Sep 2023 21:56:50 GMT, Phil Race wrote: >> The adjustmentListener therefore seems irrelevant too. > > Seems to me the test reduces to > import javax.swing.JPanel; > import javax.swing.JScrollBar; > import javax.swing.JScrollPane; > > public class bug4546474 { > > public static void main(String[] args) { > JPanel panel = new JPanel(); > JScrollPane scrollpane = new JScrollPane(panel, > JScrollPane.VERTICAL_SCROLLBAR_ALWAYS, > JScrollPane.HORIZONTAL_SCROLLBAR_NEVER); > JScrollBar sbar = scrollpane.getVerticalScrollBar(); > scrollpane.setViewportView(null); > > if (sbar.getVisibleAmount() > 0) { > throw new RuntimeException("Vertical scrollbar is not " + > "updated when viewport is replaced"); > } > } > } Updated similarly. Thanks ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/15847#discussion_r1332224222 From dnguyen at openjdk.org Wed Sep 20 22:03:22 2023 From: dnguyen at openjdk.org (Damon Nguyen) Date: Wed, 20 Sep 2023 22:03:22 GMT Subject: RFR: 8316627: JViewport Test headless failure [v4] In-Reply-To: References: Message-ID: > Converted test needs headful tag added to avoid failures. Damon Nguyen has updated the pull request incrementally with one additional commit since the last revision: Remove viewChanged ------------- Changes: - all: https://git.openjdk.org/jdk/pull/15847/files - new: https://git.openjdk.org/jdk/pull/15847/files/46abf98e..cdc2cf88 Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=15847&range=03 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=15847&range=02-03 Stats: 5 lines in 1 file changed: 0 ins; 5 del; 0 mod Patch: https://git.openjdk.org/jdk/pull/15847.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/15847/head:pull/15847 PR: https://git.openjdk.org/jdk/pull/15847 From vladimir.petko at canonical.com Wed Sep 20 22:11:38 2023 From: vladimir.petko at canonical.com (Vladimir Petko) Date: Thu, 21 Sep 2023 10:11:38 +1200 Subject: Accessibility provider classpath In-Reply-To: <9c169b73-cf45-03cd-f7ac-8508ac0f866f@oracle.com> References: <9c169b73-cf45-03cd-f7ac-8508ac0f866f@oracle.com> Message-ID: Hi, Samuel, please correct me if I'm wrong. The requirement is for the per-user (or system-wide) enablement of accessibility. The per-application setup is a bad user experience, and it would be nice to have a single point - properties file - that enables it. Java 8 achieves this by putting the accessibility provider jar in the 'ext' directory. Java 11 and up requires including an accessibility provider in the modules files. Any updates and fixes to the accessibility provider will require new releases of the openjdk package in Debian and Ubuntu. Adding accessibility providers to the build dependencies of the openjdk package also creates a circular build dependency that might introduce issues requiring careful synchronization between releases. I propose to add a new property 'java.accessibility.module_path'. The property will contain the list of locations of accessibility modules. Toolkit will construct the classloader using this path and the system class loader as a parent. Older releases will ignore this property. This feature will allow installation of the accessibility provider separate from the openjdk package and will satisfy the requirement of per-user and system-wide enablement of the accessibility provider. Best Regards, Vladimir. On Thu, Sep 21, 2023 at 9:48?AM Philip Race wrote: > > Can you explain your need for this (a lot) better ? > > The location and loading is specified to be done by > java.util.ServiceLoader. > Whilst this might be possible by some enhanced syntax, which if present > invokes ServiceLoader specifying a ClassLoader for this jar file, it > would clearly be new API and only for future releases. > NB it would also be fiddly to implement as the value of the property is > a list of class names and > you can't add jar names to that without breaking older JDKs and > so you'd need some way to match new lines referencing the JAR file for > each class .. > > And likely we'd want to have new APIs like this - if they make sense - to > be focused on a module, not a jar, but building a runtime image from > modules using jlink is a normal thing to do, so I'm not sure what such > an API would look like and seems to be not what you want. > > I also don't understand the use case / problem. > Whatever launches your application can set > -Djavax.accessibility.assistive_technologies=<..> > and set the -cp to include your jar and you don't need to do anything > to the runtime image. > > -phil > > On 9/20/23 1:33 PM, Vladimir Petko wrote: > > Hi, > > > > Java accessibility.properties (.accessibility.properties) allows > > setting the class name of the accessibility provider but not the jar > > file containing it. > > > > Was there any consideration that prevents this feature from being > > implemented, such as security? > > > > It would be nice to have it implemented to allow system-wide/per-user > > configuration of the accessibility provider without rebuilding the > > runtime image. > > > > If this is something acceptable, I am happy to create an enhancement > > issue and work on it. > > > > Best Regards, > > Vladimir. > From dnguyen at openjdk.org Wed Sep 20 22:17:43 2023 From: dnguyen at openjdk.org (Damon Nguyen) Date: Wed, 20 Sep 2023 22:17:43 GMT Subject: RFR: 8316627: JViewport Test headless failure [v5] In-Reply-To: References: Message-ID: > Converted test needs headful tag added to avoid failures. Damon Nguyen has updated the pull request incrementally with one additional commit since the last revision: Make static vars local ------------- Changes: - all: https://git.openjdk.org/jdk/pull/15847/files - new: https://git.openjdk.org/jdk/pull/15847/files/cdc2cf88..7fa0753c Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=15847&range=04 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=15847&range=03-04 Stats: 5 lines in 1 file changed: 0 ins; 3 del; 2 mod Patch: https://git.openjdk.org/jdk/pull/15847.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/15847/head:pull/15847 PR: https://git.openjdk.org/jdk/pull/15847 From prr at openjdk.org Wed Sep 20 22:17:45 2023 From: prr at openjdk.org (Phil Race) Date: Wed, 20 Sep 2023 22:17:45 GMT Subject: RFR: 8316627: JViewport Test headless failure [v4] In-Reply-To: References: Message-ID: On Wed, 20 Sep 2023 22:03:22 GMT, Damon Nguyen wrote: >> Converted test needs headful tag added to avoid failures. > > Damon Nguyen has updated the pull request incrementally with one additional commit since the last revision: > > Remove viewChanged Looks OK now. You can fix the statics if you like. test/jdk/javax/swing/JViewport/bug4546474.java line 37: > 35: public class bug4546474 { > 36: static JScrollPane scrollpane; > 37: static JScrollBar sbar; These two static vars can be local - you don't need to re-test, after that, just make sure it compiles. ------------- Marked as reviewed by prr (Reviewer). PR Review: https://git.openjdk.org/jdk/pull/15847#pullrequestreview-1636575801 PR Review Comment: https://git.openjdk.org/jdk/pull/15847#discussion_r1332228179 From dnguyen at openjdk.org Wed Sep 20 22:17:47 2023 From: dnguyen at openjdk.org (Damon Nguyen) Date: Wed, 20 Sep 2023 22:17:47 GMT Subject: RFR: 8316627: JViewport Test headless failure [v4] In-Reply-To: References: Message-ID: On Wed, 20 Sep 2023 22:04:55 GMT, Phil Race wrote: >> Damon Nguyen has updated the pull request incrementally with one additional commit since the last revision: >> >> Remove viewChanged > > test/jdk/javax/swing/JViewport/bug4546474.java line 37: > >> 35: public class bug4546474 { >> 36: static JScrollPane scrollpane; >> 37: static JScrollBar sbar; > > These two static vars can be local - you don't need to re-test, after that, just make sure it compiles. It does compile with the changes. Thanks for the quick advice ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/15847#discussion_r1332229244 From dnguyen at openjdk.org Wed Sep 20 22:17:48 2023 From: dnguyen at openjdk.org (Damon Nguyen) Date: Wed, 20 Sep 2023 22:17:48 GMT Subject: Integrated: 8316627: JViewport Test headless failure In-Reply-To: References: Message-ID: On Wed, 20 Sep 2023 21:12:55 GMT, Damon Nguyen wrote: > Converted test needs headful tag added to avoid failures. This pull request has now been integrated. Changeset: c04c9ea3 Author: Damon Nguyen URL: https://git.openjdk.org/jdk/commit/c04c9ea3615aad875ccb7e103e2d885b34cda7f6 Stats: 36 lines in 1 file changed: 3 ins; 26 del; 7 mod 8316627: JViewport Test headless failure Reviewed-by: dcubed, prr ------------- PR: https://git.openjdk.org/jdk/pull/15847 From achung at openjdk.org Wed Sep 20 22:26:57 2023 From: achung at openjdk.org (Alisen Chung) Date: Wed, 20 Sep 2023 22:26:57 GMT Subject: RFR: 8315882: Open some swing tests 2 Message-ID: Moving some tests to open 5 javax/swing/ScrollPaneLayout/4688907/bug4688907.java 6 javax/swing/SpringLayout/4756178/bug4756178.java 7 javax/swing/SpringLayout/4803649/bug4803649.java ------------- Commit messages: - moving tests to open - named test frames - finished updating SpringLayoutSetWidthTest - changed tests - init commit Changes: https://git.openjdk.org/jdk/pull/15850/files Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=15850&range=00 Issue: https://bugs.openjdk.org/browse/JDK-8315882 Stats: 270 lines in 4 files changed: 270 ins; 0 del; 0 mod Patch: https://git.openjdk.org/jdk/pull/15850.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/15850/head:pull/15850 PR: https://git.openjdk.org/jdk/pull/15850 From achung at openjdk.org Wed Sep 20 22:37:08 2023 From: achung at openjdk.org (Alisen Chung) Date: Wed, 20 Sep 2023 22:37:08 GMT Subject: RFR: 8316053: Open some swing tests 3 Message-ID: Moving tests from closed to open 8 javax/swing/SwingGraphics/VolatileBackBuffer/MultimonVImage.java 9 javax/swing/SwingUtilities/4859570/bug4859570.java 10 javax/swing/SwingUtilities/4936652/bug4936652.java 11 javax/swing/ToolTipManager/4768127/bug4768127.java ------------- Commit messages: - moved files from closed Changes: https://git.openjdk.org/jdk/pull/15851/files Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=15851&range=00 Issue: https://bugs.openjdk.org/browse/JDK-8316053 Stats: 429 lines in 4 files changed: 429 ins; 0 del; 0 mod Patch: https://git.openjdk.org/jdk/pull/15851.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/15851/head:pull/15851 PR: https://git.openjdk.org/jdk/pull/15851 From achung at openjdk.org Wed Sep 20 23:08:26 2023 From: achung at openjdk.org (Alisen Chung) Date: Wed, 20 Sep 2023 23:08:26 GMT Subject: RFR: 8315825: Open some swing tests [v2] In-Reply-To: <5ZBDsmjcSPidebRo12IiqHjrirKBpdfpD5K5BVsBhms=.b300c086-f00c-429f-82c2-5efc24e51cd3@github.com> References: <5ZBDsmjcSPidebRo12IiqHjrirKBpdfpD5K5BVsBhms=.b300c086-f00c-429f-82c2-5efc24e51cd3@github.com> Message-ID: > Opening some swing tests: > 1 javax/swing/LayoutComparator/4907772/bug4907772.java > 2 javax/swing/LayoutComparator/4979794/bug4979794.java > 3 javax/swing/LegacyGlueFocusTraversalPolicy/4765272/bug4765272.java > 4 javax/swing/RootPaneChecking/RootPaneChecking.java Alisen Chung has updated the pull request incrementally with one additional commit since the last revision: updated based on feedback ------------- Changes: - all: https://git.openjdk.org/jdk/pull/15830/files - new: https://git.openjdk.org/jdk/pull/15830/files/ec82c851..345185ba Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=15830&range=01 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=15830&range=00-01 Stats: 14 lines in 4 files changed: 7 ins; 3 del; 4 mod Patch: https://git.openjdk.org/jdk/pull/15830.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/15830/head:pull/15830 PR: https://git.openjdk.org/jdk/pull/15830 From larry.cable at oracle.com Thu Sep 21 00:18:43 2023 From: larry.cable at oracle.com (Laurence Cable) Date: Wed, 20 Sep 2023 17:18:43 -0700 Subject: proposing the depreciation of java.beans.beancontext.* Message-ID: The BeanContext.* package was added (by me) quite early in the lifetime of java beans (1.2); based loosely on some of the concepts of the opendoc component framework, it was intended to provide a "container" for JavaBeans components to collaborate with each other by exposing both their presence (within a context) and to provide/consume 'services' expressed as interfaces. (we even demoed this functionality in the "beanbox" for those that recall that) This package pre-dated the invention/discovery of Inversion of Control and (annotation based) Dependency Injection by a good number of years; and as those latter design patterns and their implementations became popular, Bean Context did not evolve, and I would argue, became rapidly irrelevant if not actually an anti-pattern! Now some 25 yrs later, it is probably beyond definition as an anachronism and long overdue to be depreciated from the JDK. Therefore I would like to propose doing so, and open the discussion regarding this here. Regards - Larry From achung at openjdk.org Thu Sep 21 00:53:19 2023 From: achung at openjdk.org (Alisen Chung) Date: Thu, 21 Sep 2023 00:53:19 GMT Subject: RFR: 8315882: Open some swing tests 2 [v2] In-Reply-To: References: Message-ID: > Moving some tests to open > 5 javax/swing/ScrollPaneLayout/4688907/bug4688907.java > 6 javax/swing/SpringLayout/4756178/bug4756178.java > 7 javax/swing/SpringLayout/4803649/bug4803649.java Alisen Chung has updated the pull request incrementally with one additional commit since the last revision: removed extra renamed test ------------- Changes: - all: https://git.openjdk.org/jdk/pull/15850/files - new: https://git.openjdk.org/jdk/pull/15850/files/85c7a899..82a7e7e5 Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=15850&range=01 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=15850&range=00-01 Stats: 50 lines in 1 file changed: 0 ins; 50 del; 0 mod Patch: https://git.openjdk.org/jdk/pull/15850.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/15850/head:pull/15850 PR: https://git.openjdk.org/jdk/pull/15850 From honkar at openjdk.org Thu Sep 21 01:03:40 2023 From: honkar at openjdk.org (Harshitha Onkar) Date: Thu, 21 Sep 2023 01:03:40 GMT Subject: RFR: 8315882: Open some swing tests 2 [v2] In-Reply-To: References: Message-ID: On Thu, 21 Sep 2023 00:53:19 GMT, Alisen Chung wrote: >> Moving some tests to open >> 5 javax/swing/ScrollPaneLayout/4688907/bug4688907.java >> 6 javax/swing/SpringLayout/4756178/bug4756178.java >> 7 javax/swing/SpringLayout/4803649/bug4803649.java > > Alisen Chung has updated the pull request incrementally with one additional commit since the last revision: > > removed extra renamed test test/jdk/javax/swing/JScrollPane/bug4688907.java line 27: > 25: * @bug 4688907 > 26: * @summary ScrollPaneLayout.minimumLayoutSize incorrectly compares hsbPolicy > 27: * @key headful This can be made headless. Please make sure to test it again after converting any test to headless to avoid regression issues. test/jdk/javax/swing/JScrollPane/bug4688907.java line 47: > 45: }); > 46: } > 47: } New line at EOF missing. Same applies to other tests. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/15850#discussion_r1332328228 PR Review Comment: https://git.openjdk.org/jdk/pull/15850#discussion_r1332329453 From achung at openjdk.org Thu Sep 21 03:41:27 2023 From: achung at openjdk.org (Alisen Chung) Date: Thu, 21 Sep 2023 03:41:27 GMT Subject: RFR: 8315882: Open some swing tests 2 [v3] In-Reply-To: References: Message-ID: <4DyRhYWL2GjPno9a8RJ4lPp59m1eJxNEKT07ucFQVBo=.a5ebdbf3-a1b7-496a-86bb-cbf0be256f2f@github.com> > Moving some tests to open > 5 javax/swing/ScrollPaneLayout/4688907/bug4688907.java > 6 javax/swing/SpringLayout/4756178/bug4756178.java > 7 javax/swing/SpringLayout/4803649/bug4803649.java Alisen Chung has updated the pull request incrementally with one additional commit since the last revision: removed headless on one test, add newline on EOF ------------- Changes: - all: https://git.openjdk.org/jdk/pull/15850/files - new: https://git.openjdk.org/jdk/pull/15850/files/82a7e7e5..8dbfe463 Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=15850&range=02 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=15850&range=01-02 Stats: 14 lines in 3 files changed: 0 ins; 3 del; 11 mod Patch: https://git.openjdk.org/jdk/pull/15850.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/15850/head:pull/15850 PR: https://git.openjdk.org/jdk/pull/15850 From tr at openjdk.org Thu Sep 21 04:22:19 2023 From: tr at openjdk.org (Tejesh R) Date: Thu, 21 Sep 2023 04:22:19 GMT Subject: RFR: 8315742: Open source several Swing Scroll related tests [v2] In-Reply-To: References: Message-ID: > Open sourcing these Swing Scroll related tests: > > javax/swing/JScrollBar/4495822/bug4495822.java > javax/swing/JScrollBar/4696826/bug4696826.java > javax/swing/JScrollBar/4842792/bug4842792.java > javax/swing/JScrollPane/4247092/bug4247092.java > javax/swing/JScrollPane/4264640/bug4264640.java > javax/swing/JScrollPane/4467063/bug4467063.java Tejesh R has updated the pull request incrementally with one additional commit since the last revision: Review fix ------------- Changes: - all: https://git.openjdk.org/jdk/pull/15839/files - new: https://git.openjdk.org/jdk/pull/15839/files/1d82fbe6..2bac7c70 Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=15839&range=01 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=15839&range=00-01 Stats: 10 lines in 6 files changed: 0 ins; 1 del; 9 mod Patch: https://git.openjdk.org/jdk/pull/15839.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/15839/head:pull/15839 PR: https://git.openjdk.org/jdk/pull/15839 From tr at openjdk.org Thu Sep 21 04:29:38 2023 From: tr at openjdk.org (Tejesh R) Date: Thu, 21 Sep 2023 04:29:38 GMT Subject: RFR: 8315742: Open source several Swing Scroll related tests [v2] In-Reply-To: References: Message-ID: <3HQ2_iuYMZ3SpxNlZl8okJcoYBWcy4NjwSixuxMwA-o=.fa86a532-81ce-45de-84d6-4006911b68e5@github.com> On Wed, 20 Sep 2023 16:26:16 GMT, Damon Nguyen wrote: >> Tejesh R has updated the pull request incrementally with one additional commit since the last revision: >> >> Review fix > > test/jdk/javax/swing/JScrollPane/bug4467063.java line 96: > >> 94: } >> 95: }); >> 96: System.out.println("test Passed!"); > > Suggestion: > > System.out.println("Test Passed!"); Updated. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/15839#discussion_r1332429217 From abhiscxk at openjdk.org Thu Sep 21 05:09:49 2023 From: abhiscxk at openjdk.org (Abhishek Kumar) Date: Thu, 21 Sep 2023 05:09:49 GMT Subject: RFR: 8316389: Open source few AWT applet tests [v4] In-Reply-To: References: <18fnIFEUM9J1uSTp3HXXpEWl55jRkBRmKaaHkuLuY9Y=.059437ba-d9d0-44be-bf02-d3091eaf2d39@github.com> Message-ID: On Wed, 20 Sep 2023 16:55:30 GMT, Alexander Zvegintsev wrote: >> Open sourcing few tests: >> >> java/awt/Frame/FrameRepackTest.java >> java/awt/Frame/FrameResizeTest/FrameResizeTest_1.java >> java/awt/Frame/FrameResizeTest/FrameResizeTest_2.java >> java/awt/Frame/WindowMoveTest.java > > Alexander Zvegintsev has updated the pull request incrementally with one additional commit since the last revision: > > space added Marked as reviewed by abhiscxk (Committer). ------------- PR Review: https://git.openjdk.org/jdk/pull/15787#pullrequestreview-1636895696 From abhiscxk at openjdk.org Thu Sep 21 06:38:56 2023 From: abhiscxk at openjdk.org (Abhishek Kumar) Date: Thu, 21 Sep 2023 06:38:56 GMT Subject: Integrated: 8316285: Opensource JButton manual tests In-Reply-To: <3VndIzpQ7JpLOjY3dzxkoiABE7f_mflvEH7DVFDsIEg=.e57bbe6a-fd03-4454-9a72-aad7401afe11@github.com> References: <3VndIzpQ7JpLOjY3dzxkoiABE7f_mflvEH7DVFDsIEg=.e57bbe6a-fd03-4454-9a72-aad7401afe11@github.com> Message-ID: On Wed, 20 Sep 2023 05:29:30 GMT, Abhishek Kumar wrote: > Few closed JButton swing manual test converted to automated and open sourced. This pull request has now been integrated. Changeset: 9f5d2b94 Author: Abhishek Kumar URL: https://git.openjdk.org/jdk/commit/9f5d2b947f7d70babba663e16882e480b8a973f2 Stats: 292 lines in 3 files changed: 292 ins; 0 del; 0 mod 8316285: Opensource JButton manual tests Reviewed-by: psadhukhan, tr ------------- PR: https://git.openjdk.org/jdk/pull/15835 From abhiscxk at openjdk.org Thu Sep 21 06:56:42 2023 From: abhiscxk at openjdk.org (Abhishek Kumar) Date: Thu, 21 Sep 2023 06:56:42 GMT Subject: RFR: 8315825: Open some swing tests [v2] In-Reply-To: References: <5ZBDsmjcSPidebRo12IiqHjrirKBpdfpD5K5BVsBhms=.b300c086-f00c-429f-82c2-5efc24e51cd3@github.com> Message-ID: On Wed, 20 Sep 2023 23:08:26 GMT, Alisen Chung wrote: >> Opening some swing tests: >> 1 javax/swing/LayoutComparator/4907772/bug4907772.java >> 2 javax/swing/LayoutComparator/4979794/bug4979794.java >> 3 javax/swing/LegacyGlueFocusTraversalPolicy/4765272/bug4765272.java >> 4 javax/swing/RootPaneChecking/RootPaneChecking.java > > Alisen Chung has updated the pull request incrementally with one additional commit since the last revision: > > updated based on feedback Marked as reviewed by abhiscxk (Committer). LGTM. ------------- PR Review: https://git.openjdk.org/jdk/pull/15830#pullrequestreview-1637045156 PR Comment: https://git.openjdk.org/jdk/pull/15830#issuecomment-1728959330 From duke at openjdk.org Thu Sep 21 09:03:52 2023 From: duke at openjdk.org (Sergei Tachenov) Date: Thu, 21 Sep 2023 09:03:52 GMT Subject: Integrated: 6415065: Submenu is shown on wrong screen in multiple monitor environment In-Reply-To: References: Message-ID: <1MqzicnH178obm0ngn9sk-lgpqB3iyT9EjpitowKem8=.26bca2da-75c1-4fd2-a358-b88f8c52c247@github.com> On Tue, 8 Aug 2023 08:44:25 GMT, Sergei Tachenov wrote: > Hello! > > I'm a member of the UI team in JetBrains IntelliJ department, and we have this bug with popup menus being shown on the wrong monitor in multi-monitor environments: > > https://youtrack.jetbrains.com/issue/JBR-5824/Dual-monitor-bug-on-the-context-menu > > I managed to track it down to this JDK bug: > > https://bugs.openjdk.org/browse/JDK-6415065 > > I've described the cause and the fix in the commit message, but in short, what happens here is that `JMenu.getPopupMenuOrigin` sometimes returns coordinates outside (usually above) of the current screen, and later `JPopupMenu.adjustPopupLocationToFitScreen` uses those coordinates to fit the entire popup menu into the screen, which goes wrong because at that point it's no longer known which screen the menu was initially invoked on. > > I've fixed this by making sure the Y coordinate is still within the correct screen when it's returned from `JMenu.getPopupMenuOrigin`. This pull request has now been integrated. Changeset: 23ed890f Author: Sergei Tachenov Committer: Alexey Ushakov URL: https://git.openjdk.org/jdk/commit/23ed890f3ff25296fb8dbb59532b9079e0326db9 Stats: 17 lines in 1 file changed: 17 ins; 0 del; 0 mod 6415065: Submenu is shown on wrong screen in multiple monitor environment Reviewed-by: prr ------------- PR: https://git.openjdk.org/jdk/pull/15185 From ihse at openjdk.org Thu Sep 21 09:20:52 2023 From: ihse at openjdk.org (Magnus Ihse Bursie) Date: Thu, 21 Sep 2023 09:20:52 GMT Subject: RFR: 8307160: [REDO] Enable the permissive- flag on the Microsoft Visual C compiler [v2] In-Reply-To: References: <7piLRto5nNbhYYYfENCr5ecm4M2xNtMkjkE8XhrLLQ0=.8fd1ac3a-46f8-47a8-ae37-a4abbf7757d9@github.com> Message-ID: On Tue, 8 Aug 2023 19:57:12 GMT, Thomas Stuefe wrote: >> Julian Waters 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 22 additional commits since the last revision: >> >> - Mismatched declaration in D3DGlyphCache.cpp >> - Fields in awt_TextComponent.cpp >> - reinterpret_cast needed in AccessBridgeJavaEntryPoints.cpp >> - Qualifiers in awt_PrintDialog.h should be removed >> - Likewise for awt_DnDDT.cpp >> - awt_ole.h include order issue in awt_DnDDS.cpp >> - Revert awt_ole.h >> - Earlier fix in awt_ole.h was not complete >> - Merge branch 'openjdk:master' into patch-10 >> - Likewise for awt_Frame.cpp >> - ... and 12 more: https://git.openjdk.org/jdk/compare/3ab6ec2a...51230f3d > > src/java.desktop/windows/native/libawt/windows/awt_Canvas.cpp line 216: > >> 214: { >> 215: PDATA pData; >> 216: JNI_CHECK_PEER_GOTO(canvas, ret); > > Here, and other places: why this scope? ~~I am curious about this, too. What aspect of the code is different from the pedantic compiler perspective?~~ edit: Found the answer further down in the comments. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/15096#discussion_r1332748161 From ihse at openjdk.org Thu Sep 21 09:20:55 2023 From: ihse at openjdk.org (Magnus Ihse Bursie) Date: Thu, 21 Sep 2023 09:20:55 GMT Subject: RFR: 8307160: [REDO] Enable the permissive- flag on the Microsoft Visual C compiler [v5] In-Reply-To: References: <7piLRto5nNbhYYYfENCr5ecm4M2xNtMkjkE8XhrLLQ0=.8fd1ac3a-46f8-47a8-ae37-a4abbf7757d9@github.com> Message-ID: On Tue, 8 Aug 2023 19:59:52 GMT, Thomas Stuefe wrote: >> Julian Waters has updated the pull request with a new target base due to a merge or a rebase. The pull request now contains 25 commits: >> >> - Merge branch 'master' into patch-10 >> - Document changes in awt_DnDDS.cpp >> - Remove negation in os_windows.cpp >> - Mismatched declaration in D3DGlyphCache.cpp >> - Fields in awt_TextComponent.cpp >> - reinterpret_cast needed in AccessBridgeJavaEntryPoints.cpp >> - Qualifiers in awt_PrintDialog.h should be removed >> - Likewise for awt_DnDDT.cpp >> - awt_ole.h include order issue in awt_DnDDS.cpp >> - Revert awt_ole.h >> - ... and 15 more: https://git.openjdk.org/jdk/compare/11d431b2...1d3d6b5e > > src/java.desktop/windows/native/libawt/windows/awt_DnDDT.cpp line 34: > >> 32: #include "sun_awt_windows_WDropTargetContextPeer.h" >> 33: #include "awt_Container.h" >> 34: #include "awt_ole.h" > > Why? Is this related to the `#define malloc Do_Not_Use_Malloc` issue? If so, the required ordering of includes should be documented here as well. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/15096#discussion_r1332749949 From ihse at openjdk.org Thu Sep 21 09:32:54 2023 From: ihse at openjdk.org (Magnus Ihse Bursie) Date: Thu, 21 Sep 2023 09:32:54 GMT Subject: RFR: 8307160: [REDO] Enable the permissive- flag on the Microsoft Visual C compiler [v4] In-Reply-To: References: <7piLRto5nNbhYYYfENCr5ecm4M2xNtMkjkE8XhrLLQ0=.8fd1ac3a-46f8-47a8-ae37-a4abbf7757d9@github.com> Message-ID: On Thu, 14 Sep 2023 03:23:55 GMT, Julian Waters wrote: >> Julian Waters has updated the pull request incrementally with one additional commit since the last revision: >> >> Document changes in awt_DnDDS.cpp > > Pinging @TheShermanTanker In my experience, getting reviews from all areas for issues like this that cuts through the entire JDK can be difficult. Another approach, which requires more work from your side, but hopefully less from the reviewers' (and thus makes it easier for them to review) is to split this PR into multiple ones: One for each area (basically, area == mailing list) that just makes the changes to the code necessary to (in the future) turn on /permissive-. And then finally a small "finishing" PR which just touches the makefile and enables the flag, when all code is fixed. As a side effect, it is also 100% clear that all parts of the code has been correctly reviewed, since then reviewers do not need to leave conditions on their reviews ("i only looked at the foo parts"). ------------- PR Comment: https://git.openjdk.org/jdk/pull/15096#issuecomment-1729204060 From azvegint at openjdk.org Thu Sep 21 14:03:39 2023 From: azvegint at openjdk.org (Alexander Zvegintsev) Date: Thu, 21 Sep 2023 14:03:39 GMT Subject: RFR: 8316240: Open source several add/remove MenuBar manual tests [v2] In-Reply-To: <3HGUm3chbDleVC3u8poeuU1rtjnVxhj_ktYIl-kEv-s=.82156c33-f6b5-4515-a747-4083d2138d38@github.com> References: <3HGUm3chbDleVC3u8poeuU1rtjnVxhj_ktYIl-kEv-s=.82156c33-f6b5-4515-a747-4083d2138d38@github.com> Message-ID: > Open sourcing several MenuBar manual tests > > java/awt/MenuBar/AddRemoveMenuBarTests/AddRemoveMenuBarTest_1.java > java/awt/MenuBar/AddRemoveMenuBarTests/AddRemoveMenuBarTest_2.java > java/awt/MenuBar/AddRemoveMenuBarTests/AddRemoveMenuBarTest_3.java > java/awt/MenuBar/AddRemoveMenuBarTests/AddRemoveMenuBarTest_4.java Alexander Zvegintsev has updated the pull request incrementally with one additional commit since the last revision: fix imports ------------- Changes: - all: https://git.openjdk.org/jdk/pull/15800/files - new: https://git.openjdk.org/jdk/pull/15800/files/07d8e583..ddc3a139 Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=15800&range=01 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=15800&range=00-01 Stats: 11 lines in 4 files changed: 0 ins; 7 del; 4 mod Patch: https://git.openjdk.org/jdk/pull/15800.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/15800/head:pull/15800 PR: https://git.openjdk.org/jdk/pull/15800 From azvegint at openjdk.org Thu Sep 21 14:03:41 2023 From: azvegint at openjdk.org (Alexander Zvegintsev) Date: Thu, 21 Sep 2023 14:03:41 GMT Subject: RFR: 8316240: Open source several add/remove MenuBar manual tests [v2] In-Reply-To: <_dQ3x9V0L4bGSxHr5fap5N2NcC9KkX2_ANB3btt435A=.b21484a6-0890-4e91-ae16-59fb40ff47c7@github.com> References: <3HGUm3chbDleVC3u8poeuU1rtjnVxhj_ktYIl-kEv-s=.82156c33-f6b5-4515-a747-4083d2138d38@github.com> <_dQ3x9V0L4bGSxHr5fap5N2NcC9KkX2_ANB3btt435A=.b21484a6-0890-4e91-ae16-59fb40ff47c7@github.com> Message-ID: On Wed, 20 Sep 2023 05:08:50 GMT, Prasanta Sadhukhan wrote: >> Alexander Zvegintsev has updated the pull request incrementally with one additional commit since the last revision: >> >> fix imports > > test/jdk/java/awt/MenuBar/AddRemoveMenuBarTests/AddRemoveMenuBarTest_4.java line 59: > >> 57: >> 58: After a menubar has been replaced with another menubar, >> 59: the frame should not be resized nor repositioned on the screen. > > Can we not automate it? I mean we can do the click by robot and then check frame.getSize and getLocationOnScreen before and after click, no? > > Probably applicable for all tests which tests "frame should not be resized nor repositioned on the screen" We also have to control the MenuBar display itself, and this will still have a manual part for visual control as it looks different on different systems. So I'm going to leave this test manual. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/15800#discussion_r1333099396 From azvegint at openjdk.org Thu Sep 21 14:03:44 2023 From: azvegint at openjdk.org (Alexander Zvegintsev) Date: Thu, 21 Sep 2023 14:03:44 GMT Subject: Integrated: 8316240: Open source several add/remove MenuBar manual tests In-Reply-To: <3HGUm3chbDleVC3u8poeuU1rtjnVxhj_ktYIl-kEv-s=.82156c33-f6b5-4515-a747-4083d2138d38@github.com> References: <3HGUm3chbDleVC3u8poeuU1rtjnVxhj_ktYIl-kEv-s=.82156c33-f6b5-4515-a747-4083d2138d38@github.com> Message-ID: <6weqUkxwYp8xPGa8pEMKxYiSRYWM7xkglYeNvH9mh0g=.2f482eb5-3bc5-4b05-bfd3-977752dbd563@github.com> On Mon, 18 Sep 2023 21:35:01 GMT, Alexander Zvegintsev wrote: > Open sourcing several MenuBar manual tests > > java/awt/MenuBar/AddRemoveMenuBarTests/AddRemoveMenuBarTest_1.java > java/awt/MenuBar/AddRemoveMenuBarTests/AddRemoveMenuBarTest_2.java > java/awt/MenuBar/AddRemoveMenuBarTests/AddRemoveMenuBarTest_3.java > java/awt/MenuBar/AddRemoveMenuBarTests/AddRemoveMenuBarTest_4.java This pull request has now been integrated. Changeset: 3809d69a Author: Alexander Zvegintsev URL: https://git.openjdk.org/jdk/commit/3809d69ac4b3d186ccdc336949b658e4671347c8 Stats: 514 lines in 4 files changed: 514 ins; 0 del; 0 mod 8316240: Open source several add/remove MenuBar manual tests Reviewed-by: honkar, psadhukhan ------------- PR: https://git.openjdk.org/jdk/pull/15800 From psadhukhan at openjdk.org Thu Sep 21 14:53:48 2023 From: psadhukhan at openjdk.org (Prasanta Sadhukhan) Date: Thu, 21 Sep 2023 14:53:48 GMT Subject: RFR: 8315965: Open source various AWT applet tests [v2] In-Reply-To: References: Message-ID: On Wed, 20 Sep 2023 01:50:36 GMT, Alexander Zvegintsev wrote: >> Open sourcing few applet tests: >> >> java/awt/ScrollPane/ScrollPaneTest.java >> java/awt/TextArea/Length.java >> java/awt/Window/WindowOwner.java >> java/awt/font/Rotate/RotateTest3.java > > Alexander Zvegintsev has updated the pull request incrementally with one additional commit since the last revision: > > add spaces Marked as reviewed by psadhukhan (Reviewer). test/jdk/java/awt/font/Rotate/RotateTest3.java line 78: > 76: frame = new JFrame("RotateTest3"); > 77: frame.addWindowListener(new WindowAdapter(){ > 78: public void windowClosing(WindowEvent e) {System.exit(0);} I guess we should remove System.exit from the test as it may hamper CI ------------- PR Review: https://git.openjdk.org/jdk/pull/15754#pullrequestreview-1638054867 PR Review Comment: https://git.openjdk.org/jdk/pull/15754#discussion_r1333194741 From psadhukhan at openjdk.org Thu Sep 21 14:56:43 2023 From: psadhukhan at openjdk.org (Prasanta Sadhukhan) Date: Thu, 21 Sep 2023 14:56:43 GMT Subject: RFR: 8315742: Open source several Swing Scroll related tests [v2] In-Reply-To: References: Message-ID: On Thu, 21 Sep 2023 04:22:19 GMT, Tejesh R wrote: >> Open sourcing these Swing Scroll related tests: >> >> javax/swing/JScrollBar/4495822/bug4495822.java >> javax/swing/JScrollBar/4696826/bug4696826.java >> javax/swing/JScrollBar/4842792/bug4842792.java >> javax/swing/JScrollPane/4247092/bug4247092.java >> javax/swing/JScrollPane/4264640/bug4264640.java >> javax/swing/JScrollPane/4467063/bug4467063.java > > Tejesh R has updated the pull request incrementally with one additional commit since the last revision: > > Review fix Marked as reviewed by psadhukhan (Reviewer). ------------- PR Review: https://git.openjdk.org/jdk/pull/15839#pullrequestreview-1638063320 From itakiguchi at openjdk.org Thu Sep 21 16:07:27 2023 From: itakiguchi at openjdk.org (Ichiroh Takiguchi) Date: Thu, 21 Sep 2023 16:07:27 GMT Subject: RFR: 6928542: Chinese characters in RTF are not decoded [v6] In-Reply-To: References: Message-ID: <8L4xWIWN3nsGc0AGS4thl1Mf3MT-Tg_nhF5eB3YKTlY=.3e63447b-0bca-4cd3-8566-30c325068e5b@github.com> > "character set of font" (font charset) table was created by "Rich Text Format Specification 1.9.1" > https://interoperability.blob.core.windows.net/files/Archive_References/[MSFT-RTF].pdf > It refers windgi.h > https://learn.microsoft.com/en-us/windows/win32/api/wingdi/ns-wingdi-textmetrica > > Test files and testcase are in bugid [JDK-6928542](https://bugs.openjdk.org/browse/JDK-6928542) > > Additional change: > Special character `\line` should `\n` > > Additional information: > > Add 2 hash tables > - fcharsetToCP: Predefined conversion table, `fcharset` with number control word, from control word to Java charset name, `fcharset0` refers `windows-1252` Java charset name > - fcharsetTable: Conversion table for each RTF file, `f` control word with number, from integer font numbers to Charset font charsets, In case of `{\f0\fnil\fcharset0 Segoe UI;}`, `0` refers Java Charset `windows-1252` > > When RTF Character Set control word (like `\mac`) is used, unmappable character returns \u0000 and it's not written into RTF text.. > When fcharset control word is used, unmappable character returns \uFFFD (it's the same as replacement character on decoder), \u0000 is used for DBCS lead byte detection. > If `f` or `par` control word is there and lead byte is remains on byte buffer for decoder, this byte data is as invalid character and write \uFFFD into RTF text. > > If `f` control word is used without `fcharset`, `translationTable` char array is used. > If `f` control word is used with `fcharset`, predefined Java Charset name is used (if missing, ISO8859_1 is used for fallback). > > **Note:** Following GitHub actions were failed > linux-cross-compile / build (riscv64), I opened following JBS. >> [JDK-8314624](https://bugs.openjdk.org/browse/JDK-8314624) GHA: RISC-V cross-build was failed Ichiroh Takiguchi 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 five additional commits since the last revision: - Merge branch 'master' of https://github.com/openjdk/jdk into 6928542 - 6928542: Chinese characters in RTF are not decoded - 6928542: Chinese characters in RTF are not decoded - Merge branch 'master' of https://github.com/openjdk/jdk into HEAD - 6928542: Chinese characters in RTF are not decoded ------------- Changes: - all: https://git.openjdk.org/jdk/pull/13553/files - new: https://git.openjdk.org/jdk/pull/13553/files/cffed595..2f9c45cb Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=13553&range=05 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=13553&range=04-05 Stats: 110454 lines in 3097 files changed: 48068 ins; 23273 del; 39113 mod Patch: https://git.openjdk.org/jdk/pull/13553.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/13553/head:pull/13553 PR: https://git.openjdk.org/jdk/pull/13553 From azvegint at openjdk.org Thu Sep 21 16:19:49 2023 From: azvegint at openjdk.org (Alexander Zvegintsev) Date: Thu, 21 Sep 2023 16:19:49 GMT Subject: RFR: 8315965: Open source various AWT applet tests [v3] In-Reply-To: References: Message-ID: > Open sourcing few applet tests: > > java/awt/ScrollPane/ScrollPaneTest.java > java/awt/TextArea/Length.java > java/awt/Window/WindowOwner.java > java/awt/font/Rotate/RotateTest3.java Alexander Zvegintsev has updated the pull request incrementally with one additional commit since the last revision: System.exit removed ------------- Changes: - all: https://git.openjdk.org/jdk/pull/15754/files - new: https://git.openjdk.org/jdk/pull/15754/files/9e537cc8..c84c1ca3 Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=15754&range=02 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=15754&range=01-02 Stats: 8 lines in 2 files changed: 2 ins; 4 del; 2 mod Patch: https://git.openjdk.org/jdk/pull/15754.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/15754/head:pull/15754 PR: https://git.openjdk.org/jdk/pull/15754 From itakiguchi at openjdk.org Thu Sep 21 16:21:05 2023 From: itakiguchi at openjdk.org (Ichiroh Takiguchi) Date: Thu, 21 Sep 2023 16:21:05 GMT Subject: RFR: 6928542: Chinese characters in RTF are not decoded [v7] In-Reply-To: References: Message-ID: > "character set of font" (font charset) table was created by "Rich Text Format Specification 1.9.1" > https://interoperability.blob.core.windows.net/files/Archive_References/[MSFT-RTF].pdf > It refers windgi.h > https://learn.microsoft.com/en-us/windows/win32/api/wingdi/ns-wingdi-textmetrica > > Test files and testcase are in bugid [JDK-6928542](https://bugs.openjdk.org/browse/JDK-6928542) > > Additional change: > Special character `\line` should `\n` > > Additional information: > > Add 2 hash tables > - fcharsetToCP: Predefined conversion table, `fcharset` with number control word, from control word to Java charset name, `fcharset0` refers `windows-1252` Java charset name > - fcharsetTable: Conversion table for each RTF file, `f` control word with number, from integer font numbers to Charset font charsets, In case of `{\f0\fnil\fcharset0 Segoe UI;}`, `0` refers Java Charset `windows-1252` > > When RTF Character Set control word (like `\mac`) is used, unmappable character returns \u0000 and it's not written into RTF text.. > When fcharset control word is used, unmappable character returns \uFFFD (it's the same as replacement character on decoder), \u0000 is used for DBCS lead byte detection. > If `f` or `par` control word is there and lead byte is remains on byte buffer for decoder, this byte data is as invalid character and write \uFFFD into RTF text. > > If `f` control word is used without `fcharset`, `translationTable` char array is used. > If `f` control word is used with `fcharset`, predefined Java Charset name is used (if missing, ISO8859_1 is used for fallback). > > **Note:** Following GitHub actions were failed > linux-cross-compile / build (riscv64), I opened following JBS. >> [JDK-8314624](https://bugs.openjdk.org/browse/JDK-8314624) GHA: RISC-V cross-build was failed Ichiroh Takiguchi has updated the pull request incrementally with one additional commit since the last revision: 6928542: Chinese characters in RTF are not decoded ------------- Changes: - all: https://git.openjdk.org/jdk/pull/13553/files - new: https://git.openjdk.org/jdk/pull/13553/files/2f9c45cb..828660a9 Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=13553&range=06 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=13553&range=05-06 Stats: 1 line in 1 file changed: 0 ins; 0 del; 1 mod Patch: https://git.openjdk.org/jdk/pull/13553.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/13553/head:pull/13553 PR: https://git.openjdk.org/jdk/pull/13553 From dnguyen at openjdk.org Thu Sep 21 16:45:57 2023 From: dnguyen at openjdk.org (Damon Nguyen) Date: Thu, 21 Sep 2023 16:45:57 GMT Subject: Integrated: 8311922: [macOS] right-Option key fails to generate release event In-Reply-To: References: Message-ID: On Fri, 25 Aug 2023 17:53:51 GMT, Damon Nguyen wrote: > Previously, a new key combination involving the option key was added to Aqua LAF for JTextAreas. In doing so, some code was removed that created this regression. The regression caused the right option key on Mac OS to incorrectly show another KeyPressed event instead of a KeyReleased event when pressing and releasing the key. Additionally, the location of the key was 'standard' instead of 'right'. Adding back the key mask and its following code resolves the issue and doesn't cause any other CI tests to fail. > > The headful test included displays the key events as they're pressed. After the changes, the test correctly shows the right option key's KeyPressed and KeyReleased events and shows the location as 'right'. This pull request has now been integrated. Changeset: 83b01cf3 Author: Damon Nguyen URL: https://git.openjdk.org/jdk/commit/83b01cf3c28bc38b953d6e7e41bb7d730d91179f Stats: 185 lines in 2 files changed: 184 ins; 0 del; 1 mod 8311922: [macOS] right-Option key fails to generate release event Reviewed-by: honkar, prr ------------- PR: https://git.openjdk.org/jdk/pull/15432 From dnguyen at openjdk.org Thu Sep 21 16:52:49 2023 From: dnguyen at openjdk.org (Damon Nguyen) Date: Thu, 21 Sep 2023 16:52:49 GMT Subject: RFR: 8316053: Open some swing tests 3 In-Reply-To: References: Message-ID: On Wed, 20 Sep 2023 22:30:04 GMT, Alisen Chung wrote: > Moving tests from closed to open > 8 javax/swing/SwingGraphics/VolatileBackBuffer/MultimonVImage.java > 9 javax/swing/SwingUtilities/4859570/bug4859570.java > 10 javax/swing/SwingUtilities/4936652/bug4936652.java > 11 javax/swing/ToolTipManager/4768127/bug4768127.java Changes requested by dnguyen (Committer). test/jdk/javax/swing/JDialog/bug4859570.java line 24: > 22: */ > 23: > 24: /* @test Suggestion: /* * @test Minor nit pick here. Standardize throughout the tests as well test/jdk/javax/swing/JDialog/bug4859570.java line 41: > 39: static Window owner; > 40: > 41: public static void main(String args[]) throws Exception { Suggestion: public static void main(String[] args) throws Exception { Probably better to standardize this throughout all the tests here test/jdk/javax/swing/JDialog/bug4859570.java line 63: > 61: Robot r = new Robot(); > 62: r.delay(1000); > 63: r.waitForIdle(); waitForIdle before delays typically test/jdk/javax/swing/JDialog/bug4859570.java line 72: > 70: } catch (Exception e) { > 71: e.printStackTrace(); > 72: } Since you already create a Robot, can't you avoid using notifyAll, synchronized, and dialogIsClosed altogether and use delays/waitForIdle? test/jdk/javax/swing/JDialog/bug4936652.java line 24: > 22: */ > 23: > 24: /* @test Suggestion: /* * @test test/jdk/javax/swing/JDialog/bug4936652.java line 34: > 32: > 33: public class bug4936652 { > 34: public static void main(String[] argv) throws Exception { Suggestion: public static void main(String[] args) throws Exception { test/jdk/javax/swing/JLabel/bug4768127.java line 24: > 22: */ > 23: > 24: /* @test Suggestion: /* * @test test/jdk/javax/swing/JLabel/bug4768127.java line 45: > 43: static JFrame fr; > 44: static volatile JLabel[] label = new JLabel[2]; > 45: static volatile Robot robot; I think robot can be local instead of static test/jdk/javax/swing/JLabel/bug4768127.java line 47: > 45: static volatile Robot robot; > 46: > 47: public static void main(String args[]) throws Exception { Suggestion: public static void main(String[] args) throws Exception { test/jdk/javax/swing/JLabel/bug4768127.java line 112: > 110: > 111: static void clickLabel(int i) { > 112: final Point p = label[i].getLocationOnScreen(); I think this line should be on EDT test/jdk/javax/swing/JLabel/bug4768127.java line 116: > 114: robot.mouseMove(p.x + rect.width / 2, p.y + rect.height / 2); > 115: robot.mousePress(InputEvent.BUTTON1_MASK); > 116: robot.mouseRelease(InputEvent.BUTTON1_MASK); Is this deprecated? I think BUTTON1_DOWN_MASK is the replacement ------------- PR Review: https://git.openjdk.org/jdk/pull/15851#pullrequestreview-1638302045 PR Review Comment: https://git.openjdk.org/jdk/pull/15851#discussion_r1333352329 PR Review Comment: https://git.openjdk.org/jdk/pull/15851#discussion_r1333348610 PR Review Comment: https://git.openjdk.org/jdk/pull/15851#discussion_r1333350154 PR Review Comment: https://git.openjdk.org/jdk/pull/15851#discussion_r1333351520 PR Review Comment: https://git.openjdk.org/jdk/pull/15851#discussion_r1333352539 PR Review Comment: https://git.openjdk.org/jdk/pull/15851#discussion_r1333352723 PR Review Comment: https://git.openjdk.org/jdk/pull/15851#discussion_r1333355698 PR Review Comment: https://git.openjdk.org/jdk/pull/15851#discussion_r1333353668 PR Review Comment: https://git.openjdk.org/jdk/pull/15851#discussion_r1333355548 PR Review Comment: https://git.openjdk.org/jdk/pull/15851#discussion_r1333355111 PR Review Comment: https://git.openjdk.org/jdk/pull/15851#discussion_r1333354761 From psadhukhan at openjdk.org Thu Sep 21 17:35:38 2023 From: psadhukhan at openjdk.org (Prasanta Sadhukhan) Date: Thu, 21 Sep 2023 17:35:38 GMT Subject: RFR: 6450193: After the first Serialization, JTableHeader does not uninstall its UI [v2] In-Reply-To: References: Message-ID: > After the first time a JTableHeader is serialized, it no longer will uninstall its UI upon subsequent serializations. > This happens for classes that use the BasicTableHeaderUI class. Any LAF that extends the BasicTableHeaderUI like SynthTableHeaderUI and WindowsTableHeaderUI will get an NotSerializableException thrown > > Each time an JComponent instance is Serialized, a [counter ](https://github.com/openjdk/jdk/blob/218829e0a2a3ae5599b81733df53557966392033/src/java.desktop/share/classes/javax/swing/JComponent.java#L5644-L5645) for the instance is incremented. It is de-incremented in JComponent's writeObject or a class that implements it the same way, like JButton, JScrollPane etc.. > With JTableHeader it does not deincrement the counter. The uninstall mechanism will not uninstall a UI if the counter is not 0 on the first pass..It is not possible to call JComponent.setWriteObjectCounter in JTableHeader as it is not in the same package so the fix is to remove the writeObject implementation and rely on JComponent writeObject implementation to make sure uninstallation of UI happens and also NotSerializableException does not happen for Synth Prasanta Sadhukhan has updated the pull request incrementally with one additional commit since the last revision: Review fix for test ------------- Changes: - all: https://git.openjdk.org/jdk/pull/15507/files - new: https://git.openjdk.org/jdk/pull/15507/files/a8df4717..267a4787 Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=15507&range=01 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=15507&range=00-01 Stats: 28 lines in 2 files changed: 7 ins; 17 del; 4 mod Patch: https://git.openjdk.org/jdk/pull/15507.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/15507/head:pull/15507 PR: https://git.openjdk.org/jdk/pull/15507 From honkar at openjdk.org Thu Sep 21 17:36:43 2023 From: honkar at openjdk.org (Harshitha Onkar) Date: Thu, 21 Sep 2023 17:36:43 GMT Subject: RFR: 8315882: Open some swing tests 2 [v3] In-Reply-To: <4DyRhYWL2GjPno9a8RJ4lPp59m1eJxNEKT07ucFQVBo=.a5ebdbf3-a1b7-496a-86bb-cbf0be256f2f@github.com> References: <4DyRhYWL2GjPno9a8RJ4lPp59m1eJxNEKT07ucFQVBo=.a5ebdbf3-a1b7-496a-86bb-cbf0be256f2f@github.com> Message-ID: <93Mx_6-JWJZ0zNQRsjrI_195TNW5FRbiTxQrSTG3Nek=.91e3bfc1-718f-4745-9df0-3f7b9db2cd71@github.com> On Thu, 21 Sep 2023 03:41:27 GMT, Alisen Chung wrote: >> Moving some tests to open >> 5 javax/swing/ScrollPaneLayout/4688907/bug4688907.java >> 6 javax/swing/SpringLayout/4756178/bug4756178.java >> 7 javax/swing/SpringLayout/4803649/bug4803649.java > > Alisen Chung has updated the pull request incrementally with one additional commit since the last revision: > > removed headless on one test, add newline on EOF Changes requested by honkar (Committer). test/jdk/javax/swing/JScrollPane/bug4688907.java line 31: > 29: import java.awt.Dimension; > 30: import javax.swing.JScrollPane; > 31: import javax.swing.SwingUtilities; Remove unused import test/jdk/javax/swing/SpringLayout/bug4756178.java line 68: > 66: fr.setLocationRelativeTo(null); > 67: fr.setVisible(true); > 68: Extra new line can be removed. test/jdk/javax/swing/SpringLayout/bug4756178.java line 74: > 72: throw new RuntimeException("Button size is " + bt.getSize() + > 73: ", should be " + buttonPreferredSize); > 74: } Delay (`Thread.sleep()`) should be add after frame is shown and bt.getSize() should be wrapped in EDT. The delay ensures the frame is updated before querying the button size. Suggestion: Thread.sleep(1000); SwingUtilities.invokeAndWait(() -> actualSize = bt.getSize()); if (!buttonPreferredSize.equals(actualSize)) { throw new RuntimeException("Button size is " + actualSize + ", should be " + buttonPreferredSize); } actualSize can be static volatile var similar to buttonPreferredSize. test/jdk/javax/swing/SpringLayout/bug4803649.java line 41: > 39: public class bug4803649 { > 40: static JFrame fr; > 41: static JPanel panel; panel can be made local var. ------------- PR Review: https://git.openjdk.org/jdk/pull/15850#pullrequestreview-1638349153 PR Review Comment: https://git.openjdk.org/jdk/pull/15850#discussion_r1333377934 PR Review Comment: https://git.openjdk.org/jdk/pull/15850#discussion_r1333379252 PR Review Comment: https://git.openjdk.org/jdk/pull/15850#discussion_r1333397379 PR Review Comment: https://git.openjdk.org/jdk/pull/15850#discussion_r1333379594 From azvegint at openjdk.org Thu Sep 21 18:48:15 2023 From: azvegint at openjdk.org (Alexander Zvegintsev) Date: Thu, 21 Sep 2023 18:48:15 GMT Subject: Integrated: 8315965: Open source various AWT applet tests In-Reply-To: References: Message-ID: On Thu, 14 Sep 2023 20:18:26 GMT, Alexander Zvegintsev wrote: > Open sourcing few applet tests: > > java/awt/ScrollPane/ScrollPaneTest.java > java/awt/TextArea/Length.java > java/awt/Window/WindowOwner.java > java/awt/font/Rotate/RotateTest3.java This pull request has now been integrated. Changeset: 3b397c85 Author: Alexander Zvegintsev URL: https://git.openjdk.org/jdk/commit/3b397c8552d7fd1b1084fbbc06384f3f34481ba4 Stats: 546 lines in 4 files changed: 546 ins; 0 del; 0 mod 8315965: Open source various AWT applet tests Reviewed-by: honkar, psadhukhan ------------- PR: https://git.openjdk.org/jdk/pull/15754 From prr at openjdk.org Thu Sep 21 18:48:46 2023 From: prr at openjdk.org (Phil Race) Date: Thu, 21 Sep 2023 18:48:46 GMT Subject: RFR: 8316206: Test StretchedFontTest.java fails for Baekmuk font [v2] In-Reply-To: References: <4eLLluXke8q0oity_JF9axhhEeX6SX1-74Q5OOvQ8U4=.c965732f-ac78-4fe7-a584-141bf76616bc@github.com> Message-ID: On Wed, 20 Sep 2023 14:07:17 GMT, Alexey Ivanov wrote: >> **Root cause** >> >> The _Baekmuk Headline_ font maps `\u6f22` (?) to glyph id 16950 which has zero length. >> >> The test fails if the right half of the image with the rendered glyph contains only pixels of background colour. In this case, the left half of the image is also blank. It's somewhat false positive because of the broken font. >> >> **Fix** >> >> Ignore fonts which don't render the glyph correctly. If the left half of the image contains pixels of the background colour only, it is expected that the right half also contains background-coloured pixels only. >> >> The updated test does not fail with the _Baekmuk Headline_ font. It still detects the original problem and fails on builds without the fix for [JDK-8312555](https://bugs.openjdk.org/browse/JDK-8312555). > > Alexey Ivanov has updated the pull request incrementally with one additional commit since the last revision: > > 8316206: Use GlyphVector.getVisualBounds().isEmpty() > > Filter out broken fonts by GlyphVector.getVisualBounds().isEmpty() Marked as reviewed by prr (Reviewer). ------------- PR Review: https://git.openjdk.org/jdk/pull/15818#pullrequestreview-1638492044 From achung at openjdk.org Thu Sep 21 19:03:08 2023 From: achung at openjdk.org (Alisen Chung) Date: Thu, 21 Sep 2023 19:03:08 GMT Subject: RFR: 8316053: Open some swing tests 3 [v2] In-Reply-To: References: Message-ID: > Moving tests from closed to open > 8 javax/swing/SwingGraphics/VolatileBackBuffer/MultimonVImage.java > 9 javax/swing/SwingUtilities/4859570/bug4859570.java > 10 javax/swing/SwingUtilities/4936652/bug4936652.java > 11 javax/swing/ToolTipManager/4768127/bug4768127.java Alisen Chung has updated the pull request incrementally with three additional commits since the last revision: - waitForIdle first - typo - updated based on comment feedback ------------- Changes: - all: https://git.openjdk.org/jdk/pull/15851/files - new: https://git.openjdk.org/jdk/pull/15851/files/87b6f228..d3f848fb Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=15851&range=01 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=15851&range=00-01 Stats: 54 lines in 4 files changed: 17 ins; 17 del; 20 mod Patch: https://git.openjdk.org/jdk/pull/15851.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/15851/head:pull/15851 PR: https://git.openjdk.org/jdk/pull/15851 From achung at openjdk.org Thu Sep 21 19:04:08 2023 From: achung at openjdk.org (Alisen Chung) Date: Thu, 21 Sep 2023 19:04:08 GMT Subject: RFR: 8315882: Open some swing tests 2 [v3] In-Reply-To: <93Mx_6-JWJZ0zNQRsjrI_195TNW5FRbiTxQrSTG3Nek=.91e3bfc1-718f-4745-9df0-3f7b9db2cd71@github.com> References: <4DyRhYWL2GjPno9a8RJ4lPp59m1eJxNEKT07ucFQVBo=.a5ebdbf3-a1b7-496a-86bb-cbf0be256f2f@github.com> <93Mx_6-JWJZ0zNQRsjrI_195TNW5FRbiTxQrSTG3Nek=.91e3bfc1-718f-4745-9df0-3f7b9db2cd71@github.com> Message-ID: On Thu, 21 Sep 2023 17:13:25 GMT, Harshitha Onkar wrote: >> Alisen Chung has updated the pull request incrementally with one additional commit since the last revision: >> >> removed headless on one test, add newline on EOF > > test/jdk/javax/swing/SpringLayout/bug4803649.java line 41: > >> 39: public class bug4803649 { >> 40: static JFrame fr; >> 41: static JPanel panel; > > panel can be made local var. looks like panel is used later to check the dimension, so it has to be a global var ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/15850#discussion_r1333488986 From achung at openjdk.org Thu Sep 21 19:11:28 2023 From: achung at openjdk.org (Alisen Chung) Date: Thu, 21 Sep 2023 19:11:28 GMT Subject: RFR: 8315882: Open some swing tests 2 [v4] In-Reply-To: References: Message-ID: > Moving some tests to open > 5 javax/swing/ScrollPaneLayout/4688907/bug4688907.java > 6 javax/swing/SpringLayout/4756178/bug4756178.java > 7 javax/swing/SpringLayout/4803649/bug4803649.java Alisen Chung has updated the pull request incrementally with one additional commit since the last revision: updated tests based on feedback ------------- Changes: - all: https://git.openjdk.org/jdk/pull/15850/files - new: https://git.openjdk.org/jdk/pull/15850/files/8dbfe463..ae558c94 Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=15850&range=03 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=15850&range=02-03 Stats: 21 lines in 3 files changed: 12 ins; 1 del; 8 mod Patch: https://git.openjdk.org/jdk/pull/15850.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/15850/head:pull/15850 PR: https://git.openjdk.org/jdk/pull/15850 From honkar at openjdk.org Thu Sep 21 19:13:10 2023 From: honkar at openjdk.org (Harshitha Onkar) Date: Thu, 21 Sep 2023 19:13:10 GMT Subject: RFR: 8315882: Open some swing tests 2 [v4] In-Reply-To: References: Message-ID: On Thu, 21 Sep 2023 19:11:28 GMT, Alisen Chung wrote: >> Moving some tests to open >> 5 javax/swing/ScrollPaneLayout/4688907/bug4688907.java >> 6 javax/swing/SpringLayout/4756178/bug4756178.java >> 7 javax/swing/SpringLayout/4803649/bug4803649.java > > Alisen Chung has updated the pull request incrementally with one additional commit since the last revision: > > updated tests based on feedback Updated changes look good. ------------- Marked as reviewed by honkar (Committer). PR Review: https://git.openjdk.org/jdk/pull/15850#pullrequestreview-1638534608 From dnguyen at openjdk.org Thu Sep 21 19:40:58 2023 From: dnguyen at openjdk.org (Damon Nguyen) Date: Thu, 21 Sep 2023 19:40:58 GMT Subject: Integrated: 8316306: Open source and convert manual Swing test In-Reply-To: <80OSlkBZiECg1Q2eSy3_79_7-jM2K93nF15w0LE-hmc=.94dbeadf-2b92-4590-968a-878c324e95d7@github.com> References: <80OSlkBZiECg1Q2eSy3_79_7-jM2K93nF15w0LE-hmc=.94dbeadf-2b92-4590-968a-878c324e95d7@github.com> Message-ID: On Tue, 19 Sep 2023 00:07:33 GMT, Damon Nguyen wrote: > This is to convert and open source test: javax/swing/JToolBar/4203039/bug4203039.java > > This manual test now uses PassFailJFrame to handle the display for the instructions text as well as the pass/fail buttons. This pull request has now been integrated. Changeset: d3e82183 Author: Damon Nguyen URL: https://git.openjdk.org/jdk/commit/d3e821838668a0ccc0ccd098336230975e27fd7c Stats: 82 lines in 1 file changed: 82 ins; 0 del; 0 mod 8316306: Open source and convert manual Swing test Reviewed-by: honkar, azvegint ------------- PR: https://git.openjdk.org/jdk/pull/15806 From dnguyen at openjdk.org Thu Sep 21 19:58:23 2023 From: dnguyen at openjdk.org (Damon Nguyen) Date: Thu, 21 Sep 2023 19:58:23 GMT Subject: RFR: 8316053: Open some swing tests 3 [v2] In-Reply-To: References: Message-ID: On Thu, 21 Sep 2023 19:03:08 GMT, Alisen Chung wrote: >> Moving tests from closed to open >> 8 javax/swing/SwingGraphics/VolatileBackBuffer/MultimonVImage.java >> 9 javax/swing/SwingUtilities/4859570/bug4859570.java >> 10 javax/swing/SwingUtilities/4936652/bug4936652.java >> 11 javax/swing/ToolTipManager/4768127/bug4768127.java > > Alisen Chung has updated the pull request incrementally with three additional commits since the last revision: > > - waitForIdle first > - typo > - updated based on comment feedback test/jdk/javax/swing/JDialog/bug4859570.java line 40: > 38: public class bug4859570 { > 39: static volatile boolean dialogIsClosed = false; > 40: static Robot r; Pretty sure robot can be local. test/jdk/javax/swing/JDialog/bug4859570.java line 66: > 64: if (!dialogIsClosed) { > 65: r.delay(1000); > 66: } Do you know if dialogIsClosed is needed? It seems to only add a delay. I suppose this makes more sense when there was `synchronized`, but not sure if it's still needed. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/15851#discussion_r1333538880 PR Review Comment: https://git.openjdk.org/jdk/pull/15851#discussion_r1333538268 From achung at openjdk.org Thu Sep 21 21:23:11 2023 From: achung at openjdk.org (Alisen Chung) Date: Thu, 21 Sep 2023 21:23:11 GMT Subject: RFR: 8316053: Open some swing tests 3 [v3] In-Reply-To: References: Message-ID: > Moving tests from closed to open > 8 javax/swing/SwingGraphics/VolatileBackBuffer/MultimonVImage.java > 9 javax/swing/SwingUtilities/4859570/bug4859570.java > 10 javax/swing/SwingUtilities/4936652/bug4936652.java > 11 javax/swing/ToolTipManager/4768127/bug4768127.java Alisen Chung has updated the pull request incrementally with one additional commit since the last revision: updated tests based on feedback ------------- Changes: - all: https://git.openjdk.org/jdk/pull/15851/files - new: https://git.openjdk.org/jdk/pull/15851/files/d3f848fb..18d1e43d Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=15851&range=02 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=15851&range=01-02 Stats: 13 lines in 1 file changed: 0 ins; 13 del; 0 mod Patch: https://git.openjdk.org/jdk/pull/15851.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/15851/head:pull/15851 PR: https://git.openjdk.org/jdk/pull/15851 From achung at openjdk.org Thu Sep 21 21:30:04 2023 From: achung at openjdk.org (Alisen Chung) Date: Thu, 21 Sep 2023 21:30:04 GMT Subject: RFR: 8316053: Open some swing tests 3 [v4] In-Reply-To: References: Message-ID: > Moving tests from closed to open > 8 javax/swing/SwingGraphics/VolatileBackBuffer/MultimonVImage.java > 9 javax/swing/SwingUtilities/4859570/bug4859570.java > 10 javax/swing/SwingUtilities/4936652/bug4936652.java > 11 javax/swing/ToolTipManager/4768127/bug4768127.java Alisen Chung has updated the pull request incrementally with one additional commit since the last revision: updated tests based on feedback ------------- Changes: - all: https://git.openjdk.org/jdk/pull/15851/files - new: https://git.openjdk.org/jdk/pull/15851/files/18d1e43d..b375dbfe Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=15851&range=03 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=15851&range=02-03 Stats: 2 lines in 1 file changed: 0 ins; 1 del; 1 mod Patch: https://git.openjdk.org/jdk/pull/15851.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/15851/head:pull/15851 PR: https://git.openjdk.org/jdk/pull/15851 From achung at openjdk.org Thu Sep 21 21:43:53 2023 From: achung at openjdk.org (Alisen Chung) Date: Thu, 21 Sep 2023 21:43:53 GMT Subject: RFR: 8316218: Open some swing tests 5 Message-ID: <5ZuZUU2La8JTcNSHH8Wt-ERWlcc1zizN5JwuiUijKyo=.59c442ff-a1ef-44eb-95d0-a41138ec1163@github.com> Opening some swing tests: 16 javax/swing/plaf/metal/MetalBorders/4290656/bug4290656.java 17 javax/swing/plaf/metal/MetalInternalFrameTitlePane/4221007/bug4221007.java 18 javax/swing/plaf/metal/isJavaLAFLockedCorrectly/isJavaLAFLockedCorrectly.java 19 javax/swing/plaf/multi/isMultiLAFLockedCorrectly/isMultiLAFLockedCorrectly.java ------------- Commit messages: - moved tests from closed Changes: https://git.openjdk.org/jdk/pull/15872/files Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=15872&range=00 Issue: https://bugs.openjdk.org/browse/JDK-8316218 Stats: 262 lines in 4 files changed: 262 ins; 0 del; 0 mod Patch: https://git.openjdk.org/jdk/pull/15872.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/15872/head:pull/15872 PR: https://git.openjdk.org/jdk/pull/15872 From achung at openjdk.org Thu Sep 21 21:53:38 2023 From: achung at openjdk.org (Alisen Chung) Date: Thu, 21 Sep 2023 21:53:38 GMT Subject: RFR: 8316371: Open some swing tests 6 Message-ID: Opening some closed tests: 20 javax/swing/plaf/windows/4736093/bug4736093.java 21 javax/swing/table/DefaultTableCellRenderer/4240870/bug4240870.java 22 javax/swing/table/JTableHeader/4243927/bug4243927.java 23 javax/swing/text/AbstractDocument/4549069/bug4549069.java 24 javax/swing/text/AbstractWriter/4185537/bug4185537.java ------------- Commit messages: - moved tests to open Changes: https://git.openjdk.org/jdk/pull/15873/files Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=15873&range=00 Issue: https://bugs.openjdk.org/browse/JDK-8316371 Stats: 574 lines in 5 files changed: 574 ins; 0 del; 0 mod Patch: https://git.openjdk.org/jdk/pull/15873.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/15873/head:pull/15873 PR: https://git.openjdk.org/jdk/pull/15873 From dnguyen at openjdk.org Thu Sep 21 22:01:11 2023 From: dnguyen at openjdk.org (Damon Nguyen) Date: Thu, 21 Sep 2023 22:01:11 GMT Subject: RFR: 8316053: Open some swing tests 3 [v4] In-Reply-To: References: Message-ID: On Thu, 21 Sep 2023 21:30:04 GMT, Alisen Chung wrote: >> Moving tests from closed to open >> 8 javax/swing/SwingGraphics/VolatileBackBuffer/MultimonVImage.java >> 9 javax/swing/SwingUtilities/4859570/bug4859570.java >> 10 javax/swing/SwingUtilities/4936652/bug4936652.java >> 11 javax/swing/ToolTipManager/4768127/bug4768127.java > > Alisen Chung has updated the pull request incrementally with one additional commit since the last revision: > > updated tests based on feedback Marked as reviewed by dnguyen (Committer). ------------- PR Review: https://git.openjdk.org/jdk/pull/15851#pullrequestreview-1638764505 From achung at openjdk.org Thu Sep 21 22:08:39 2023 From: achung at openjdk.org (Alisen Chung) Date: Thu, 21 Sep 2023 22:08:39 GMT Subject: RFR: 8316146: Open some swing tests 4 Message-ID: Opening closed tests: 12 javax/swing/ToolTipManager/5078214/bug5078214.java 13 javax/swing/plaf/basic/BasicMenuItemUI/4239714/bug4239714.java 14 javax/swing/plaf/basic/BasicMenuUI/4244616/bug4244616.java 15 javax/swing/plaf/metal/4306431/bug4306431.java ------------- Commit messages: - moving tests into open Changes: https://git.openjdk.org/jdk/pull/15875/files Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=15875&range=00 Issue: https://bugs.openjdk.org/browse/JDK-8316146 Stats: 324 lines in 4 files changed: 324 ins; 0 del; 0 mod Patch: https://git.openjdk.org/jdk/pull/15875.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/15875/head:pull/15875 PR: https://git.openjdk.org/jdk/pull/15875 From honkar at openjdk.org Thu Sep 21 22:19:14 2023 From: honkar at openjdk.org (Harshitha Onkar) Date: Thu, 21 Sep 2023 22:19:14 GMT Subject: RFR: 8316146: Open some swing tests 4 In-Reply-To: References: Message-ID: On Thu, 21 Sep 2023 22:00:27 GMT, Alisen Chung wrote: > Opening closed tests: > 12 javax/swing/ToolTipManager/5078214/bug5078214.java > 13 javax/swing/plaf/basic/BasicMenuItemUI/4239714/bug4239714.java > 14 javax/swing/plaf/basic/BasicMenuUI/4244616/bug4244616.java > 15 javax/swing/plaf/metal/4306431/bug4306431.java Looks good except for some minor nits as mentioned below. test/jdk/javax/swing/BasicMenuUI/bug4244616.java line 52: > 50: > 51: // Stream redirection > 52: try(ByteArrayOutputStream bout = new ByteArrayOutputStream(); Minor Suggestion: try (ByteArrayOutputStream bout = new ByteArrayOutputStream(); test/jdk/javax/swing/ToolTipManager/bug5078214.java line 109: > 107: Util.blockTillDisplayed(mainFrame); > 108: r.delay(1000); > 109: r.waitForIdle(); first r.waitForIdle(), followed by r.delay(). test/jdk/javax/swing/ToolTipManager/bug5078214.java line 113: > 111: test(bounds, insets); > 112: r.delay(1000); > 113: r.waitForIdle(); Same here. ------------- Marked as reviewed by honkar (Committer). PR Review: https://git.openjdk.org/jdk/pull/15875#pullrequestreview-1638776321 PR Review Comment: https://git.openjdk.org/jdk/pull/15875#discussion_r1333648588 PR Review Comment: https://git.openjdk.org/jdk/pull/15875#discussion_r1333651292 PR Review Comment: https://git.openjdk.org/jdk/pull/15875#discussion_r1333651475 From achung at openjdk.org Thu Sep 21 22:23:13 2023 From: achung at openjdk.org (Alisen Chung) Date: Thu, 21 Sep 2023 22:23:13 GMT Subject: RFR: 8315825: Open some swing tests [v3] In-Reply-To: <5ZBDsmjcSPidebRo12IiqHjrirKBpdfpD5K5BVsBhms=.b300c086-f00c-429f-82c2-5efc24e51cd3@github.com> References: <5ZBDsmjcSPidebRo12IiqHjrirKBpdfpD5K5BVsBhms=.b300c086-f00c-429f-82c2-5efc24e51cd3@github.com> Message-ID: > Opening some swing tests: > 1 javax/swing/LayoutComparator/4907772/bug4907772.java > 2 javax/swing/LayoutComparator/4979794/bug4979794.java > 3 javax/swing/LegacyGlueFocusTraversalPolicy/4765272/bug4765272.java > 4 javax/swing/RootPaneChecking/RootPaneChecking.java Alisen Chung has updated the pull request incrementally with one additional commit since the last revision: extra newline at EOF ------------- Changes: - all: https://git.openjdk.org/jdk/pull/15830/files - new: https://git.openjdk.org/jdk/pull/15830/files/345185ba..5ec823c3 Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=15830&range=02 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=15830&range=01-02 Stats: 3 lines in 3 files changed: 0 ins; 0 del; 3 mod Patch: https://git.openjdk.org/jdk/pull/15830.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/15830/head:pull/15830 PR: https://git.openjdk.org/jdk/pull/15830 From honkar at openjdk.org Thu Sep 21 22:39:11 2023 From: honkar at openjdk.org (Harshitha Onkar) Date: Thu, 21 Sep 2023 22:39:11 GMT Subject: RFR: 8316146: Open some swing tests 4 In-Reply-To: References: Message-ID: On Thu, 21 Sep 2023 22:00:27 GMT, Alisen Chung wrote: > Opening closed tests: > 12 javax/swing/ToolTipManager/5078214/bug5078214.java > 13 javax/swing/plaf/basic/BasicMenuItemUI/4239714/bug4239714.java > 14 javax/swing/plaf/basic/BasicMenuUI/4244616/bug4244616.java > 15 javax/swing/plaf/metal/4306431/bug4306431.java Changes requested by honkar (Committer). test/jdk/javax/swing/ToolTipManager/bug5078214.java line 102: > 100: System.out.print("We need at least one screen with "); > 101: System.out.println("the taskbar at the bottom position."); > 102: System.out.println("Testing skipped."); As @azvegint mentioned you need either a return or jtreg Skipped Exception here. ------------- PR Review: https://git.openjdk.org/jdk/pull/15875#pullrequestreview-1638807746 PR Review Comment: https://git.openjdk.org/jdk/pull/15875#discussion_r1333664572 From prr at openjdk.org Thu Sep 21 22:43:11 2023 From: prr at openjdk.org (Phil Race) Date: Thu, 21 Sep 2023 22:43:11 GMT Subject: RFR: 8316159: Update BoxLayout sample image for crispier edges In-Reply-To: <3qA83A35UhJzf22QgJve-oeYd77lFaPYMGmMZxcXNmM=.4a035825-7a75-47ce-803b-324be5881afe@github.com> References: <3qA83A35UhJzf22QgJve-oeYd77lFaPYMGmMZxcXNmM=.4a035825-7a75-47ce-803b-324be5881afe@github.com> Message-ID: On Wed, 13 Sep 2023 09:17:16 GMT, Alexey Ivanov wrote: > **Problem** > > On a standard display with the scale of 100%, the BoxLayout sample has blurred edges. > > It is the result of how SVG is rendered: the strokes fall between the pixel grid, therefore a 1-pixel wide stroke is blurred between the previous and the following pixels with 50% of colour on each pixel. It doesn't look as good. > > **Fix** > > Move all rectangles half a pixel to make edges crisp. The edges of the rectangles look crisp in 100% and 200%. > > For more information see answers to the following questions on Stack Overflow: > > - [Why is my SVG line blurry or 2px in height when I specified 1px?](https://stackoverflow.com/a/34229584/572834) > - [Avoiding lines between adjacent SVG rectangles](https://stackoverflow.com/a/23376793/572834) Marked as reviewed by prr (Reviewer). ------------- PR Review: https://git.openjdk.org/jdk/pull/15703#pullrequestreview-1638810904 From prr at openjdk.org Thu Sep 21 22:45:12 2023 From: prr at openjdk.org (Phil Race) Date: Thu, 21 Sep 2023 22:45:12 GMT Subject: RFR: 8315825: Open some swing tests [v3] In-Reply-To: References: <5ZBDsmjcSPidebRo12IiqHjrirKBpdfpD5K5BVsBhms=.b300c086-f00c-429f-82c2-5efc24e51cd3@github.com> Message-ID: <4KTChn7nyL86n2rNuEGnjs-9kFrpjMWldxdJqUAnjdQ=.2da7c4e6-6c9e-4fed-bbbd-dad0c09f5aae@github.com> On Thu, 21 Sep 2023 22:23:13 GMT, Alisen Chung wrote: >> Opening some swing tests: >> 1 javax/swing/LayoutComparator/4907772/bug4907772.java >> 2 javax/swing/LayoutComparator/4979794/bug4979794.java >> 3 javax/swing/LegacyGlueFocusTraversalPolicy/4765272/bug4765272.java >> 4 javax/swing/RootPaneChecking/RootPaneChecking.java > > Alisen Chung has updated the pull request incrementally with one additional commit since the last revision: > > extra newline at EOF Marked as reviewed by prr (Reviewer). ------------- PR Review: https://git.openjdk.org/jdk/pull/15830#pullrequestreview-1638812447 From prr at openjdk.org Thu Sep 21 22:47:12 2023 From: prr at openjdk.org (Phil Race) Date: Thu, 21 Sep 2023 22:47:12 GMT Subject: RFR: 8315882: Open some swing tests 2 [v4] In-Reply-To: References: Message-ID: <3Uq59EEIlR3Xery4B5MUnyXzIr-DNfMRfNYjmEX9gfc=.173068b1-b799-44aa-bb65-7ce9da4e9241@github.com> On Thu, 21 Sep 2023 19:11:28 GMT, Alisen Chung wrote: >> Moving some tests to open >> 5 javax/swing/ScrollPaneLayout/4688907/bug4688907.java >> 6 javax/swing/SpringLayout/4756178/bug4756178.java >> 7 javax/swing/SpringLayout/4803649/bug4803649.java > > Alisen Chung has updated the pull request incrementally with one additional commit since the last revision: > > updated tests based on feedback Marked as reviewed by prr (Reviewer). ------------- PR Review: https://git.openjdk.org/jdk/pull/15850#pullrequestreview-1638813587 From prr at openjdk.org Thu Sep 21 22:49:11 2023 From: prr at openjdk.org (Phil Race) Date: Thu, 21 Sep 2023 22:49:11 GMT Subject: RFR: 8316053: Open some swing tests 3 [v4] In-Reply-To: References: Message-ID: On Thu, 21 Sep 2023 21:30:04 GMT, Alisen Chung wrote: >> Moving tests from closed to open >> 8 javax/swing/SwingGraphics/VolatileBackBuffer/MultimonVImage.java >> 9 javax/swing/SwingUtilities/4859570/bug4859570.java >> 10 javax/swing/SwingUtilities/4936652/bug4936652.java >> 11 javax/swing/ToolTipManager/4768127/bug4768127.java > > Alisen Chung has updated the pull request incrementally with one additional commit since the last revision: > > updated tests based on feedback Marked as reviewed by prr (Reviewer). ------------- PR Review: https://git.openjdk.org/jdk/pull/15851#pullrequestreview-1638815532 From prr at openjdk.org Thu Sep 21 22:52:10 2023 From: prr at openjdk.org (Phil Race) Date: Thu, 21 Sep 2023 22:52:10 GMT Subject: RFR: 8316218: Open some swing tests 5 In-Reply-To: <5ZuZUU2La8JTcNSHH8Wt-ERWlcc1zizN5JwuiUijKyo=.59c442ff-a1ef-44eb-95d0-a41138ec1163@github.com> References: <5ZuZUU2La8JTcNSHH8Wt-ERWlcc1zizN5JwuiUijKyo=.59c442ff-a1ef-44eb-95d0-a41138ec1163@github.com> Message-ID: <4c1YAB6fVDygsmKxkzyqELgh1w1xhL7XiWe4yOtk2RA=.61bd987a-6466-4bc7-a73e-ea5eee3c019f@github.com> On Thu, 21 Sep 2023 21:36:52 GMT, Alisen Chung wrote: > Opening some swing tests: > 16 javax/swing/plaf/metal/MetalBorders/4290656/bug4290656.java > 17 javax/swing/plaf/metal/MetalInternalFrameTitlePane/4221007/bug4221007.java > 18 javax/swing/plaf/metal/isJavaLAFLockedCorrectly/isJavaLAFLockedCorrectly.java > 19 javax/swing/plaf/multi/isMultiLAFLockedCorrectly/isMultiLAFLockedCorrectly.java Marked as reviewed by prr (Reviewer). ------------- PR Review: https://git.openjdk.org/jdk/pull/15872#pullrequestreview-1638818820 From prr at openjdk.org Thu Sep 21 23:05:13 2023 From: prr at openjdk.org (Phil Race) Date: Thu, 21 Sep 2023 23:05:13 GMT Subject: RFR: 8316371: Open some swing tests 6 In-Reply-To: References: Message-ID: <5nAAAMlSPZ8WfDD1QviHpIlzlTGntlJPBIKVtAJQgJ4=.c0f7dcae-4194-4e56-9f09-506f118d85f2@github.com> On Thu, 21 Sep 2023 21:45:49 GMT, Alisen Chung wrote: > Opening some closed tests: > 20 javax/swing/plaf/windows/4736093/bug4736093.java > 21 javax/swing/table/DefaultTableCellRenderer/4240870/bug4240870.java > 22 javax/swing/table/JTableHeader/4243927/bug4243927.java > 23 javax/swing/text/AbstractDocument/4549069/bug4549069.java > 24 javax/swing/text/AbstractWriter/4185537/bug4185537.java test/jdk/javax/swing/AbstractDocument/bug4549069.java line 84: > 82: f.setVisible(true); > 83: > 84: if (!passed) { I'm not sure why this var is tested here. The test sets it to true in a static initializer and NEVER updates it. I think the test is supposed to fail if an Exception is thrown so this isn't needed, unless there's some place it is supposed to update the var on catching an Exception but I don't see that. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/15873#discussion_r1333678728 From philip.race at oracle.com Thu Sep 21 23:16:35 2023 From: philip.race at oracle.com (Philip Race) Date: Thu, 21 Sep 2023 16:16:35 -0700 Subject: proposing the depreciation of java.beans.beancontext.* In-Reply-To: References: Message-ID: Hi Larry, Deprecation happens either because there is a preferred replacement or because something is dangerous or obsolete. This is a slightly blurred case, since it seems to be obsoleted by a preferred pattern that doesn't involve a JDK replacement API. I guess the first question I have is do you mean just "deprecate" and provide pointers, or do you mean "deprecate for removal". The latter needs more consideration, like (1) Is any actively supported software still using this ? (2) How hard would it be for them to migrate to something else ? And how reasonable is it to expect them to do so? (3) What's the ripple effect in the JDK ? Does it impact the java.beans package too in some ways ? -phil. On 9/20/23 5:18 PM, Laurence Cable wrote: > The BeanContext.* package was added (by me) quite early in the > lifetime of java beans (1.2); based loosely on some of the concepts of > the opendoc component framework, > it was intended to provide a "container" for JavaBeans components to > collaborate with each other by exposing both their presence (within a > context) > and to provide/consume 'services' expressed as interfaces. > > (we even demoed this functionality in the "beanbox" for those that > recall that) > > This package pre-dated the invention/discovery of Inversion of Control > and (annotation based) Dependency Injection by a good number of years; > and as those latter design patterns > and their implementations became popular, Bean Context did not evolve, > and I would argue, became rapidly irrelevant if not actually an > anti-pattern! > > Now some 25 yrs later, it is probably beyond definition as an > anachronism and long overdue to be depreciated from the JDK. > > Therefore I would like to propose doing so, and open the discussion > regarding this here. > > Regards > > - Larry From larry.cable at oracle.com Thu Sep 21 23:48:52 2023 From: larry.cable at oracle.com (Laurence Cable) Date: Thu, 21 Sep 2023 16:48:52 -0700 Subject: proposing the depreciation of java.beans.beancontext.* In-Reply-To: References: Message-ID: <6679fe8c-1dde-b667-2274-918fe7ac4a60@oracle.com> Hi Phillip, inline ... On 9/21/23 4:16 PM, Philip Race wrote: > Hi Larry, > > Deprecation happens either because there is a preferred replacement or > because something > is dangerous or obsolete. This is a slightly blurred case, since it > seems to be obsoleted by > a preferred pattern that doesn't involve a JDK replacement API. > > I guess the first question I have is do you mean just "deprecate" and > provide pointers, or > do you mean "deprecate for removal". The latter needs more > consideration, like I mean the latter - eventual removal, return some bytes for better usage since its my opinion beancontext is long past being obsolete... its pretty much only of historical/archeological interest at this point in time! :) > > (1) Is any actively supported software still using this ? I intend to perform some corpus searches to determine this (to the degree possible) > (2) How hard would it be for them to migrate to something else ? And > how reasonable is it to expect them to do so? I would anticipate that any code written after the onset of Spring, Guice etc would have already abandoned beancontext! > (3) What's the ripple effect in the JDK ? Does it impact the > java.beans package too in some ways ? AFIAK/recall the beancontext and beans pkgs are effectively independent of each other ... at least in the dependency 'direction' of beans -> beancontext. I do not recall any other packages (e.g awt) using it, but a search of the JDK will confirm this. beancontext did not really gain any significant adoption that I was aware of, once DI/IoT became the de facto model for component/bean assembly with Spring and that percolated down into SE from EE, along with OSGi (which also had overlap in the area of service/interface brokerage) Rgds - Larry > > -phil. > > > On 9/20/23 5:18 PM, Laurence Cable wrote: >> The BeanContext.* package was added (by me) quite early in the >> lifetime of java beans (1.2); based loosely on some of the concepts >> of the opendoc component framework, >> it was intended to provide a "container" for JavaBeans components to >> collaborate with each other by exposing both their presence (within a >> context) >> and to provide/consume 'services' expressed as interfaces. >> >> (we even demoed this functionality in the "beanbox" for those that >> recall that) >> >> This package pre-dated the invention/discovery of Inversion of >> Control and (annotation based) Dependency Injection by a good number >> of years; and as those latter design patterns >> and their implementations became popular, Bean Context did not >> evolve, and I would argue, became rapidly irrelevant if not actually >> an anti-pattern! >> >> Now some 25 yrs later, it is probably beyond definition as an >> anachronism and long overdue to be depreciated from the JDK. >> >> Therefore I would like to propose doing so, and open the discussion >> regarding this here. >> >> Regards >> >> - Larry > From jwaters at openjdk.org Fri Sep 22 02:30:25 2023 From: jwaters at openjdk.org (Julian Waters) Date: Fri, 22 Sep 2023 02:30:25 GMT Subject: RFR: 8307160: [REDO] Enable the permissive- flag on the Microsoft Visual C compiler [v4] In-Reply-To: References: <7piLRto5nNbhYYYfENCr5ecm4M2xNtMkjkE8XhrLLQ0=.8fd1ac3a-46f8-47a8-ae37-a4abbf7757d9@github.com> Message-ID: On Thu, 14 Sep 2023 03:23:55 GMT, Julian Waters wrote: >> Julian Waters has updated the pull request incrementally with one additional commit since the last revision: >> >> Document changes in awt_DnDDS.cpp > > Pinging > @TheShermanTanker In my experience, getting reviews from all areas for issues like this that cuts through the entire JDK can be difficult. Another approach, which requires more work from your side, but hopefully less from the reviewers' (and thus makes it easier for them to review) is to split this PR into multiple ones: One for each area (basically, area == mailing list) that just makes the changes to the code necessary to (in the future) turn on /permissive-. And then finally a small "finishing" PR which just touches the makefile and enables the flag, when all code is fixed. > > As a side effect, it is also 100% clear that all parts of the code has been correctly reviewed, since then reviewers do not need to leave conditions on their reviews ("i only looked at the foo parts"). I understand, will split this into multiple changes after I answer all queries above ------------- PR Comment: https://git.openjdk.org/jdk/pull/15096#issuecomment-1730719188 From clanger at openjdk.org Fri Sep 22 06:30:26 2023 From: clanger at openjdk.org (Christoph Langer) Date: Fri, 22 Sep 2023 06:30:26 GMT Subject: RFR: 8316710: Exclude java/awt/font/Rotate/RotatedTextTest.java Message-ID: Exclude java/awt/font/Rotate/RotatedTextTest.java until [JDK-8219641](https://bugs.openjdk.org/browse/JDK-8219641) is fixed. The error shows in several linux installations. ------------- Commit messages: - JDK-8316710 Changes: https://git.openjdk.org/jdk/pull/15880/files Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=15880&range=00 Issue: https://bugs.openjdk.org/browse/JDK-8316710 Stats: 2 lines in 1 file changed: 2 ins; 0 del; 0 mod Patch: https://git.openjdk.org/jdk/pull/15880.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/15880/head:pull/15880 PR: https://git.openjdk.org/jdk/pull/15880 From aturbanov at openjdk.org Fri Sep 22 07:04:13 2023 From: aturbanov at openjdk.org (Andrey Turbanov) Date: Fri, 22 Sep 2023 07:04:13 GMT Subject: RFR: 8316211: Open source several manual applet tests [v2] In-Reply-To: References: <76b2-b6qr-MNBiDvTuZYs1bKZAbC21UMhoFxTZDJAGc=.2af94b7b-2a4d-4724-a08a-08a162ef1d4c@github.com> Message-ID: <9B_XrK8BSCOmFVZEWaxBq98iM1xGG0DCJXbOsDPUWHs=.29ae0179-ed39-42d9-9682-7066efe22cd7@github.com> On Wed, 20 Sep 2023 01:46:35 GMT, Alexander Zvegintsev wrote: >> Open sourcing several manual applet tests >> >> >> test/jdk/java/awt/Frame/DefaultSizeTest.java >> test/jdk/java/awt/LightweightComponent/LightweightCliprect.java >> test/jdk/java/awt/event/KeyEvent/FunctionKeyTest.java >> test/jdk/javax/swing/JFrame/DefaultCloseOperation.java > > Alexander Zvegintsev has updated the pull request incrementally with one additional commit since the last revision: > > FunctionKeyTest converted to automated test/jdk/java/awt/Frame/DefaultSizeTest.java line 35: > 33: */ > 34: > 35: public class DefaultSizeTest { Suggestion: public class DefaultSizeTest { test/jdk/java/awt/LightweightComponent/LightweightCliprect.java line 96: > 94: for(int i = 0; i < 30; i++) { > 95: g.drawString("Lightweight: Java version: " + version + > 96: ", Vendor: " + vendor, 10, y += 20); Suggestion: ", Vendor: " + vendor, 10, y += 20); test/jdk/java/awt/event/KeyEvent/FunctionKeyTest.java line 104: > 102: class FunctionKeyTester extends Frame { > 103: Label l = new Label ("NULL"); > 104: Button b = new Button (); Suggestion: Button b = new Button (); ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/15827#discussion_r1333962044 PR Review Comment: https://git.openjdk.org/jdk/pull/15827#discussion_r1333962295 PR Review Comment: https://git.openjdk.org/jdk/pull/15827#discussion_r1333961842 From psadhukhan at openjdk.org Fri Sep 22 07:18:09 2023 From: psadhukhan at openjdk.org (Prasanta Sadhukhan) Date: Fri, 22 Sep 2023 07:18:09 GMT Subject: RFR: 6450193: After the first Serialization, JTableHeader does not uninstall its UI [v3] In-Reply-To: References: Message-ID: > After the first time a JTableHeader is serialized, it no longer will uninstall its UI upon subsequent serializations. > This happens for classes that use the BasicTableHeaderUI class. Any LAF that extends the BasicTableHeaderUI like SynthTableHeaderUI and WindowsTableHeaderUI will get an NotSerializableException thrown > > Each time an JComponent instance is Serialized, a [counter ](https://github.com/openjdk/jdk/blob/218829e0a2a3ae5599b81733df53557966392033/src/java.desktop/share/classes/javax/swing/JComponent.java#L5644-L5645) for the instance is incremented. It is de-incremented in JComponent's writeObject or a class that implements it the same way, like JButton, JScrollPane etc.. > With JTableHeader it does not deincrement the counter. The uninstall mechanism will not uninstall a UI if the counter is not 0 on the first pass..It is not possible to call JComponent.setWriteObjectCounter in JTableHeader as it is not in the same package so the fix is to remove the writeObject implementation and rely on JComponent writeObject implementation to make sure uninstallation of UI happens and also NotSerializableException does not happen for Synth Prasanta Sadhukhan has updated the pull request incrementally with one additional commit since the last revision: try-with-resource use ------------- Changes: - all: https://git.openjdk.org/jdk/pull/15507/files - new: https://git.openjdk.org/jdk/pull/15507/files/267a4787..7303c96f Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=15507&range=02 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=15507&range=01-02 Stats: 5 lines in 1 file changed: 0 ins; 0 del; 5 mod Patch: https://git.openjdk.org/jdk/pull/15507.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/15507/head:pull/15507 PR: https://git.openjdk.org/jdk/pull/15507 From psadhukhan at openjdk.org Fri Sep 22 07:18:12 2023 From: psadhukhan at openjdk.org (Prasanta Sadhukhan) Date: Fri, 22 Sep 2023 07:18:12 GMT Subject: RFR: 6450193: After the first Serialization, JTableHeader does not uninstall its UI [v3] In-Reply-To: References: Message-ID: On Mon, 11 Sep 2023 19:05:25 GMT, Alexey Ivanov wrote: >> Prasanta Sadhukhan has updated the pull request incrementally with one additional commit since the last revision: >> >> try-with-resource use > > test/jdk/javax/swing/JTableHeader/SerializeJTableHeader.java line 46: > >> 44: for(int i = 0; i < 10; i ++){ >> 45: ByteArrayOutputStream baos = new ByteArrayOutputStream(); >> 46: ObjectOutputStream oos = new ObjectOutputStream(baos); > > You should use try with resources to close the streams as a good pattern, even though closing byte-array does nothing, nor does it leak any resources. I guess in test, resource leak probably wouldn't matter so much but anyways I have used try-with-resource. Please have a look ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/15507#discussion_r1333971798 From aivanov at openjdk.org Fri Sep 22 11:59:26 2023 From: aivanov at openjdk.org (Alexey Ivanov) Date: Fri, 22 Sep 2023 11:59:26 GMT Subject: RFR: 6450193: After the first Serialization, JTableHeader does not uninstall its UI [v3] In-Reply-To: References: Message-ID: On Fri, 22 Sep 2023 07:18:09 GMT, Prasanta Sadhukhan wrote: >> After the first time a JTableHeader is serialized, it no longer will uninstall its UI upon subsequent serializations. >> This happens for classes that use the BasicTableHeaderUI class. Any LAF that extends the BasicTableHeaderUI like SynthTableHeaderUI and WindowsTableHeaderUI will get an NotSerializableException thrown >> >> Each time an JComponent instance is Serialized, a [counter ](https://github.com/openjdk/jdk/blob/218829e0a2a3ae5599b81733df53557966392033/src/java.desktop/share/classes/javax/swing/JComponent.java#L5644-L5645) for the instance is incremented. It is de-incremented in JComponent's writeObject or a class that implements it the same way, like JButton, JScrollPane etc.. >> With JTableHeader it does not deincrement the counter. The uninstall mechanism will not uninstall a UI if the counter is not 0 on the first pass..It is not possible to call JComponent.setWriteObjectCounter in JTableHeader as it is not in the same package so the fix is to remove the writeObject implementation and rely on JComponent writeObject implementation to make sure uninstallation of UI happens and also NotSerializableException does not happen for Synth > > Prasanta Sadhukhan has updated the pull request incrementally with one additional commit since the last revision: > > try-with-resource use Looks good. Yet I have a small question. test/jdk/javax/swing/JTableHeader/SerializeJTableHeader.java line 55: > 53: for (UIManager.LookAndFeelInfo laf : UIManager.getInstalledLookAndFeels()) { > 54: System.out.println("Testing L&F: " + laf); > 55: SwingUtilities.invokeAndWait(() -> setLookAndFeel(laf)); Why did you choose to set LAF on EDT? You then continue with creating and serialising the component on the main thread. ------------- Marked as reviewed by aivanov (Reviewer). PR Review: https://git.openjdk.org/jdk/pull/15507#pullrequestreview-1639803248 PR Review Comment: https://git.openjdk.org/jdk/pull/15507#discussion_r1334280564 From aivanov at openjdk.org Fri Sep 22 11:59:28 2023 From: aivanov at openjdk.org (Alexey Ivanov) Date: Fri, 22 Sep 2023 11:59:28 GMT Subject: RFR: 6450193: After the first Serialization, JTableHeader does not uninstall its UI [v3] In-Reply-To: References: Message-ID: <-27cxexIaMwxCYoCBsPJ8wSJ5oUhKKC67DI-Vg71eJ4=.d83ac001-d976-4c1f-9885-efdb4ccb81ef@github.com> On Fri, 22 Sep 2023 07:12:08 GMT, Prasanta Sadhukhan wrote: > I guess in test, resource leak probably wouldn't matter? No, it wouldn't. Yet someone could later copy the code and use file streams where closing the streams matters. Always following the pattern is safer. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/15507#discussion_r1334283537 From aivanov at openjdk.org Fri Sep 22 12:31:11 2023 From: aivanov at openjdk.org (Alexey Ivanov) Date: Fri, 22 Sep 2023 12:31:11 GMT Subject: RFR: 8316556: Fix typos in java.desktop In-Reply-To: References: Message-ID: On Sat, 16 Sep 2023 16:22:40 GMT, Andrey Turbanov wrote: > PR with non-swing changes extracted from initial #14847 src/java.desktop/unix/classes/sun/awt/X11/XMenuBarPeer.java line 132: > 130: * need to have somewhat strange behaviour > 131: * deduced from java.awt.MenuBar. > 132: * We can not get index of particular item in Suggestion: * We cannot get index of particular item in ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/15773#discussion_r1334307868 From aivanov at openjdk.org Fri Sep 22 12:42:16 2023 From: aivanov at openjdk.org (Alexey Ivanov) Date: Fri, 22 Sep 2023 12:42:16 GMT Subject: RFR: 8316146: Open some swing tests 4 In-Reply-To: References: Message-ID: <_hraCg_dnCbTkYPkAZlVjNr22v28rXLrFevRQVDVDwM=.fd7f6096-c3a4-4ad8-949e-b20c2d382167@github.com> On Thu, 21 Sep 2023 22:36:16 GMT, Harshitha Onkar wrote: >> Opening closed tests: >> 12 javax/swing/ToolTipManager/5078214/bug5078214.java >> 13 javax/swing/plaf/basic/BasicMenuItemUI/4239714/bug4239714.java >> 14 javax/swing/plaf/basic/BasicMenuUI/4244616/bug4244616.java >> 15 javax/swing/plaf/metal/4306431/bug4306431.java > > test/jdk/javax/swing/ToolTipManager/bug5078214.java line 102: > >> 100: System.out.print("We need at least one screen with "); >> 101: System.out.println("the taskbar at the bottom position."); >> 102: System.out.println("Testing skipped."); > > @azvegint mentioned about Ubuntu issue, you will probably need either a return or jtreg Skipped Exception here. Using jtreg Skipped Exception is more appropriate here. I would also recommend inverting the condition to avoid additional indentation. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/15875#discussion_r1334325660 From goetz at openjdk.org Fri Sep 22 12:47:13 2023 From: goetz at openjdk.org (Goetz Lindenmaier) Date: Fri, 22 Sep 2023 12:47:13 GMT Subject: RFR: 8316206: Test StretchedFontTest.java fails for Baekmuk font [v2] In-Reply-To: References: <4eLLluXke8q0oity_JF9axhhEeX6SX1-74Q5OOvQ8U4=.c965732f-ac78-4fe7-a584-141bf76616bc@github.com> Message-ID: On Wed, 20 Sep 2023 14:07:17 GMT, Alexey Ivanov wrote: >> **Root cause** >> >> The _Baekmuk Headline_ font maps `\u6f22` (?) to glyph id 16950 which has zero length. >> >> The test fails if the right half of the image with the rendered glyph contains only pixels of background colour. In this case, the left half of the image is also blank. It's somewhat false positive because of the broken font. >> >> **Fix** >> >> Ignore fonts which don't render the glyph correctly. If the left half of the image contains pixels of the background colour only, it is expected that the right half also contains background-coloured pixels only. >> >> The updated test does not fail with the _Baekmuk Headline_ font. It still detects the original problem and fails on builds without the fix for [JDK-8312555](https://bugs.openjdk.org/browse/JDK-8312555). > > Alexey Ivanov has updated the pull request incrementally with one additional commit since the last revision: > > 8316206: Use GlyphVector.getVisualBounds().isEmpty() > > Filter out broken fonts by GlyphVector.getVisualBounds().isEmpty() The test passes with this patch on our machine. LGTM. ------------- Marked as reviewed by goetz (Reviewer). PR Review: https://git.openjdk.org/jdk/pull/15818#pullrequestreview-1639880214 From aivanov at openjdk.org Fri Sep 22 12:50:29 2023 From: aivanov at openjdk.org (Alexey Ivanov) Date: Fri, 22 Sep 2023 12:50:29 GMT Subject: Integrated: 8316206: Test StretchedFontTest.java fails for Baekmuk font In-Reply-To: <4eLLluXke8q0oity_JF9axhhEeX6SX1-74Q5OOvQ8U4=.c965732f-ac78-4fe7-a584-141bf76616bc@github.com> References: <4eLLluXke8q0oity_JF9axhhEeX6SX1-74Q5OOvQ8U4=.c965732f-ac78-4fe7-a584-141bf76616bc@github.com> Message-ID: <94aaiV4SHpK96jjZgtc90DOjDGUVRBdyuwLipgTiU98=.e23a09ba-a5a6-4669-9778-258aa3b8ed39@github.com> On Tue, 19 Sep 2023 13:41:27 GMT, Alexey Ivanov wrote: > **Root cause** > > The _Baekmuk Headline_ font maps `\u6f22` (?) to glyph id 16950 which has zero length. > > The test fails if the right half of the image with the rendered glyph contains only pixels of background colour. In this case, the left half of the image is also blank. It's somewhat false positive because of the broken font. > > **Fix** > > Ignore fonts which don't render the glyph correctly. If the left half of the image contains pixels of the background colour only, it is expected that the right half also contains background-coloured pixels only. > > The updated test does not fail with the _Baekmuk Headline_ font. It still detects the original problem and fails on builds without the fix for [JDK-8312555](https://bugs.openjdk.org/browse/JDK-8312555). This pull request has now been integrated. Changeset: 00f585bd Author: Alexey Ivanov URL: https://git.openjdk.org/jdk/commit/00f585bd22f527eca0107a9b4ed366f25754f0be Stats: 27 lines in 1 file changed: 25 ins; 0 del; 2 mod 8316206: Test StretchedFontTest.java fails for Baekmuk font Ignore broken fonts, i.e. the fonts for which GlyphVector(TEXT).getVisualBounds().isEmpty() returns true Reviewed-by: azvegint, prr, goetz ------------- PR: https://git.openjdk.org/jdk/pull/15818 From azvegint at openjdk.org Fri Sep 22 15:43:18 2023 From: azvegint at openjdk.org (Alexander Zvegintsev) Date: Fri, 22 Sep 2023 15:43:18 GMT Subject: RFR: 8316211: Open source several manual applet tests [v3] In-Reply-To: <76b2-b6qr-MNBiDvTuZYs1bKZAbC21UMhoFxTZDJAGc=.2af94b7b-2a4d-4724-a08a-08a162ef1d4c@github.com> References: <76b2-b6qr-MNBiDvTuZYs1bKZAbC21UMhoFxTZDJAGc=.2af94b7b-2a4d-4724-a08a-08a162ef1d4c@github.com> Message-ID: > Open sourcing several manual applet tests > > > test/jdk/java/awt/Frame/DefaultSizeTest.java > test/jdk/java/awt/LightweightComponent/LightweightCliprect.java > test/jdk/java/awt/event/KeyEvent/FunctionKeyTest.java > test/jdk/javax/swing/JFrame/DefaultCloseOperation.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/15827/files - new: https://git.openjdk.org/jdk/pull/15827/files/69a125fa..abece69d Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=15827&range=02 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=15827&range=01-02 Stats: 3 lines in 3 files changed: 0 ins; 0 del; 3 mod Patch: https://git.openjdk.org/jdk/pull/15827.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/15827/head:pull/15827 PR: https://git.openjdk.org/jdk/pull/15827 From achung at openjdk.org Fri Sep 22 20:18:19 2023 From: achung at openjdk.org (Alisen Chung) Date: Fri, 22 Sep 2023 20:18:19 GMT Subject: RFR: 8315825: Open some swing tests [v4] In-Reply-To: <5ZBDsmjcSPidebRo12IiqHjrirKBpdfpD5K5BVsBhms=.b300c086-f00c-429f-82c2-5efc24e51cd3@github.com> References: <5ZBDsmjcSPidebRo12IiqHjrirKBpdfpD5K5BVsBhms=.b300c086-f00c-429f-82c2-5efc24e51cd3@github.com> Message-ID: > Opening some swing tests: > 1 javax/swing/LayoutComparator/4907772/bug4907772.java > 2 javax/swing/LayoutComparator/4979794/bug4979794.java > 3 javax/swing/LegacyGlueFocusTraversalPolicy/4765272/bug4765272.java > 4 javax/swing/RootPaneChecking/RootPaneChecking.java Alisen Chung has updated the pull request incrementally with one additional commit since the last revision: fixed btn null error ------------- Changes: - all: https://git.openjdk.org/jdk/pull/15830/files - new: https://git.openjdk.org/jdk/pull/15830/files/5ec823c3..2e7a894e Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=15830&range=03 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=15830&range=02-03 Stats: 1 line in 1 file changed: 0 ins; 0 del; 1 mod Patch: https://git.openjdk.org/jdk/pull/15830.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/15830/head:pull/15830 PR: https://git.openjdk.org/jdk/pull/15830 From achung at openjdk.org Fri Sep 22 20:54:29 2023 From: achung at openjdk.org (Alisen Chung) Date: Fri, 22 Sep 2023 20:54:29 GMT Subject: Integrated: 8315825: Open some swing tests In-Reply-To: <5ZBDsmjcSPidebRo12IiqHjrirKBpdfpD5K5BVsBhms=.b300c086-f00c-429f-82c2-5efc24e51cd3@github.com> References: <5ZBDsmjcSPidebRo12IiqHjrirKBpdfpD5K5BVsBhms=.b300c086-f00c-429f-82c2-5efc24e51cd3@github.com> Message-ID: On Wed, 20 Sep 2023 00:57:57 GMT, Alisen Chung wrote: > Opening some swing tests: > 1 javax/swing/LayoutComparator/4907772/bug4907772.java > 2 javax/swing/LayoutComparator/4979794/bug4979794.java > 3 javax/swing/LegacyGlueFocusTraversalPolicy/4765272/bug4765272.java > 4 javax/swing/RootPaneChecking/RootPaneChecking.java This pull request has now been integrated. Changeset: e015e6ce Author: Alisen Chung URL: https://git.openjdk.org/jdk/commit/e015e6ce28e263e546cd1b6583a4a3ecc431d576 Stats: 449 lines in 4 files changed: 449 ins; 0 del; 0 mod 8315825: Open some swing tests Reviewed-by: abhiscxk, prr ------------- PR: https://git.openjdk.org/jdk/pull/15830 From achung at openjdk.org Fri Sep 22 21:14:09 2023 From: achung at openjdk.org (Alisen Chung) Date: Fri, 22 Sep 2023 21:14:09 GMT Subject: RFR: 8315882: Open some swing tests 2 [v5] In-Reply-To: References: Message-ID: > Moving some tests to open > 5 javax/swing/ScrollPaneLayout/4688907/bug4688907.java > 6 javax/swing/SpringLayout/4756178/bug4756178.java > 7 javax/swing/SpringLayout/4803649/bug4803649.java Alisen Chung has updated the pull request incrementally with one additional commit since the last revision: typo ------------- Changes: - all: https://git.openjdk.org/jdk/pull/15850/files - new: https://git.openjdk.org/jdk/pull/15850/files/ae558c94..e5a90e0c Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=15850&range=04 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=15850&range=03-04 Stats: 1 line in 1 file changed: 0 ins; 0 del; 1 mod Patch: https://git.openjdk.org/jdk/pull/15850.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/15850/head:pull/15850 PR: https://git.openjdk.org/jdk/pull/15850 From honkar at openjdk.org Fri Sep 22 21:37:12 2023 From: honkar at openjdk.org (Harshitha Onkar) Date: Fri, 22 Sep 2023 21:37:12 GMT Subject: RFR: 8316146: Open some swing tests 4 In-Reply-To: References: Message-ID: On Thu, 21 Sep 2023 22:00:27 GMT, Alisen Chung wrote: > Opening closed tests: > 12 javax/swing/ToolTipManager/5078214/bug5078214.java > 13 javax/swing/plaf/basic/BasicMenuItemUI/4239714/bug4239714.java > 14 javax/swing/plaf/basic/BasicMenuUI/4244616/bug4244616.java > 15 javax/swing/plaf/metal/4306431/bug4306431.java Changes requested by honkar (Committer). test/jdk/javax/swing/ToolTipManager/bug5078214.java line 77: > 75: } > 76: > 77: if (testGraphics != null) { I agree with @aivanov-jdk on this [point](https://github.com/openjdk/jdk/pull/15875/files#r1334325660). The following condition can be checked first and the SkippedException can be added here so as to return at this point if test conditions are not met. Suggestion: if (testGraphics == null) { ------------- PR Review: https://git.openjdk.org/jdk/pull/15875#pullrequestreview-1640666079 PR Review Comment: https://git.openjdk.org/jdk/pull/15875#discussion_r1334832378 From achung at openjdk.org Sat Sep 23 04:51:17 2023 From: achung at openjdk.org (Alisen Chung) Date: Sat, 23 Sep 2023 04:51:17 GMT Subject: RFR: 8315882: Open some swing tests 2 [v6] In-Reply-To: References: Message-ID: > Moving some tests to open > 5 javax/swing/ScrollPaneLayout/4688907/bug4688907.java > 6 javax/swing/SpringLayout/4756178/bug4756178.java > 7 javax/swing/SpringLayout/4803649/bug4803649.java Alisen Chung has updated the pull request incrementally with one additional commit since the last revision: Empty commit ------------- Changes: - all: https://git.openjdk.org/jdk/pull/15850/files - new: https://git.openjdk.org/jdk/pull/15850/files/e5a90e0c..dd54235c Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=15850&range=05 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=15850&range=04-05 Stats: 0 lines in 0 files changed: 0 ins; 0 del; 0 mod Patch: https://git.openjdk.org/jdk/pull/15850.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/15850/head:pull/15850 PR: https://git.openjdk.org/jdk/pull/15850 From achung at openjdk.org Sat Sep 23 04:51:19 2023 From: achung at openjdk.org (Alisen Chung) Date: Sat, 23 Sep 2023 04:51:19 GMT Subject: Integrated: 8315882: Open some swing tests 2 In-Reply-To: References: Message-ID: On Wed, 20 Sep 2023 22:19:42 GMT, Alisen Chung wrote: > Moving some tests to open > 5 javax/swing/ScrollPaneLayout/4688907/bug4688907.java > 6 javax/swing/SpringLayout/4756178/bug4756178.java > 7 javax/swing/SpringLayout/4803649/bug4803649.java This pull request has now been integrated. Changeset: d2d7d9a8 Author: Alisen Chung URL: https://git.openjdk.org/jdk/commit/d2d7d9a8b7c68865553dcbb4d660bbb06fde3974 Stats: 228 lines in 3 files changed: 228 ins; 0 del; 0 mod 8315882: Open some swing tests 2 Reviewed-by: honkar, prr ------------- PR: https://git.openjdk.org/jdk/pull/15850 From achung at openjdk.org Sat Sep 23 05:45:33 2023 From: achung at openjdk.org (Alisen Chung) Date: Sat, 23 Sep 2023 05:45:33 GMT Subject: Integrated: 8316053: Open some swing tests 3 In-Reply-To: References: Message-ID: On Wed, 20 Sep 2023 22:30:04 GMT, Alisen Chung wrote: > Moving tests from closed to open > 8 javax/swing/SwingGraphics/VolatileBackBuffer/MultimonVImage.java > 9 javax/swing/SwingUtilities/4859570/bug4859570.java > 10 javax/swing/SwingUtilities/4936652/bug4936652.java > 11 javax/swing/ToolTipManager/4768127/bug4768127.java This pull request has now been integrated. Changeset: a2391a92 Author: Alisen Chung URL: https://git.openjdk.org/jdk/commit/a2391a92cd09630cc3c46024f7e02924a997cc86 Stats: 415 lines in 4 files changed: 415 ins; 0 del; 0 mod 8316053: Open some swing tests 3 Reviewed-by: dnguyen, prr ------------- PR: https://git.openjdk.org/jdk/pull/15851 From aturbanov at openjdk.org Sat Sep 23 09:28:14 2023 From: aturbanov at openjdk.org (Andrey Turbanov) Date: Sat, 23 Sep 2023 09:28:14 GMT Subject: RFR: 8316389: Open source few AWT applet tests [v4] In-Reply-To: References: <18fnIFEUM9J1uSTp3HXXpEWl55jRkBRmKaaHkuLuY9Y=.059437ba-d9d0-44be-bf02-d3091eaf2d39@github.com> Message-ID: On Wed, 20 Sep 2023 16:55:30 GMT, Alexander Zvegintsev wrote: >> Open sourcing few tests: >> >> java/awt/Frame/FrameRepackTest.java >> java/awt/Frame/FrameResizeTest/FrameResizeTest_1.java >> java/awt/Frame/FrameResizeTest/FrameResizeTest_2.java >> java/awt/Frame/WindowMoveTest.java > > Alexander Zvegintsev has updated the pull request incrementally with one additional commit since the last revision: > > space added test/jdk/java/awt/Frame/FrameRepackTest.java line 46: > 44: */ > 45: > 46: public class FrameRepackTest { Suggestion: public class FrameRepackTest { ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/15787#discussion_r1334949566 From achung at openjdk.org Sun Sep 24 06:12:17 2023 From: achung at openjdk.org (Alisen Chung) Date: Sun, 24 Sep 2023 06:12:17 GMT Subject: RFR: 8316146: Open some swing tests 4 [v2] In-Reply-To: References: Message-ID: <84rFHCxQOmHAKLvYCg9C1Qy8x4ebcdJXAmR9mvncLWs=.d6354e6f-d1df-4405-b749-ea53baae9828@github.com> > Opening closed tests: > 12 javax/swing/ToolTipManager/5078214/bug5078214.java > 13 javax/swing/plaf/basic/BasicMenuItemUI/4239714/bug4239714.java > 14 javax/swing/plaf/basic/BasicMenuUI/4244616/bug4244616.java > 15 javax/swing/plaf/metal/4306431/bug4306431.java Alisen Chung has updated the pull request incrementally with two additional commits since the last revision: - updated tests based on feedback - updated tests ------------- Changes: - all: https://git.openjdk.org/jdk/pull/15875/files - new: https://git.openjdk.org/jdk/pull/15875/files/4e0bf4a3..0a2cb4d6 Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=15875&range=01 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=15875&range=00-01 Stats: 54 lines in 3 files changed: 22 ins; 24 del; 8 mod Patch: https://git.openjdk.org/jdk/pull/15875.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/15875/head:pull/15875 PR: https://git.openjdk.org/jdk/pull/15875 From aturbanov at openjdk.org Sun Sep 24 10:13:03 2023 From: aturbanov at openjdk.org (Andrey Turbanov) Date: Sun, 24 Sep 2023 10:13:03 GMT Subject: RFR: 8316556: Fix typos in java.desktop [v2] In-Reply-To: References: Message-ID: > PR with non-swing changes extracted from initial #14847 Andrey Turbanov has updated the pull request incrementally with one additional commit since the last revision: 8316556: Fix typos in java.desktop ------------- Changes: - all: https://git.openjdk.org/jdk/pull/15773/files - new: https://git.openjdk.org/jdk/pull/15773/files/798a7607..031025c7 Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=15773&range=01 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=15773&range=00-01 Stats: 1 line in 1 file changed: 0 ins; 0 del; 1 mod Patch: https://git.openjdk.org/jdk/pull/15773.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/15773/head:pull/15773 PR: https://git.openjdk.org/jdk/pull/15773 From aivanov at openjdk.org Sun Sep 24 11:40:10 2023 From: aivanov at openjdk.org (Alexey Ivanov) Date: Sun, 24 Sep 2023 11:40:10 GMT Subject: RFR: 8316556: Fix typos in java.desktop [v2] In-Reply-To: References: Message-ID: <_d0zUN-sDtXTYQn-i7EWhnI-x0SF_t8uXP4iJufcGx4=.414e5955-f5cc-4ed5-879a-af12cb475474@github.com> On Sun, 24 Sep 2023 10:13:03 GMT, Andrey Turbanov wrote: >> PR with non-swing changes extracted from initial #14847 > > Andrey Turbanov has updated the pull request incrementally with one additional commit since the last revision: > > 8316556: Fix typos in java.desktop Marked as reviewed by aivanov (Reviewer). ------------- PR Review: https://git.openjdk.org/jdk/pull/15773#pullrequestreview-1641040526 From tr at openjdk.org Mon Sep 25 05:38:32 2023 From: tr at openjdk.org (Tejesh R) Date: Mon, 25 Sep 2023 05:38:32 GMT Subject: Integrated: 8315742: Open source several Swing Scroll related tests In-Reply-To: References: Message-ID: On Wed, 20 Sep 2023 09:38:19 GMT, Tejesh R wrote: > Open sourcing these Swing Scroll related tests: > > javax/swing/JScrollBar/4495822/bug4495822.java > javax/swing/JScrollBar/4696826/bug4696826.java > javax/swing/JScrollBar/4842792/bug4842792.java > javax/swing/JScrollPane/4247092/bug4247092.java > javax/swing/JScrollPane/4264640/bug4264640.java > javax/swing/JScrollPane/4467063/bug4467063.java This pull request has now been integrated. Changeset: f0ff001d Author: Tejesh R URL: https://git.openjdk.org/jdk/commit/f0ff001dd7db33eb492f01cfa08b11705956ebcd Stats: 418 lines in 6 files changed: 418 ins; 0 del; 0 mod 8315742: Open source several Swing Scroll related tests Reviewed-by: dnguyen, psadhukhan ------------- PR: https://git.openjdk.org/jdk/pull/15839 From aturbanov at openjdk.org Mon Sep 25 06:35:20 2023 From: aturbanov at openjdk.org (Andrey Turbanov) Date: Mon, 25 Sep 2023 06:35:20 GMT Subject: Integrated: 8316556: Fix typos in java.desktop In-Reply-To: References: Message-ID: On Sat, 16 Sep 2023 16:22:40 GMT, Andrey Turbanov wrote: > PR with non-swing changes extracted from initial #14847 This pull request has now been integrated. Changeset: 89e068bc Author: Andrey Turbanov URL: https://git.openjdk.org/jdk/commit/89e068bc19b12bb8f4a175fdf979cbe795ac3709 Stats: 196 lines in 81 files changed: 0 ins; 0 del; 196 mod 8316556: Fix typos in java.desktop Reviewed-by: prr, aivanov ------------- PR: https://git.openjdk.org/jdk/pull/15773 From mbaesken at openjdk.org Mon Sep 25 06:47:11 2023 From: mbaesken at openjdk.org (Matthias Baesken) Date: Mon, 25 Sep 2023 06:47:11 GMT Subject: RFR: 8316710: Exclude java/awt/font/Rotate/RotatedTextTest.java In-Reply-To: References: Message-ID: On Fri, 22 Sep 2023 06:20:42 GMT, Christoph Langer wrote: > Exclude java/awt/font/Rotate/RotatedTextTest.java until [JDK-8219641](https://bugs.openjdk.org/browse/JDK-8219641) is fixed. The error shows in several linux installations. Marked as reviewed by mbaesken (Reviewer). ------------- PR Review: https://git.openjdk.org/jdk/pull/15880#pullrequestreview-1641429230 From psadhukhan at openjdk.org Mon Sep 25 07:00:38 2023 From: psadhukhan at openjdk.org (Prasanta Sadhukhan) Date: Mon, 25 Sep 2023 07:00:38 GMT Subject: RFR: 6450193: After the first Serialization, JTableHeader does not uninstall its UI [v4] In-Reply-To: References: Message-ID: > After the first time a JTableHeader is serialized, it no longer will uninstall its UI upon subsequent serializations. > This happens for classes that use the BasicTableHeaderUI class. Any LAF that extends the BasicTableHeaderUI like SynthTableHeaderUI and WindowsTableHeaderUI will get an NotSerializableException thrown > > Each time an JComponent instance is Serialized, a [counter ](https://github.com/openjdk/jdk/blob/218829e0a2a3ae5599b81733df53557966392033/src/java.desktop/share/classes/javax/swing/JComponent.java#L5644-L5645) for the instance is incremented. It is de-incremented in JComponent's writeObject or a class that implements it the same way, like JButton, JScrollPane etc.. > With JTableHeader it does not deincrement the counter. The uninstall mechanism will not uninstall a UI if the counter is not 0 on the first pass..It is not possible to call JComponent.setWriteObjectCounter in JTableHeader as it is not in the same package so the fix is to remove the writeObject implementation and rely on JComponent writeObject implementation to make sure uninstallation of UI happens and also NotSerializableException does not happen for Synth Prasanta Sadhukhan has updated the pull request incrementally with one additional commit since the last revision: tag headful added ------------- Changes: - all: https://git.openjdk.org/jdk/pull/15507/files - new: https://git.openjdk.org/jdk/pull/15507/files/7303c96f..be24f0fa Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=15507&range=03 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=15507&range=02-03 Stats: 2 lines in 1 file changed: 1 ins; 0 del; 1 mod Patch: https://git.openjdk.org/jdk/pull/15507.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/15507/head:pull/15507 PR: https://git.openjdk.org/jdk/pull/15507 From psadhukhan at openjdk.org Mon Sep 25 07:00:40 2023 From: psadhukhan at openjdk.org (Prasanta Sadhukhan) Date: Mon, 25 Sep 2023 07:00:40 GMT Subject: RFR: 6450193: After the first Serialization, JTableHeader does not uninstall its UI [v3] In-Reply-To: References: Message-ID: On Fri, 22 Sep 2023 11:53:30 GMT, Alexey Ivanov wrote: >> Prasanta Sadhukhan has updated the pull request incrementally with one additional commit since the last revision: >> >> try-with-resource use > > test/jdk/javax/swing/JTableHeader/SerializeJTableHeader.java line 55: > >> 53: for (UIManager.LookAndFeelInfo laf : UIManager.getInstalledLookAndFeels()) { >> 54: System.out.println("Testing L&F: " + laf); >> 55: SwingUtilities.invokeAndWait(() -> setLookAndFeel(laf)); > > Why did you choose to set LAF on EDT? You then continue with creating and serialising the component on the main thread. I was not sure if any event processing needs to be done for lookandfeel change particularly native l&f like GTK and Aqua. Seems like it works with both EDT and non-EDT...tried with repeat count 50....so removed EDT usage... however GTK is not supported on headless environment so made the test run on headful environment. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/15507#discussion_r1335456820 From aivanov at openjdk.org Mon Sep 25 10:38:14 2023 From: aivanov at openjdk.org (Alexey Ivanov) Date: Mon, 25 Sep 2023 10:38:14 GMT Subject: RFR: 8316710: Exclude java/awt/font/Rotate/RotatedTextTest.java In-Reply-To: References: Message-ID: On Fri, 22 Sep 2023 06:20:42 GMT, Christoph Langer wrote: > Exclude java/awt/font/Rotate/RotatedTextTest.java until [JDK-8219641](https://bugs.openjdk.org/browse/JDK-8219641) is fixed. The error shows in several linux installations. test/jdk/ProblemList.txt line 472: > 470: > 471: java/awt/font/Rotate/RotatedTextTest.java 8219641 linux-all > 472: Looks good to me, except for its placement: shouldn't it be placed close to other font tests? Shouldn't the list be sorted? Do we always add newly excluded tests to the end of the list? ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/15880#discussion_r1335704518 From aivanov at openjdk.org Mon Sep 25 10:50:15 2023 From: aivanov at openjdk.org (Alexey Ivanov) Date: Mon, 25 Sep 2023 10:50:15 GMT Subject: RFR: 6450193: After the first Serialization, JTableHeader does not uninstall its UI [v4] In-Reply-To: References: Message-ID: On Mon, 25 Sep 2023 07:00:38 GMT, Prasanta Sadhukhan wrote: >> After the first time a JTableHeader is serialized, it no longer will uninstall its UI upon subsequent serializations. >> This happens for classes that use the BasicTableHeaderUI class. Any LAF that extends the BasicTableHeaderUI like SynthTableHeaderUI and WindowsTableHeaderUI will get an NotSerializableException thrown >> >> Each time an JComponent instance is Serialized, a [counter ](https://github.com/openjdk/jdk/blob/218829e0a2a3ae5599b81733df53557966392033/src/java.desktop/share/classes/javax/swing/JComponent.java#L5644-L5645) for the instance is incremented. It is de-incremented in JComponent's writeObject or a class that implements it the same way, like JButton, JScrollPane etc.. >> With JTableHeader it does not deincrement the counter. The uninstall mechanism will not uninstall a UI if the counter is not 0 on the first pass..It is not possible to call JComponent.setWriteObjectCounter in JTableHeader as it is not in the same package so the fix is to remove the writeObject implementation and rely on JComponent writeObject implementation to make sure uninstallation of UI happens and also NotSerializableException does not happen for Synth > > Prasanta Sadhukhan has updated the pull request incrementally with one additional commit since the last revision: > > tag headful added Marked as reviewed by aivanov (Reviewer). ------------- PR Review: https://git.openjdk.org/jdk/pull/15507#pullrequestreview-1641859251 From aivanov at openjdk.org Mon Sep 25 11:24:14 2023 From: aivanov at openjdk.org (Alexey Ivanov) Date: Mon, 25 Sep 2023 11:24:14 GMT Subject: RFR: 6450193: After the first Serialization, JTableHeader does not uninstall its UI [v3] In-Reply-To: References: Message-ID: On Mon, 25 Sep 2023 06:53:49 GMT, Prasanta Sadhukhan wrote: >> test/jdk/javax/swing/JTableHeader/SerializeJTableHeader.java line 55: >> >>> 53: for (UIManager.LookAndFeelInfo laf : UIManager.getInstalledLookAndFeels()) { >>> 54: System.out.println("Testing L&F: " + laf); >>> 55: SwingUtilities.invokeAndWait(() -> setLookAndFeel(laf)); >> >> Why did you choose to set LAF on EDT? You then continue with creating and serialising the component on the main thread. > > I was not sure if any event processing needs to be done for lookandfeel change particularly native l&f like GTK and Aqua. > Seems like it works with both EDT and non-EDT...tried with repeat count 50....so removed EDT usage... > however GTK is not supported on headless environment so made the test run on headful environment. I never thought about it? Yet if there's anything that depends on access to native platform, it probably needs to run on the toolkit thread. I'm for keeping it simpler: if it works correctly on the main thread here, let's keep it this way. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/15507#discussion_r1335747606 From aivanov at openjdk.org Mon Sep 25 11:48:17 2023 From: aivanov at openjdk.org (Alexey Ivanov) Date: Mon, 25 Sep 2023 11:48:17 GMT Subject: RFR: 8316146: Open some swing tests 4 [v2] In-Reply-To: <84rFHCxQOmHAKLvYCg9C1Qy8x4ebcdJXAmR9mvncLWs=.d6354e6f-d1df-4405-b749-ea53baae9828@github.com> References: <84rFHCxQOmHAKLvYCg9C1Qy8x4ebcdJXAmR9mvncLWs=.d6354e6f-d1df-4405-b749-ea53baae9828@github.com> Message-ID: On Sun, 24 Sep 2023 06:12:17 GMT, Alisen Chung wrote: >> Opening closed tests: >> 12 javax/swing/ToolTipManager/5078214/bug5078214.java >> 13 javax/swing/plaf/basic/BasicMenuItemUI/4239714/bug4239714.java >> 14 javax/swing/plaf/basic/BasicMenuUI/4244616/bug4244616.java >> 15 javax/swing/plaf/metal/4306431/bug4306431.java > > Alisen Chung has updated the pull request incrementally with two additional commits since the last revision: > > - updated tests based on feedback > - updated tests test/jdk/javax/swing/BasicMenuItemUI/bug4239714.java line 27: > 25: * @test > 26: * @bug 4239714 > 27: * @summary Tests that BasicMenuItemUI.installComponent() is protected I doubt this test is useful? Wouldn't it be verified with JCK? I had a similar doubt about another case where test used a new method that was added in 1.3.0 or an earlier release. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/15875#discussion_r1335770533 From aivanov at openjdk.org Mon Sep 25 12:40:31 2023 From: aivanov at openjdk.org (Alexey Ivanov) Date: Mon, 25 Sep 2023 12:40:31 GMT Subject: RFR: 8315804: Open source several Swing JTabbedPane JTextArea JTextField tests [v5] In-Reply-To: References: <478CQyCgOlwR8RT1Gyj7-VfD9ELOHiBORo-96yz-UBI=.46cf43f9-bc64-42f0-8545-32493d97d318@github.com> Message-ID: <1ezjs3LS_fn9pw5N3gIZfPZnHdr8I_LJNVPXw6UKLaQ=.c0b08f84-f0a9-48fa-9f86-cfebe7bdb46f@github.com> On Mon, 18 Sep 2023 19:08:48 GMT, Damon Nguyen wrote: >> test/jdk/javax/swing/JTabbedPane/bug4703690.java line 54: >> >>> 52: static volatile boolean focusButtonTwo = false; >>> 53: static volatile boolean switchToTabTwo = false; >>> 54: static volatile boolean focusButtonOne = false; >> >> Assigning the default value is redundant. >> >> Use CountDownLatch instead of boolean values: >> >> >> public void execute() { >> // Create robot >> >> two.requestFocus(); >> >> if (!focusButtonTwo.await(1, TimeUnit.SECONDS)) { >> throw new RuntimeException("Button two didn't receive focus"); >> } >> >> // Switch to tab two >> // do the click >> if (!switchToTabTwo.await(1, TimeUnit.SECONDS)) { >> throw new RuntimeException("Switching to tab two failed"); >> } >> >> // Switch to tab one >> // do the click >> if (!focusButtonOne.await(1, TimeUnit.SECONDS)) { >> throw new RuntimeException("The 'Button 1' button doesn't have focus"); >> } >> } >> >> >> The test completes much faster because there are no unneeded delays. > > The test runs much faster with your changes. Appreciate the advice Proper synchronisation has its benefits, yet implementing it is tiresome in UI tests, that's why we rely on delays. This case was just a perfect example where it's easy to do. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/15747#discussion_r1335829061 From aivanov at openjdk.org Mon Sep 25 13:03:33 2023 From: aivanov at openjdk.org (Alexey Ivanov) Date: Mon, 25 Sep 2023 13:03:33 GMT Subject: RFR: 8316146: Open some swing tests 4 [v2] In-Reply-To: <84rFHCxQOmHAKLvYCg9C1Qy8x4ebcdJXAmR9mvncLWs=.d6354e6f-d1df-4405-b749-ea53baae9828@github.com> References: <84rFHCxQOmHAKLvYCg9C1Qy8x4ebcdJXAmR9mvncLWs=.d6354e6f-d1df-4405-b749-ea53baae9828@github.com> Message-ID: On Sun, 24 Sep 2023 06:12:17 GMT, Alisen Chung wrote: >> Opening closed tests: >> 12 javax/swing/ToolTipManager/5078214/bug5078214.java >> 13 javax/swing/plaf/basic/BasicMenuItemUI/4239714/bug4239714.java >> 14 javax/swing/plaf/basic/BasicMenuUI/4244616/bug4244616.java >> 15 javax/swing/plaf/metal/4306431/bug4306431.java > > Alisen Chung has updated the pull request incrementally with two additional commits since the last revision: > > - updated tests based on feedback > - updated tests Changes requested by aivanov (Reviewer). test/jdk/javax/swing/BasicMenuUI/bug4244616.java line 67: > 65: action.actionPerformed(ev); > 66: } catch (Exception ignored) { > 67: } Are exceptions thrown here? test/jdk/javax/swing/BasicMenuUI/bug4244616.java line 72: > 70: // Restore streams, check results > 71: System.setOut(oldOut); > 72: System.setErr(oldErr); This should be in `finally` block. test/jdk/javax/swing/BasicMenuUI/bug4244616.java line 76: > 74: if (bout.size() != 0 || berr.size() != 0) { > 75: throw new RuntimeException("Failed: some debug output occurred"); > 76: } Does it make sense to output the contents of `bout` and `berr`? test/jdk/javax/swing/LookAndFeel/bug4306431.java line 37: > 35: > 36: public class bug4306431 { > 37: static Font FONT = new Font(Font.MONOSPACED, Font.ITALIC, 24); Suggestion: static final Font FONT = new Font(Font.MONOSPACED, Font.ITALIC, 24); test/jdk/javax/swing/LookAndFeel/bug4306431.java line 48: > 46: } > 47: > 48: static class MetalTheme extends DefaultMetalTheme { I suggest renaming `MetalTheme` to `TestMetalTheme` so that, when you read the main method, you know right away it's not one of the default themes but a custom test theme. test/jdk/javax/swing/ToolTipManager/bug5078214.java line 47: > 45: import javax.swing.JFrame; > 46: import javax.swing.SwingUtilities; > 47: import javax.swing.ToolTipManager; Suggestion: import java.awt.BorderLayout; import java.awt.GraphicsConfiguration; import java.awt.GraphicsDevice; import java.awt.GraphicsEnvironment; import java.awt.Insets; import java.awt.Point; import java.awt.Rectangle; import java.awt.Toolkit; import java.awt.Window; import java.awt.event.MouseEvent; import javax.swing.JButton; import javax.swing.JFrame; import javax.swing.SwingUtilities; import javax.swing.ToolTipManager; Imports should be sorted. Your IDE will do it for you. `java.awt.event.MouseEvent` should go after `java.awt.Window` rather than `java.awt.BorderLayout`. test/jdk/javax/swing/ToolTipManager/bug5078214.java line 63: > 61: getLocalGraphicsEnvironment(); > 62: GraphicsDevice[] gs = ge.getScreenDevices(); > 63: GraphicsConfiguration testGraphics = null; Suggestion: GraphicsConfiguration testGraphicsConfig = null; The name `testGraphics` suggests you're about to test `Graphics` object. I would suggest moving the code which determines the `GraphicsConfiguration` to test into a helper method. And this helper method can safely be run on the main thread. test/jdk/javax/swing/ToolTipManager/bug5078214.java line 69: > 67: gd.getConfigurations(); > 68: for (int i = 0; i < gc.length; i++) { > 69: insets = Toolkit.getDefaultToolkit().getScreenInsets(gc[i]); Shouldn't it use the default configuration of the graphics device? The test does nothing to activate a configuration. test/jdk/javax/swing/ToolTipManager/bug5078214.java line 111: > 109: test(bounds, insets); > 110: r.waitForIdle(); > 111: r.delay(1000); Any delays after you verified the condition for failure make no sense ? the value of `passed` will not change, remove all the delays after `test`. test/jdk/javax/swing/ToolTipManager/bug5078214.java line 126: > 124: > 125: public static void test(Rectangle b, Insets i) { > 126: r.delay(500); There was a delay of 1,000 milliseconds just before calling `test`, isn't it enough? test/jdk/javax/swing/ToolTipManager/bug5078214.java line 128: > 126: r.delay(500); > 127: ToolTipManager.sharedInstance().setLightWeightPopupEnabled(false); > 128: ToolTipManager.sharedInstance().setInitialDelay(100); Shouldn't `ToolTipManager` be accessed on EDT? Since you [_?agreed to keep components on EDT?_](https://github.com/openjdk/jdk/pull/15755#discussion_r1329183236) (according to @DamonGuy), `mainFrame.getOwnedWindows()` should also be called on EDT. test/jdk/javax/swing/ToolTipManager/bug5078214.java line 136: > 134: passed = true; > 135: return; > 136: } To me, this is a failure. Perhaps, delay of 2 seconds is too long. You explicitly set the tooltip delay to 100ms, so the tooltip should display in about this time. Waiting 2 seconds could lead to the tooltip being hidden. test/jdk/javax/swing/ToolTipManager/bug5078214.java line 143: > 141: // Position is Ok! > 142: passed = true; > 143: } Suggestion: passed = (wy < (b.y + b.height - i.bottom)); ------------- PR Review: https://git.openjdk.org/jdk/pull/15875#pullrequestreview-1641966312 PR Review Comment: https://git.openjdk.org/jdk/pull/15875#discussion_r1335782224 PR Review Comment: https://git.openjdk.org/jdk/pull/15875#discussion_r1335783253 PR Review Comment: https://git.openjdk.org/jdk/pull/15875#discussion_r1335785236 PR Review Comment: https://git.openjdk.org/jdk/pull/15875#discussion_r1335786014 PR Review Comment: https://git.openjdk.org/jdk/pull/15875#discussion_r1335790095 PR Review Comment: https://git.openjdk.org/jdk/pull/15875#discussion_r1335809266 PR Review Comment: https://git.openjdk.org/jdk/pull/15875#discussion_r1335794251 PR Review Comment: https://git.openjdk.org/jdk/pull/15875#discussion_r1335795417 PR Review Comment: https://git.openjdk.org/jdk/pull/15875#discussion_r1335804959 PR Review Comment: https://git.openjdk.org/jdk/pull/15875#discussion_r1335812715 PR Review Comment: https://git.openjdk.org/jdk/pull/15875#discussion_r1335814806 PR Review Comment: https://git.openjdk.org/jdk/pull/15875#discussion_r1335835680 PR Review Comment: https://git.openjdk.org/jdk/pull/15875#discussion_r1335854527 From clanger at openjdk.org Mon Sep 25 13:32:15 2023 From: clanger at openjdk.org (Christoph Langer) Date: Mon, 25 Sep 2023 13:32:15 GMT Subject: RFR: 8316710: Exclude java/awt/font/Rotate/RotatedTextTest.java In-Reply-To: References: Message-ID: On Mon, 25 Sep 2023 10:35:21 GMT, Alexey Ivanov wrote: >> Exclude java/awt/font/Rotate/RotatedTextTest.java until [JDK-8219641](https://bugs.openjdk.org/browse/JDK-8219641) is fixed. The error shows in several linux installations. > > test/jdk/ProblemList.txt line 472: > >> 470: >> 471: java/awt/font/Rotate/RotatedTextTest.java 8219641 linux-all >> 472: > > Looks good to me, except for its placement: shouldn't it be placed close to other font tests? Shouldn't the list be sorted? > > Do we always add newly excluded tests to the end of the list? You are right, it all seems a bit unordered. If you like, I could place it next to line 221 or 416 where other java/awt/font tests are excluded. Not sure what the rule is but it seems like it's at least not alphabetically ordered. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/15880#discussion_r1335892489 From aivanov at openjdk.org Mon Sep 25 14:18:15 2023 From: aivanov at openjdk.org (Alexey Ivanov) Date: Mon, 25 Sep 2023 14:18:15 GMT Subject: RFR: 8316710: Exclude java/awt/font/Rotate/RotatedTextTest.java In-Reply-To: References: Message-ID: On Mon, 25 Sep 2023 13:29:09 GMT, Christoph Langer wrote: >> test/jdk/ProblemList.txt line 472: >> >>> 470: >>> 471: java/awt/font/Rotate/RotatedTextTest.java 8219641 linux-all >>> 472: >> >> Looks good to me, except for its placement: shouldn't it be placed close to other font tests? Shouldn't the list be sorted? >> >> Do we always add newly excluded tests to the end of the list? > > You are right, it all seems a bit unordered. If you like, I could place it next to line 221 or 416 where other java/awt/font tests are excluded. Not sure what the rule is but it seems like it's at least not alphabetically ordered. I couldn't find any best practices for problem-listing. Yet keeping tests in the same area closer seems like a good idea to me. Either line is fine with me. Thanks. I started an internal discussion in clientlibs to see whether there are any conventions. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/15880#discussion_r1335954188 From azvegint at openjdk.org Mon Sep 25 15:27:15 2023 From: azvegint at openjdk.org (Alexander Zvegintsev) Date: Mon, 25 Sep 2023 15:27:15 GMT Subject: RFR: 8316389: Open source few AWT applet tests [v5] In-Reply-To: <18fnIFEUM9J1uSTp3HXXpEWl55jRkBRmKaaHkuLuY9Y=.059437ba-d9d0-44be-bf02-d3091eaf2d39@github.com> References: <18fnIFEUM9J1uSTp3HXXpEWl55jRkBRmKaaHkuLuY9Y=.059437ba-d9d0-44be-bf02-d3091eaf2d39@github.com> Message-ID: > Open sourcing few tests: > > java/awt/Frame/FrameRepackTest.java > java/awt/Frame/FrameResizeTest/FrameResizeTest_1.java > java/awt/Frame/FrameResizeTest/FrameResizeTest_2.java > java/awt/Frame/WindowMoveTest.java Alexander Zvegintsev has updated the pull request incrementally with one additional commit since the last revision: space removed ------------- Changes: - all: https://git.openjdk.org/jdk/pull/15787/files - new: https://git.openjdk.org/jdk/pull/15787/files/57cfd0bd..ff3f23ea Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=15787&range=04 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=15787&range=03-04 Stats: 1 line in 1 file changed: 0 ins; 0 del; 1 mod Patch: https://git.openjdk.org/jdk/pull/15787.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/15787/head:pull/15787 PR: https://git.openjdk.org/jdk/pull/15787 From aivanov at openjdk.org Mon Sep 25 15:38:26 2023 From: aivanov at openjdk.org (Alexey Ivanov) Date: Mon, 25 Sep 2023 15:38:26 GMT Subject: RFR: 8316389: Open source few AWT applet tests [v4] In-Reply-To: References: <18fnIFEUM9J1uSTp3HXXpEWl55jRkBRmKaaHkuLuY9Y=.059437ba-d9d0-44be-bf02-d3091eaf2d39@github.com> Message-ID: On Wed, 20 Sep 2023 16:55:30 GMT, Alexander Zvegintsev wrote: >> Open sourcing few tests: >> >> java/awt/Frame/FrameRepackTest.java >> java/awt/Frame/FrameResizeTest/FrameResizeTest_1.java >> java/awt/Frame/FrameResizeTest/FrameResizeTest_2.java >> java/awt/Frame/WindowMoveTest.java > > Alexander Zvegintsev has updated the pull request incrementally with one additional commit since the last revision: > > space added Do we add `@Override` annotations? test/jdk/java/awt/Frame/FrameRepackTest.java line 53: > 51: The menu has two items, labelled 'visible' and 'not visible'. > 52: The frame also contains a red panel that contains two line labels, > 53: ' This panel is always displayed' and ' it is a test'. Suggestion: 'This panel is always displayed' and 'it is a test'. test/jdk/java/awt/Frame/FrameRepackTest.java line 64: > 62: You can repeatedly add and remove the second panel in this way. > 63: After such an addition or removal, the frame's location on the screen > 64: should not have changed, while the size changes to accommodate Suggestion: should not change, while the size changes to accommodate It's happening now, during the test. test/jdk/java/awt/Frame/FrameRepackTest.java line 116: > 114: Menu flip = new Menu("Flip"); > 115: MenuItem mi; > 116: flip.addSeparator(); The separator as the first item in a drop-down menu looks weird and confusing, I propose removing it. test/jdk/java/awt/Frame/FrameRepackTest.java line 134: > 132: north.setLayout(new BorderLayout(2, 2)); > 133: north.add("North", new Label(" This panel is always displayed")); > 134: north.add("Center", new Label(" it is a test ")); Suggestion: north.add("North", new Label("This panel is always displayed")); north.add("Center", new Label("it is a test ")); Is the space used to offset the text from the edge? test/jdk/java/awt/Frame/FrameRepackTest.java line 169: > 167: south.setVisible(true); > 168: pack(); > 169: setVisible(true); Nothing should change if you remove `setVisible(true)` here, the frame is never hidden, is it? test/jdk/java/awt/Frame/FrameResizeTest/FrameResizeTest_1.java line 45: > 43: To the right of this frame is an all-white 200x200 frame. > 44: > 45: This is actually a white canvas component of the frame. Suggestion: This is actually a white canvas component in the frame. test/jdk/java/awt/Frame/FrameResizeTest/FrameResizeTest_1.java line 48: > 46: The frame itself is red. > 47: The red should never show. > 48: In particular, after you resize the frame, you should see all white and no red. If I resize the frame quickly, I see some areas in red, I guess it's expected? test/jdk/java/awt/Frame/FrameResizeTest/FrameResizeTest_1.java line 62: > 60: .build(); > 61: > 62: SwingUtilities.invokeAndWait(() -> { Suggestion: EventQueue.invokeAndWait(() -> { Using `EventQueue` is more appropriate for AWT components. test/jdk/java/awt/Frame/FrameResizeTest/FrameResizeTest_2.java line 95: > 93: > 94: Container dumbc = new DumbC(); > 95: add( dumbc, c ); Suggestion: add(dumbc, c); test/jdk/java/awt/Frame/FrameResizeTest/FrameResizeTest_2.java line 98: > 96: > 97: Panel dump = new DumbPanel(); > 98: add( dump, c ); Suggestion: add(dump, c); test/jdk/java/awt/Frame/FrameResizeTest/FrameResizeTest_2.java line 100: > 98: add( dump, c ); > 99: > 100: setSize( new Dimension( 300, 300)); Suggestion: setSize(new Dimension(300, 300)); or directly `(300, 300)` without creating the `Dimension` object. test/jdk/java/awt/Frame/WindowMoveTest.java line 56: > 54: frame.dispatchEvent(new WindowEvent(frame, WindowEvent.WINDOW_CLOSING))); > 55: > 56: WindowMove.latch.await(); Add a timeout for `await` just in case? However, jtreg will also handle timeout. test/jdk/java/awt/Frame/WindowMoveTest.java line 69: > 67: > 68: static CountDownLatch latch = new CountDownLatch(1); > 69: static volatile String failMessage = null; It does not need to be `volatile`, using the latch establishes the _happens before_ relation between the EDT and the main thread. ------------- PR Review: https://git.openjdk.org/jdk/pull/15787#pullrequestreview-1642316127 PR Review Comment: https://git.openjdk.org/jdk/pull/15787#discussion_r1335980344 PR Review Comment: https://git.openjdk.org/jdk/pull/15787#discussion_r1336031064 PR Review Comment: https://git.openjdk.org/jdk/pull/15787#discussion_r1336032622 PR Review Comment: https://git.openjdk.org/jdk/pull/15787#discussion_r1336035280 PR Review Comment: https://git.openjdk.org/jdk/pull/15787#discussion_r1336038451 PR Review Comment: https://git.openjdk.org/jdk/pull/15787#discussion_r1336042208 PR Review Comment: https://git.openjdk.org/jdk/pull/15787#discussion_r1336043985 PR Review Comment: https://git.openjdk.org/jdk/pull/15787#discussion_r1336045648 PR Review Comment: https://git.openjdk.org/jdk/pull/15787#discussion_r1336047171 PR Review Comment: https://git.openjdk.org/jdk/pull/15787#discussion_r1336047580 PR Review Comment: https://git.openjdk.org/jdk/pull/15787#discussion_r1336048137 PR Review Comment: https://git.openjdk.org/jdk/pull/15787#discussion_r1336060409 PR Review Comment: https://git.openjdk.org/jdk/pull/15787#discussion_r1336057460 From aivanov at openjdk.org Mon Sep 25 15:38:31 2023 From: aivanov at openjdk.org (Alexey Ivanov) Date: Mon, 25 Sep 2023 15:38:31 GMT Subject: RFR: 8316389: Open source few AWT applet tests [v5] In-Reply-To: References: <18fnIFEUM9J1uSTp3HXXpEWl55jRkBRmKaaHkuLuY9Y=.059437ba-d9d0-44be-bf02-d3091eaf2d39@github.com> Message-ID: On Mon, 25 Sep 2023 15:27:15 GMT, Alexander Zvegintsev wrote: >> Open sourcing few tests: >> >> java/awt/Frame/FrameRepackTest.java >> java/awt/Frame/FrameResizeTest/FrameResizeTest_1.java >> java/awt/Frame/FrameResizeTest/FrameResizeTest_2.java >> java/awt/Frame/WindowMoveTest.java > > Alexander Zvegintsev has updated the pull request incrementally with one additional commit since the last revision: > > space removed test/jdk/java/awt/Frame/FrameResizeTest/FrameResizeTest_2.java line 87: > 85: super("FrameResize_2"); > 86: > 87: setLayout( new GridBagLayout() ); Suggestion: setLayout(new GridBagLayout()); test/jdk/java/awt/Frame/FrameResizeTest/FrameResizeTest_2.java line 94: > 92: c.weighty = 1; > 93: > 94: Container dumbc = new DumbC(); Maybe change names of `dumbc` and `dump` to `container` and `panel`? test/jdk/java/awt/Frame/FrameResizeTest/FrameResizeTest_2.java line 118: > 116: } > 117: > 118: class DumbC extends Container { Suggestion: class DumbContainer extends Container { Similarly, to `DumbPanel`? ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/15787#discussion_r1336063216 PR Review Comment: https://git.openjdk.org/jdk/pull/15787#discussion_r1336065512 PR Review Comment: https://git.openjdk.org/jdk/pull/15787#discussion_r1336064508 From achung at openjdk.org Mon Sep 25 15:48:11 2023 From: achung at openjdk.org (Alisen Chung) Date: Mon, 25 Sep 2023 15:48:11 GMT Subject: RFR: 8316371: Open some swing tests 6 [v2] In-Reply-To: References: Message-ID: > Opening some closed tests: > 20 javax/swing/plaf/windows/4736093/bug4736093.java > 21 javax/swing/table/DefaultTableCellRenderer/4240870/bug4240870.java > 22 javax/swing/table/JTableHeader/4243927/bug4243927.java > 23 javax/swing/text/AbstractDocument/4549069/bug4549069.java > 24 javax/swing/text/AbstractWriter/4185537/bug4185537.java Alisen Chung has updated the pull request incrementally with one additional commit since the last revision: remove unused var ------------- Changes: - all: https://git.openjdk.org/jdk/pull/15873/files - new: https://git.openjdk.org/jdk/pull/15873/files/4bf1fdc7..971b9b9a Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=15873&range=01 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=15873&range=00-01 Stats: 5 lines in 1 file changed: 0 ins; 5 del; 0 mod Patch: https://git.openjdk.org/jdk/pull/15873.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/15873/head:pull/15873 PR: https://git.openjdk.org/jdk/pull/15873 From aivanov at openjdk.org Mon Sep 25 16:47:23 2023 From: aivanov at openjdk.org (Alexey Ivanov) Date: Mon, 25 Sep 2023 16:47:23 GMT Subject: RFR: 8316211: Open source several manual applet tests [v3] In-Reply-To: References: <76b2-b6qr-MNBiDvTuZYs1bKZAbC21UMhoFxTZDJAGc=.2af94b7b-2a4d-4724-a08a-08a162ef1d4c@github.com> Message-ID: <1v8n1a0RfNUgmZ__k1khLNQ6_ylijPi_3Y1CX81gx3Y=.3afd8b26-8982-4ca1-8684-e372a7db7c46@github.com> On Fri, 22 Sep 2023 15:43:18 GMT, Alexander Zvegintsev wrote: >> Open sourcing several manual applet tests >> >> >> test/jdk/java/awt/Frame/DefaultSizeTest.java >> test/jdk/java/awt/LightweightComponent/LightweightCliprect.java >> test/jdk/java/awt/event/KeyEvent/FunctionKeyTest.java >> test/jdk/javax/swing/JFrame/DefaultCloseOperation.java > > Alexander Zvegintsev has updated the pull request incrementally with one additional commit since the last revision: > > review comments test/jdk/java/awt/Frame/DefaultSizeTest.java line 42: > 40: and should be the minimum size allowed by the window manager. > 41: For any WM, the frame should be very small. > 42: When the test is complete, click Pass or Fail as appropriate. I guess we can't determine the minimum size, yet it's a bit confusing. Reading [JDK-4033151](https://bugs.openjdk.org/browse/JDK-4033151) reveals the frame remained invisible on Solaris 2.5 and appeared in virtual desktop with a large size. Being more specific could still help: If the frame is not large, click Pass or Fail otherwise. This test would benefit from screenshots. test/jdk/java/awt/Frame/DefaultSizeTest.java line 55: > 53: .build(); > 54: > 55: SwingUtilities.invokeAndWait(() -> { Suggestion: EventQueue.invokeAndWait(() -> { Using `EventQueue` is more appropriate for AWT components. test/jdk/java/awt/LightweightComponent/LightweightCliprect.java line 47: > 45: private static final String INSTRUCTIONS = """ > 46: If some text is drawn outside the red rectangle press "Fail" button. > 47: Otherwise press "Pass" button. Suggestion: If some text is drawn outside the red rectangle, press "Fail" button. Otherwise, press "Pass" button. test/jdk/java/awt/LightweightComponent/LightweightCliprect.java line 87: > 85: g.fillRect(20, 20, 400, 200); > 86: Rectangle clip; > 87: clip = g.getClipBounds(); Suggestion: Rectangle clip = g.getClipBounds(); Since this object is used to restore the clip, using `g.getClip()` is better ? you'll restore the clip to its original value. The `Shape` could be non-rectangular, or it could consist of several rectangles which don't intersect. test/jdk/javax/swing/JFrame/DefaultCloseOperation.java line 1: > 1: /* I wonder if this test can be automated? On Windows, one could use `Alt+F4` or close the window using robot. On macOS, the close button is also available but it's on the left of the window. On Linux, it's close to impossible because of different window managers. test/jdk/javax/swing/JFrame/DefaultCloseOperation.java line 48: > 46: public class DefaultCloseOperation extends JPanel { > 47: private static final String INSTRUCTIONS = """ > 48: This is a manual test (requires user interaction) which tests the I guess the instructions should be amended so that it is clear what is required from the tester. ?To run this test, do the following steps?? could be replaced with ?Do (Perform) the following steps??. jtreg automatically handles exceptions, it will fail there's an unhandled exception in the test. test/jdk/javax/swing/JFrame/DefaultCloseOperation.java line 78: > 76: - Select "Dispose" from the "JDialog Default Close Operation" ComboBox > 77: - On the TestDialog, select "Close" from the system menu (the window should go away) > 78: """; I guess this test should disable Pass and Fail buttons. The Fail button should remain disabled: the test will fail automatically. Yet the Pass button may always be enabled, or it could be enabled only after the tester cycles through all the scenarios. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/15827#discussion_r1336079278 PR Review Comment: https://git.openjdk.org/jdk/pull/15827#discussion_r1336074132 PR Review Comment: https://git.openjdk.org/jdk/pull/15827#discussion_r1336080349 PR Review Comment: https://git.openjdk.org/jdk/pull/15827#discussion_r1336083937 PR Review Comment: https://git.openjdk.org/jdk/pull/15827#discussion_r1336149065 PR Review Comment: https://git.openjdk.org/jdk/pull/15827#discussion_r1336123609 PR Review Comment: https://git.openjdk.org/jdk/pull/15827#discussion_r1336145672 From aivanov at openjdk.org Mon Sep 25 16:53:16 2023 From: aivanov at openjdk.org (Alexey Ivanov) Date: Mon, 25 Sep 2023 16:53:16 GMT Subject: RFR: 8313403: Remove unused 'mask' field from JFormattedTextField In-Reply-To: References: <4fl_xrqZnBAxg014rvHQuI_7K-YP2QouKSzr76fcOX4=.2823965d-9be5-4b9d-ab02-038658b3469c@github.com> Message-ID: On Wed, 20 Sep 2023 20:05:01 GMT, Phil Race wrote: > Swing isn't serializable across releases, so I see no need for a CSR. Thank you. That's what I thought. ------------- PR Comment: https://git.openjdk.org/jdk/pull/15088#issuecomment-1734125157 From serb at openjdk.org Mon Sep 25 17:12:55 2023 From: serb at openjdk.org (Sergey Bylokhov) Date: Mon, 25 Sep 2023 17:12:55 GMT Subject: RFR: 8312191: ColorConvertOp.filter for the default destination is too slow [v2] In-Reply-To: References: Message-ID: > I have found that MTPerLineTransformValidation - one of our slowest stress test spends most of the time not in the code related to the colors conversion(as it was intended) but in the initialization of the native cmm-transforms. > > > ColorConvertOp sharedOp = new ColorConvertOp(srcCS, dstCS, null); <-- slow > BufferedImage dst = sharedOp.filter(src, null); > > > The code above triggers the next sequence: > 1. The destination buffered image is not set so it should be created [automatically](https://github.com/openjdk/jdk/blob/master/src/java.desktop/share/classes/java/awt/image/ColorConvertOp.java#L551) ->> > 2. The buffered image requires the new color [model](https://github.com/openjdk/jdk/blob/master/src/java.desktop/share/classes/java/awt/image/ColorConvertOp.java#L588) ->> > 3. The color model requires new color [space](https://github.com/openjdk/jdk/blob/master/src/java.desktop/share/classes/java/awt/image/ColorConvertOp.java#L563) ->> > 4. The color model initialize some [LUTs](https://github.com/openjdk/jdk/blob/master/src/java.desktop/share/classes/java/awt/image/ColorModel.java#L1816), **and cache it per color space** ->> > 5. When the ColorConvertOp is used for the first time the color space caches some state internally if the format of the src/dst image is not changed > > So the critical thing above is to minimize the creation of the new color spaces, since for each new space all optimizations above should be repeated. Unfortunately, when we create the ColorConvertOp using standard icc_profile/icc_colorspace we store the profile only and [lost](https://github.com/openjdk/jdk/blob/master/src/java.desktop/share/classes/java/awt/image/ColorConvertOp.java#L150) the reference to the initial color space. And when later we decide to create a color model we create the new icc_color space->all optimizations resets. > > We do not save the reference to the color space because that way we distinguish the icc_colorspace saved using profiles, and non-icc_color spaces used as is. I think all that code should be reworked to take into account the current issue. But for now, we can fix it at least for standard types. > > **Important notes**: > * Performance of MTPerLineTransformValidation test is increased(on my system from 3m30s to the 14s) - the number of used native transforms changed from 80000 to ~500. It can have a side effect since a few crashes(exit code 134) were reported for this test. The crashes of this test and others may disappear since the memory pressure is decreased, o... 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 three additional commits since the last revision: - Merge branch 'master' into JDK-8312191 - Merge remote-tracking branch 'upstream/master' into JDK-8312191 - 8312191: ColorConvertOp.filter for the default destination is too slow ------------- Changes: - all: https://git.openjdk.org/jdk/pull/14910/files - new: https://git.openjdk.org/jdk/pull/14910/files/eeb6b4a6..2cb96be8 Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=14910&range=01 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=14910&range=00-01 Stats: 190879 lines in 4799 files changed: 92024 ins; 47575 del; 51280 mod Patch: https://git.openjdk.org/jdk/pull/14910.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/14910/head:pull/14910 PR: https://git.openjdk.org/jdk/pull/14910 From azvegint at openjdk.org Mon Sep 25 17:21:13 2023 From: azvegint at openjdk.org (Alexander Zvegintsev) Date: Mon, 25 Sep 2023 17:21:13 GMT Subject: RFR: 8316389: Open source few AWT applet tests [v6] In-Reply-To: <18fnIFEUM9J1uSTp3HXXpEWl55jRkBRmKaaHkuLuY9Y=.059437ba-d9d0-44be-bf02-d3091eaf2d39@github.com> References: <18fnIFEUM9J1uSTp3HXXpEWl55jRkBRmKaaHkuLuY9Y=.059437ba-d9d0-44be-bf02-d3091eaf2d39@github.com> Message-ID: > Open sourcing few tests: > > java/awt/Frame/FrameRepackTest.java > java/awt/Frame/FrameResizeTest/FrameResizeTest_1.java > java/awt/Frame/FrameResizeTest/FrameResizeTest_2.java > java/awt/Frame/WindowMoveTest.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/15787/files - new: https://git.openjdk.org/jdk/pull/15787/files/ff3f23ea..d5f7164c Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=15787&range=05 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=15787&range=04-05 Stats: 27 lines in 4 files changed: 6 ins; 3 del; 18 mod Patch: https://git.openjdk.org/jdk/pull/15787.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/15787/head:pull/15787 PR: https://git.openjdk.org/jdk/pull/15787 From azvegint at openjdk.org Mon Sep 25 17:21:18 2023 From: azvegint at openjdk.org (Alexander Zvegintsev) Date: Mon, 25 Sep 2023 17:21:18 GMT Subject: RFR: 8316389: Open source few AWT applet tests [v4] In-Reply-To: References: <18fnIFEUM9J1uSTp3HXXpEWl55jRkBRmKaaHkuLuY9Y=.059437ba-d9d0-44be-bf02-d3091eaf2d39@github.com> Message-ID: <6wqT78oly1lZqPMGI28aL-_-US2FlQlzYHxjVvAJyss=.e7e7405e-08c8-4707-b7e5-bd15335e0f37@github.com> On Mon, 25 Sep 2023 15:12:27 GMT, Alexey Ivanov wrote: >> Alexander Zvegintsev has updated the pull request incrementally with one additional commit since the last revision: >> >> space added > > test/jdk/java/awt/Frame/FrameRepackTest.java line 134: > >> 132: north.setLayout(new BorderLayout(2, 2)); >> 133: north.add("North", new Label(" This panel is always displayed")); >> 134: north.add("Center", new Label(" it is a test ")); > > Suggestion: > > north.add("North", new Label("This panel is always displayed")); > north.add("Center", new Label("it is a test ")); > > Is the space used to offset the text from the edge? No idea. So removed. > test/jdk/java/awt/Frame/FrameRepackTest.java line 169: > >> 167: south.setVisible(true); >> 168: pack(); >> 169: setVisible(true); > > Nothing should change if you remove `setVisible(true)` here, the frame is never hidden, is it? Sure, removed. > test/jdk/java/awt/Frame/FrameResizeTest/FrameResizeTest_1.java line 48: > >> 46: The frame itself is red. >> 47: The red should never show. >> 48: In particular, after you resize the frame, you should see all white and no red. > > If I resize the frame quickly, I see some areas in red, I guess it's expected? Updated the instructions slightly to reflect this. > test/jdk/java/awt/Frame/FrameResizeTest/FrameResizeTest_1.java line 62: > >> 60: .build(); >> 61: >> 62: SwingUtilities.invokeAndWait(() -> { > > Suggestion: > > EventQueue.invokeAndWait(() -> { > > Using `EventQueue` is more appropriate for AWT components. This particular case also uses the JFrame from PassFailJFrame. So I used the Swing variant here (which uses EventQueue.invokeAndWait internally). > test/jdk/java/awt/Frame/WindowMoveTest.java line 56: > >> 54: frame.dispatchEvent(new WindowEvent(frame, WindowEvent.WINDOW_CLOSING))); >> 55: >> 56: WindowMove.latch.await(); > > Add a timeout for `await` just in case? However, jtreg will also handle timeout. Yes, the original idea was that jtreg was responsible for the timeout. Changed it to a smaller timeout. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/15787#discussion_r1336155065 PR Review Comment: https://git.openjdk.org/jdk/pull/15787#discussion_r1336153641 PR Review Comment: https://git.openjdk.org/jdk/pull/15787#discussion_r1336179241 PR Review Comment: https://git.openjdk.org/jdk/pull/15787#discussion_r1336152307 PR Review Comment: https://git.openjdk.org/jdk/pull/15787#discussion_r1336142471 From azvegint at openjdk.org Mon Sep 25 17:21:21 2023 From: azvegint at openjdk.org (Alexander Zvegintsev) Date: Mon, 25 Sep 2023 17:21:21 GMT Subject: RFR: 8316389: Open source few AWT applet tests [v5] In-Reply-To: References: <18fnIFEUM9J1uSTp3HXXpEWl55jRkBRmKaaHkuLuY9Y=.059437ba-d9d0-44be-bf02-d3091eaf2d39@github.com> Message-ID: <93iolXpjMY7ZTHrx-Uqkxxi8eC7S_5xEIXidBx_U3dE=.2fb38d2e-d860-40d7-8422-92ca89423a56@github.com> On Mon, 25 Sep 2023 15:35:03 GMT, Alexey Ivanov wrote: >> Alexander Zvegintsev has updated the pull request incrementally with one additional commit since the last revision: >> >> space removed > > test/jdk/java/awt/Frame/FrameResizeTest/FrameResizeTest_2.java line 94: > >> 92: c.weighty = 1; >> 93: >> 94: Container dumbc = new DumbC(); > > Maybe change names of `dumbc` and `dump` to `container` and `panel`? changed to `dumbContainer` and `dumbPanel` ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/15787#discussion_r1336143838 From aivanov at openjdk.org Mon Sep 25 17:29:15 2023 From: aivanov at openjdk.org (Alexey Ivanov) Date: Mon, 25 Sep 2023 17:29:15 GMT Subject: RFR: 8316389: Open source few AWT applet tests [v4] In-Reply-To: <6wqT78oly1lZqPMGI28aL-_-US2FlQlzYHxjVvAJyss=.e7e7405e-08c8-4707-b7e5-bd15335e0f37@github.com> References: <18fnIFEUM9J1uSTp3HXXpEWl55jRkBRmKaaHkuLuY9Y=.059437ba-d9d0-44be-bf02-d3091eaf2d39@github.com> <6wqT78oly1lZqPMGI28aL-_-US2FlQlzYHxjVvAJyss=.e7e7405e-08c8-4707-b7e5-bd15335e0f37@github.com> Message-ID: On Mon, 25 Sep 2023 16:48:51 GMT, Alexander Zvegintsev wrote: >> test/jdk/java/awt/Frame/FrameRepackTest.java line 134: >> >>> 132: north.setLayout(new BorderLayout(2, 2)); >>> 133: north.add("North", new Label(" This panel is always displayed")); >>> 134: north.add("Center", new Label(" it is a test ")); >> >> Suggestion: >> >> north.add("North", new Label("This panel is always displayed")); >> north.add("Center", new Label("it is a test ")); >> >> Is the space used to offset the text from the edge? > > No idea. So removed. Yeah, it was it. Now the text is flushed to the left. Fine either way. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/15787#discussion_r1336191016 From dnguyen at openjdk.org Mon Sep 25 17:51:23 2023 From: dnguyen at openjdk.org (Damon Nguyen) Date: Mon, 25 Sep 2023 17:51:23 GMT Subject: RFR: 8316218: Open some swing tests 5 In-Reply-To: <5ZuZUU2La8JTcNSHH8Wt-ERWlcc1zizN5JwuiUijKyo=.59c442ff-a1ef-44eb-95d0-a41138ec1163@github.com> References: <5ZuZUU2La8JTcNSHH8Wt-ERWlcc1zizN5JwuiUijKyo=.59c442ff-a1ef-44eb-95d0-a41138ec1163@github.com> Message-ID: On Thu, 21 Sep 2023 21:36:52 GMT, Alisen Chung wrote: > Opening some swing tests: > 16 javax/swing/plaf/metal/MetalBorders/4290656/bug4290656.java > 17 javax/swing/plaf/metal/MetalInternalFrameTitlePane/4221007/bug4221007.java > 18 javax/swing/plaf/metal/isJavaLAFLockedCorrectly/isJavaLAFLockedCorrectly.java > 19 javax/swing/plaf/multi/isMultiLAFLockedCorrectly/isMultiLAFLockedCorrectly.java Marked as reviewed by dnguyen (Committer). ------------- PR Review: https://git.openjdk.org/jdk/pull/15872#pullrequestreview-1642689286 From aivanov at openjdk.org Mon Sep 25 17:51:34 2023 From: aivanov at openjdk.org (Alexey Ivanov) Date: Mon, 25 Sep 2023 17:51:34 GMT Subject: RFR: 8316389: Open source few AWT applet tests [v6] In-Reply-To: References: <18fnIFEUM9J1uSTp3HXXpEWl55jRkBRmKaaHkuLuY9Y=.059437ba-d9d0-44be-bf02-d3091eaf2d39@github.com> Message-ID: <32pgq_k8HL1B4XCghDaGkHm4LxPYolzSHy2qyDw7KT8=.03096530-8de0-4278-9045-9f52e8c016e1@github.com> On Mon, 25 Sep 2023 17:21:13 GMT, Alexander Zvegintsev wrote: >> Open sourcing few tests: >> >> java/awt/Frame/FrameRepackTest.java >> java/awt/Frame/FrameResizeTest/FrameResizeTest_1.java >> java/awt/Frame/FrameResizeTest/FrameResizeTest_2.java >> java/awt/Frame/WindowMoveTest.java > > Alexander Zvegintsev has updated the pull request incrementally with one additional commit since the last revision: > > review comments Marked as reviewed by aivanov (Reviewer). test/jdk/java/awt/Frame/WindowMoveTest.java line 57: > 55: frame.dispatchEvent(new WindowEvent(frame, WindowEvent.WINDOW_CLOSING))); > 56: > 57: if (!WindowMove.latch.await(10, TimeUnit.SECONDS)) { I think 10 seconds is too long? We usually use 2 seconds for various delays. ------------- PR Review: https://git.openjdk.org/jdk/pull/15787#pullrequestreview-1642681652 PR Review Comment: https://git.openjdk.org/jdk/pull/15787#discussion_r1336198201 From aivanov at openjdk.org Mon Sep 25 17:51:43 2023 From: aivanov at openjdk.org (Alexey Ivanov) Date: Mon, 25 Sep 2023 17:51:43 GMT Subject: RFR: 8316389: Open source few AWT applet tests [v4] In-Reply-To: <6wqT78oly1lZqPMGI28aL-_-US2FlQlzYHxjVvAJyss=.e7e7405e-08c8-4707-b7e5-bd15335e0f37@github.com> References: <18fnIFEUM9J1uSTp3HXXpEWl55jRkBRmKaaHkuLuY9Y=.059437ba-d9d0-44be-bf02-d3091eaf2d39@github.com> <6wqT78oly1lZqPMGI28aL-_-US2FlQlzYHxjVvAJyss=.e7e7405e-08c8-4707-b7e5-bd15335e0f37@github.com> Message-ID: On Mon, 25 Sep 2023 16:46:26 GMT, Alexander Zvegintsev wrote: >> test/jdk/java/awt/Frame/FrameResizeTest/FrameResizeTest_1.java line 62: >> >>> 60: .build(); >>> 61: >>> 62: SwingUtilities.invokeAndWait(() -> { >> >> Suggestion: >> >> EventQueue.invokeAndWait(() -> { >> >> Using `EventQueue` is more appropriate for AWT components. > > This particular case also uses the JFrame from PassFailJFrame. > So I used the Swing variant here (which uses EventQueue.invokeAndWait internally). Yeah, yet `JFrame` is hidden away inside `PassFailJFrame`. The test itself uses AWT components, therefore it's reasonable not to use `SwingUtilities`. Functionally, there's no change, so I'm nitpicking. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/15787#discussion_r1336194944 From prr at openjdk.org Mon Sep 25 17:59:34 2023 From: prr at openjdk.org (Phil Race) Date: Mon, 25 Sep 2023 17:59:34 GMT Subject: RFR: 8316371: Open some swing tests 6 [v2] In-Reply-To: References: Message-ID: On Mon, 25 Sep 2023 15:48:11 GMT, Alisen Chung wrote: >> Opening some closed tests: >> 20 javax/swing/plaf/windows/4736093/bug4736093.java >> 21 javax/swing/table/DefaultTableCellRenderer/4240870/bug4240870.java >> 22 javax/swing/table/JTableHeader/4243927/bug4243927.java >> 23 javax/swing/text/AbstractDocument/4549069/bug4549069.java >> 24 javax/swing/text/AbstractWriter/4185537/bug4185537.java > > Alisen Chung has updated the pull request incrementally with one additional commit since the last revision: > > remove unused var test/jdk/javax/swing/AbstractDocument/bug4549069.java line 116: > 114: > 115: robot.mousePress(InputEvent.BUTTON1_MASK); > 116: robot.mouseRelease(InputEvent.BUTTON1_MASK); Just noticed you are still using the deprecated field, replace with BUTTON1_DOWN_MASK ? ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/15873#discussion_r1336220435 From kizune at openjdk.org Mon Sep 25 18:02:45 2023 From: kizune at openjdk.org (Alexander Zuev) Date: Mon, 25 Sep 2023 18:02:45 GMT Subject: RFR: 8315871: Opensource five more Swing regression tests [v3] In-Reply-To: References: Message-ID: > Clean up and move to open source five tests. > javax/swing/AncestorNotifier/4817630/bug4817630.java > javax/swing/BoxLayout/4191948/bug4191948.java > javax/swing/ComponentInputMap/4248723/bug4248723.java > javax/swing/DefaultBoundedRangeModel/4297953/bug4297953.java > javax/swing/DefaultButtonModel/4097723/bug4097723.java Alexander Zuev has updated the pull request incrementally with one additional commit since the last revision: Small fixes based on the review feedback ------------- Changes: - all: https://git.openjdk.org/jdk/pull/15702/files - new: https://git.openjdk.org/jdk/pull/15702/files/d9d32378..6f2847d0 Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=15702&range=02 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=15702&range=01-02 Stats: 26 lines in 4 files changed: 10 ins; 11 del; 5 mod Patch: https://git.openjdk.org/jdk/pull/15702.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/15702/head:pull/15702 PR: https://git.openjdk.org/jdk/pull/15702 From kizune at openjdk.org Mon Sep 25 18:02:49 2023 From: kizune at openjdk.org (Alexander Zuev) Date: Mon, 25 Sep 2023 18:02:49 GMT Subject: RFR: 8315871: Opensource five more Swing regression tests [v2] In-Reply-To: References: Message-ID: On Thu, 14 Sep 2023 15:27:48 GMT, Alexander Zuev wrote: >> Clean up and move to open source five tests. >> javax/swing/AncestorNotifier/4817630/bug4817630.java >> javax/swing/BoxLayout/4191948/bug4191948.java >> javax/swing/ComponentInputMap/4248723/bug4248723.java >> javax/swing/DefaultBoundedRangeModel/4297953/bug4297953.java >> javax/swing/DefaultButtonModel/4097723/bug4097723.java > > Alexander Zuev has updated the pull request incrementally with two additional commits since the last revision: > > - Update test/jdk/javax/swing/AncestorNotifier/4817630/bug4817630.java > > Co-authored-by: Andrey Turbanov > - Update test/jdk/javax/swing/DefaultBoundedRangeModel/4297953/bug4297953.java > > Co-authored-by: Andrey Turbanov Fixed found problems. ------------- PR Comment: https://git.openjdk.org/jdk/pull/15702#issuecomment-1734215098 From kizune at openjdk.org Mon Sep 25 18:02:53 2023 From: kizune at openjdk.org (Alexander Zuev) Date: Mon, 25 Sep 2023 18:02:53 GMT Subject: RFR: 8315871: Opensource five more Swing regression tests [v2] In-Reply-To: References: Message-ID: <8nHT3rdo-ywD_s8G1FHMUeAaTQwLydOYNzgi-n6iDho=.089af625-2cdd-417f-8c8c-53f7b6dae510@github.com> On Thu, 14 Sep 2023 21:45:31 GMT, Damon Nguyen wrote: >> Alexander Zuev has updated the pull request incrementally with two additional commits since the last revision: >> >> - Update test/jdk/javax/swing/AncestorNotifier/4817630/bug4817630.java >> >> Co-authored-by: Andrey Turbanov >> - Update test/jdk/javax/swing/DefaultBoundedRangeModel/4297953/bug4297953.java >> >> Co-authored-by: Andrey Turbanov > > test/jdk/javax/swing/AncestorNotifier/4817630/bug4817630.java line 112: > >> 110: test.start(); >> 111: } finally { >> 112: test.destroy(); > > Either destroy() or the if statement in destroy() for disposing the frame should be on EDT Fixed. > test/jdk/javax/swing/BoxLayout/4191948/bug4191948.java line 76: > >> 74: frame.setVisible(false); >> 75: frame.dispose(); >> 76: } > > Should this if statement be run on EDT? In new version the entire method is being run on EDT. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/15702#discussion_r1336221059 PR Review Comment: https://git.openjdk.org/jdk/pull/15702#discussion_r1336220415 From prr at openjdk.org Mon Sep 25 18:03:54 2023 From: prr at openjdk.org (Phil Race) Date: Mon, 25 Sep 2023 18:03:54 GMT Subject: RFR: 8316389: Open source few AWT applet tests [v6] In-Reply-To: <32pgq_k8HL1B4XCghDaGkHm4LxPYolzSHy2qyDw7KT8=.03096530-8de0-4278-9045-9f52e8c016e1@github.com> References: <18fnIFEUM9J1uSTp3HXXpEWl55jRkBRmKaaHkuLuY9Y=.059437ba-d9d0-44be-bf02-d3091eaf2d39@github.com> <32pgq_k8HL1B4XCghDaGkHm4LxPYolzSHy2qyDw7KT8=.03096530-8de0-4278-9045-9f52e8c016e1@github.com> Message-ID: <9XM2IrnTEK8Bp0bQysooiqtqOXRZ3sCzDIjM3xxdbGs=.1f2e9101-67be-49b7-aa5e-b0da29815b2f@github.com> On Mon, 25 Sep 2023 17:33:35 GMT, Alexey Ivanov wrote: >> Alexander Zvegintsev has updated the pull request incrementally with one additional commit since the last revision: >> >> review comments > > test/jdk/java/awt/Frame/WindowMoveTest.java line 57: > >> 55: frame.dispatchEvent(new WindowEvent(frame, WindowEvent.WINDOW_CLOSING))); >> 56: >> 57: if (!WindowMove.latch.await(10, TimeUnit.SECONDS)) { > > I think 10 seconds is too long? We usually use 2 seconds for various delays. I agree, If it doesn't happen in much less than 10 seconds probably it'll never happen. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/15787#discussion_r1336224236 From dnguyen at openjdk.org Mon Sep 25 18:05:35 2023 From: dnguyen at openjdk.org (Damon Nguyen) Date: Mon, 25 Sep 2023 18:05:35 GMT Subject: RFR: 8316371: Open some swing tests 6 [v2] In-Reply-To: References: Message-ID: On Mon, 25 Sep 2023 15:48:11 GMT, Alisen Chung wrote: >> Opening some closed tests: >> 20 javax/swing/plaf/windows/4736093/bug4736093.java >> 21 javax/swing/table/DefaultTableCellRenderer/4240870/bug4240870.java >> 22 javax/swing/table/JTableHeader/4243927/bug4243927.java >> 23 javax/swing/text/AbstractDocument/4549069/bug4549069.java >> 24 javax/swing/text/AbstractWriter/4185537/bug4185537.java > > Alisen Chung has updated the pull request incrementally with one additional commit since the last revision: > > remove unused var Marked as reviewed by dnguyen (Committer). test/jdk/javax/swing/AbstractDocument/bug4549069.java line 116: > 114: > 115: robot.mousePress(InputEvent.BUTTON1_MASK); > 116: robot.mouseRelease(InputEvent.BUTTON1_MASK); Should this be BUTTON1_DOWN_MASK? ------------- PR Review: https://git.openjdk.org/jdk/pull/15873#pullrequestreview-1642720648 PR Review Comment: https://git.openjdk.org/jdk/pull/15873#discussion_r1336219798 From aivanov at openjdk.org Mon Sep 25 18:10:44 2023 From: aivanov at openjdk.org (Alexey Ivanov) Date: Mon, 25 Sep 2023 18:10:44 GMT Subject: Integrated: 8313403: Remove unused 'mask' field from JFormattedTextField In-Reply-To: <4fl_xrqZnBAxg014rvHQuI_7K-YP2QouKSzr76fcOX4=.2823965d-9be5-4b9d-ab02-038658b3469c@github.com> References: <4fl_xrqZnBAxg014rvHQuI_7K-YP2QouKSzr76fcOX4=.2823965d-9be5-4b9d-ab02-038658b3469c@github.com> Message-ID: On Mon, 31 Jul 2023 10:26:44 GMT, Alexey Ivanov wrote: > The private field `mask` is never used in `JFormattedTextField`. > > I couldn't find any usages of the field, including JNI. Therefore, it is safe to remove. This pull request has now been integrated. Changeset: b65f4f72 Author: Alexey Ivanov URL: https://git.openjdk.org/jdk/commit/b65f4f7220f53b250846c19ca6378450b5c9a61a Stats: 4 lines in 1 file changed: 0 ins; 4 del; 0 mod 8313403: Remove unused 'mask' field from JFormattedTextField Reviewed-by: prr, honkar ------------- PR: https://git.openjdk.org/jdk/pull/15088 From prr at openjdk.org Mon Sep 25 18:11:27 2023 From: prr at openjdk.org (Phil Race) Date: Mon, 25 Sep 2023 18:11:27 GMT Subject: RFR: 8315871: Opensource five more Swing regression tests [v3] In-Reply-To: References: Message-ID: On Mon, 25 Sep 2023 18:02:45 GMT, Alexander Zuev wrote: >> Clean up and move to open source five tests. >> javax/swing/AncestorNotifier/4817630/bug4817630.java >> javax/swing/BoxLayout/4191948/bug4191948.java >> javax/swing/ComponentInputMap/4248723/bug4248723.java >> javax/swing/DefaultBoundedRangeModel/4297953/bug4297953.java >> javax/swing/DefaultButtonModel/4097723/bug4097723.java > > Alexander Zuev has updated the pull request incrementally with one additional commit since the last revision: > > Small fixes based on the review feedback Marked as reviewed by prr (Reviewer). ------------- PR Review: https://git.openjdk.org/jdk/pull/15702#pullrequestreview-1642739541 From azvegint at openjdk.org Mon Sep 25 18:31:04 2023 From: azvegint at openjdk.org (Alexander Zvegintsev) Date: Mon, 25 Sep 2023 18:31:04 GMT Subject: RFR: 8316389: Open source few AWT applet tests [v7] In-Reply-To: <18fnIFEUM9J1uSTp3HXXpEWl55jRkBRmKaaHkuLuY9Y=.059437ba-d9d0-44be-bf02-d3091eaf2d39@github.com> References: <18fnIFEUM9J1uSTp3HXXpEWl55jRkBRmKaaHkuLuY9Y=.059437ba-d9d0-44be-bf02-d3091eaf2d39@github.com> Message-ID: > Open sourcing few tests: > > java/awt/Frame/FrameRepackTest.java > java/awt/Frame/FrameResizeTest/FrameResizeTest_1.java > java/awt/Frame/FrameResizeTest/FrameResizeTest_2.java > java/awt/Frame/WindowMoveTest.java Alexander Zvegintsev has updated the pull request incrementally with one additional commit since the last revision: SwingUtilities -> EventQueue, reduce timeout ------------- Changes: - all: https://git.openjdk.org/jdk/pull/15787/files - new: https://git.openjdk.org/jdk/pull/15787/files/d5f7164c..29a5a233 Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=15787&range=06 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=15787&range=05-06 Stats: 10 lines in 4 files changed: 3 ins; 3 del; 4 mod Patch: https://git.openjdk.org/jdk/pull/15787.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/15787/head:pull/15787 PR: https://git.openjdk.org/jdk/pull/15787 From kizune at openjdk.org Mon Sep 25 18:33:58 2023 From: kizune at openjdk.org (Alexander Zuev) Date: Mon, 25 Sep 2023 18:33:58 GMT Subject: Integrated: 8315871: Opensource five more Swing regression tests In-Reply-To: References: Message-ID: On Wed, 13 Sep 2023 08:48:25 GMT, Alexander Zuev wrote: > Clean up and move to open source five tests. > javax/swing/AncestorNotifier/4817630/bug4817630.java > javax/swing/BoxLayout/4191948/bug4191948.java > javax/swing/ComponentInputMap/4248723/bug4248723.java > javax/swing/DefaultBoundedRangeModel/4297953/bug4297953.java > javax/swing/DefaultButtonModel/4097723/bug4097723.java This pull request has now been integrated. Changeset: be9cc73f Author: Alexander Zuev URL: https://git.openjdk.org/jdk/commit/be9cc73fcad0cac0a6f12b0f962fbe3bd8328ec9 Stats: 355 lines in 5 files changed: 355 ins; 0 del; 0 mod 8315871: Opensource five more Swing regression tests Reviewed-by: dnguyen, prr ------------- PR: https://git.openjdk.org/jdk/pull/15702 From prr at openjdk.org Mon Sep 25 19:03:03 2023 From: prr at openjdk.org (Phil Race) Date: Mon, 25 Sep 2023 19:03:03 GMT Subject: RFR: 8316412: javax/print tests fail without printer set up In-Reply-To: References: Message-ID: On Tue, 19 Sep 2023 14:45:47 GMT, Michal Sobierski wrote: > For NullClipARGB we are throwing SkippedException only if instance of caught exception is PrinterException. All other exceptions are considered unrelated to printer configuration. > > For CountPrintServices we want to throw SkippedException in the case when lpstat is not installed, where an IOException is caught in that case. > > For ExceptionTest we want to throw SkippedException for all PrinterExceptions which were not caused by IndexOutOfBoundsException. > > For rest of the tests if PrintService was not created instead RuntimeException we are throwing now SkippedException. > > Tested on environment without printer installed. > Test are passing with skipped exception as expected. > > Passed: java/awt/print/PrinterJob/ExceptionTest.java > Passed: java/awt/print/PrinterJob/ImagePrinting/NullClipARGB.java > Passed: java/awt/print/PrinterJob/PrtException.java > Passed: javax/print/attribute/AttributeTest.java > Passed: javax/print/attribute/GetCopiesSupported.java > Passed: javax/print/attribute/SidesPageRangesTest.java > Passed: javax/print/attribute/SupportedPrintableAreas.java > Passed: javax/print/PrintServiceLookup/CountPrintServices.java > Passed: javax/print/CheckDupFlavor.java > > Additionally unused imports have been removed. Just like @key headful is used for headful tests, these tests have @key printer which you are supposed to use to exclude them if you don't have a printer configured., eg jtreg -k:!printer ... In other words none of these changes should be necessary and I'm fairly sure are actually undesirable in some cases. Notably skipping if lpstat isn't installed and you are trying to test printing is bad. ------------- PR Comment: https://git.openjdk.org/jdk/pull/15821#issuecomment-1734303824 From aivanov at openjdk.org Mon Sep 25 19:42:14 2023 From: aivanov at openjdk.org (Alexey Ivanov) Date: Mon, 25 Sep 2023 19:42:14 GMT Subject: RFR: 8316389: Open source few AWT applet tests [v7] In-Reply-To: References: <18fnIFEUM9J1uSTp3HXXpEWl55jRkBRmKaaHkuLuY9Y=.059437ba-d9d0-44be-bf02-d3091eaf2d39@github.com> Message-ID: On Mon, 25 Sep 2023 18:31:04 GMT, Alexander Zvegintsev wrote: >> Open sourcing few tests: >> >> java/awt/Frame/FrameRepackTest.java >> java/awt/Frame/FrameResizeTest/FrameResizeTest_1.java >> java/awt/Frame/FrameResizeTest/FrameResizeTest_2.java >> java/awt/Frame/WindowMoveTest.java > > Alexander Zvegintsev has updated the pull request incrementally with one additional commit since the last revision: > > SwingUtilities -> EventQueue, reduce timeout Marked as reviewed by aivanov (Reviewer). ------------- PR Review: https://git.openjdk.org/jdk/pull/15787#pullrequestreview-1642870882 From azvegint at openjdk.org Mon Sep 25 20:30:50 2023 From: azvegint at openjdk.org (Alexander Zvegintsev) Date: Mon, 25 Sep 2023 20:30:50 GMT Subject: RFR: 8316211: Open source several manual applet tests [v4] In-Reply-To: <76b2-b6qr-MNBiDvTuZYs1bKZAbC21UMhoFxTZDJAGc=.2af94b7b-2a4d-4724-a08a-08a162ef1d4c@github.com> References: <76b2-b6qr-MNBiDvTuZYs1bKZAbC21UMhoFxTZDJAGc=.2af94b7b-2a4d-4724-a08a-08a162ef1d4c@github.com> Message-ID: > Open sourcing several manual applet tests > > > test/jdk/java/awt/Frame/DefaultSizeTest.java > test/jdk/java/awt/LightweightComponent/LightweightCliprect.java > test/jdk/java/awt/event/KeyEvent/FunctionKeyTest.java > test/jdk/javax/swing/JFrame/DefaultCloseOperation.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/15827/files - new: https://git.openjdk.org/jdk/pull/15827/files/abece69d..0fb799e1 Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=15827&range=03 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=15827&range=02-03 Stats: 24 lines in 3 files changed: 2 ins; 12 del; 10 mod Patch: https://git.openjdk.org/jdk/pull/15827.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/15827/head:pull/15827 PR: https://git.openjdk.org/jdk/pull/15827 From azvegint at openjdk.org Mon Sep 25 20:30:51 2023 From: azvegint at openjdk.org (Alexander Zvegintsev) Date: Mon, 25 Sep 2023 20:30:51 GMT Subject: RFR: 8316211: Open source several manual applet tests [v3] In-Reply-To: <1v8n1a0RfNUgmZ__k1khLNQ6_ylijPi_3Y1CX81gx3Y=.3afd8b26-8982-4ca1-8684-e372a7db7c46@github.com> References: <76b2-b6qr-MNBiDvTuZYs1bKZAbC21UMhoFxTZDJAGc=.2af94b7b-2a4d-4724-a08a-08a162ef1d4c@github.com> <1v8n1a0RfNUgmZ__k1khLNQ6_ylijPi_3Y1CX81gx3Y=.3afd8b26-8982-4ca1-8684-e372a7db7c46@github.com> Message-ID: On Mon, 25 Sep 2023 16:43:57 GMT, Alexey Ivanov wrote: >> Alexander Zvegintsev has updated the pull request incrementally with one additional commit since the last revision: >> >> review comments > > test/jdk/javax/swing/JFrame/DefaultCloseOperation.java line 1: > >> 1: /* > > I wonder if this test can be automated? On Windows, one could use `Alt+F4` or close the window using robot. On macOS, the close button is also available but it's on the left of the window. On Linux, it's close to impossible because of different window managers. I have already tried this using keyboard shortcuts. Alt+F4 works fine on Window and Linux (many popular DEs close windows by Alt+F4 by default, e.g. Gnome shell, Plasma). For macos we don't have a system handler for Cmd + W But I haven't tried to use mouse on the close button. I think something could come out of this, Alt+F4 for Windows/Linux, mouse click on close button for macos. But this will probably be a task for one of the next test sprints. > test/jdk/javax/swing/JFrame/DefaultCloseOperation.java line 48: > >> 46: public class DefaultCloseOperation extends JPanel { >> 47: private static final String INSTRUCTIONS = """ >> 48: This is a manual test (requires user interaction) which tests the > > I guess the instructions should be amended so that it is clear what is required from the tester. > > ?To run this test, do the following steps?? could be replaced with ?Do (Perform) the following steps??. > > jtreg automatically handles exceptions, it will fail there's an unhandled exception in the test. Cleaned up. > test/jdk/javax/swing/JFrame/DefaultCloseOperation.java line 78: > >> 76: - Select "Dispose" from the "JDialog Default Close Operation" ComboBox >> 77: - On the TestDialog, select "Close" from the system menu (the window should go away) >> 78: """; > > I guess this test should disable Pass and Fail buttons. The Fail button should remain disabled: the test will fail automatically. Yet the Pass button may always be enabled, or it could be enabled only after the tester cycles through all the scenarios. I think it's fine the way it is now. Just in case the user sees some unusual failure. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/15827#discussion_r1336349131 PR Review Comment: https://git.openjdk.org/jdk/pull/15827#discussion_r1336349339 PR Review Comment: https://git.openjdk.org/jdk/pull/15827#discussion_r1336352531 From serb at openjdk.org Mon Sep 25 20:57:21 2023 From: serb at openjdk.org (Sergey Bylokhov) Date: Mon, 25 Sep 2023 20:57:21 GMT Subject: Integrated: 8312191: ColorConvertOp.filter for the default destination is too slow In-Reply-To: References: Message-ID: <0iaBAuULsb4dISqreP0joMPgFzKQ8cqo4UQXNjTU2IE=.c6370018-0570-48f5-8b45-4b995a40103e@github.com> On Mon, 17 Jul 2023 20:59:05 GMT, Sergey Bylokhov wrote: > I have found that MTPerLineTransformValidation - one of our slowest stress test spends most of the time not in the code related to the colors conversion(as it was intended) but in the initialization of the native cmm-transforms. > > > ColorConvertOp sharedOp = new ColorConvertOp(srcCS, dstCS, null); <-- slow > BufferedImage dst = sharedOp.filter(src, null); > > > The code above triggers the next sequence: > 1. The destination buffered image is not set so it should be created [automatically](https://github.com/openjdk/jdk/blob/master/src/java.desktop/share/classes/java/awt/image/ColorConvertOp.java#L551) ->> > 2. The buffered image requires the new color [model](https://github.com/openjdk/jdk/blob/master/src/java.desktop/share/classes/java/awt/image/ColorConvertOp.java#L588) ->> > 3. The color model requires new color [space](https://github.com/openjdk/jdk/blob/master/src/java.desktop/share/classes/java/awt/image/ColorConvertOp.java#L563) ->> > 4. The color model initialize some [LUTs](https://github.com/openjdk/jdk/blob/master/src/java.desktop/share/classes/java/awt/image/ColorModel.java#L1816), **and cache it per color space** ->> > 5. When the ColorConvertOp is used for the first time the color space caches some state internally if the format of the src/dst image is not changed > > So the critical thing above is to minimize the creation of the new color spaces, since for each new space all optimizations above should be repeated. Unfortunately, when we create the ColorConvertOp using standard icc_profile/icc_colorspace we store the profile only and [lost](https://github.com/openjdk/jdk/blob/master/src/java.desktop/share/classes/java/awt/image/ColorConvertOp.java#L150) the reference to the initial color space. And when later we decide to create a color model we create the new icc_color space->all optimizations resets. > > We do not save the reference to the color space because that way we distinguish the icc_colorspace saved using profiles, and non-icc_color spaces used as is. I think all that code should be reworked to take into account the current issue. But for now, we can fix it at least for standard types. > > **Important notes**: > * Performance of MTPerLineTransformValidation test is increased(on my system from 3m30s to the 14s) - the number of used native transforms changed from 80000 to ~500. It can have a side effect since a few crashes(exit code 134) were reported for this test. The crashes of this test and others may disappear since the memory pressure is decreased, o... This pull request has now been integrated. Changeset: e5f05b5a Author: Sergey Bylokhov URL: https://git.openjdk.org/jdk/commit/e5f05b5a963774914751d9c241dd5693ed06af0b Stats: 82 lines in 2 files changed: 80 ins; 0 del; 2 mod 8312191: ColorConvertOp.filter for the default destination is too slow Reviewed-by: prr ------------- PR: https://git.openjdk.org/jdk/pull/14910 From achung at openjdk.org Mon Sep 25 22:03:12 2023 From: achung at openjdk.org (Alisen Chung) Date: Mon, 25 Sep 2023 22:03:12 GMT Subject: RFR: 8316146: Open some swing tests 4 [v2] In-Reply-To: References: <84rFHCxQOmHAKLvYCg9C1Qy8x4ebcdJXAmR9mvncLWs=.d6354e6f-d1df-4405-b749-ea53baae9828@github.com> Message-ID: On Mon, 25 Sep 2023 11:57:18 GMT, Alexey Ivanov wrote: >> Alisen Chung has updated the pull request incrementally with two additional commits since the last revision: >> >> - updated tests based on feedback >> - updated tests > > test/jdk/javax/swing/BasicMenuUI/bug4244616.java line 67: > >> 65: action.actionPerformed(ev); >> 66: } catch (Exception ignored) { >> 67: } > > Are exceptions thrown here? Yea, an exception is thrown here and the original test ignores the exception ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/15875#discussion_r1336427844 From achung at openjdk.org Mon Sep 25 22:32:05 2023 From: achung at openjdk.org (Alisen Chung) Date: Mon, 25 Sep 2023 22:32:05 GMT Subject: RFR: 8316146: Open some swing tests 4 [v3] In-Reply-To: References: Message-ID: > Opening closed tests: > 12 javax/swing/ToolTipManager/5078214/bug5078214.java > 13 javax/swing/plaf/basic/BasicMenuItemUI/4239714/bug4239714.java > 14 javax/swing/plaf/basic/BasicMenuUI/4244616/bug4244616.java > 15 javax/swing/plaf/metal/4306431/bug4306431.java Alisen Chung has updated the pull request incrementally with one additional commit since the last revision: updated tests based on feedback ------------- Changes: - all: https://git.openjdk.org/jdk/pull/15875/files - new: https://git.openjdk.org/jdk/pull/15875/files/0a2cb4d6..0e0e2357 Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=15875&range=02 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=15875&range=01-02 Stats: 76 lines in 3 files changed: 33 ins; 25 del; 18 mod Patch: https://git.openjdk.org/jdk/pull/15875.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/15875/head:pull/15875 PR: https://git.openjdk.org/jdk/pull/15875 From serb at openjdk.org Mon Sep 25 23:04:24 2023 From: serb at openjdk.org (Sergey Bylokhov) Date: Mon, 25 Sep 2023 23:04:24 GMT Subject: Integrated: 8313220: Remove Windows specific workaround in LCMS.c for _snprintf In-Reply-To: References: Message-ID: On Wed, 23 Aug 2023 00:42:47 GMT, Sergey Bylokhov wrote: > This patch addresses two issues: > * For Windows: The snprintf is available with Visual Studio 2015 and above, so we do not need to use the windows speciific "_snprintf". We also do not need to set a zero at the end of the string since the "new" snprintf works according c99: see this [link](https://learn.microsoft.com/en-us/cpp/c-runtime-library/reference/snprintf-snprintf-snprintf-l-snwprintf-snwprintf-l?view=msvc-170#behavior-summary) for details. > * For unix: It seems the standard snprintf does not guaratier that the zero is set at the start of the string if error is occured and the negative value is returned. It could be fixed by checking the return value and set zero manually, but I just decided to memset the whole array to zero, that is shorte and should not affect the performance in this error handler. > > See some discussin at the end of [this](https://github.com/openjdk/jdk/pull/10625) PR > > The new test just covered the changed code path and verifies that it works as expected. This pull request has now been integrated. Changeset: 0dce4c17 Author: Sergey Bylokhov URL: https://git.openjdk.org/jdk/commit/0dce4c1758d05832e20380cff28d7ed47d693a6e Stats: 94 lines in 3 files changed: 80 ins; 11 del; 3 mod 8313220: Remove Windows specific workaround in LCMS.c for _snprintf Reviewed-by: prr ------------- PR: https://git.openjdk.org/jdk/pull/15396 From duke at openjdk.org Tue Sep 26 03:28:10 2023 From: duke at openjdk.org (Logan Abernathy) Date: Tue, 26 Sep 2023 03:28:10 GMT Subject: RFR: 8316710: Exclude java/awt/font/Rotate/RotatedTextTest.java In-Reply-To: References: Message-ID: On Fri, 22 Sep 2023 06:20:42 GMT, Christoph Langer wrote: > Exclude java/awt/font/Rotate/RotatedTextTest.java until [JDK-8219641](https://bugs.openjdk.org/browse/JDK-8219641) is fixed. The error shows in several linux installations. Marked as reviewed by M4ximumPizza at github.com (no known OpenJDK username). ------------- PR Review: https://git.openjdk.org/jdk/pull/15880#pullrequestreview-1643278080 From duke at openjdk.org Tue Sep 26 03:29:10 2023 From: duke at openjdk.org (Logan Abernathy) Date: Tue, 26 Sep 2023 03:29:10 GMT Subject: RFR: 8316218: Open some swing tests 5 In-Reply-To: <5ZuZUU2La8JTcNSHH8Wt-ERWlcc1zizN5JwuiUijKyo=.59c442ff-a1ef-44eb-95d0-a41138ec1163@github.com> References: <5ZuZUU2La8JTcNSHH8Wt-ERWlcc1zizN5JwuiUijKyo=.59c442ff-a1ef-44eb-95d0-a41138ec1163@github.com> Message-ID: On Thu, 21 Sep 2023 21:36:52 GMT, Alisen Chung wrote: > Opening some swing tests: > 16 javax/swing/plaf/metal/MetalBorders/4290656/bug4290656.java > 17 javax/swing/plaf/metal/MetalInternalFrameTitlePane/4221007/bug4221007.java > 18 javax/swing/plaf/metal/isJavaLAFLockedCorrectly/isJavaLAFLockedCorrectly.java > 19 javax/swing/plaf/multi/isMultiLAFLockedCorrectly/isMultiLAFLockedCorrectly.java Marked as reviewed by M4ximumPizza at github.com (no known OpenJDK username). ------------- PR Review: https://git.openjdk.org/jdk/pull/15872#pullrequestreview-1643278407 From abhiscxk at openjdk.org Tue Sep 26 10:54:20 2023 From: abhiscxk at openjdk.org (Abhishek Kumar) Date: Tue, 26 Sep 2023 10:54:20 GMT Subject: RFR: 8283214: [macos] Screen magnifier does not show the magnified text for JcomboBox [v7] In-Reply-To: References: Message-ID: On Fri, 1 Sep 2023 10:19:42 GMT, Alexey Ivanov wrote: >> Ok, I will check this. > >> I still do not think that setting accessible name in paint is a good idea. > > It's been my biggest concern. But I didn't even think about it this way. > > The problem is that the displayed value is known only when the component is painted. Other components seem to handle it? somehow. > Setting it during the initialization and adding a property change listener to the accessible context to track changes seems like a better way to do it. @azuev-java We have a ItemListener for JComboBox defined in AquaComboBoxUI here to handle any changes in combobox selected item. https://github.com/openjdk/jdk/blob/9e6cb620486ac7b0adaefeb2000babf3ea31207f/src/java.desktop/macosx/classes/com/apple/laf/AquaComboBoxUI.java#L135 Tried setting the `accessibleName` for arrowButton in `itemStateChanged` method. So whenever combobox value changes using list selection, **accessibleName is set to the selected Item**. For initial accessibleName, it can be set to the first value of data model inside `AquaComboBoxButton constructor` code. `However, this doesn't work with custom renederer.` ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/14497#discussion_r1337018315 From abhiscxk at openjdk.org Tue Sep 26 11:12:08 2023 From: abhiscxk at openjdk.org (Abhishek Kumar) Date: Tue, 26 Sep 2023 11:12:08 GMT Subject: RFR: 8283214: [macos] Screen magnifier does not show the magnified text for JcomboBox [v8] In-Reply-To: References: Message-ID: <71Kog6sDk_17WiI_9AU1y1zKnFW53V6nupE-bUFbMl8=.c259ed45-06cf-4c9d-8242-0a9fe9a8e333@github.com> > The issue exist only for non-editable combobox and the root cause is accessible object is not created due to incorrect index returned from component class which results in no a11y API invoked. > > Proposed solution is to return the correct accessible child from getAccessibleChild method which is AquaComboBoxButton (arrowButton) instance and that results in invoking the a11y APIs to return the current selected item in combobox. > > Further when the application comes up first time the accessible name is not set for current displayed item in JCombobox that is handled in AquaComboBoxButton which will take care for the current selected item as well as if user modifies the selection by drop-down list. > > CI link is posted in JBS. Abhishek Kumar 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: - AccessibleName set in Listener - Master - Revert BasicComboBoxUI fix and update review comment - bugid removed in comments - Add condition to check JLabel instance - set accessiblename to displayed text in JComboBox - Merge - Explicit frame dispose remove - merge - Review comment update - ... and 1 more: https://git.openjdk.org/jdk/compare/cb585aa5...1a48076b ------------- Changes: - all: https://git.openjdk.org/jdk/pull/14497/files - new: https://git.openjdk.org/jdk/pull/14497/files/525e3465..1a48076b Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=14497&range=07 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=14497&range=06-07 Stats: 251060 lines in 5135 files changed: 101653 ins; 97756 del; 51651 mod Patch: https://git.openjdk.org/jdk/pull/14497.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/14497/head:pull/14497 PR: https://git.openjdk.org/jdk/pull/14497 From aivanov at openjdk.org Tue Sep 26 13:40:13 2023 From: aivanov at openjdk.org (Alexey Ivanov) Date: Tue, 26 Sep 2023 13:40:13 GMT Subject: RFR: 8316710: Exclude java/awt/font/Rotate/RotatedTextTest.java In-Reply-To: References: Message-ID: On Mon, 25 Sep 2023 14:15:52 GMT, Alexey Ivanov wrote: > Yet keeping tests in the same area closer seems like a good idea to me. Either line is fine with me. Let's go for the latter one, line 416. > I started an internal discussion in clientlibs to see whether there are any conventions. It looks there are no strict conventions. There groups for *awt* and *swing*, there are also some subheaders to group tests which fail with the same root cause, like the one above the line you're adding. At the same time, I still think it's better to group tests? This one is in `awt/font`, let's add close to another one. Other than that, it looks good to me, I'll approve it. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/15880#discussion_r1337225081 From aivanov at openjdk.org Tue Sep 26 14:46:14 2023 From: aivanov at openjdk.org (Alexey Ivanov) Date: Tue, 26 Sep 2023 14:46:14 GMT Subject: RFR: 8316211: Open source several manual applet tests [v3] In-Reply-To: References: <76b2-b6qr-MNBiDvTuZYs1bKZAbC21UMhoFxTZDJAGc=.2af94b7b-2a4d-4724-a08a-08a162ef1d4c@github.com> <1v8n1a0RfNUgmZ__k1khLNQ6_ylijPi_3Y1CX81gx3Y=.3afd8b26-8982-4ca1-8684-e372a7db7c46@github.com> Message-ID: On Mon, 25 Sep 2023 20:23:27 GMT, Alexander Zvegintsev wrote: >> test/jdk/javax/swing/JFrame/DefaultCloseOperation.java line 78: >> >>> 76: - Select "Dispose" from the "JDialog Default Close Operation" ComboBox >>> 77: - On the TestDialog, select "Close" from the system menu (the window should go away) >>> 78: """; >> >> I guess this test should disable Pass and Fail buttons. The Fail button should remain disabled: the test will fail automatically. Yet the Pass button may always be enabled, or it could be enabled only after the tester cycles through all the scenarios. > > I think it's fine the way it is now. Just in case the user sees some unusual failure. Well, yes? I haven't thought about it. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/15827#discussion_r1337332580 From aivanov at openjdk.org Tue Sep 26 14:49:12 2023 From: aivanov at openjdk.org (Alexey Ivanov) Date: Tue, 26 Sep 2023 14:49:12 GMT Subject: RFR: 8316211: Open source several manual applet tests [v3] In-Reply-To: References: <76b2-b6qr-MNBiDvTuZYs1bKZAbC21UMhoFxTZDJAGc=.2af94b7b-2a4d-4724-a08a-08a162ef1d4c@github.com> <1v8n1a0RfNUgmZ__k1khLNQ6_ylijPi_3Y1CX81gx3Y=.3afd8b26-8982-4ca1-8684-e372a7db7c46@github.com> Message-ID: On Mon, 25 Sep 2023 20:19:17 GMT, Alexander Zvegintsev wrote: > But this will probably be a task for one of the next test sprints. Absolutely, it's too many changes. Yet it may make the test easier. In fact, I thought about iterating the values automatically ? and ask the tester to click the Close button on the window. The *do nothing* could be the last option tested, and the frame/dialog would be closed from the handler. Another way could be sending the event programmatically. This would automate the test completely. However, we may still leave the manual test? just in case the tester sees anything unusual. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/15827#discussion_r1337337389 From aivanov at openjdk.org Tue Sep 26 14:59:16 2023 From: aivanov at openjdk.org (Alexey Ivanov) Date: Tue, 26 Sep 2023 14:59:16 GMT Subject: RFR: 8316211: Open source several manual applet tests [v4] In-Reply-To: References: <76b2-b6qr-MNBiDvTuZYs1bKZAbC21UMhoFxTZDJAGc=.2af94b7b-2a4d-4724-a08a-08a162ef1d4c@github.com> Message-ID: <69zCc0QLatUizTGLU137Y4IZh2pLAupoL16Pew-GjBo=.26c17597-bdb9-4565-a90d-cfd1bbe40681@github.com> On Mon, 25 Sep 2023 20:30:50 GMT, Alexander Zvegintsev wrote: >> Open sourcing several manual applet tests >> >> >> test/jdk/java/awt/Frame/DefaultSizeTest.java >> test/jdk/java/awt/LightweightComponent/LightweightCliprect.java >> test/jdk/java/awt/event/KeyEvent/FunctionKeyTest.java >> test/jdk/javax/swing/JFrame/DefaultCloseOperation.java > > Alexander Zvegintsev has updated the pull request incrementally with one additional commit since the last revision: > > review comments Marked as reviewed by aivanov (Reviewer). ------------- PR Review: https://git.openjdk.org/jdk/pull/15827#pullrequestreview-1644506838 From achung at openjdk.org Tue Sep 26 20:55:28 2023 From: achung at openjdk.org (Alisen Chung) Date: Tue, 26 Sep 2023 20:55:28 GMT Subject: Integrated: 8316218: Open some swing tests 5 In-Reply-To: <5ZuZUU2La8JTcNSHH8Wt-ERWlcc1zizN5JwuiUijKyo=.59c442ff-a1ef-44eb-95d0-a41138ec1163@github.com> References: <5ZuZUU2La8JTcNSHH8Wt-ERWlcc1zizN5JwuiUijKyo=.59c442ff-a1ef-44eb-95d0-a41138ec1163@github.com> Message-ID: On Thu, 21 Sep 2023 21:36:52 GMT, Alisen Chung wrote: > Opening some swing tests: > 16 javax/swing/plaf/metal/MetalBorders/4290656/bug4290656.java > 17 javax/swing/plaf/metal/MetalInternalFrameTitlePane/4221007/bug4221007.java > 18 javax/swing/plaf/metal/isJavaLAFLockedCorrectly/isJavaLAFLockedCorrectly.java > 19 javax/swing/plaf/multi/isMultiLAFLockedCorrectly/isMultiLAFLockedCorrectly.java This pull request has now been integrated. Changeset: 788e6e15 Author: Alisen Chung URL: https://git.openjdk.org/jdk/commit/788e6e154824317cf92884510c2ee116bc64f510 Stats: 262 lines in 4 files changed: 262 ins; 0 del; 0 mod 8316218: Open some swing tests 5 Reviewed-by: prr, dnguyen ------------- PR: https://git.openjdk.org/jdk/pull/15872 From achung at openjdk.org Tue Sep 26 21:03:22 2023 From: achung at openjdk.org (Alisen Chung) Date: Tue, 26 Sep 2023 21:03:22 GMT Subject: RFR: 8316371: Open some swing tests 6 [v3] In-Reply-To: References: Message-ID: > Opening some closed tests: > 20 javax/swing/plaf/windows/4736093/bug4736093.java > 21 javax/swing/table/DefaultTableCellRenderer/4240870/bug4240870.java > 22 javax/swing/table/JTableHeader/4243927/bug4243927.java > 23 javax/swing/text/AbstractDocument/4549069/bug4549069.java > 24 javax/swing/text/AbstractWriter/4185537/bug4185537.java Alisen Chung has updated the pull request incrementally with one additional commit since the last revision: replaced button1_mask with button1_down_mask ------------- Changes: - all: https://git.openjdk.org/jdk/pull/15873/files - new: https://git.openjdk.org/jdk/pull/15873/files/971b9b9a..76cb514a Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=15873&range=02 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=15873&range=01-02 Stats: 2 lines in 1 file changed: 0 ins; 0 del; 2 mod Patch: https://git.openjdk.org/jdk/pull/15873.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/15873/head:pull/15873 PR: https://git.openjdk.org/jdk/pull/15873 From azvegint at openjdk.org Tue Sep 26 21:26:25 2023 From: azvegint at openjdk.org (Alexander Zvegintsev) Date: Tue, 26 Sep 2023 21:26:25 GMT Subject: Integrated: 8316389: Open source few AWT applet tests In-Reply-To: <18fnIFEUM9J1uSTp3HXXpEWl55jRkBRmKaaHkuLuY9Y=.059437ba-d9d0-44be-bf02-d3091eaf2d39@github.com> References: <18fnIFEUM9J1uSTp3HXXpEWl55jRkBRmKaaHkuLuY9Y=.059437ba-d9d0-44be-bf02-d3091eaf2d39@github.com> Message-ID: On Mon, 18 Sep 2023 12:35:47 GMT, Alexander Zvegintsev wrote: > Open sourcing few tests: > > java/awt/Frame/FrameRepackTest.java > java/awt/Frame/FrameResizeTest/FrameResizeTest_1.java > java/awt/Frame/FrameResizeTest/FrameResizeTest_2.java > java/awt/Frame/WindowMoveTest.java This pull request has now been integrated. Changeset: 65227a3c Author: Alexander Zvegintsev URL: https://git.openjdk.org/jdk/commit/65227a3c64a9eaead7a7b2b94a5c2786f1b1bb4f Stats: 577 lines in 4 files changed: 577 ins; 0 del; 0 mod 8316389: Open source few AWT applet tests Reviewed-by: dnguyen, abhiscxk, aivanov ------------- PR: https://git.openjdk.org/jdk/pull/15787 From azvegint at openjdk.org Tue Sep 26 21:27:27 2023 From: azvegint at openjdk.org (Alexander Zvegintsev) Date: Tue, 26 Sep 2023 21:27:27 GMT Subject: Integrated: 8316211: Open source several manual applet tests In-Reply-To: <76b2-b6qr-MNBiDvTuZYs1bKZAbC21UMhoFxTZDJAGc=.2af94b7b-2a4d-4724-a08a-08a162ef1d4c@github.com> References: <76b2-b6qr-MNBiDvTuZYs1bKZAbC21UMhoFxTZDJAGc=.2af94b7b-2a4d-4724-a08a-08a162ef1d4c@github.com> Message-ID: On Tue, 19 Sep 2023 20:52:41 GMT, Alexander Zvegintsev wrote: > Open sourcing several manual applet tests > > > test/jdk/java/awt/Frame/DefaultSizeTest.java > test/jdk/java/awt/LightweightComponent/LightweightCliprect.java > test/jdk/java/awt/event/KeyEvent/FunctionKeyTest.java > test/jdk/javax/swing/JFrame/DefaultCloseOperation.java This pull request has now been integrated. Changeset: 2f311d59 Author: Alexander Zvegintsev URL: https://git.openjdk.org/jdk/commit/2f311d59dcbbf7605e52fac0b8ebd35d7d51a48b Stats: 544 lines in 4 files changed: 544 ins; 0 del; 0 mod 8316211: Open source several manual applet tests Reviewed-by: honkar, aivanov ------------- PR: https://git.openjdk.org/jdk/pull/15827 From prr at openjdk.org Tue Sep 26 21:41:11 2023 From: prr at openjdk.org (Phil Race) Date: Tue, 26 Sep 2023 21:41:11 GMT Subject: RFR: 8316371: Open some swing tests 6 [v3] In-Reply-To: References: Message-ID: On Tue, 26 Sep 2023 21:03:22 GMT, Alisen Chung wrote: >> Opening some closed tests: >> 20 javax/swing/plaf/windows/4736093/bug4736093.java >> 21 javax/swing/table/DefaultTableCellRenderer/4240870/bug4240870.java >> 22 javax/swing/table/JTableHeader/4243927/bug4243927.java >> 23 javax/swing/text/AbstractDocument/4549069/bug4549069.java >> 24 javax/swing/text/AbstractWriter/4185537/bug4185537.java > > Alisen Chung has updated the pull request incrementally with one additional commit since the last revision: > > replaced button1_mask with button1_down_mask Marked as reviewed by prr (Reviewer). ------------- PR Review: https://git.openjdk.org/jdk/pull/15873#pullrequestreview-1645245741 From psadhukhan at openjdk.org Wed Sep 27 04:33:24 2023 From: psadhukhan at openjdk.org (Prasanta Sadhukhan) Date: Wed, 27 Sep 2023 04:33:24 GMT Subject: Integrated: 6450193: After the first Serialization, JTableHeader does not uninstall its UI In-Reply-To: References: Message-ID: On Thu, 31 Aug 2023 08:02:35 GMT, Prasanta Sadhukhan wrote: > After the first time a JTableHeader is serialized, it no longer will uninstall its UI upon subsequent serializations. > This happens for classes that use the BasicTableHeaderUI class. Any LAF that extends the BasicTableHeaderUI like SynthTableHeaderUI and WindowsTableHeaderUI will get an NotSerializableException thrown > > Each time an JComponent instance is Serialized, a [counter ](https://github.com/openjdk/jdk/blob/218829e0a2a3ae5599b81733df53557966392033/src/java.desktop/share/classes/javax/swing/JComponent.java#L5644-L5645) for the instance is incremented. It is de-incremented in JComponent's writeObject or a class that implements it the same way, like JButton, JScrollPane etc.. > With JTableHeader it does not deincrement the counter. The uninstall mechanism will not uninstall a UI if the counter is not 0 on the first pass..It is not possible to call JComponent.setWriteObjectCounter in JTableHeader as it is not in the same package so the fix is to remove the writeObject implementation and rely on JComponent writeObject implementation to make sure uninstallation of UI happens and also NotSerializableException does not happen for Synth This pull request has now been integrated. Changeset: 83806abe Author: Prasanta Sadhukhan URL: https://git.openjdk.org/jdk/commit/83806abe440809aaea47337646de96a97080724a Stats: 81 lines in 2 files changed: 67 ins; 13 del; 1 mod 6450193: After the first Serialization, JTableHeader does not uninstall its UI Reviewed-by: aivanov ------------- PR: https://git.openjdk.org/jdk/pull/15507 From psadhukhan at openjdk.org Wed Sep 27 04:54:20 2023 From: psadhukhan at openjdk.org (Prasanta Sadhukhan) Date: Wed, 27 Sep 2023 04:54:20 GMT Subject: RFR: 6510914: JScrollBar.getMinimumSize() breaks the contract of JComponent.setMinimumSize() [v2] In-Reply-To: References: <2oFB3wU5gns6b5ZLaFhsURai_16OLzSm6wYuoGeHK3Y=.c942050f-9d03-4989-b9a2-6836abf7a055@github.com> Message-ID: <5OGm-0SM7bgkioZGpWdiW-XPT3mSkyYgDxrAmxenf0Y=.53d2ad6b-6a39-4fab-aa1b-e9a040a576bb@github.com> On Thu, 24 Aug 2023 07:46:07 GMT, Prasanta Sadhukhan wrote: >> javadoc contract for JComponent.setMinimumSize(Dimension) states: >> >> "Sets the minimum size of this component to a constant value. Subsequent calls to getMinimumSize will always return this value..." >> >> However, JScrollBar overrides getMinimumSize() and breaks this contract - it always returns a minimum size derived from the preferred size even if you have previously called setMinimumSize() >> >> Fix is made to check if mnimumSize is set and if so, honour it.. > > Prasanta Sadhukhan has updated the pull request incrementally with two additional commits since the last revision: > > - copyright year > - Fix maximumSize, test I dont see any visual change with this fix and it solves `get/setMinimumSize` contract. However, I think the suggestion is to update the javadoc for JScrollBar but it does not have `setMinimumSize/setMaximumSize` method which has the contract in `JComponent.setMinimumSize/setMaximumSize` " Subsequent calls to getMaximumSize will always return this value;" so not sure where to update the spec..in the JScrollBar class top summary or in `getMinimumSize/getMaximumSize` but since the contract is in set method, not sure if it will be considered if updated in get methods.. @aivanov-jdk @prrace Please provide your opinion.. ------------- PR Comment: https://git.openjdk.org/jdk/pull/15325#issuecomment-1736698607 From goetz at openjdk.org Wed Sep 27 06:22:23 2023 From: goetz at openjdk.org (Goetz Lindenmaier) Date: Wed, 27 Sep 2023 06:22:23 GMT Subject: RFR: 8316206: Test StretchedFontTest.java fails for Baekmuk font [v2] In-Reply-To: References: <4eLLluXke8q0oity_JF9axhhEeX6SX1-74Q5OOvQ8U4=.c965732f-ac78-4fe7-a584-141bf76616bc@github.com> Message-ID: On Wed, 20 Sep 2023 14:07:17 GMT, Alexey Ivanov wrote: >> **Root cause** >> >> The _Baekmuk Headline_ font maps `\u6f22` (?) to glyph id 16950 which has zero length. >> >> The test fails if the right half of the image with the rendered glyph contains only pixels of background colour. In this case, the left half of the image is also blank. It's somewhat false positive because of the broken font. >> >> **Fix** >> >> Ignore fonts which don't render the glyph correctly. If the left half of the image contains pixels of the background colour only, it is expected that the right half also contains background-coloured pixels only. >> >> The updated test does not fail with the _Baekmuk Headline_ font. It still detects the original problem and fails on builds without the fix for [JDK-8312555](https://bugs.openjdk.org/browse/JDK-8312555). > > Alexey Ivanov has updated the pull request incrementally with one additional commit since the last revision: > > 8316206: Use GlyphVector.getVisualBounds().isEmpty() > > Filter out broken fonts by GlyphVector.getVisualBounds().isEmpty() Thanks for this timely fix! ------------- PR Comment: https://git.openjdk.org/jdk/pull/15818#issuecomment-1736770130 From clanger at openjdk.org Wed Sep 27 08:10:16 2023 From: clanger at openjdk.org (Christoph Langer) Date: Wed, 27 Sep 2023 08:10:16 GMT Subject: RFR: 8316710: Exclude java/awt/font/Rotate/RotatedTextTest.java [v2] In-Reply-To: References: Message-ID: > Exclude java/awt/font/Rotate/RotatedTextTest.java until [JDK-8219641](https://bugs.openjdk.org/browse/JDK-8219641) is fixed. The error shows in several linux installations. Christoph Langer 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: - Move exclusion to a better place - Merge branch 'master' into JDK-8316710 - JDK-8316710 ------------- Changes: - all: https://git.openjdk.org/jdk/pull/15880/files - new: https://git.openjdk.org/jdk/pull/15880/files/ca1339d9..a9f58cc9 Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=15880&range=01 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=15880&range=00-01 Stats: 6672 lines in 274 files changed: 5430 ins; 462 del; 780 mod Patch: https://git.openjdk.org/jdk/pull/15880.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/15880/head:pull/15880 PR: https://git.openjdk.org/jdk/pull/15880 From clanger at openjdk.org Wed Sep 27 08:10:18 2023 From: clanger at openjdk.org (Christoph Langer) Date: Wed, 27 Sep 2023 08:10:18 GMT Subject: RFR: 8316710: Exclude java/awt/font/Rotate/RotatedTextTest.java [v2] In-Reply-To: References: Message-ID: On Tue, 26 Sep 2023 13:37:53 GMT, Alexey Ivanov wrote: >> I couldn't find any best practices for problem-listing. >> >> Yet keeping tests in the same area closer seems like a good idea to me. Either line is fine with me. Thanks. >> >> I started an internal discussion in clientlibs to see whether there are any conventions. > >> Yet keeping tests in the same area closer seems like a good idea to me. Either line is fine with me. > > Let's go for the latter one, line 416. > >> I started an internal discussion in clientlibs to see whether there are any conventions. > > It looks there are no strict conventions. There groups for *awt* and *swing*, there are also some subheaders to group tests which fail with the same root cause, like the one above the line you're adding. > > At the same time, I still think it's better to group tests? This one is in `awt/font`, let's add close to another one. > > Other than that, it looks good to me, I'll approve it. OK, great. I've moved the exclusion to the proposed line. Thanks for checking. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/15880#discussion_r1338208758 From aivanov at openjdk.org Wed Sep 27 11:51:15 2023 From: aivanov at openjdk.org (Alexey Ivanov) Date: Wed, 27 Sep 2023 11:51:15 GMT Subject: RFR: 8316710: Exclude java/awt/font/Rotate/RotatedTextTest.java [v2] In-Reply-To: References: Message-ID: On Wed, 27 Sep 2023 08:10:16 GMT, Christoph Langer wrote: >> Exclude java/awt/font/Rotate/RotatedTextTest.java until [JDK-8219641](https://bugs.openjdk.org/browse/JDK-8219641) is fixed. The error shows in several linux installations. > > Christoph Langer 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: > > - Move exclusion to a better place > - Merge branch 'master' into JDK-8316710 > - JDK-8316710 Marked as reviewed by aivanov (Reviewer). ------------- PR Review: https://git.openjdk.org/jdk/pull/15880#pullrequestreview-1646267896 From aivanov at openjdk.org Wed Sep 27 11:51:16 2023 From: aivanov at openjdk.org (Alexey Ivanov) Date: Wed, 27 Sep 2023 11:51:16 GMT Subject: RFR: 8316710: Exclude java/awt/font/Rotate/RotatedTextTest.java [v2] In-Reply-To: References: Message-ID: On Wed, 27 Sep 2023 08:04:02 GMT, Christoph Langer wrote: >>> Yet keeping tests in the same area closer seems like a good idea to me. Either line is fine with me. >> >> Let's go for the latter one, line 416. >> >>> I started an internal discussion in clientlibs to see whether there are any conventions. >> >> It looks there are no strict conventions. There groups for *awt* and *swing*, there are also some subheaders to group tests which fail with the same root cause, like the one above the line you're adding. >> >> At the same time, I still think it's better to group tests? This one is in `awt/font`, let's add close to another one. >> >> Other than that, it looks good to me, I'll approve it. > > OK, great. I've moved the exclusion to the proposed line. Thanks for checking. Thank you, Christoph! ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/15880#discussion_r1338482530 From clanger at openjdk.org Wed Sep 27 12:40:31 2023 From: clanger at openjdk.org (Christoph Langer) Date: Wed, 27 Sep 2023 12:40:31 GMT Subject: RFR: 8316710: Exclude java/awt/font/Rotate/RotatedTextTest.java [v2] In-Reply-To: References: Message-ID: On Wed, 27 Sep 2023 08:10:16 GMT, Christoph Langer wrote: >> Exclude java/awt/font/Rotate/RotatedTextTest.java until [JDK-8219641](https://bugs.openjdk.org/browse/JDK-8219641) is fixed. The error shows in several linux installations. > > Christoph Langer 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: > > - Move exclusion to a better place > - Merge branch 'master' into JDK-8316710 > - JDK-8316710 Thanks Alexey! ------------- PR Comment: https://git.openjdk.org/jdk/pull/15880#issuecomment-1737307224 From clanger at openjdk.org Wed Sep 27 12:40:32 2023 From: clanger at openjdk.org (Christoph Langer) Date: Wed, 27 Sep 2023 12:40:32 GMT Subject: Integrated: 8316710: Exclude java/awt/font/Rotate/RotatedTextTest.java In-Reply-To: References: Message-ID: <4mWUYcOQ8AXlbgk8KTUFBZvQxPl4u44eKm4JQZmRzeY=.639c9c80-2ac1-410f-a217-d36de7c2775f@github.com> On Fri, 22 Sep 2023 06:20:42 GMT, Christoph Langer wrote: > Exclude java/awt/font/Rotate/RotatedTextTest.java until [JDK-8219641](https://bugs.openjdk.org/browse/JDK-8219641) is fixed. The error shows in several linux installations. This pull request has now been integrated. Changeset: ad6df41a Author: Christoph Langer URL: https://git.openjdk.org/jdk/commit/ad6df41a9e4356b9c5de681f200f386f72c76ae2 Stats: 1 line in 1 file changed: 1 ins; 0 del; 0 mod 8316710: Exclude java/awt/font/Rotate/RotatedTextTest.java Reviewed-by: mbaesken, aivanov ------------- PR: https://git.openjdk.org/jdk/pull/15880 From aivanov at openjdk.org Wed Sep 27 15:54:29 2023 From: aivanov at openjdk.org (Alexey Ivanov) Date: Wed, 27 Sep 2023 15:54:29 GMT Subject: RFR: 8316211: Open source several manual applet tests [v3] In-Reply-To: References: <76b2-b6qr-MNBiDvTuZYs1bKZAbC21UMhoFxTZDJAGc=.2af94b7b-2a4d-4724-a08a-08a162ef1d4c@github.com> <1v8n1a0RfNUgmZ__k1khLNQ6_ylijPi_3Y1CX81gx3Y=.3afd8b26-8982-4ca1-8684-e372a7db7c46@github.com> Message-ID: <-nPWeHCoYHaFZ0s_pCIg9kLG-crsoD_bOJcKNFMFlAE=.282de22a-a48d-4e0a-b26a-d78464edb705@github.com> On Tue, 26 Sep 2023 14:46:39 GMT, Alexey Ivanov wrote: >> I have already tried this using keyboard shortcuts. >> >> Alt+F4 works fine on Window and Linux (many popular DEs close windows by Alt+F4 by default, e.g. Gnome shell, Plasma). >> >> For macos we don't have a system handler for Cmd + W >> >> But I haven't tried to use mouse on the close button. >> >> I think something could come out of this, Alt+F4 for Windows/Linux, mouse click on close button for macos. >> But this will probably be a task for one of the next test sprints. > >> But this will probably be a task for one of the next test sprints. > > Absolutely, it's too many changes. Yet it may make the test easier. > > In fact, I thought about iterating the values automatically ? and ask the tester to click the Close button on the window. The *do nothing* could be the last option tested, and the frame/dialog would be closed from the handler. > > Another way could be sending the event programmatically. This would automate the test completely. However, we may still leave the manual test? just in case the tester sees anything unusual. I submitted [JDK-8317107](https://bugs.openjdk.org/browse/JDK-8317107): *Investigate automating JFrame/DefaultCloseOperation.java*, so it doesn't get lost. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/15827#discussion_r1338826849 From aivanov at openjdk.org Wed Sep 27 16:08:27 2023 From: aivanov at openjdk.org (Alexey Ivanov) Date: Wed, 27 Sep 2023 16:08:27 GMT Subject: RFR: 8316211: Open source several manual applet tests [v3] In-Reply-To: References: <76b2-b6qr-MNBiDvTuZYs1bKZAbC21UMhoFxTZDJAGc=.2af94b7b-2a4d-4724-a08a-08a162ef1d4c@github.com> <1v8n1a0RfNUgmZ__k1khLNQ6_ylijPi_3Y1CX81gx3Y=.3afd8b26-8982-4ca1-8684-e372a7db7c46@github.com> Message-ID: <5Tww0TRpf7VilV6HN2b-X-W1lOUqei5WX21v62Dwqe0=.26e68c65-21dc-42f5-b9ca-11c47b9b68f4@github.com> On Tue, 26 Sep 2023 14:43:13 GMT, Alexey Ivanov wrote: >> I think it's fine the way it is now. Just in case the user sees some unusual failure. > > Well, yes? I haven't thought about it. Anyway I submitted [JDK-8317111](https://bugs.openjdk.org/browse/JDK-8317111): Provide access to Pass/Fail buttons of PassFailJFrame. There could be scenarios where it's useful to control access to Pass/Fail buttons. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/15827#discussion_r1338847018 From aivanov at openjdk.org Wed Sep 27 16:25:29 2023 From: aivanov at openjdk.org (Alexey Ivanov) Date: Wed, 27 Sep 2023 16:25:29 GMT Subject: RFR: 8316211: Open source several manual applet tests [v3] In-Reply-To: <1v8n1a0RfNUgmZ__k1khLNQ6_ylijPi_3Y1CX81gx3Y=.3afd8b26-8982-4ca1-8684-e372a7db7c46@github.com> References: <76b2-b6qr-MNBiDvTuZYs1bKZAbC21UMhoFxTZDJAGc=.2af94b7b-2a4d-4724-a08a-08a162ef1d4c@github.com> <1v8n1a0RfNUgmZ__k1khLNQ6_ylijPi_3Y1CX81gx3Y=.3afd8b26-8982-4ca1-8684-e372a7db7c46@github.com> Message-ID: On Mon, 25 Sep 2023 15:45:59 GMT, Alexey Ivanov wrote: >> Alexander Zvegintsev has updated the pull request incrementally with one additional commit since the last revision: >> >> review comments > > test/jdk/java/awt/Frame/DefaultSizeTest.java line 42: > >> 40: and should be the minimum size allowed by the window manager. >> 41: For any WM, the frame should be very small. >> 42: When the test is complete, click Pass or Fail as appropriate. > > I guess we can't determine the minimum size, yet it's a bit confusing. > > Reading [JDK-4033151](https://bugs.openjdk.org/browse/JDK-4033151) reveals the frame remained invisible on Solaris 2.5 and appeared in virtual desktop with a large size. > > Being more specific could still help: If the frame is not large, click Pass or Fail otherwise. > > This test would benefit from screenshots. Submitted [JDK-8317112](https://bugs.openjdk.org/browse/JDK-8317112): Add screenshot for Frame/DefaultSizeTest.java. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/15827#discussion_r1338874735 From aivanov at openjdk.org Wed Sep 27 16:35:13 2023 From: aivanov at openjdk.org (Alexey Ivanov) Date: Wed, 27 Sep 2023 16:35:13 GMT Subject: RFR: 8294158: HTML formatting for PassFailJFrame instructions In-Reply-To: References: <_66glVfDeTgdOjLf6UFWUpvbLliLuQh-vhHmQnYaHBg=.a6500a45-7b96-4cff-b14d-cf0375becb72@github.com> Message-ID: On Wed, 20 Sep 2023 18:05:31 GMT, Phil Race wrote: > One thing about these and the other enhancements I see is that there's an (increasing) need for a nice bit of documentation in PassFailJFrame itself about all its features. > Easiest to do this as you are adding them, so a doc comment block can be started with this one. Probably as a class comment. Yes, I absolutely agree, the class requires adding docs. It's what I wrote in PR #15665: the entire class requires a bit of TLC for documentation. Yet I'd rather do it for PR #15665, it is easier to handle in one place rather than writing docs for one feature just to modify them right away for another feature. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/15660#discussion_r1338892141 From aivanov at openjdk.org Wed Sep 27 16:45:15 2023 From: aivanov at openjdk.org (Alexey Ivanov) Date: Wed, 27 Sep 2023 16:45:15 GMT Subject: RFR: 8294156: Allow PassFailJFrame.Builder to create test UI [v2] In-Reply-To: <80EWWL3FSNahyei94fPqu9XLOceu_wt-Xw7abes--_8=.a3b5ec1b-b0b2-4f76-847e-36a31af83976@github.com> References: <80EWWL3FSNahyei94fPqu9XLOceu_wt-Xw7abes--_8=.a3b5ec1b-b0b2-4f76-847e-36a31af83976@github.com> Message-ID: On Wed, 20 Sep 2023 18:12:25 GMT, Phil Race wrote: >>> Shouldn't we mention here a window added by `testUI` via builder? >> >> I don't think it's necessary: the builder uses `addTestWindow` under the hood. It's the builder that requires documentation. >> >> In fact, the entire class requires a bit of TLC for documentation. I even wrote some after Lawrence @lawrence-andrew created the first version of `PassFailJFrame` but I never finished it. Even this part was implemented nearly a year ago. >> >> I plan to create a wiki page on the [client-libs wiki](https://wiki.openjdk.org/display/ClientLibs) to describe creating manual tests with `PassFailJFrame`. > >> > Shouldn't we mention here a window added by `testUI` via builder? >> >> I don't think it's necessary: the builder uses `addTestWindow` under the hood. It's the builder that requires documentation. >> >> In fact, the entire class requires a bit of TLC for documentation. I even wrote some after Lawrence @lawrence-andrew created the first version of `PassFailJFrame` but I never finished it. Even this part was implemented nearly a year ago. >> >> I plan to create a wiki page on the [client-libs wiki](https://wiki.openjdk.org/display/ClientLibs) to describe creating manual tests with `PassFailJFrame`. > > Just saw this, and it mirrors what I wrote in another PR that we need docs, but I believe they are best placed inside the source itself. Not everyone who can update this source can update the wiki. > That doesn't preclude you from putting more examples on the wiki and a reference to it from the source but I still think there should be docs in the source. > > Include how to use this feature and something like to the builder example you have here might be good too. In fact, I started writing javadoc for `PassFailJFrame` while Lawrence and I discussed it. I explained how to use the framework. But I have never finished it to a PR-ready state. As I noted in the [HTML enhancement PR](https://github.com/openjdk/jdk/pull/15660#discussion_r1338892141), I'd rather document both features together. On the other hand, I would prefer integrating this so that people could use it already. In my opinion, this feature streamlines the usage of `PassFailJFrame`. At the same time, the framework needs docs badly, especially as such rich features are added. And writing docs usually slips as other tasks come up. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/15665#discussion_r1338906945 From aivanov at openjdk.org Wed Sep 27 17:01:16 2023 From: aivanov at openjdk.org (Alexey Ivanov) Date: Wed, 27 Sep 2023 17:01:16 GMT Subject: RFR: 8294156: Allow PassFailJFrame.Builder to create test UI [v2] In-Reply-To: <2AD15rZ3B4RKFOsu-GAK6vMllvVuywhwQPJvdIxPnJ0=.c824db8b-0efb-4916-84e2-4b093fd8d942@github.com> References: <2AD15rZ3B4RKFOsu-GAK6vMllvVuywhwQPJvdIxPnJ0=.c824db8b-0efb-4916-84e2-4b093fd8d942@github.com> Message-ID: On Wed, 13 Sep 2023 14:25:19 GMT, Alexey Ivanov wrote: >> This enhances the `Builder` pattern added in [JDK-8294535](https://bugs.openjdk.org/browse/JDK-8294535) with a new method `testUI` which allows passing a lambda expression or a method reference to create *the test UI window*. >> >> The `PassFailJFrame` will automatically call the method on the EDT to create the UI, add it to the internal list of windows, install the window closing listener and finally position and show both the instructions and test UI. >> >> Alternatively, you can pass an already created window. >> >> The `main` method of a manual test could look as simple as a sequence of calls: >> >> >> public static void main(String[] args) throws Exception { >> PassFailJFrame.builder() >> .instructions(INSTRUCTIONS) >> .testUI(() -> createTestUI()) >> .build() >> .awaitAndCheck(); >> } >> >> where `createTestUI` returns a test UI window. > > Alexey Ivanov has updated the pull request incrementally with one additional commit since the last revision: > > 8294156: Allow creating several test windows > > The windows can be positioned in advance, or > a call back PositionWindows interface can be used > to define their positions after the instruction UI > frame is positioned on the screen. I submitted an enhancement [JDK-8317116](https://bugs.openjdk.org/browse/JDK-8317116): _Provide layouts for multiple test UI in `PassFailJFrame`_. ------------- PR Comment: https://git.openjdk.org/jdk/pull/15665#issuecomment-1737766845 From aivanov at openjdk.org Wed Sep 27 17:01:16 2023 From: aivanov at openjdk.org (Alexey Ivanov) Date: Wed, 27 Sep 2023 17:01:16 GMT Subject: RFR: 8294156: Demo positioning of multiple test windows [v2] In-Reply-To: References: Message-ID: On Thu, 14 Sep 2023 14:53:08 GMT, Alexey Ivanov wrote: >> test/jdk/java/awt/Window/8294156/manyWindows/TwoWindowColumnsH.java line 96: >> >>> 94: private static final int COLUMNS = 3; >>> 95: >>> 96: public static void positionTestUI(List windows, >> >> When I thought about adding more than one window, I thought about simply placing everything in a row. >> >> Looking at all this I have mixed feelings. >> On the one hand a person using all this for the first time will have to spend some time to understand how it works, or take the easy way out and manually arrange the windows. >> On the other hand, the result is impressive, and can make life easier if you don't have to write positionTestUI every time. >> >> I think if we do go this way, we should add some standard positionTestUI implementations to PassFailJFrame so that we don't have to reinvent the wheel every time. >> >> It is also worth considering that looks like we don't have many tests with more than 2-3 windows. > > Isn't it the problem? If we allow adding more than one window, there should be a way to position them? as we have a way to position one test window. Do you agree? > >> When I thought about adding more than one window, I thought about simply placing everything in a row. > > This is pretty easy. If you look at `TwoWindowsHH.java` > https://github.com/openjdk/jdk/blob/4c0e4d097e3a484698bee0356ba36557ccc9e96c/test/jdk/java/awt/Window/8294156/twoWindows/TwoWindowsHH.java#L64-L69 > > It implements positioning of test windows in a row, either to the right of the instructions or below it. > > Then `TwoWindowsHV.java` does the same for placing test windows in a column to the right or below the instructions. > > This still requires refinement. > >> Looking at all this I have mixed feelings. > > I do too. > > When Lawrence @lawrence-andrew and I started on the manual test framework ([JDK-8283712](https://bugs.openjdk.org/browse/JDK-8283712)), I envisioned it as something light that provided a quick and easy replacement for applet-based manual Yes/No test, that also gave a unified look to manual tests. If I remember correctly, we took inspiration from your code. ;) > > As new scenarios emerged, the framework grew? Yet it wasn't as easy to use, it still required manually creating test UI, registering test windows. The idea of disposing of all the frames was rejected on [the code review](https://github.com/openjdk/jdk/pull/7966#discussion_r835700911). > > I truly believe Lawrence's idea of the builder pattern ([JDK-8294535](https://bugs.openjdk.org/browse/JDK-8294535)) is a *game-changer*. With the addition of the `testUI` method, the entire `main` method becomes simple, *streamlined*. I think it makes using the framework easier. > > I had this idea of passing a method reference to create a test window from the start. But I never thought about supporting two test windows or more. > > As you can see, handling one test window is much simpler, the internals have grown dramatically with multiple windows. > > At the same time, I must **thank you** for raising this problem. Adding support for multiple windows would've been harder if I'd handled only one test window. > >> On the one hand a person using all this for the first time will have to spend some time to understand how it works, or take the easy way out and manually arrange the windows. > > The hardest part is making it easy to use? and flexible at the same time. > > Manually arranging windows could be easier as the developer knows more about their intentions. Ha... > > ?We should add some standard positionTestUI implementations to PassFailJFrame so that we don't have to reinvent the wheel every time. > > I didn't even think about not providing any default implementations of `positionTestUI` ? that's the idea! The framework should support simple layouts. I submitted an enhancement [JDK-8317116](https://bugs.openjdk.org/browse/JDK-8317116): _Provide layouts for multiple test UI in `PassFailJFrame`_. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/15721#discussion_r1338928149 From achung at openjdk.org Wed Sep 27 23:23:37 2023 From: achung at openjdk.org (Alisen Chung) Date: Wed, 27 Sep 2023 23:23:37 GMT Subject: Integrated: 8316371: Open some swing tests 6 In-Reply-To: References: Message-ID: On Thu, 21 Sep 2023 21:45:49 GMT, Alisen Chung wrote: > Opening some closed tests: > 20 javax/swing/plaf/windows/4736093/bug4736093.java > 21 javax/swing/table/DefaultTableCellRenderer/4240870/bug4240870.java > 22 javax/swing/table/JTableHeader/4243927/bug4243927.java > 23 javax/swing/text/AbstractDocument/4549069/bug4549069.java > 24 javax/swing/text/AbstractWriter/4185537/bug4185537.java This pull request has now been integrated. Changeset: d3a79b58 Author: Alisen Chung URL: https://git.openjdk.org/jdk/commit/d3a79b5861be27227b8c28cb3acdce089b74c50b Stats: 569 lines in 5 files changed: 569 ins; 0 del; 0 mod 8316371: Open some swing tests 6 Reviewed-by: dnguyen, prr ------------- PR: https://git.openjdk.org/jdk/pull/15873 From jwaters at openjdk.org Thu Sep 28 03:12:03 2023 From: jwaters at openjdk.org (Julian Waters) Date: Thu, 28 Sep 2023 03:12:03 GMT Subject: RFR: 8307160: [REDO] Enable the permissive- flag on the Microsoft Visual C compiler [v6] In-Reply-To: <7piLRto5nNbhYYYfENCr5ecm4M2xNtMkjkE8XhrLLQ0=.8fd1ac3a-46f8-47a8-ae37-a4abbf7757d9@github.com> References: <7piLRto5nNbhYYYfENCr5ecm4M2xNtMkjkE8XhrLLQ0=.8fd1ac3a-46f8-47a8-ae37-a4abbf7757d9@github.com> Message-ID: > We should set the -permissive- flag for the Microsoft Visual C compiler, as was requested by the now backed out [JDK-8241499](https://bugs.openjdk.org/browse/JDK-8241499). Doing so makes the Visual C compiler much less accepting of ill formed code, which will improve code quality on Windows in the future. Julian Waters has updated the pull request with a new target base due to a merge or a rebase. The pull request now contains 26 commits: - Merge branch 'openjdk:master' into patch-10 - Merge branch 'master' into patch-10 - Document changes in awt_DnDDS.cpp - Remove negation in os_windows.cpp - Mismatched declaration in D3DGlyphCache.cpp - Fields in awt_TextComponent.cpp - reinterpret_cast needed in AccessBridgeJavaEntryPoints.cpp - Qualifiers in awt_PrintDialog.h should be removed - Likewise for awt_DnDDT.cpp - awt_ole.h include order issue in awt_DnDDS.cpp - ... and 16 more: https://git.openjdk.org/jdk/compare/84390dd0...1e2b39f9 ------------- Changes: https://git.openjdk.org/jdk/pull/15096/files Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=15096&range=05 Stats: 802 lines in 17 files changed: 171 ins; 127 del; 504 mod Patch: https://git.openjdk.org/jdk/pull/15096.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/15096/head:pull/15096 PR: https://git.openjdk.org/jdk/pull/15096 From jwaters at openjdk.org Thu Sep 28 03:21:40 2023 From: jwaters at openjdk.org (Julian Waters) Date: Thu, 28 Sep 2023 03:21:40 GMT Subject: RFR: 8307160: [REDO] Enable the permissive- flag on the Microsoft Visual C compiler [v6] In-Reply-To: References: <7piLRto5nNbhYYYfENCr5ecm4M2xNtMkjkE8XhrLLQ0=.8fd1ac3a-46f8-47a8-ae37-a4abbf7757d9@github.com> Message-ID: On Thu, 28 Sep 2023 03:12:03 GMT, Julian Waters wrote: >> We should set the -permissive- flag for the Microsoft Visual C compiler, as was requested by the now backed out [JDK-8241499](https://bugs.openjdk.org/browse/JDK-8241499). Doing so makes the Visual C compiler much less accepting of ill formed code, which will improve code quality on Windows in the future. > > Julian Waters has updated the pull request with a new target base due to a merge or a rebase. The pull request now contains 26 commits: > > - Merge branch 'openjdk:master' into patch-10 > - Merge branch 'master' into patch-10 > - Document changes in awt_DnDDS.cpp > - Remove negation in os_windows.cpp > - Mismatched declaration in D3DGlyphCache.cpp > - Fields in awt_TextComponent.cpp > - reinterpret_cast needed in AccessBridgeJavaEntryPoints.cpp > - Qualifiers in awt_PrintDialog.h should be removed > - Likewise for awt_DnDDT.cpp > - awt_ole.h include order issue in awt_DnDDS.cpp > - ... and 16 more: https://git.openjdk.org/jdk/compare/84390dd0...1e2b39f9 closing and deleting for now ------------- PR Comment: https://git.openjdk.org/jdk/pull/15096#issuecomment-1738377203 From jwaters at openjdk.org Thu Sep 28 03:21:41 2023 From: jwaters at openjdk.org (Julian Waters) Date: Thu, 28 Sep 2023 03:21:41 GMT Subject: Withdrawn: 8307160: [REDO] Enable the permissive- flag on the Microsoft Visual C compiler In-Reply-To: <7piLRto5nNbhYYYfENCr5ecm4M2xNtMkjkE8XhrLLQ0=.8fd1ac3a-46f8-47a8-ae37-a4abbf7757d9@github.com> References: <7piLRto5nNbhYYYfENCr5ecm4M2xNtMkjkE8XhrLLQ0=.8fd1ac3a-46f8-47a8-ae37-a4abbf7757d9@github.com> Message-ID: <2z8rwkhhnrcVYMmAFv0iyc9bYapjmtEtCEnlrlfFxWQ=.10d537c9-43f3-47ce-9e3e-fff1aaaadfb5@github.com> On Tue, 1 Aug 2023 01:52:24 GMT, Julian Waters wrote: > We should set the -permissive- flag for the Microsoft Visual C compiler, as was requested by the now backed out [JDK-8241499](https://bugs.openjdk.org/browse/JDK-8241499). Doing so makes the Visual C compiler much less accepting of ill formed code, which will improve code quality on Windows in the future. This pull request has been closed without being integrated. ------------- PR: https://git.openjdk.org/jdk/pull/15096 From duke at openjdk.org Thu Sep 28 06:17:24 2023 From: duke at openjdk.org (ScientificWare) Date: Thu, 28 Sep 2023 06:17:24 GMT Subject: RFR: JDK-8314731 : Add support for the alt attribute in the image type input HTML tag [v2] In-Reply-To: References: Message-ID: On Wed, 30 Aug 2023 14:20:41 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 = """ >> >> >> >>

    >> Write a test to check textArea triggers MouseEntered/MouseExited events properly MouseEntered should be triggered only when the mouse enters the component and MouseExited should be triggered when the mouse goes out of the component. In TextArea, when we moved the mouse inside the component MouseMoved events are triggered properly. But when we slowly took the mouse outside the component that is towards the scrollbars, we could see a MouseEntered event being triggered followed by MouseExited.(before actually mouse enters the scrollbar) Testing: Tested using Mach5(20 times per platform) in macos,linux and windows and got all pass. ------------- Commit messages: - 8316947: Jcheck issue - 8316947: Write a test to check textArea triggers MouseEntered/MouseExited events properly Changes: https://git.openjdk.org/jdk/pull/15961/files Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=15961&range=00 Issue: https://bugs.openjdk.org/browse/JDK-8316947 Stats: 137 lines in 1 file changed: 137 ins; 0 del; 0 mod Patch: https://git.openjdk.org/jdk/pull/15961.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/15961/head:pull/15961 PR: https://git.openjdk.org/jdk/pull/15961 From aivanov at openjdk.org Thu Sep 28 11:34:35 2023 From: aivanov at openjdk.org (Alexey Ivanov) Date: Thu, 28 Sep 2023 11:34:35 GMT Subject: Integrated: 8316159: Update BoxLayout sample image for crisper edges In-Reply-To: <3qA83A35UhJzf22QgJve-oeYd77lFaPYMGmMZxcXNmM=.4a035825-7a75-47ce-803b-324be5881afe@github.com> References: <3qA83A35UhJzf22QgJve-oeYd77lFaPYMGmMZxcXNmM=.4a035825-7a75-47ce-803b-324be5881afe@github.com> Message-ID: On Wed, 13 Sep 2023 09:17:16 GMT, Alexey Ivanov wrote: > **Problem** > > On a standard display with the scale of 100%, the BoxLayout sample has blurred edges. > > It is the result of how SVG is rendered: the strokes fall between the pixel grid, therefore a 1-pixel wide stroke is blurred between the previous and the following pixels with 50% of colour on each pixel. It doesn't look as good. > > **Fix** > > Move all rectangles half a pixel to make edges crisp. The edges of the rectangles look crisp in 100% and 200%. > > For more information see answers to the following questions on Stack Overflow: > > - [Why is my SVG line blurry or 2px in height when I specified 1px?](https://stackoverflow.com/a/34229584/572834) > - [Avoiding lines between adjacent SVG rectangles](https://stackoverflow.com/a/23376793/572834) This pull request has now been integrated. Changeset: 3481ecb2 Author: Alexey Ivanov URL: https://git.openjdk.org/jdk/commit/3481ecb25585d427f2c272e475c7f4ebbf60b799 Stats: 5 lines in 1 file changed: 0 ins; 0 del; 5 mod 8316159: Update BoxLayout sample image for crisper edges Move all rectangles half a pixel to make edges crisp Reviewed-by: prr ------------- PR: https://git.openjdk.org/jdk/pull/15703 From georgewangari44 at gmail.com Thu Sep 28 15:20:26 2023 From: georgewangari44 at gmail.com (George Wangari) Date: Thu, 28 Sep 2023 18:20:26 +0300 Subject: Confirmation Message-ID: I would like to cofirm mailing development process and progress. From georgewangari44 at gmail.com Thu Sep 28 15:22:36 2023 From: georgewangari44 at gmail.com (George Wangari) Date: Thu, 28 Sep 2023 18:22:36 +0300 Subject: Confirm Message-ID: Mailing process From achung at openjdk.org Thu Sep 28 15:42:36 2023 From: achung at openjdk.org (Alisen Chung) Date: Thu, 28 Sep 2023 15:42:36 GMT Subject: RFR: 8316146: Open some swing tests 4 [v2] In-Reply-To: References: <84rFHCxQOmHAKLvYCg9C1Qy8x4ebcdJXAmR9mvncLWs=.d6354e6f-d1df-4405-b749-ea53baae9828@github.com> Message-ID: On Mon, 25 Sep 2023 11:45:24 GMT, Alexey Ivanov wrote: >> Alisen Chung has updated the pull request incrementally with two additional commits since the last revision: >> >> - updated tests based on feedback >> - updated tests > > test/jdk/javax/swing/BasicMenuItemUI/bug4239714.java line 27: > >> 25: * @test >> 26: * @bug 4239714 >> 27: * @summary Tests that BasicMenuItemUI.installComponent() is protected > > I doubt this test is useful? Wouldn't it be verified with JCK? > > I had a similar doubt about another case where test used a new method that was added in 1.3.0 or an earlier release. Since this isn't a test for applet I think we should keep it for now ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/15875#discussion_r1340346014 From aivanov at openjdk.org Thu Sep 28 15:56:35 2023 From: aivanov at openjdk.org (Alexey Ivanov) Date: Thu, 28 Sep 2023 15:56:35 GMT Subject: RFR: 8316146: Open some swing tests 4 [v3] In-Reply-To: References: Message-ID: <3SWE-Z3X7_2CG_5L6NCeJlFCwrzp9Vd_xQjGIWzGOcg=.d8f631b6-bba9-46ba-8abc-c0acba356cd2@github.com> On Mon, 25 Sep 2023 22:32:05 GMT, Alisen Chung wrote: >> Opening closed tests: >> 12 javax/swing/ToolTipManager/5078214/bug5078214.java >> 13 javax/swing/plaf/basic/BasicMenuItemUI/4239714/bug4239714.java >> 14 javax/swing/plaf/basic/BasicMenuUI/4244616/bug4244616.java >> 15 javax/swing/plaf/metal/4306431/bug4306431.java > > Alisen Chung has updated the pull request incrementally with one additional commit since the last revision: > > updated tests based on feedback Changes requested by aivanov (Reviewer). test/jdk/javax/swing/BasicMenuUI/bug4244616.java line 41: > 39: public class bug4244616 { > 40: static PrintStream oldOut; > 41: static PrintStream oldErr; Declare them before the try block, there's no need for them to be fields. See below. test/jdk/javax/swing/BasicMenuUI/bug4244616.java line 61: > 59: > 60: oldOut = System.out; > 61: oldErr = System.err; // Redirect streams final PrintStream oldOut = System.out; final PrintStream oldErr = System.err; try (ByteArrayOutputStream bout = new ByteArrayOutputStream(); ByteArrayOutputStream berr = new ByteArrayOutputStream(); PrintStream out = new PrintStream(bout); PrintStream err = new PrintStream(berr)) { // Perform the test } finally { // Restore streams System.setOut(oldOut); System.setErr(oldErr); } test/jdk/javax/swing/ToolTipManager/bug5078214.java line 58: > 56: static volatile Rectangle bounds; > 57: static volatile Insets insets; > 58: static volatile JRobot r; Robot is created and used on the main thread only, it doesn't need to be `volatile`. You should rename it to `robot`. test/jdk/javax/swing/ToolTipManager/bug5078214.java line 147: > 145: }); > 146: > 147: } As I said, there's absolutely no reason to call `GraphicsEnvironment` methods on EDT ? these are not Swing components. There's no reason to store any of these as static fields, they are local variables. Suggestion: private static GraphicsConfiguration getGraphicsConfig() { GraphicsDevice[] devices = GraphicsEnvironment.getLocalGraphicsEnvironment() .getScreenDevices(); for (GraphicsDevice device : devices) { GraphicsConfiguration[] gc = device.getConfigurations(); for (int i = 0; i < gc.length; i++) { insets = Toolkit.getDefaultToolkit().getScreenInsets(gc[i]); if (insets.bottom != 0) { return gc[i]; } } } return null; } You call this function from the `main` method. ------------- PR Review: https://git.openjdk.org/jdk/pull/15875#pullrequestreview-1644408576 PR Review Comment: https://git.openjdk.org/jdk/pull/15875#discussion_r1337294239 PR Review Comment: https://git.openjdk.org/jdk/pull/15875#discussion_r1337301304 PR Review Comment: https://git.openjdk.org/jdk/pull/15875#discussion_r1337327968 PR Review Comment: https://git.openjdk.org/jdk/pull/15875#discussion_r1337319542 From aivanov at openjdk.org Thu Sep 28 15:56:39 2023 From: aivanov at openjdk.org (Alexey Ivanov) Date: Thu, 28 Sep 2023 15:56:39 GMT Subject: RFR: 8316146: Open some swing tests 4 [v2] In-Reply-To: References: <84rFHCxQOmHAKLvYCg9C1Qy8x4ebcdJXAmR9mvncLWs=.d6354e6f-d1df-4405-b749-ea53baae9828@github.com> Message-ID: On Mon, 25 Sep 2023 22:00:33 GMT, Alisen Chung wrote: >> test/jdk/javax/swing/BasicMenuUI/bug4244616.java line 67: >> >>> 65: action.actionPerformed(ev); >>> 66: } catch (Exception ignored) { >>> 67: } >> >> Are exceptions thrown here? > > Yea, an exception is thrown here and the original test ignores the exception Okay, thanks for clarification. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/15875#discussion_r1337303698 From aivanov at openjdk.org Thu Sep 28 15:56:43 2023 From: aivanov at openjdk.org (Alexey Ivanov) Date: Thu, 28 Sep 2023 15:56:43 GMT Subject: RFR: 8316146: Open some swing tests 4 [v3] In-Reply-To: <_hraCg_dnCbTkYPkAZlVjNr22v28rXLrFevRQVDVDwM=.fd7f6096-c3a4-4ad8-949e-b20c2d382167@github.com> References: <_hraCg_dnCbTkYPkAZlVjNr22v28rXLrFevRQVDVDwM=.fd7f6096-c3a4-4ad8-949e-b20c2d382167@github.com> Message-ID: On Fri, 22 Sep 2023 12:39:04 GMT, Alexey Ivanov wrote: >> test/jdk/javax/swing/ToolTipManager/bug5078214.java line 102: >> >>> 100: System.out.print("We need at least one screen with "); >>> 101: System.out.println("the taskbar at the bottom position."); >>> 102: System.out.println("Testing skipped."); >> >> @azvegint mentioned about Ubuntu issue, you will probably need either a return or jtreg Skipped Exception here. Using jtreg Skipped Exception is more appropriate here. > > I would also recommend inverting the condition to avoid additional indentation. This is still not resolved! You should throw `jtreg.SkippedException` if `getGraphicsConfig()` returns `null`. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/15875#discussion_r1337324056 From aivanov at openjdk.org Thu Sep 28 16:03:35 2023 From: aivanov at openjdk.org (Alexey Ivanov) Date: Thu, 28 Sep 2023 16:03:35 GMT Subject: RFR: 8316146: Open some swing tests 4 [v2] In-Reply-To: References: <84rFHCxQOmHAKLvYCg9C1Qy8x4ebcdJXAmR9mvncLWs=.d6354e6f-d1df-4405-b749-ea53baae9828@github.com> Message-ID: On Thu, 28 Sep 2023 15:39:27 GMT, Alisen Chung wrote: > Since this isn't a test for applet I think we should keep it for now What do you mean? All the test does is it verifies the `installComponents` method is accessible in a subclass of `BasicMenuItemUI`. The [`installComponents`](https://docs.oracle.com/en/java/javase/21/docs/api/java.desktop/javax/swing/plaf/basic/BasicMenuItemUI.html#installComponents(javax.swing.JMenuItem)) method is protected since JDK 1.3, it's now a public API. Removing it requires a CSR. Can it be accidentally removed? Can it be accidentally made package-private or private? *Very unlikely.* Therefore, we can save time by not running this test. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/15875#discussion_r1340373481 From aivanov at openjdk.org Thu Sep 28 16:08:28 2023 From: aivanov at openjdk.org (Alexey Ivanov) Date: Thu, 28 Sep 2023 16:08:28 GMT Subject: RFR: 8316146: Open some swing tests 4 [v3] In-Reply-To: <3SWE-Z3X7_2CG_5L6NCeJlFCwrzp9Vd_xQjGIWzGOcg=.d8f631b6-bba9-46ba-8abc-c0acba356cd2@github.com> References: <3SWE-Z3X7_2CG_5L6NCeJlFCwrzp9Vd_xQjGIWzGOcg=.d8f631b6-bba9-46ba-8abc-c0acba356cd2@github.com> Message-ID: On Tue, 26 Sep 2023 14:34:20 GMT, Alexey Ivanov wrote: >> Alisen Chung has updated the pull request incrementally with one additional commit since the last revision: >> >> updated tests based on feedback > > test/jdk/javax/swing/ToolTipManager/bug5078214.java line 147: > >> 145: }); >> 146: >> 147: } > > As I said, there's absolutely no reason to call `GraphicsEnvironment` methods on EDT ? these are not Swing components. > > There's no reason to store any of these as static fields, they are local variables. > > Suggestion: > > private static GraphicsConfiguration getGraphicsConfig() { > GraphicsDevice[] devices = GraphicsEnvironment.getLocalGraphicsEnvironment() > .getScreenDevices(); > for (GraphicsDevice device : devices) { > GraphicsConfiguration[] gc = device.getConfigurations(); > for (int i = 0; i < gc.length; i++) { > insets = Toolkit.getDefaultToolkit().getScreenInsets(gc[i]); > if (insets.bottom != 0) { > return gc[i]; > } > } > } > return null; > } > > > You call this function from the `main` method. The nested loop could also be enhanced for: for (GraphicsConfiguration config : device.getConfigurations()) { insets = Toolkit.getDefaultToolkit().getScreenInsets(config); if (insets.bottom != 0) { return config; } } ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/15875#discussion_r1340379635 From prr at openjdk.org Thu Sep 28 17:13:30 2023 From: prr at openjdk.org (Phil Race) Date: Thu, 28 Sep 2023 17:13:30 GMT Subject: RFR: 8316146: Open some swing tests 4 [v3] In-Reply-To: References: Message-ID: On Mon, 25 Sep 2023 22:32:05 GMT, Alisen Chung wrote: >> Opening closed tests: >> 12 javax/swing/ToolTipManager/5078214/bug5078214.java >> 13 javax/swing/plaf/basic/BasicMenuItemUI/4239714/bug4239714.java >> 14 javax/swing/plaf/basic/BasicMenuUI/4244616/bug4244616.java >> 15 javax/swing/plaf/metal/4306431/bug4306431.java > > Alisen Chung has updated the pull request incrementally with one additional commit since the last revision: > > updated tests based on feedback Marked as reviewed by prr (Reviewer). ------------- PR Review: https://git.openjdk.org/jdk/pull/15875#pullrequestreview-1649355809 From prr at openjdk.org Thu Sep 28 17:13:31 2023 From: prr at openjdk.org (Phil Race) Date: Thu, 28 Sep 2023 17:13:31 GMT Subject: RFR: 8316146: Open some swing tests 4 [v2] In-Reply-To: References: <84rFHCxQOmHAKLvYCg9C1Qy8x4ebcdJXAmR9mvncLWs=.d6354e6f-d1df-4405-b749-ea53baae9828@github.com> Message-ID: On Thu, 28 Sep 2023 16:00:15 GMT, Alexey Ivanov wrote: >> Since this isn't a test for applet I think we should keep it for now > >> Since this isn't a test for applet I think we should keep it for now > > What do you mean? > > All the test does is it verifies the `installComponents` method is accessible in a subclass of `BasicMenuItemUI`. The [`installComponents`](https://docs.oracle.com/en/java/javase/21/docs/api/java.desktop/javax/swing/plaf/basic/BasicMenuItemUI.html#installComponents(javax.swing.JMenuItem)) method is protected since JDK 1.3, it's now a public API. Removing it requires a CSR. > > Can it be accidentally removed? Can it be accidentally made package-private or private? *Very unlikely.* Therefore, we can save time by not running this test. the comment about applet is a bit out of context. Its from a comment I made off-line that if you were taking a test that was written as an Applet and it explicitly a test for applets, that would be a good example of a test to drop since JDK 22 doesn't support Applets, even thought the API is still there. In this case, I agree I would not have bothered porting this test that basically corresponds to the signature tests, but its also harmless, notwithstanding the very tiny cost of running this as a (now) headless test. But since it was already done, I think we can keep it. It is a thousand times better than it was before in its old form. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/15875#discussion_r1340452893 From aivanov at openjdk.org Thu Sep 28 17:13:34 2023 From: aivanov at openjdk.org (Alexey Ivanov) Date: Thu, 28 Sep 2023 17:13:34 GMT Subject: RFR: 8316146: Open some swing tests 4 [v3] In-Reply-To: References: <3SWE-Z3X7_2CG_5L6NCeJlFCwrzp9Vd_xQjGIWzGOcg=.d8f631b6-bba9-46ba-8abc-c0acba356cd2@github.com> Message-ID: On Thu, 28 Sep 2023 16:05:41 GMT, Alexey Ivanov wrote: >> test/jdk/javax/swing/ToolTipManager/bug5078214.java line 147: >> >>> 145: }); >>> 146: >>> 147: } >> >> As I said, there's absolutely no reason to call `GraphicsEnvironment` methods on EDT ? these are not Swing components. >> >> There's no reason to store any of these as static fields, they are local variables. >> >> Suggestion: >> >> private static GraphicsConfiguration getGraphicsConfig() { >> GraphicsDevice[] devices = GraphicsEnvironment.getLocalGraphicsEnvironment() >> .getScreenDevices(); >> for (GraphicsDevice device : devices) { >> GraphicsConfiguration[] gc = device.getConfigurations(); >> for (int i = 0; i < gc.length; i++) { >> insets = Toolkit.getDefaultToolkit().getScreenInsets(gc[i]); >> if (insets.bottom != 0) { >> return gc[i]; >> } >> } >> } >> return null; >> } >> >> >> You call this function from the `main` method. > > The nested loop could also be enhanced for: > > for (GraphicsConfiguration config : device.getConfigurations()) { > insets = Toolkit.getDefaultToolkit().getScreenInsets(config); > if (insets.bottom != 0) { > return config; > } > } And [I still have the concern](https://github.com/openjdk/jdk/pull/15875#discussion_r1335795417) about iterating over all the configurations. It hasn't been addressed. Since the configuration is not set, I think the inner loop is not needed at all, it should be replaced with ```java GraphicsConfiguration config = device.getDefaultConfiguration(); ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/15875#discussion_r1340386748 From shade at openjdk.org Thu Sep 28 17:20:28 2023 From: shade at openjdk.org (Aleksey Shipilev) Date: Thu, 28 Sep 2023 17:20:28 GMT Subject: RFR: 8316412: javax/print tests fail without printer set up In-Reply-To: References: Message-ID: On Mon, 25 Sep 2023 19:00:34 GMT, Phil Race wrote: > In other words none of these changes should be necessary and I'm fairly sure are actually undesirable in some cases. > Notably skipping if lpstat isn't installed and you are trying to test printing is bad. Right! Argh, I missed that the tests have keywords on them. I think we can close this as WNF, @msobiers. Sorry for leading you the wrong way here. ------------- PR Comment: https://git.openjdk.org/jdk/pull/15821#issuecomment-1739725074 From aivanov at openjdk.org Thu Sep 28 17:29:29 2023 From: aivanov at openjdk.org (Alexey Ivanov) Date: Thu, 28 Sep 2023 17:29:29 GMT Subject: RFR: 8316146: Open some swing tests 4 [v2] In-Reply-To: References: <84rFHCxQOmHAKLvYCg9C1Qy8x4ebcdJXAmR9mvncLWs=.d6354e6f-d1df-4405-b749-ea53baae9828@github.com> Message-ID: On Thu, 28 Sep 2023 17:10:39 GMT, Phil Race wrote: >>> Since this isn't a test for applet I think we should keep it for now >> >> What do you mean? >> >> All the test does is it verifies the `installComponents` method is accessible in a subclass of `BasicMenuItemUI`. The [`installComponents`](https://docs.oracle.com/en/java/javase/21/docs/api/java.desktop/javax/swing/plaf/basic/BasicMenuItemUI.html#installComponents(javax.swing.JMenuItem)) method is protected since JDK 1.3, it's now a public API. Removing it requires a CSR. >> >> Can it be accidentally removed? Can it be accidentally made package-private or private? *Very unlikely.* Therefore, we can save time by not running this test. > > the comment about applet is a bit out of context. Its from a comment I made off-line that if you were taking > a test that was written as an Applet and it explicitly a test for applets, that would be a good example of > a test to drop since JDK 22 doesn't support Applets, even thought the API is still there. > > In this case, I agree I would not have bothered porting this test that basically corresponds to the signature tests, > but its also harmless, notwithstanding the very tiny cost of running this as a (now) headless test. > But since it was already done, I think we can keep it. It is a thousand times better than it was before in its old form. Thank you for clarification. Let's keep it then. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/15875#discussion_r1340468384 From aivanov at openjdk.org Thu Sep 28 19:31:37 2023 From: aivanov at openjdk.org (Alexey Ivanov) Date: Thu, 28 Sep 2023 19:31:37 GMT Subject: Integrated: 4622866: javax.swing.text.Document.remove(int, int) has a misleading picture In-Reply-To: References: Message-ID: On Wed, 13 Sep 2023 07:46:50 GMT, Alexey Ivanov wrote: > The image in the [documentation for `Document.remove`](https://docs.oracle.com/en/java/javase/17/docs/api/java.desktop/javax/swing/text/Document.html#remove(int,int)) looks as if the portion between the offsets 6 and 10 is removed. However, the entire region for _?quick ?_ is highlighted. > > I updated the image to mark the start offset 4 and the end offset 10. The new image is in SVG format which looks crisp on modern High DPI displays. > > I added a sentence that describes the image, which makes the documentation accessible and clearer. > > Also, I marked up references to classes and members with `{@code}`. > > Look at the updated version: [`Document.remove` in JDK 22](https://cr.openjdk.org/~aivanov/4622866/api/java.desktop/javax/swing/text/Document.html#remove(int,int)). This pull request has now been integrated. Changeset: 73a47f0c Author: Alexey Ivanov URL: https://git.openjdk.org/jdk/commit/73a47f0c4a4f01f62ef55d64120e58535df12623 Stats: 170 lines in 3 files changed: 159 ins; 0 del; 11 mod 4622866: javax.swing.text.Document.remove(int, int) has a misleading picture Reviewed-by: prr ------------- PR: https://git.openjdk.org/jdk/pull/15701 From aivanov at openjdk.org Thu Sep 28 19:49:36 2023 From: aivanov at openjdk.org (Alexey Ivanov) Date: Thu, 28 Sep 2023 19:49:36 GMT Subject: Integrated: 8313810: BoxLayout uses

    instead of list for layout options In-Reply-To: References: Message-ID: <_jAw7ri9FxvuaxARSds5wUqmMnx5nLrDCKSCQi3JD4s=.1e3d58ad-b09b-4621-b23a-93d4df3239a8@github.com> On Mon, 7 Aug 2023 19:43:38 GMT, Alexey Ivanov wrote: > A clean-up of documentation for [`BoxLayout`](https://docs.oracle.com/en/java/javase/17/docs/api/java.desktop/javax/swing/BoxLayout.html#class-description): > > 1. Use the `
      ` element instead of `
      ` to list layout options or axes. > 2. Add links to `GridBagLayout` and `Box` classes. > 3. Markup references to classes, mostly `BoxLayout` itself, with `{@code}`. > 4. Separate the introduction to layout description from the description of horizontal layout. They're now in different paragraphs for easier scanning. > 5. Add the missing ?a? articles. > 6. Organise imports, including expanding the wildcard import. > > The updated version: [**`BoxLayout.html`**](https://cr.openjdk.org/~aivanov/8313810/api/java.desktop/javax/swing/BoxLayout.html#class-description) (without the CSS). This pull request has now been integrated. Changeset: 09dad0e9 Author: Alexey Ivanov URL: https://git.openjdk.org/jdk/commit/09dad0e96b37e3fcd1a13040e0de85ebc04b07c2 Stats: 34 lines in 1 file changed: 14 ins; 1 del; 19 mod 8313810: BoxLayout uses
      instead of list for layout options 8313811: Improve description of how BoxLayout lays out components Reviewed-by: prr ------------- PR: https://git.openjdk.org/jdk/pull/15182 From aivanov at openjdk.org Thu Sep 28 19:55:27 2023 From: aivanov at openjdk.org (Alexey Ivanov) Date: Thu, 28 Sep 2023 19:55:27 GMT Subject: RFR: 8313348: Fix typo in JFormattedTextField: 'it self' [v2] In-Reply-To: References: <_5rQ_t9i-odOEhntaz2UX3JaX4k16IosfrO8jHR9NG4=.69d39026-647b-4b9c-b71b-fd019ff8803a@github.com> <4T0pygyDZdSE3p-MlrcnWEvVFCzO9wgZK1G7BJHHSpo=.c53469e2-9e0b-484c-befb-5092631ed848@github.com> <83YjShRPDPsiJHh0EKKFsk9LcszTy-xXWOs_lMp8qVI=.376ef4f8-4f3d-494c-ba79-b8f2555d0e5e@github.com> Message-ID: On Thu, 7 Sep 2023 10:24:05 GMT, Alexey Ivanov wrote: > Anyway, I have updated `BasicTreeUI`; in addition to fixing the typo there, I expanded the wildcard imports. > > Do you have any more comments? @mrserb @mrserb Have I addressed your concerns? Do you have any additional comments? ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/15087#discussion_r1340606749 From achung at openjdk.org Thu Sep 28 20:34:08 2023 From: achung at openjdk.org (Alisen Chung) Date: Thu, 28 Sep 2023 20:34:08 GMT Subject: RFR: 8316146: Open some swing tests 4 [v4] In-Reply-To: References: Message-ID: > Opening closed tests: > 12 javax/swing/ToolTipManager/5078214/bug5078214.java > 13 javax/swing/plaf/basic/BasicMenuItemUI/4239714/bug4239714.java > 14 javax/swing/plaf/basic/BasicMenuUI/4244616/bug4244616.java > 15 javax/swing/plaf/metal/4306431/bug4306431.java Alisen Chung has updated the pull request incrementally with one additional commit since the last revision: updated tests, renamed vars, throw SkippedException, rewrote getGraphicsConfig ------------- Changes: - all: https://git.openjdk.org/jdk/pull/15875/files - new: https://git.openjdk.org/jdk/pull/15875/files/0e0e2357..d1d7ab5d Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=15875&range=03 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=15875&range=02-03 Stats: 56 lines in 2 files changed: 10 ins; 26 del; 20 mod Patch: https://git.openjdk.org/jdk/pull/15875.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/15875/head:pull/15875 PR: https://git.openjdk.org/jdk/pull/15875 From achung at openjdk.org Thu Sep 28 20:39:44 2023 From: achung at openjdk.org (Alisen Chung) Date: Thu, 28 Sep 2023 20:39:44 GMT Subject: RFR: 8316146: Open some swing tests 4 [v5] In-Reply-To: References: Message-ID: > Opening closed tests: > 12 javax/swing/ToolTipManager/5078214/bug5078214.java > 13 javax/swing/plaf/basic/BasicMenuItemUI/4239714/bug4239714.java > 14 javax/swing/plaf/basic/BasicMenuUI/4244616/bug4244616.java > 15 javax/swing/plaf/metal/4306431/bug4306431.java Alisen Chung has updated the pull request incrementally with one additional commit since the last revision: removed nested loop and used default graphics configuration ------------- Changes: - all: https://git.openjdk.org/jdk/pull/15875/files - new: https://git.openjdk.org/jdk/pull/15875/files/d1d7ab5d..9a264130 Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=15875&range=04 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=15875&range=03-04 Stats: 6 lines in 1 file changed: 0 ins; 2 del; 4 mod Patch: https://git.openjdk.org/jdk/pull/15875.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/15875/head:pull/15875 PR: https://git.openjdk.org/jdk/pull/15875 From psadhukhan at openjdk.org Fri Sep 29 05:05:08 2023 From: psadhukhan at openjdk.org (Prasanta Sadhukhan) Date: Fri, 29 Sep 2023 05:05:08 GMT Subject: RFR: 8315986: javax/swing/JMenuItem/4654927/bug4654927.java: component must be showing on the screen to determine its location In-Reply-To: References: Message-ID: On Tue, 12 Sep 2023 04:45:51 GMT, Prasanta Sadhukhan wrote: > Test was run without waiting for UI to be made visible leading to IllegalComponentStateException. > Used robot.delay consistent with other headful tests to made the test wait after UI is created and shown. > > Test passed in several iterations in all platforms. Link in JBS Updated test passes in macos14 and in all other platforms ------------- PR Comment: https://git.openjdk.org/jdk/pull/15677#issuecomment-1740316337 From psadhukhan at openjdk.org Fri Sep 29 05:05:07 2023 From: psadhukhan at openjdk.org (Prasanta Sadhukhan) Date: Fri, 29 Sep 2023 05:05:07 GMT Subject: RFR: 8315986: javax/swing/JMenuItem/4654927/bug4654927.java: component must be showing on the screen to determine its location [v2] In-Reply-To: References: Message-ID: > Test was run without waiting for UI to be made visible leading to IllegalComponentStateException. > Used robot.delay consistent with other headful tests to made the test wait after UI is created and shown. > > Test passed in several iterations in all platforms. Link in JBS Prasanta Sadhukhan has updated the pull request incrementally with one additional commit since the last revision: Add setAutoWaitForIdle ------------- Changes: - all: https://git.openjdk.org/jdk/pull/15677/files - new: https://git.openjdk.org/jdk/pull/15677/files/c42be49c..b5861ef5 Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=15677&range=01 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=15677&range=00-01 Stats: 3 lines in 1 file changed: 3 ins; 0 del; 0 mod Patch: https://git.openjdk.org/jdk/pull/15677.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/15677/head:pull/15677 PR: https://git.openjdk.org/jdk/pull/15677 From abhiscxk at openjdk.org Fri Sep 29 05:08:11 2023 From: abhiscxk at openjdk.org (Abhishek Kumar) Date: Fri, 29 Sep 2023 05:08:11 GMT Subject: RFR: 8283214: [macos] Screen magnifier does not show the magnified text for JcomboBox [v7] In-Reply-To: References: Message-ID: On Fri, 1 Sep 2023 06:05:09 GMT, Alexander Zuev wrote: >> Abhishek Kumar has updated the pull request incrementally with one additional commit since the last revision: >> >> Revert BasicComboBoxUI fix and update review comment > > src/java.desktop/macosx/classes/com/apple/laf/AquaComboBoxButton.java line 253: > >> 251: >> 252: // set the accessible name to the displayed text in JComboBox. >> 253: // screen magnifier queries to get the accessible name to display magnified text. > > I still do not think that setting accessible name in paint is a good idea. Setting it during the initialization and adding a property change listener to the accessible context to track changes seems like a better way to do it. @azuev-java Please review. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/14497#discussion_r1340902980 From duke at openjdk.org Fri Sep 29 08:42:16 2023 From: duke at openjdk.org (Michal Sobierski) Date: Fri, 29 Sep 2023 08:42:16 GMT Subject: RFR: 8316412: javax/print tests fail without printer set up In-Reply-To: References: Message-ID: <43pyB63IvRozeUdItnCRaTNCjLEjNPEeC5i_e2PjEp0=.c6c511b5-1066-4349-a734-560b98ccc095@github.com> On Thu, 28 Sep 2023 17:17:55 GMT, Aleksey Shipilev wrote: > > In other words none of these changes should be necessary and I'm fairly sure are actually undesirable in some cases. > > Notably skipping if lpstat isn't installed and you are trying to test printing is bad. > > Right! Argh, I missed that the tests have keywords on them. I think we can close this as WNF, @msobiers. Sorry for leading you the wrong way here. Np. Closing now. ------------- PR Comment: https://git.openjdk.org/jdk/pull/15821#issuecomment-1740522079 From duke at openjdk.org Fri Sep 29 08:42:18 2023 From: duke at openjdk.org (Michal Sobierski) Date: Fri, 29 Sep 2023 08:42:18 GMT Subject: Withdrawn: 8316412: javax/print tests fail without printer set up In-Reply-To: References: Message-ID: On Tue, 19 Sep 2023 14:45:47 GMT, Michal Sobierski wrote: > For NullClipARGB we are throwing SkippedException only if instance of caught exception is PrinterException. All other exceptions are considered unrelated to printer configuration. > > For CountPrintServices we want to throw SkippedException in the case when lpstat is not installed, where an IOException is caught in that case. > > For ExceptionTest we want to throw SkippedException for all PrinterExceptions which were not caused by IndexOutOfBoundsException. > > For rest of the tests if PrintService was not created instead RuntimeException we are throwing now SkippedException. > > Tested on environment without printer installed. > Test are passing with skipped exception as expected. > > Passed: java/awt/print/PrinterJob/ExceptionTest.java > Passed: java/awt/print/PrinterJob/ImagePrinting/NullClipARGB.java > Passed: java/awt/print/PrinterJob/PrtException.java > Passed: javax/print/attribute/AttributeTest.java > Passed: javax/print/attribute/GetCopiesSupported.java > Passed: javax/print/attribute/SidesPageRangesTest.java > Passed: javax/print/attribute/SupportedPrintableAreas.java > Passed: javax/print/PrintServiceLookup/CountPrintServices.java > Passed: javax/print/CheckDupFlavor.java > > Additionally unused imports have been removed. This pull request has been closed without being integrated. ------------- PR: https://git.openjdk.org/jdk/pull/15821 From duke at openjdk.org Fri Sep 29 09:41:24 2023 From: duke at openjdk.org (Arik Hadas) Date: Fri, 29 Sep 2023 09:41:24 GMT Subject: RFR: 8314498: [macos] Transferring File objects to Finder fails Message-ID: Credit goes to JetBrain that fixed it in JetBrainsRuntime (commit 24819d9). This fix was also cherry-picked to muCommander and was verified on macOS 12.6.8 and macOs 13, on X86_64 and on M1. Reproducer/step-to-verify: 1. Compile the following class: import java.awt.Toolkit; import java.awt.datatransfer.DataFlavor; import java.awt.datatransfer.Transferable; import java.awt.datatransfer.UnsupportedFlavorException; import java.io.IOException; import java.nio.file.Files; import java.nio.file.Path; import java.util.Arrays; public class Arik { public static void main(String[] args) throws IOException, UnsupportedFlavorException { System.out.println("copying a file to the clipboard2"); var path = Files.createTempFile(null, null); Files.writeString(path.toAbsolutePath(), "test"); Toolkit.getDefaultToolkit().getSystemClipboard().setContents(new MyTransferable(path), null); try { Thread.sleep(Long.MAX_VALUE); } catch (InterruptedException e) { } } public static class MyTransferable implements Transferable { private Path path; MyTransferable(Path path) { this.path = path; } @Override public DataFlavor[] getTransferDataFlavors() { return new DataFlavor[] { DataFlavor.javaFileListFlavor }; } @Override public boolean isDataFlavorSupported(DataFlavor flavor) { return flavor.equals(DataFlavor.javaFileListFlavor); } @Override public Object getTransferData(DataFlavor flavor) throws UnsupportedFlavorException, IOException { return Arrays.asList(path.toFile()); } } } 2. Run the compiled class using current JRE (`java Arik`) 3. Switch to Finder and check the content of the clipboard (`Edit -> Show Clipboard`) 4. Verify you see "Cliboard contents: unknown" as in the following screenshot: clipboard-before 5. Verify you cannot paste the content of the clipboard to Finder (`Edit -> Paste` is disabled) 6. Run the compiled class using JRE that includes this change (`java Arik`) 7. 3. Switch to Finder and check the content of the clipboard (`Edit -> Show Clipboard`) 8. Verify you see "Cliboard contents: file URL / items" as in the following screenshot: clipboard-after 9. Paste the content of the clipboard into Finder 10. Verify the pasted item is a text file that includes the text `test` ------------- Commit messages: - 8314498: [macos] provide writeObjects implementation for copying to Finder Changes: https://git.openjdk.org/jdk/pull/15980/files Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=15980&range=00 Issue: https://bugs.openjdk.org/browse/JDK-8314498 Stats: 47 lines in 2 files changed: 46 ins; 0 del; 1 mod Patch: https://git.openjdk.org/jdk/pull/15980.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/15980/head:pull/15980 PR: https://git.openjdk.org/jdk/pull/15980 From aivanov at openjdk.org Fri Sep 29 12:01:57 2023 From: aivanov at openjdk.org (Alexey Ivanov) Date: Fri, 29 Sep 2023 12:01:57 GMT Subject: RFR: 8316146: Open some swing tests 4 [v5] In-Reply-To: References: Message-ID: <8M326J97KgIg6AsqgccvIJbHFsHHR8PDvyEuF9eOZSI=.99a71e92-ab97-4af9-b532-2514e670cfaf@github.com> On Thu, 28 Sep 2023 20:39:44 GMT, Alisen Chung wrote: >> Opening closed tests: >> 12 javax/swing/ToolTipManager/5078214/bug5078214.java >> 13 javax/swing/plaf/basic/BasicMenuItemUI/4239714/bug4239714.java >> 14 javax/swing/plaf/basic/BasicMenuUI/4244616/bug4244616.java >> 15 javax/swing/plaf/metal/4306431/bug4306431.java > > Alisen Chung has updated the pull request incrementally with one additional commit since the last revision: > > removed nested loop and used default graphics configuration Changes requested by aivanov (Reviewer). test/jdk/javax/swing/BasicMenuUI/bug4244616.java line 72: > 70: } > 71: } finally { > 72: // Restore streams, check results Suggestion: // Restore streams You don't check the results here ? you've already checked the results above. test/jdk/javax/swing/ToolTipManager/bug5078214.java line 66: > 64: throw new SkippedException("We need at least one screen " + > 65: "with the taskbar at the bottom position."); > 66: } This code will never throw `SkippedException`. First you have to test whether `getGraphicsConfig()` returned `null` and throw the exception. Otherwise, `NullPointerException` will be thrown, which fails the test instead of skipping it. Alternatively, you may throw `SkippedException` from `getGraphicsConfig()` instead of returning `null`. ------------- PR Review: https://git.openjdk.org/jdk/pull/15875#pullrequestreview-1650635609 PR Review Comment: https://git.openjdk.org/jdk/pull/15875#discussion_r1341278831 PR Review Comment: https://git.openjdk.org/jdk/pull/15875#discussion_r1341274950 From aivanov at openjdk.org Fri Sep 29 13:15:32 2023 From: aivanov at openjdk.org (Alexey Ivanov) Date: Fri, 29 Sep 2023 13:15:32 GMT Subject: RFR: JDK-8314731 : Add support for the alt attribute in the image type input HTML tag [v2] In-Reply-To: References: Message-ID: On Wed, 30 Aug 2023 14:20:41 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 = """ >> >> >> >>

      >> 281: URL srcURL = new URL(base, srcAtt); > 282: ImageIcon icon = new ImageIcon(srcURL); You should probably pass `altAtt` as the `description` parameter, yet I'm unsure if it's ever used in this context. src/java.desktop/share/classes/javax/swing/text/html/FormView.java line 283: > 281: URL srcURL = new URL(base, srcAtt); > 282: ImageIcon icon = new ImageIcon(srcURL); > 283: button = icon.getImageLoadStatus() == MediaTracker.COMPLETE ? new JButton(icon) : new JButton(altAtt); Initially I thought the status could change, it can't. Looks good to me. src/java.desktop/share/classes/javax/swing/text/html/FormView.java line 285: > 283: button = icon.getImageLoadStatus() == MediaTracker.COMPLETE ? new JButton(icon) : new JButton(altAtt); > 284: } catch (MalformedURLException e) { > 285: button = new JButton(srcAtt); Suggestion: button = new JButton(altAtt); If `altAtt` is provided, it should be used to handle invalid `srcAtt` too. ------------- Changes requested by aivanov (Reviewer). PR Review: https://git.openjdk.org/jdk/pull/15319#pullrequestreview-1650659110 PR Review Comment: https://git.openjdk.org/jdk/pull/15319#discussion_r1341292119 PR Review Comment: https://git.openjdk.org/jdk/pull/15319#discussion_r1341310689 PR Review Comment: https://git.openjdk.org/jdk/pull/15319#discussion_r1341317037 From dnguyen at openjdk.org Fri Sep 29 16:38:15 2023 From: dnguyen at openjdk.org (Damon Nguyen) Date: Fri, 29 Sep 2023 16:38:15 GMT Subject: RFR: 8315986: javax/swing/JMenuItem/4654927/bug4654927.java: component must be showing on the screen to determine its location [v2] In-Reply-To: References: Message-ID: On Fri, 29 Sep 2023 05:05:07 GMT, Prasanta Sadhukhan wrote: >> Test was run without waiting for UI to be made visible leading to IllegalComponentStateException. >> Used robot.delay consistent with other headful tests to made the test wait after UI is created and shown. >> >> Test passed in several iterations in all platforms. Link in JBS > > Prasanta Sadhukhan has updated the pull request incrementally with one additional commit since the last revision: > > Add setAutoWaitForIdle Stability changes with delays/waits look good. Minor nit. test/jdk/javax/swing/JMenuItem/4654927/bug4654927.java line 96: > 94: @Override > 95: public Point call() throws Exception { > 96: System.out.println("Menu Location: "+ menu.getLocationOnScreen()); Suggestion: System.out.println("Menu Location: " + menu.getLocationOnScreen()); test/jdk/javax/swing/JMenuItem/4654927/bug4654927.java line 105: > 103: @Override > 104: public Point call() throws Exception { > 105: System.out.println("MenuItem Location: "+ menuItem.getLocationOnScreen()); Suggestion: System.out.println("MenuItem Location: " + menuItem.getLocationOnScreen()); ------------- Marked as reviewed by dnguyen (Committer). PR Review: https://git.openjdk.org/jdk/pull/15677#pullrequestreview-1651107520 PR Review Comment: https://git.openjdk.org/jdk/pull/15677#discussion_r1341564697 PR Review Comment: https://git.openjdk.org/jdk/pull/15677#discussion_r1341564855 From achung at openjdk.org Fri Sep 29 19:31:08 2023 From: achung at openjdk.org (Alisen Chung) Date: Fri, 29 Sep 2023 19:31:08 GMT Subject: RFR: 8316146: Open some swing tests 4 [v6] In-Reply-To: References: Message-ID: > Opening closed tests: > 12 javax/swing/ToolTipManager/5078214/bug5078214.java > 13 javax/swing/plaf/basic/BasicMenuItemUI/4239714/bug4239714.java > 14 javax/swing/plaf/basic/BasicMenuUI/4244616/bug4244616.java > 15 javax/swing/plaf/metal/4306431/bug4306431.java Alisen Chung has updated the pull request incrementally with one additional commit since the last revision: fixed skippedexception, fixed comment ------------- Changes: - all: https://git.openjdk.org/jdk/pull/15875/files - new: https://git.openjdk.org/jdk/pull/15875/files/9a264130..7e1a7f4f Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=15875&range=05 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=15875&range=04-05 Stats: 4 lines in 2 files changed: 1 ins; 1 del; 2 mod Patch: https://git.openjdk.org/jdk/pull/15875.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/15875/head:pull/15875 PR: https://git.openjdk.org/jdk/pull/15875 From aivanov at openjdk.org Fri Sep 29 19:31:39 2023 From: aivanov at openjdk.org (Alexey Ivanov) Date: Fri, 29 Sep 2023 19:31:39 GMT Subject: RFR: 8316146: Open some swing tests 4 [v6] In-Reply-To: References: Message-ID: <21qfi3MpGO2LKFCGC6zA_k_FxaxrQSs6ujzUz6CqBvY=.55774a77-6cc6-4141-a2ff-52ae8481ea9c@github.com> On Fri, 29 Sep 2023 19:31:08 GMT, Alisen Chung wrote: >> Opening closed tests: >> 12 javax/swing/ToolTipManager/5078214/bug5078214.java >> 13 javax/swing/plaf/basic/BasicMenuItemUI/4239714/bug4239714.java >> 14 javax/swing/plaf/basic/BasicMenuUI/4244616/bug4244616.java >> 15 javax/swing/plaf/metal/4306431/bug4306431.java > > Alisen Chung has updated the pull request incrementally with one additional commit since the last revision: > > fixed skippedexception, fixed comment Marked as reviewed by aivanov (Reviewer). test/jdk/javax/swing/ToolTipManager/bug5078214.java line 66: > 64: "with the taskbar at the bottom position."); > 65: } > 66: bounds = getGraphicsConfig().getBounds(); It's better to use the pattern that was used before: assign the result of `getGraphicsConfig()` to `testConfig` because `getGraphicsConfig()` is not a simple getter which returns the value of a field. On the other hand, it's more like premature optimisation; it's unlikely that enumerating screens takes a lot of time, especially now when you use the default config only. ------------- PR Review: https://git.openjdk.org/jdk/pull/15875#pullrequestreview-1651371634 PR Review Comment: https://git.openjdk.org/jdk/pull/15875#discussion_r1341727276 From duke at openjdk.org Fri Sep 29 19:35:33 2023 From: duke at openjdk.org (Arik Hadas) Date: Fri, 29 Sep 2023 19:35:33 GMT Subject: RFR: 8314498: [macos] Transferring File objects to Finder fails [v2] In-Reply-To: References: Message-ID: > Credit goes to JetBrain that fixed it in JetBrainsRuntime (commit 24819d9). This fix was also cherry-picked to muCommander and was verified on macOS 12.6.8 and macOs 13, on X86_64 and on M1. > > Reproducer/step-to-verify: > 1. Compile the following class: > > import java.awt.Toolkit; > import java.awt.datatransfer.DataFlavor; > import java.awt.datatransfer.Transferable; > import java.awt.datatransfer.UnsupportedFlavorException; > import java.io.IOException; > import java.nio.file.Files; > import java.nio.file.Path; > import java.util.Arrays; > > public class Arik { > > public static void main(String[] args) throws IOException, UnsupportedFlavorException { > System.out.println("copying a file to the clipboard2"); > var path = Files.createTempFile(null, null); > Files.writeString(path.toAbsolutePath(), "test"); > Toolkit.getDefaultToolkit().getSystemClipboard().setContents(new MyTransferable(path), null); > try { > Thread.sleep(Long.MAX_VALUE); > } catch (InterruptedException e) { > } > } > > public static class MyTransferable implements Transferable { > private Path path; > > MyTransferable(Path path) { > this.path = path; > } > > @Override > public DataFlavor[] getTransferDataFlavors() { > return new DataFlavor[] { DataFlavor.javaFileListFlavor }; > } > > @Override > public boolean isDataFlavorSupported(DataFlavor flavor) { > return flavor.equals(DataFlavor.javaFileListFlavor); > } > > @Override > public Object getTransferData(DataFlavor flavor) throws UnsupportedFlavorException, IOException { > return Arrays.asList(path.toFile()); > } > > } > } > > 2. Run the compiled class using current JRE (`java Arik`) > 3. Switch to Finder and check the content of the clipboard (`Edit -> Show Clipboard`) > 4. Verify you see "Cliboard contents: unknown" as in the following screenshot: > clipboard-before > > 5. Verify you cannot paste the content of the clipboard to Finder (`Edit -> Paste` is disabled) > 6. Run the compiled class using JRE that includes this change (`java Arik`) > 7. 3. Switch to Finder and check the content of the clipboard (`Edit -> Show Clipboard`) > 8. Verify you see "Cliboard contents: file URL / items" as in the following screenshot: > clipboard-after> var path = Files.createTempFile(null, null); >> Files.writeString(path.toAbsolutePath(), "test"); >> Toolkit.getDefaultToolkit().getSystemClipboard().setContents(new MyTransferable(path), null); >> try { >> Thread.sleep(Long.MAX_VALUE); >> } catch (InterruptedException e) { >> } >> } >> >> public static class MyTransferable implements Transferable { >> private Path path; >> >> MyTransferable(Path path) { >> this.path = path; >> } >> >> @Override >> public DataFlavor[] getTransferDataFlavors() { >> return new DataFlavor[] { DataFlavor.javaFileListFlavor }; >> } >> >> @Override >> public boolean isDataFlavorSupported(DataFlavor flavor) { >> return flavor.equals(DataFlavor.javaFileListFlavor); >> } >> >> @Override >> public Object getTransferData(DataFlavor flavor) throws UnsupportedFlavorException, IOException { >> return Arrays.asList(path.toFile()); >> } >> >> } >> } >> >> 2. Run the compiled class using current JRE (`java Arik`) >> 3. Switch to Finder and check the content of the clipboard (`Edit -> Show Clipboard`) >> 4. Verify you see "Cliboard contents: unknown" as in the following screenshot: >> clipboard-before >> >> 5. Verify you cannot paste the content of the clipboard to Finder (`Edit -> Paste` is disabled) >> 6. Run the compiled class using JRE that includes this change (`java Arik`) >> 7. 3. Switch to Finder and check the content of the clipboard (`Edit -> Show Clipboard`) >> 8. Verify you see "Cliboard contents: file U... > > Arik Hadas has refreshed the contents of this pull request, and previous commits have been removed. The incremental views will show differences compared to the previous content of the PR. The pull request contains one new commit since the last revision: > > 8314498: [macos] Transferring File objects to Finder fails > > Credit goes to JetBrain that fixed it in JetBrainsRuntime (commit 24819d9). > This fix was also cherry-picked to muCommander and was verified on macOS > 12.6.8 and macOs 13, on X86_64 and on M1. I think someone from the JetBrains should bring this patch for discussion and confirm who is the "author" of the code. We cannot accept the copied code from the 3p codebase. @avu please take a look ------------- PR Comment: https://git.openjdk.org/jdk/pull/15980#issuecomment-1741639341 From duke at openjdk.org Sat Sep 30 09:37:39 2023 From: duke at openjdk.org (Arik Hadas) Date: Sat, 30 Sep 2023 09:37:39 GMT Subject: RFR: 8314498: [macos] Transferring File objects to Finder fails [v2] In-Reply-To: References: Message-ID: <1V9DLhmT1vdeIVPhmmnA65zH0aRtBqraaIHiZV5Vdmk=.bcd2a704-198c-4665-ab06-1893c1768c59@github.com> On Fri, 29 Sep 2023 19:35:33 GMT, Arik Hadas wrote: >> Credit goes to JetBrain that fixed it in JetBrainsRuntime (commit 24819d9). This fix was also cherry-picked to muCommander and was verified on macOS 12.6.8 and macOs 13, on X86_64 and on M1. >> >> Reproducer/step-to-verify: >> 1. Compile the following class: >> >> import java.awt.Toolkit; >> import java.awt.datatransfer.DataFlavor; >> import java.awt.datatransfer.Transferable; >> import java.awt.datatransfer.UnsupportedFlavorException; >> import java.io.IOException; >> import java.nio.file.Files; >> import java.nio.file.Path; >> import java.util.Arrays; >> >> public class Arik { >> >> public static void main(String[] args) throws IOException, UnsupportedFlavorException { >> System.out.println("copying a file to the clipboard2"); >> var path = Files.createTempFile(null, null); >> Files.writeString(path.toAbsolutePath(), "test"); >> Toolkit.getDefaultToolkit().getSystemClipboard().setContents(new MyTransferable(path), null); >> try { >> Thread.sleep(Long.MAX_VALUE); >> } catch (InterruptedException e) { >> } >> } >> >> public static class MyTransferable implements Transferable { >> private Path path; >> >> MyTransferable(Path path) { >> this.path = path; >> } >> >> @Override >> public DataFlavor[] getTransferDataFlavors() { >> return new DataFlavor[] { DataFlavor.javaFileListFlavor }; >> } >> >> @Override >> public boolean isDataFlavorSupported(DataFlavor flavor) { >> return flavor.equals(DataFlavor.javaFileListFlavor); >> } >> >> @Override >> public Object getTransferData(DataFlavor flavor) throws UnsupportedFlavorException, IOException { >> return Arrays.asList(path.toFile()); >> } >> >> } >> } >> >> 2. Run the compiled class using current JRE (`java Arik`) >> 3. Switch to Finder and check the content of the clipboard (`Edit -> Show Clipboard`) >> 4. Verify you see "Cliboard contents: unknown" as in the following screenshot: >> clipboard-before >> >> 5. Verify you cannot paste the content of the clipboard to Finder (`Edit -> Paste` is disabled) >> 6. Run the compiled class using JRE that includes this change (`java Arik`) >> 7. 3. Switch to Finder and check the content of the clipboard (`Edit -> Show Clipboard`) >> 8. Verify you see "Cliboard contents: file U... > > Arik Hadas has refreshed the contents of this pull request, and previous commits have been removed. The incremental views will show differences compared to the previous content of the PR. The pull request contains one new commit since the last revision: > > 8314498: [macos] Transferring File objects to Finder fails > > Credit goes to JetBrain that fixed it in JetBrainsRuntime (commit 24819d9). > This fix was also cherry-picked to muCommander and was verified on macOS > 12.6.8 and macOs 13, on X86_64 and on M1. @anstarovoyt, I've proposed [the fix you posted 3 years ago to JetBrainsRuntime](https://github.com/JetBrains/JetBrainsRuntime/pull/37) here to OpenJDK as it can be useful for other applications, like muCommander. Could you please help getting it in? As I wrote in the description, the credit should go to you guys, so if you want to post it yourself or want me to change something in this PR it would be fine ------------- PR Comment: https://git.openjdk.org/jdk/pull/15980#issuecomment-1741725756 From samuel.thibault at ens-lyon.org Wed Sep 20 22:21:04 2023 From: samuel.thibault at ens-lyon.org (Samuel Thibault) Date: Wed, 20 Sep 2023 22:21:04 -0000 Subject: Accessibility provider classpath In-Reply-To: References: <9c169b73-cf45-03cd-f7ac-8508ac0f866f@oracle.com> Message-ID: <20230920222055.qy7bmcrdzivdzj5h@begin> Vladimir Petko, le jeu. 21 sept. 2023 10:11:38 +1200, a ecrit: > Samuel, please correct me if I'm wrong. The requirement is for the > per-user (or system-wide) enablement of accessibility. The > per-application setup is a bad user experience, and it would be nice > to have a single point - properties file - that enables it. Yes, that's it. It is meaningless to enable accessibility only for some applicatins: either the user needs it for all applications, or they don't need it at all. Samuel > Java 8 achieves this by putting the accessibility provider jar in the > 'ext' directory. Java 11 and up requires including an accessibility > provider in the modules files. > > Any updates and fixes to the accessibility provider will require new > releases of the openjdk package in Debian and Ubuntu. Adding > accessibility providers to the build dependencies of the openjdk > package also creates a circular build dependency that might introduce > issues requiring careful synchronization between releases. > > I propose to add a new property 'java.accessibility.module_path'. The > property will contain the list of locations of accessibility modules. > Toolkit will construct the classloader using this path and the system > class loader as a parent. Older releases will ignore this property. > > This feature will allow installation of the accessibility provider > separate from the openjdk package and will satisfy the requirement of > per-user and system-wide enablement of the accessibility provider. > > Best Regards, > Vladimir. > > On Thu, Sep 21, 2023 at 9:48?AM Philip Race wrote: > > > > Can you explain your need for this (a lot) better ? > > > > The location and loading is specified to be done by > > java.util.ServiceLoader. > > Whilst this might be possible by some enhanced syntax, which if present > > invokes ServiceLoader specifying a ClassLoader for this jar file, it > > would clearly be new API and only for future releases. > > NB it would also be fiddly to implement as the value of the property is > > a list of class names and > > you can't add jar names to that without breaking older JDKs and > > so you'd need some way to match new lines referencing the JAR file for > > each class .. > > > > And likely we'd want to have new APIs like this - if they make sense - to > > be focused on a module, not a jar, but building a runtime image from > > modules using jlink is a normal thing to do, so I'm not sure what such > > an API would look like and seems to be not what you want. > > > > I also don't understand the use case / problem. > > Whatever launches your application can set > > -Djavax.accessibility.assistive_technologies=<..> > > and set the -cp to include your jar and you don't need to do anything > > to the runtime image. > > > > -phil > > > > On 9/20/23 1:33 PM, Vladimir Petko wrote: > > > Hi, > > > > > > Java accessibility.properties (.accessibility.properties) allows > > > setting the class name of the accessibility provider but not the jar > > > file containing it. > > > > > > Was there any consideration that prevents this feature from being > > > implemented, such as security? > > > > > > It would be nice to have it implemented to allow system-wide/per-user > > > configuration of the accessibility provider without rebuilding the > > > runtime image. > > > > > > If this is something acceptable, I am happy to create an enhancement > > > issue and work on it. > > > > > > Best Regards, > > > Vladimir. > > > -- Samuel --- Pour une ?valuation ind?pendante, transparente et rigoureuse ! Je soutiens la Commission d'?valuation de l'Inria.