From aturbanov at openjdk.org Thu Sep 1 06:28:11 2022 From: aturbanov at openjdk.org (Andrey Turbanov) Date: Thu, 1 Sep 2022 06:28:11 GMT Subject: RFR: 4834298: JFileChooser.getSelectedFiles() failed with multi-selection and double-click In-Reply-To: References: Message-ID: <8DX6ByDjUI9pIhOkGyzozxV2di1b7XI0dXcDTpWkI2E=.1fc54dee-f22b-4dab-912b-3313cadf44ac@github.com> On Wed, 24 Aug 2022 07:44:52 GMT, Tejesh R wrote: > JFileChooser.getSelectedFiles() failed to retrieve files with multi-selection and double-click. This occurs when a single file is selected then enable multi-selection then select the same file through mouse double-click(Two file chooser dialogs used before and after multi-selection enabled). SelectedFiles are updated when a change in files/directory selection is done or when selection is made through keyboard selection. In this case since a single file is selected before multi-selection is enabled and same file is selected again without changing the selection index/directory, leaving selected Files un-updated. > **Proposed Fix** : Whenever Multi-Selection is enabled check if any files are selected, if yes update the selected Files of JFileChoooser. src/java.desktop/share/classes/sun/swing/FilePane.java line 1760: > 1758: //If selected, retain them and update the selected files in FileChooser class. > 1759: File[] selectedFiles = null; > 1760: if(getFileChooser().getSelectedFiles().length != 0) { let's add space after `if`s ------------- PR: https://git.openjdk.org/jdk/pull/9996 From tr at openjdk.org Thu Sep 1 06:40:08 2022 From: tr at openjdk.org (Tejesh R) Date: Thu, 1 Sep 2022 06:40:08 GMT Subject: RFR: 4834298: JFileChooser.getSelectedFiles() failed with multi-selection and double-click [v2] In-Reply-To: References: Message-ID: > JFileChooser.getSelectedFiles() failed to retrieve files with multi-selection and double-click. This occurs when a single file is selected then enable multi-selection then select the same file through mouse double-click(Two file chooser dialogs used before and after multi-selection enabled). SelectedFiles are updated when a change in files/directory selection is done or when selection is made through keyboard selection. In this case since a single file is selected before multi-selection is enabled and same file is selected again without changing the selection index/directory, leaving selected Files un-updated. > **Proposed Fix** : Whenever Multi-Selection is enabled check if any files are selected, if yes update the selected Files of JFileChoooser. Tejesh R has updated the pull request incrementally with one additional commit since the last revision: Updated based on review comments ------------- Changes: - all: https://git.openjdk.org/jdk/pull/9996/files - new: https://git.openjdk.org/jdk/pull/9996/files/7129054a..71c936a0 Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=9996&range=01 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=9996&range=00-01 Stats: 3 lines in 1 file changed: 0 ins; 0 del; 3 mod Patch: https://git.openjdk.org/jdk/pull/9996.diff Fetch: git fetch https://git.openjdk.org/jdk pull/9996/head:pull/9996 PR: https://git.openjdk.org/jdk/pull/9996 From duke at openjdk.org Thu Sep 1 16:12:49 2022 From: duke at openjdk.org (Abhishek Kumar) Date: Thu, 1 Sep 2022 16:12:49 GMT Subject: RFR: 8287912: GTK L&F : Background of tree icons are red Message-ID: The background of tree icons are not red in GTK LAF when setOpaque is set to false for tree component. It has been observed that while painting tree cell background in GTK LAF, a rectangular area is also painted with background color (white). Proposed solution is to check the opacity of tree component before drawing tree cell background. If the opacity is set to "false" then the background shouldn't be painted. An automated test case has been added and checked in CI, link is added in JBS. ------------- Commit messages: - Whitespace error fixed - Fix for tree icon background in GTK LAF Changes: https://git.openjdk.org/jdk/pull/10112/files Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=10112&range=00 Issue: https://bugs.openjdk.org/browse/JDK-8287912 Stats: 116 lines in 2 files changed: 114 ins; 0 del; 2 mod Patch: https://git.openjdk.org/jdk/pull/10112.diff Fetch: git fetch https://git.openjdk.org/jdk pull/10112/head:pull/10112 PR: https://git.openjdk.org/jdk/pull/10112 From prr at openjdk.org Thu Sep 1 16:15:43 2022 From: prr at openjdk.org (Phil Race) Date: Thu, 1 Sep 2022 16:15:43 GMT Subject: RFR: 8288882: JFileChooser - empty (0 bytes) file is displayed as 1 KB [v22] In-Reply-To: References: <1vIZK9GjFmvSFEiDeXaRrYIm6pF9vwHZkOvGjuhKQ_E=.628cf54f-af74-45ca-81bd-51f99a723753@github.com> Message-ID: On Mon, 22 Aug 2022 09:46:22 GMT, Abhishek Kumar wrote: > Since we are displaying file size in one decimal precision, files having size from 1 to 199 byte will be 0.1 KB. Yes, I see that. My point is it seems wrong. ------------- PR: https://git.openjdk.org/jdk/pull/9327 From prr at openjdk.org Thu Sep 1 16:22:19 2022 From: prr at openjdk.org (Phil Race) Date: Thu, 1 Sep 2022 16:22:19 GMT Subject: RFR: 8293088: Fix compilation with the new Visual Studio preprocessor In-Reply-To: References: Message-ID: On Tue, 30 Aug 2022 12:08:09 GMT, Daniel Jeli?ski wrote: > Fix compilation with Zc:preprocessor enabled. > > The flag itself will be enabled in [JDK-8247283](https://bugs.openjdk.org/browse/JDK-8247283); I enabled the flag using instructions found in Magnus's comment on that issue. > > Windows 10 SDK version 2104 (10.0.20348.0) is required for successful compilation. Compilation fails with a warning (treated as error by default) with older versions of Windows 10 SDK. > > I verified that the compilation completes successfully with this patch, both in debug and in release mode, both with and without Zc:preprocessor. Fixing the compilation is one thing. But did you verify that it actually works as intended ? ------------- PR: https://git.openjdk.org/jdk/pull/10080 From prr at openjdk.org Thu Sep 1 16:26:19 2022 From: prr at openjdk.org (Phil Race) Date: Thu, 1 Sep 2022 16:26:19 GMT Subject: RFR: 7148092: [macosx] When Alt+down arrow key is pressed, the combobox popup does not appear. [v3] In-Reply-To: <9_6m09UHBqjqrDWnuPS7Imjl3tciQr1q7RCxyOY0xXs=.47f6bcbe-38db-40c5-86b5-4329d5c365ef@github.com> References: <9_6m09UHBqjqrDWnuPS7Imjl3tciQr1q7RCxyOY0xXs=.47f6bcbe-38db-40c5-86b5-4329d5c365ef@github.com> Message-ID: On Thu, 25 Aug 2022 16:34:32 GMT, Prasanta Sadhukhan wrote: >> When comboBox have focus, pressing Alt+Down (or Up) should render the popup which is not happening for Aqua L&F. >> >> Fix is to add toggleAction for Alt+Down/Up keys as has been done for [MetalLookAndFeel](https://github.com/openjdk/jdk/blob/master/src/java.desktop/share/classes/javax/swing/plaf/metal/MetalLookAndFeel.java#L912) >> >> closed problemlisted test is used to check the fix. > > Prasanta Sadhukhan has updated the pull request incrementally with one additional commit since the last revision: > > Use camelCase Looks OK to me .. I presume the closed test now passes . . ------------- Marked as reviewed by prr (Reviewer). PR: https://git.openjdk.org/jdk/pull/10014 From aivanov at openjdk.org Thu Sep 1 16:36:35 2022 From: aivanov at openjdk.org (Alexey Ivanov) Date: Thu, 1 Sep 2022 16:36:35 GMT Subject: RFR: 8288882: JFileChooser - empty (0 bytes) file is displayed as 1 KB [v25] In-Reply-To: References: Message-ID: On Fri, 26 Aug 2022 14:30:10 GMT, Abhishek Kumar wrote: >> JFileChooser - empty file size issue fixed. >> For empty file, now the size 0 KB. >> Manual Test Case "FileSizeCheck.java" created. > > Abhishek Kumar has updated the pull request incrementally with one additional commit since the last revision: > > Updated as per suggested changes test/jdk/javax/swing/JFileChooser/FileSizeCheck.java line 64: > 62: public static void test() { > 63: JFrame frame = new JFrame("JFileChooser File Size test"); > 64: JFileChooser fc = new JFileChooser(); If you add, fc.setControlButtonsAreShown(false); the panel with _Open_ and _Cancel_ button will be hidden. I think it improves user experience, clicking either button does nothing. ------------- PR: https://git.openjdk.org/jdk/pull/9327 From psadhukhan at openjdk.org Thu Sep 1 16:49:10 2022 From: psadhukhan at openjdk.org (Prasanta Sadhukhan) Date: Thu, 1 Sep 2022 16:49:10 GMT Subject: RFR: 7148092: [macosx] When Alt+down arrow key is pressed, the combobox popup does not appear. [v3] In-Reply-To: References: <9_6m09UHBqjqrDWnuPS7Imjl3tciQr1q7RCxyOY0xXs=.47f6bcbe-38db-40c5-86b5-4329d5c365ef@github.com> Message-ID: On Thu, 1 Sep 2022 16:23:58 GMT, Phil Race wrote: > Looks OK to me .. I presume the closed test now passes . . Yes, it passes. Will you also review the closed part in orahub as it involves removing the test from PL? ------------- PR: https://git.openjdk.org/jdk/pull/10014 From psadhukhan at openjdk.org Thu Sep 1 17:07:13 2022 From: psadhukhan at openjdk.org (Prasanta Sadhukhan) Date: Thu, 1 Sep 2022 17:07:13 GMT Subject: RFR: 8287912: GTK L&F : Background of tree icons are red In-Reply-To: References: Message-ID: On Thu, 1 Sep 2022 06:27:17 GMT, Abhishek Kumar wrote: > The background of tree icons are not red in GTK LAF when setOpaque is set to false for tree component. > It has been observed that while painting tree cell background in GTK LAF, a rectangular area is also painted with background color (white). > > Proposed solution is to check the opacity of tree component before drawing tree cell background. If the opacity is set to "false" then the background shouldn't be painted. > > An automated test case has been added and checked in CI, link is added in JBS. test/jdk/javax/swing/JTree/TestTreeBackgroundColor.java line 1: > 1: remove this empty line test/jdk/javax/swing/JTree/TestTreeBackgroundColor.java line 81: > 79: if (c.equals(Color.RED)) { > 80: passed = true; > 81: } better to check at midpoint tree.width/2, tree.height/2 and also break if it's RED, no need to check all pixels. ------------- PR: https://git.openjdk.org/jdk/pull/10112 From duke at openjdk.org Thu Sep 1 17:37:55 2022 From: duke at openjdk.org (Abhishek Kumar) Date: Thu, 1 Sep 2022 17:37:55 GMT Subject: RFR: 8288882: JFileChooser - empty (0 bytes) file is displayed as 1 KB [v22] In-Reply-To: References: <1vIZK9GjFmvSFEiDeXaRrYIm6pF9vwHZkOvGjuhKQ_E=.628cf54f-af74-45ca-81bd-51f99a723753@github.com> Message-ID: On Thu, 1 Sep 2022 16:13:41 GMT, Phil Race wrote: >> "formatToDouble" method is taking filesize as a long value in parameter and convert it to one decimal precision value. >> The reason for converting to one decimal point is to make it similar to native file system which shows file size in one decimal precision. >> >> can "formatToDouble" method rename to "getOneDecimalPrecisionFileSize" ? >> >> Since we are displaying file size in one decimal precision, files having size from 1 to 199 byte will be 0.1 KB. >> 1 to 99 byte file size is handled separately otherwise it will show 0.0 KB. >> >> I will add few test case for 100 to 199 byte file. > >> Since we are displaying file size in one decimal precision, files having size from 1 to 199 byte will be 0.1 KB. > > Yes, I see that. My point is it seems wrong. Can you please suggest me what should I do to handle 1 byte to199 bytes ? ------------- PR: https://git.openjdk.org/jdk/pull/9327 From duke at openjdk.org Thu Sep 1 17:37:59 2022 From: duke at openjdk.org (Abhishek Kumar) Date: Thu, 1 Sep 2022 17:37:59 GMT Subject: RFR: 8288882: JFileChooser - empty (0 bytes) file is displayed as 1 KB [v25] In-Reply-To: References: Message-ID: On Thu, 1 Sep 2022 16:29:07 GMT, Alexey Ivanov wrote: >> Abhishek Kumar has updated the pull request incrementally with one additional commit since the last revision: >> >> Updated as per suggested changes > > test/jdk/javax/swing/JFileChooser/FileSizeCheck.java line 64: > >> 62: public static void test() { >> 63: JFrame frame = new JFrame("JFileChooser File Size test"); >> 64: JFileChooser fc = new JFileChooser(); > > If you add, > > > fc.setControlButtonsAreShown(false); > > > the panel with _Open_ and _Cancel_ button will be hidden. I think it improves user experience, clicking either button does nothing. Yeah sure, I will update it. ------------- PR: https://git.openjdk.org/jdk/pull/9327 From prr at openjdk.org Thu Sep 1 20:24:13 2022 From: prr at openjdk.org (Phil Race) Date: Thu, 1 Sep 2022 20:24:13 GMT Subject: RFR: 8293159: Use try-with-resources in X11FontManager.registerFontDir In-Reply-To: <05z0cNBF7JPLVHQGt0B5WBYiZIXwgEey8XEsWG9yCYg=.9ef77c92-2ef1-4e23-ad44-15da001a4a05@github.com> References: <05z0cNBF7JPLVHQGt0B5WBYiZIXwgEey8XEsWG9yCYg=.9ef77c92-2ef1-4e23-ad44-15da001a4a05@github.com> Message-ID: On Mon, 15 Aug 2022 13:13:33 GMT, Andrey Turbanov wrote: > Makes code easier to read. github did not make it easy to compare what should be a trivial diff . ------------- Marked as reviewed by prr (Reviewer). PR: https://git.openjdk.org/jdk/pull/9879 From djelinski at openjdk.org Thu Sep 1 20:42:11 2022 From: djelinski at openjdk.org (Daniel =?UTF-8?B?SmVsacWEc2tp?=) Date: Thu, 1 Sep 2022 20:42:11 GMT Subject: RFR: 8293088: Fix compilation with the new Visual Studio preprocessor In-Reply-To: References: Message-ID: On Tue, 30 Aug 2022 12:08:09 GMT, Daniel Jeli?ski wrote: > Fix compilation with Zc:preprocessor enabled. > > The flag itself will be enabled in [JDK-8247283](https://bugs.openjdk.org/browse/JDK-8247283); I enabled the flag using instructions found in Magnus's comment on that issue. > > Windows 10 SDK version 2104 (10.0.20348.0) is required for successful compilation. Compilation fails with a warning (treated as error by default) with older versions of Windows 10 SDK. > > I verified that the compilation completes successfully with this patch, both in debug and in release mode, both with and without Zc:preprocessor. I verified that client tests still pass. I also verified on a separate project that merging strings with and without ## is equivalent when Zc:preprocessor is absent. When it is present, merging with ## is an error. I did not verify the output of the changed macros, but I'm pretty confident that their behavior will not change. If you could suggest a test, I'll be happy to perform it. ------------- PR: https://git.openjdk.org/jdk/pull/10080 From prr at openjdk.org Thu Sep 1 20:43:11 2022 From: prr at openjdk.org (Phil Race) Date: Thu, 1 Sep 2022 20:43:11 GMT Subject: RFR: JDK-8292276 : Missing color names in CSS. [v10] In-Reply-To: <3K40K0Roy0-H5dqJr4TqChwOOCRbEQYnsezkiKe3gEw=.6a48b650-6421-4b32-abc9-f1543b554ac9@github.com> References: <3K40K0Roy0-H5dqJr4TqChwOOCRbEQYnsezkiKe3gEw=.6a48b650-6421-4b32-abc9-f1543b554ac9@github.com> Message-ID: On Mon, 29 Aug 2022 14:24:59 GMT, ScientificWare wrote: >> This is referenced in Java Bug Database as >> - [JDK-8292276 : Missing color names in CSS](https://bugs.java.com/bugdatabase/view_bug.do?bug_id=8292276) >> >> This is tracked in JBS as >> - [JDK-8292276 : Missing color names in CSS](https://bugs.openjdk.java.net/browse/JDK-8292276) >> >> Adds missing color names, defined by CSS Level 4, in CSS.java : >> CSS Color Module Level 4 >> W3C Candidate Recommendation Snapshot, 5 July 2022 >> [7.1 Named Colors](https://www.w3.org/TR/css-color-4/#named-color) >> >> Designed from : [ScientificWare JDK-8292276 : Missing color names in CSS](https://github.com/scientificware/jdk/issues/12) > > ScientificWare has updated the pull request incrementally with one additional commit since the last revision: > > Adds transparent and RGB case insensitive tests. > > When and values contains at least an uppercase character, getAttribute returns null. > When using 'transparent' keyword getAttribute returns null. Changes requested by prr (Reviewer). src/java.desktop/share/classes/javax/swing/text/html/CSS.java line 1398: > 1396: static Color stringToColor(String str) { > 1397: String strlc = str.toLowerCase(Locale.ROOT); > 1398: if (str == null) { What's the point in testing if it is null after you already de-referenced it ? src/java.desktop/share/classes/javax/swing/text/html/CSS.java line 1411: > 1409: Color color = colorNamed.get(strlc); > 1410: if (color != null) { > 1411: return new Color(color.getRGB(), true); Can you explain why you can't return the color instance directly ? They are immutable so I don't see the reason. src/java.desktop/share/classes/javax/swing/text/html/CSS.java line 1562: > 1560: Map.entry("tomato", new Color(255, 99, 71, 255)), > 1561: Map.entry("transparent", new Color(0, 0, 0, 0)), > 1562: Map.entry("turquoise", new Color(64, 224, 208, 255)), So all of these have the extra 255 alpha arg just so this ONE entry can be different ? Do you expect others like this ? If not why not special case that in the caller method ? ------------- PR: https://git.openjdk.org/jdk/pull/9825 From prr at openjdk.org Fri Sep 2 00:49:03 2022 From: prr at openjdk.org (Phil Race) Date: Fri, 2 Sep 2022 00:49:03 GMT Subject: RFR: 8288882: JFileChooser - empty (0 bytes) file is displayed as 1 KB [v25] In-Reply-To: References: Message-ID: On Fri, 26 Aug 2022 14:30:10 GMT, Abhishek Kumar wrote: >> JFileChooser - empty file size issue fixed. >> For empty file, now the size 0 KB. >> Manual Test Case "FileSizeCheck.java" created. > > Abhishek Kumar has updated the pull request incrementally with one additional commit since the last revision: > > Updated as per suggested changes AK > Since we are displaying file size in one decimal precision, files having size from 1 to 199 byte will be 0.1 KB. PR > Yes, I see that. My point is it seems wrong. AK > Can you please suggest me what should I do to handle 1 byte to199 bytes ? PR : Just consistently round up - 0 bytes is 0 kb - 1-100 bytes is 0.1 kb - 101-199 bytes is 0.2 kb - 901 -1000 bytes is 1kb and so on ------------- PR: https://git.openjdk.org/jdk/pull/9327 From dnguyen at openjdk.org Fri Sep 2 01:17:09 2022 From: dnguyen at openjdk.org (Damon Nguyen) Date: Fri, 2 Sep 2022 01:17:09 GMT Subject: RFR: 8287912: GTK L&F : Background of tree icons are red In-Reply-To: References: Message-ID: <5rfMGeAuR5EKbTbfDnwIu-7fkuKXMilG8YywPHbfH7s=.5532e2d9-923a-40e2-bbff-e0a9b18dfd17@github.com> On Thu, 1 Sep 2022 16:56:00 GMT, Prasanta Sadhukhan wrote: >> The background of tree icons are not red in GTK LAF when setOpaque is set to false for tree component. >> It has been observed that while painting tree cell background in GTK LAF, a rectangular area is also painted with background color (white). >> >> Proposed solution is to check the opacity of tree component before drawing tree cell background. If the opacity is set to "false" then the background shouldn't be painted. >> >> An automated test case has been added and checked in CI, link is added in JBS. > > test/jdk/javax/swing/JTree/TestTreeBackgroundColor.java line 81: > >> 79: if (c.equals(Color.RED)) { >> 80: passed = true; >> 81: } > > better to check at midpoint tree.width/2, tree.height/2 and also break if it's RED, no need to check all pixels. Another possible solution that I used in a previous test was a midpoint as suggested, but also one pixel near each edge. This eliminates the chance of the red still existing but not being detected at the midpoint because the red is at a different location. ------------- PR: https://git.openjdk.org/jdk/pull/10112 From tr at openjdk.org Fri Sep 2 05:49:43 2022 From: tr at openjdk.org (Tejesh R) Date: Fri, 2 Sep 2022 05:49:43 GMT Subject: RFR: 4834298: JFileChooser.getSelectedFiles() failed with multi-selection and double-click [v2] In-Reply-To: <8DX6ByDjUI9pIhOkGyzozxV2di1b7XI0dXcDTpWkI2E=.1fc54dee-f22b-4dab-912b-3313cadf44ac@github.com> References: <8DX6ByDjUI9pIhOkGyzozxV2di1b7XI0dXcDTpWkI2E=.1fc54dee-f22b-4dab-912b-3313cadf44ac@github.com> Message-ID: On Thu, 1 Sep 2022 06:24:17 GMT, Andrey Turbanov wrote: >> Tejesh R has updated the pull request incrementally with one additional commit since the last revision: >> >> Updated based on review comments > > src/java.desktop/share/classes/sun/swing/FilePane.java line 1760: > >> 1758: //If selected, retain them and update the selected files in FileChooser class. >> 1759: File[] selectedFiles = null; >> 1760: if(getFileChooser().getSelectedFiles().length != 0) { > > let's add space after `if`s Updated. ------------- PR: https://git.openjdk.org/jdk/pull/9996 From djelinski at openjdk.org Fri Sep 2 05:55:43 2022 From: djelinski at openjdk.org (Daniel =?UTF-8?B?SmVsacWEc2tp?=) Date: Fri, 2 Sep 2022 05:55:43 GMT Subject: RFR: 8293088: Fix compilation with the new Visual Studio preprocessor In-Reply-To: References: Message-ID: On Tue, 30 Aug 2022 12:08:09 GMT, Daniel Jeli?ski wrote: > Fix compilation with Zc:preprocessor enabled. > > The flag itself will be enabled in [JDK-8247283](https://bugs.openjdk.org/browse/JDK-8247283); I enabled the flag using instructions found in Magnus's comment on that issue. > > Windows 10 SDK version 2104 (10.0.20348.0) is required for successful compilation. Compilation fails with a warning (treated as error by default) with older versions of Windows 10 SDK. > > I verified that the compilation completes successfully with this patch, both in debug and in release mode, both with and without Zc:preprocessor. FWIW, here's the test that I used: #include #define PRINTERR(res) \ PRINT(res, " " ## #res ## " in file " __FILE__); #define PRINT(res, msg) \ printf("- " ## msg ## " val=%d\n", res); int main() { for (int i = 0; i < 2; i++) { PRINTERR(i); } } Output: - i in file test.c val=0 - i in file test.c val=1 removing `##` does not change the output. ------------- PR: https://git.openjdk.org/jdk/pull/10080 From jdv at openjdk.org Fri Sep 2 06:15:51 2022 From: jdv at openjdk.org (Jayathirth D V) Date: Fri, 2 Sep 2022 06:15:51 GMT Subject: RFR: 8287912: GTK L&F : Background of tree icons are red In-Reply-To: References: Message-ID: <_bIYExydlnYYOOicYeV0d5ytc4dW8Vp3Es-Ep4tLc1o=.7150c1ca-1fcd-4e26-a6d9-b4781f1f6da7@github.com> On Thu, 1 Sep 2022 06:27:17 GMT, Abhishek Kumar wrote: > The background of tree icons are not red in GTK LAF when setOpaque is set to false for tree component. > It has been observed that while painting tree cell background in GTK LAF, a rectangular area is also painted with background color (white). > > Proposed solution is to check the opacity of tree component before drawing tree cell background. If the opacity is set to "false" then the background shouldn't be painted. > > An automated test case has been added and checked in CI, link is added in JBS. test/jdk/javax/swing/JTree/TestTreeBackgroundColor.java line 84: > 82: } > 83: } > 84: if (!passed) { This test will pass even in the case of last pixel check is RED. We should check for pixel data and whenever it is not RED we should bail out. Also if test fails it will leave TreeBackgroundColorTestFail.png, we should use temporary file and delete it on exit. ------------- PR: https://git.openjdk.org/jdk/pull/10112 From duke at openjdk.org Fri Sep 2 07:06:54 2022 From: duke at openjdk.org (Abhishek Kumar) Date: Fri, 2 Sep 2022 07:06:54 GMT Subject: RFR: 8287912: GTK L&F : Background of tree icons are red [v2] In-Reply-To: References: Message-ID: > The background of tree icons are not red in GTK LAF when setOpaque is set to false for tree component. > It has been observed that while painting tree cell background in GTK LAF, a rectangular area is also painted with background color (white). > > Proposed solution is to check the opacity of tree component before drawing tree cell background. If the opacity is set to "false" then the background shouldn't be painted. > > An automated test case has been added and checked in CI, link is added in JBS. Abhishek Kumar has updated the pull request incrementally with one additional commit since the last revision: Review Comments fix ------------- Changes: - all: https://git.openjdk.org/jdk/pull/10112/files - new: https://git.openjdk.org/jdk/pull/10112/files/17d61005..fb3db43f Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=10112&range=01 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=10112&range=00-01 Stats: 8 lines in 1 file changed: 0 ins; 1 del; 7 mod Patch: https://git.openjdk.org/jdk/pull/10112.diff Fetch: git fetch https://git.openjdk.org/jdk pull/10112/head:pull/10112 PR: https://git.openjdk.org/jdk/pull/10112 From psadhukhan at openjdk.org Fri Sep 2 07:16:41 2022 From: psadhukhan at openjdk.org (Prasanta Sadhukhan) Date: Fri, 2 Sep 2022 07:16:41 GMT Subject: RFR: 8292948: JEditorPane ignores font-size styles in external linked css-file [v3] In-Reply-To: References: Message-ID: On Sun, 28 Aug 2022 05:14:08 GMT, Stanimir Stamenkov wrote: >> [JDK-8292948] reveals a regression by the fix for [JDK-8257664] (#1759) causing `font-size` declarations from external style sheets to be ignored. >> >> As far as I've traced, the problem is with the `isDefined(CSS.Attribute.FONT_SIZE)` test: >> >> https://github.com/openjdk/jdk/blob/70b5b3119b2ed032b021a080f34a4fa28d092fb5/src/java.desktop/share/classes/javax/swing/text/html/StyleSheet.java#L2825-L2830 >> >> It misses declarations from linked styles via a `resolver` ([`AttributeSet.ResolveAttribute`](https://github.com/openjdk/jdk/blob/b0e0b87891eb81c2b33c1cfa598701b7bd2e5bdf/src/java.desktop/share/classes/javax/swing/text/AttributeSet.java#L187-L191)) attribute that happens to hold the external style sheet rules. The fix for this would be to move the implied `CSS.Attribute.FONT_SIZE` handling after: >> >> https://github.com/openjdk/jdk/blob/70b5b3119b2ed032b021a080f34a4fa28d092fb5/src/java.desktop/share/classes/javax/swing/text/html/StyleSheet.java#L2833-L2835 >> >> and drop the `isDefined()` test. >> >> [I'll prepare a jtreg test further.] >> >> [JDK-8292948]: https://bugs.openjdk.org/browse/JDK-8292948 "JEditorPane ignores font-size styles in external linked css-file" >> [JDK-8257664]: https://bugs.openjdk.org/browse/JDK-8257664 "HTMLEditorKit: Wrong CSS relative font sizes" > > Stanimir Stamenkov has updated the pull request incrementally with seven additional commits since the last revision: > > - 8292948: Make captureImage() an instance method > > Use just the instance editor component. > - 8292948: Use bigger/different base font than the default > > Make potential discrepancies with not resolving the base more obvious. > - 8292948: Make the setUp(), run/verify() sequence invocation explicit > > Simplify overall setup. > - 8292948: Avoid failing to save image capture when editor == null > > The failure to save the image suppresses the original failure. > - 8292948: Capitalize messages > - 8292948: Resolve test HTML file from the classpath > > Don't rely on the current working directory. > - 8292948: Adjust @summary Marked as reviewed by psadhukhan (Reviewer). ------------- PR: https://git.openjdk.org/jdk/pull/10054 From duke at openjdk.org Fri Sep 2 07:23:41 2022 From: duke at openjdk.org (Abhishek Kumar) Date: Fri, 2 Sep 2022 07:23:41 GMT Subject: RFR: 8287912: GTK L&F : Background of tree icons are red [v2] In-Reply-To: <5rfMGeAuR5EKbTbfDnwIu-7fkuKXMilG8YywPHbfH7s=.5532e2d9-923a-40e2-bbff-e0a9b18dfd17@github.com> References: <5rfMGeAuR5EKbTbfDnwIu-7fkuKXMilG8YywPHbfH7s=.5532e2d9-923a-40e2-bbff-e0a9b18dfd17@github.com> Message-ID: On Fri, 2 Sep 2022 01:14:10 GMT, Damon Nguyen wrote: >> test/jdk/javax/swing/JTree/TestTreeBackgroundColor.java line 81: >> >>> 79: if (c.equals(Color.RED)) { >>> 80: passed = true; >>> 81: } >> >> better to check at midpoint tree.width/2, tree.height/2 and also break if it's RED, no need to check all pixels. > > Another possible solution that I used in a previous test was a midpoint as suggested, but also one pixel near each edge. This eliminates the chance of the red still existing but not being detected at the midpoint because the red is at a different location. The test check has been changed to compare the pixels of entire width keeping the height constant to half of tree height. Now it will check pixel color and if it is not red , the test will fail. ------------- PR: https://git.openjdk.org/jdk/pull/10112 From duke at openjdk.org Fri Sep 2 07:23:43 2022 From: duke at openjdk.org (Abhishek Kumar) Date: Fri, 2 Sep 2022 07:23:43 GMT Subject: RFR: 8287912: GTK L&F : Background of tree icons are red [v2] In-Reply-To: <_bIYExydlnYYOOicYeV0d5ytc4dW8Vp3Es-Ep4tLc1o=.7150c1ca-1fcd-4e26-a6d9-b4781f1f6da7@github.com> References: <_bIYExydlnYYOOicYeV0d5ytc4dW8Vp3Es-Ep4tLc1o=.7150c1ca-1fcd-4e26-a6d9-b4781f1f6da7@github.com> Message-ID: On Fri, 2 Sep 2022 06:11:47 GMT, Jayathirth D V wrote: >> Abhishek Kumar has updated the pull request incrementally with one additional commit since the last revision: >> >> Review Comments fix > > test/jdk/javax/swing/JTree/TestTreeBackgroundColor.java line 84: > >> 82: } >> 83: } >> 84: if (!passed) { > > This test will pass even in the case of last pixel check is RED. We should check for pixel data and whenever it is not RED we should bail out. > > Also if test fails it will leave TreeBackgroundColorTestFail.png, we should use temporary file and delete it on exit. I have removed the writing of test image in case of fail operation and test condition changed to check if pixel color is not red then test will fail. ------------- PR: https://git.openjdk.org/jdk/pull/10112 From duke at openjdk.org Fri Sep 2 11:12:53 2022 From: duke at openjdk.org (Abhishek Kumar) Date: Fri, 2 Sep 2022 11:12:53 GMT Subject: RFR: 8288882: JFileChooser - empty (0 bytes) file is displayed as 1 KB [v26] In-Reply-To: References: Message-ID: > JFileChooser - empty file size issue fixed. > For empty file, now the size 0 KB. > Manual Test Case "FileSizeCheck.java" created. Abhishek Kumar has updated the pull request incrementally with one additional commit since the last revision: Filesize calculation logic modified ------------- Changes: - all: https://git.openjdk.org/jdk/pull/9327/files - new: https://git.openjdk.org/jdk/pull/9327/files/8ffcc83a..cea398f5 Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=9327&range=25 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=9327&range=24-25 Stats: 31 lines in 2 files changed: 7 ins; 2 del; 22 mod Patch: https://git.openjdk.org/jdk/pull/9327.diff Fetch: git fetch https://git.openjdk.org/jdk pull/9327/head:pull/9327 PR: https://git.openjdk.org/jdk/pull/9327 From duke at openjdk.org Fri Sep 2 11:37:02 2022 From: duke at openjdk.org (Abhishek Kumar) Date: Fri, 2 Sep 2022 11:37:02 GMT Subject: RFR: 8288882: JFileChooser - empty (0 bytes) file is displayed as 1 KB [v25] In-Reply-To: References: Message-ID: On Fri, 2 Sep 2022 00:46:39 GMT, Phil Race wrote: > AK > Since we are displaying file size in one decimal precision, files having size from 1 to 199 byte will be 0.1 KB. > > PR > Yes, I see that. My point is it seems wrong. > > AK > Can you please suggest me what should I do to handle 1 byte to199 bytes ? > > PR : Just consistently round up > > * 0 bytes is 0 kb > > * 1-100 bytes is 0.1 kb > > * 101-199 bytes is 0.2 kb > > * 901 -1000 bytes is 1kb > and so on The file size calculation logic has been changed to display the file size with round up value for < 1000 byte size. It will show similar values as mentioned here. ![Smaller_File_Size](https://user-images.githubusercontent.com/107542245/188130510-330ee330-a4c4-46ce-9f2a-cce880f4e264.png) But the native file system in linux does the rounding off for file length >1000 bytes. For example : 1250 bytes is displayed as 1.2 KB and 1251 bytes is displayed as 1.3 KB. So to keep JFileChooser behavior similar to native file system, the existing logic has been changed to use DecimalFormat object for formatting file size. It returns the file size similar to file managers on linux. JFileChooser File Size: ![JFileChooser_File_Size1](https://user-images.githubusercontent.com/107542245/188130027-d43f70de-0501-4e61-900d-55f12525c35d.png) Native System File Size: ![Native_File_System_Size](https://user-images.githubusercontent.com/107542245/188130137-78e4a82b-9edc-4103-b120-9f70bbecce58.png) ------------- PR: https://git.openjdk.org/jdk/pull/9327 From duke at openjdk.org Fri Sep 2 11:42:42 2022 From: duke at openjdk.org (ScientificWare) Date: Fri, 2 Sep 2022 11:42:42 GMT Subject: RFR: JDK-8292276 : Missing color names in CSS. [v10] In-Reply-To: References: <3K40K0Roy0-H5dqJr4TqChwOOCRbEQYnsezkiKe3gEw=.6a48b650-6421-4b32-abc9-f1543b554ac9@github.com> Message-ID: <6TqA6trYJCQmj_UnMJU5YZYGJvEiIP2h5GGpA3TZ3VI=.15d7a51d-6ca0-4f05-a02b-7eb15bdceae5@github.com> On Thu, 1 Sep 2022 20:29:00 GMT, Phil Race wrote: >> ScientificWare has updated the pull request incrementally with one additional commit since the last revision: >> >> Adds transparent and RGB case insensitive tests. >> >> When and values contains at least an uppercase character, getAttribute returns null. >> When using 'transparent' keyword getAttribute returns null. > > src/java.desktop/share/classes/javax/swing/text/html/CSS.java line 1398: > >> 1396: static Color stringToColor(String str) { >> 1397: String strlc = str.toLowerCase(Locale.ROOT); >> 1398: if (str == null) { > > What's the point in testing if it is null after you already de-referenced it ? Big logical mistake. I going to change the command order. > src/java.desktop/share/classes/javax/swing/text/html/CSS.java line 1411: > >> 1409: Color color = colorNamed.get(strlc); >> 1410: if (color != null) { >> 1411: return new Color(color.getRGB(), true); > > Can you explain why you can't return the color instance directly ? > They are immutable so I don't see the reason. To avoid change method behaviour, I tried to reproduce previous behaviors because returned objects can be publicly exposed trough javax.swing.text.html.StyleSheet stringToColor method. Previous implementation : When, "" returns always the same object Color.Black. When, "black", "silver", "white", ..., rgb colors defined ... returns a new object. I haven't a example list in mind but at least Color1 == Color2 is different according implementation. > src/java.desktop/share/classes/javax/swing/text/html/CSS.java line 1562: > >> 1560: Map.entry("tomato", new Color(255, 99, 71, 255)), >> 1561: Map.entry("transparent", new Color(0, 0, 0, 0)), >> 1562: Map.entry("turquoise", new Color(64, 224, 208, 255)), > > So all of these have the extra 255 alpha arg just so this ONE entry can be different ? Do you expect others like this ? If not why not special case that in the caller method ? I will correct this. ------------- PR: https://git.openjdk.org/jdk/pull/9825 From duke at openjdk.org Sat Sep 3 01:36:43 2022 From: duke at openjdk.org (SWinxy) Date: Sat, 3 Sep 2022 01:36:43 GMT Subject: RFR: JDK-8292276 : Missing color names in CSS. [v10] In-Reply-To: <6TqA6trYJCQmj_UnMJU5YZYGJvEiIP2h5GGpA3TZ3VI=.15d7a51d-6ca0-4f05-a02b-7eb15bdceae5@github.com> References: <3K40K0Roy0-H5dqJr4TqChwOOCRbEQYnsezkiKe3gEw=.6a48b650-6421-4b32-abc9-f1543b554ac9@github.com> <6TqA6trYJCQmj_UnMJU5YZYGJvEiIP2h5GGpA3TZ3VI=.15d7a51d-6ca0-4f05-a02b-7eb15bdceae5@github.com> Message-ID: On Fri, 2 Sep 2022 11:38:27 GMT, ScientificWare wrote: >> src/java.desktop/share/classes/javax/swing/text/html/CSS.java line 1411: >> >>> 1409: Color color = colorNamed.get(strlc); >>> 1410: if (color != null) { >>> 1411: return new Color(color.getRGB(), true); >> >> Can you explain why you can't return the color instance directly ? >> They are immutable so I don't see the reason. > > To avoid change method behaviour, I tried to reproduce previous behaviors because returned objects can be publicly exposed trough javax.swing.text.html.StyleSheet stringToColor method. > Previous implementation : > When, "" returns always the same object Color.Black. > When, "black", "silver", "white", ..., rgb colors defined ... returns a new object. > I haven't a example list in mind but at least Color1 == Color2 is different according implementation. I think Phil is talking about just `return`ing the result, which doesn't change behavior. `""` can still `return Color.BLACK;` with the others creating a new object, ditching the oddly-placed temporary `Color` object. ------------- PR: https://git.openjdk.org/jdk/pull/9825 From duke at openjdk.org Sat Sep 3 03:29:32 2022 From: duke at openjdk.org (ScientificWare) Date: Sat, 3 Sep 2022 03:29:32 GMT Subject: RFR: JDK-8292276 : Missing color names in CSS. [v10] In-Reply-To: References: <3K40K0Roy0-H5dqJr4TqChwOOCRbEQYnsezkiKe3gEw=.6a48b650-6421-4b32-abc9-f1543b554ac9@github.com> <6TqA6trYJCQmj_UnMJU5YZYGJvEiIP2h5GGpA3TZ3VI=.15d7a51d-6ca0-4f05-a02b-7eb15bdceae5@github.com> Message-ID: <2q3e4KHR1d_Oit9Byhd3qWwstuG5yPJjB6pSvsYGEQE=.159a981c-7259-444c-be0d-f032dddebf87@github.com> On Sat, 3 Sep 2022 01:33:02 GMT, SWinxy wrote: >> To avoid change method behaviour, I tried to reproduce previous behaviors because returned objects can be publicly exposed trough javax.swing.text.html.StyleSheet stringToColor method. >> Previous implementation : >> When, "" returns always the same object Color.Black. >> When, "black", "silver", "white", ..., rgb colors defined ... returns a new object. >> I haven't a example list in mind but at least Color1 == Color2 is different according implementation. > > I think Phil is talking about just `return`ing the result, which doesn't change behavior. `""` can still `return Color.BLACK;` with the others creating a new object, ditching the oddly-placed temporary `Color` object. @SWinxy, - if you're suggesting this ``` } else { return colorNamed.get(strlc); ``` We change the behavior (your comment) and lose the last test (color hex coded but without # prefix). - or if you have in mind } else { return new Color(colorNamed.get(strlc).color.getRGB(), true); We preserve the behavior but still lose the last test (color hex coded but without # prefix). - The way I interpreted @prrace comment : ``` } else { Color color = colorNamed.get(strlc); if (color != null) { return color; ``` We change the behavior : - In the code before this PR. The results were : null, Color.Black if "", and new Color Object for all other colors (the 10 named colors and all hex coded colors). - In the first implementation achieved in this PR, like the code above, results changed to : null, Color.Black if "", the same Object for each (149) named-color or hex coded color. - After your comment, results became : null, Color.Black if "", and new Color Object for all other Color (149 named or hex coded). ------------- PR: https://git.openjdk.org/jdk/pull/9825 From duke at openjdk.org Sat Sep 3 23:43:41 2022 From: duke at openjdk.org (SWinxy) Date: Sat, 3 Sep 2022 23:43:41 GMT Subject: RFR: JDK-8292276 : Missing color names in CSS. [v10] In-Reply-To: <2q3e4KHR1d_Oit9Byhd3qWwstuG5yPJjB6pSvsYGEQE=.159a981c-7259-444c-be0d-f032dddebf87@github.com> References: <3K40K0Roy0-H5dqJr4TqChwOOCRbEQYnsezkiKe3gEw=.6a48b650-6421-4b32-abc9-f1543b554ac9@github.com> <6TqA6trYJCQmj_UnMJU5YZYGJvEiIP2h5GGpA3TZ3VI=.15d7a51d-6ca0-4f05-a02b-7eb15bdceae5@github.com> <2q3e4KHR1d_Oit9Byhd3qWwstuG5yPJjB6pSvsYGEQE=.159a981c-7259-444c-be0d-f032dddebf87@github.com> Message-ID: On Sat, 3 Sep 2022 03:26:05 GMT, ScientificWare wrote: >> I think Phil is talking about just `return`ing the result, which doesn't change behavior. `""` can still `return Color.BLACK;` with the others creating a new object, ditching the oddly-placed temporary `Color` object. > > @SWinxy, > - if you're suggesting this > ``` > } else { > return colorNamed.get(strlc); > ``` > We change the behavior (your comment) and lose the last test (color hex coded but without # prefix). > - or if you have in mind > > } else { > return new Color(colorNamed.get(strlc).color.getRGB(), true); > > We preserve the behavior but still lose the last test (color hex coded but without # prefix). > - The way I interpreted @prrace comment : > ``` > } else { > Color color = colorNamed.get(strlc); > if (color != null) { > return color; > ``` > We change the behavior : > - In the code before this PR. The results were : null, Color.Black if "", and new Color Object for all other colors (the 10 named colors and all hex coded colors). > - In the first implementation achieved in this PR, like the code above, results changed to : null, Color.Black if "", the same Object for each (149) named-color or hex coded color. > - After your comment, results became : null, Color.Black if "", and new Color Object for all other Color (149 named or hex coded). Mmm I completely forgot that we're using the map here, and for that we'll need to create a `new Color` from it. My b. There could be a check to `colorNames.has(str)` and return the `new Color(colorNames.get(str))` since there will never be a `null` returned for a valid key. ------------- PR: https://git.openjdk.org/jdk/pull/9825 From psadhukhan at openjdk.org Mon Sep 5 07:11:39 2022 From: psadhukhan at openjdk.org (Prasanta Sadhukhan) Date: Mon, 5 Sep 2022 07:11:39 GMT Subject: RFR: 8287912: GTK L&F : Background of tree icons are red [v2] In-Reply-To: References: <5rfMGeAuR5EKbTbfDnwIu-7fkuKXMilG8YywPHbfH7s=.5532e2d9-923a-40e2-bbff-e0a9b18dfd17@github.com> Message-ID: <-TZ3xL49ZfKOWCG3ZQ6pIUjrMP5OiXOveJL8SA31eh0=.ade2a135-4c74-4f67-b090-c0a18a101c51@github.com> On Fri, 2 Sep 2022 07:18:13 GMT, Abhishek Kumar wrote: >> Another possible solution that I used in a previous test was a midpoint as suggested, but also one pixel near each edge. This eliminates the chance of the red still existing but not being detected at the midpoint because the red is at a different location. > > The test check has been changed to compare the pixels of entire width keeping the height constant to half of tree height. Now it will check pixel color and if it is not red , the test will fail. For me, test is not failing without the fix. Also, if you test entire width and fail if it is not red, it might encounter black pixel of text font too and might fail, so I think it's better to check width/2 to width -1 and not entire width. ------------- PR: https://git.openjdk.org/jdk/pull/10112 From psadhukhan at openjdk.org Mon Sep 5 07:11:39 2022 From: psadhukhan at openjdk.org (Prasanta Sadhukhan) Date: Mon, 5 Sep 2022 07:11:39 GMT Subject: RFR: 8287912: GTK L&F : Background of tree icons are red [v2] In-Reply-To: <-TZ3xL49ZfKOWCG3ZQ6pIUjrMP5OiXOveJL8SA31eh0=.ade2a135-4c74-4f67-b090-c0a18a101c51@github.com> References: <5rfMGeAuR5EKbTbfDnwIu-7fkuKXMilG8YywPHbfH7s=.5532e2d9-923a-40e2-bbff-e0a9b18dfd17@github.com> <-TZ3xL49ZfKOWCG3ZQ6pIUjrMP5OiXOveJL8SA31eh0=.ade2a135-4c74-4f67-b090-c0a18a101c51@github.com> Message-ID: On Mon, 5 Sep 2022 07:06:40 GMT, Prasanta Sadhukhan wrote: >> The test check has been changed to compare the pixels of entire width keeping the height constant to half of tree height. Now it will check pixel color and if it is not red , the test will fail. > > For me, test is not failing without the fix. > Also, if you test entire width and fail if it is not red, it might encounter black pixel of text font too and might fail, so I think it's better to check width/2 to width -1 and not entire width. Also, it's might be better to write the image in case of failure so that it gives an idea why it failed. ------------- PR: https://git.openjdk.org/jdk/pull/10112 From djelinski at openjdk.org Mon Sep 5 07:25:28 2022 From: djelinski at openjdk.org (Daniel =?UTF-8?B?SmVsacWEc2tp?=) Date: Mon, 5 Sep 2022 07:25:28 GMT Subject: RFR: 8293088: Fix compilation with the new Visual Studio preprocessor In-Reply-To: References: Message-ID: On Tue, 30 Aug 2022 12:08:09 GMT, Daniel Jeli?ski wrote: > Fix compilation with Zc:preprocessor enabled. > > The flag itself will be enabled in [JDK-8247283](https://bugs.openjdk.org/browse/JDK-8247283); I enabled the flag using instructions found in Magnus's comment on that issue. > > Windows 10 SDK version 2104 (10.0.20348.0) is required for successful compilation. Compilation fails with a warning (treated as error by default) with older versions of Windows 10 SDK. > > I verified that the compilation completes successfully with this patch, both in debug and in release mode, both with and without Zc:preprocessor. I verified the preprocessor output on `D3DResourceManager.cpp` file, which uses 3 of the 4 changed macros in `D3DPipeline.h` (`RETURN_STATUS_IF_EXP_FAILED` is not used anywhere). The generated files have only cosmetic differences - `##` removes whitespace between the concatenated string literals, and without `##` the whitespace is preserved. This whitespace is ignored by the compiler. ------------- PR: https://git.openjdk.org/jdk/pull/10080 From djelinski at openjdk.org Mon Sep 5 07:25:29 2022 From: djelinski at openjdk.org (Daniel =?UTF-8?B?SmVsacWEc2tp?=) Date: Mon, 5 Sep 2022 07:25:29 GMT Subject: Integrated: 8293088: Fix compilation with the new Visual Studio preprocessor In-Reply-To: References: Message-ID: <8jbP_1Aah3x4T_snhUAcWiN5NsxDJgst1JHiFYOrngY=.fe496f0d-51e9-4e0f-a6f4-c1df98174f4b@github.com> On Tue, 30 Aug 2022 12:08:09 GMT, Daniel Jeli?ski wrote: > Fix compilation with Zc:preprocessor enabled. > > The flag itself will be enabled in [JDK-8247283](https://bugs.openjdk.org/browse/JDK-8247283); I enabled the flag using instructions found in Magnus's comment on that issue. > > Windows 10 SDK version 2104 (10.0.20348.0) is required for successful compilation. Compilation fails with a warning (treated as error by default) with older versions of Windows 10 SDK. > > I verified that the compilation completes successfully with this patch, both in debug and in release mode, both with and without Zc:preprocessor. This pull request has now been integrated. Changeset: e945619d Author: Daniel Jeli?ski URL: https://git.openjdk.org/jdk/commit/e945619ddd38091eaa010f65472141443b8f214d Stats: 6 lines in 2 files changed: 0 ins; 0 del; 6 mod 8293088: Fix compilation with the new Visual Studio preprocessor Reviewed-by: ihse ------------- PR: https://git.openjdk.org/jdk/pull/10080 From duke at openjdk.org Mon Sep 5 09:35:34 2022 From: duke at openjdk.org (KIRIYAMA Takuya) Date: Mon, 5 Sep 2022 09:35:34 GMT Subject: RFR: 8292848: AWT_Mixing and TrayIcon tests fail on el8 with hard-coded isOel7 In-Reply-To: References: Message-ID: On Thu, 25 Aug 2022 18:56:59 GMT, Phil Race wrote: >> Could you please review the JDK-8292848 bug fixes? >> The purpose of the isOel7 method is to detect differences in GNOME version changes, and the isOel7 >> result should be true after version 8. >> I modified the isOel7 method to use regular expressions instead of hard-coded versions to be able to >> detect the new os version. >> I also changed the method name to match the new conditions. > > I guess this will do what was previously being done on OL7 .. but the way it is done it is fragile > and surely it can't be specific to OL .. and there's some pretty hokey adjustments going on in some of these tests. > I think some day these tests will need to be re-examined. @prrace Thank you for your review. I agree with another consideration . I think two reviews are required thisfix to be integrated. Could anyone please review this fix? ------------- PR: https://git.openjdk.org/jdk/pull/9995 From psadhukhan at openjdk.org Mon Sep 5 10:52:52 2022 From: psadhukhan at openjdk.org (Prasanta Sadhukhan) Date: Mon, 5 Sep 2022 10:52:52 GMT Subject: Integrated: 8267374: macOS: Option+Up/Down Arrow don't traverse to beginning/end of line in JTextArea In-Reply-To: References: Message-ID: On Wed, 22 Jun 2022 03:28:17 GMT, Prasanta Sadhukhan wrote: > Unlike in native "Notes" editor where Option+Up/Down traverses to start/end of each line respectively, > Java does not honour these key combination in editor. > > Added the key combination support by moving the caret to start/end of line and then doing caret up/down a line depending on if we are pressing UP or DOWN key. This pull request has now been integrated. Changeset: 955baa3c Author: Prasanta Sadhukhan URL: https://git.openjdk.org/jdk/commit/955baa3c44805538df5f95ccc91d2d5a08c85b81 Stats: 397 lines in 8 files changed: 367 ins; 16 del; 14 mod 8267374: macOS: Option+Up/Down Arrow don't traverse to beginning/end of line in JTextArea Reviewed-by: prr ------------- PR: https://git.openjdk.org/jdk/pull/9230 From psadhukhan at openjdk.org Mon Sep 5 12:55:41 2022 From: psadhukhan at openjdk.org (Prasanta Sadhukhan) Date: Mon, 5 Sep 2022 12:55:41 GMT Subject: RFR: 6529151: NullPointerException in swing.plaf.synth.SynthLookAndFeel$Handler Message-ID: NPE is thrown for closed/disposed JDialogs after uninstalling the UI which is because for SynthEditorPaneUI even though is disposed of, Nimbus propertyHandler tries to get the style of this disposed component resulting in NPE, which is fixed by a null check to prevent deferencing style object to get the color. ------------- Commit messages: - 6529151: NullPointerException in swing.plaf.synth.SynthLookAndFeel Changes: https://git.openjdk.org/jdk/pull/10167/files Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=10167&range=00 Issue: https://bugs.openjdk.org/browse/JDK-6529151 Stats: 129 lines in 2 files changed: 129 ins; 0 del; 0 mod Patch: https://git.openjdk.org/jdk/pull/10167.diff Fetch: git fetch https://git.openjdk.org/jdk pull/10167/head:pull/10167 PR: https://git.openjdk.org/jdk/pull/10167 From duke at openjdk.org Mon Sep 5 16:55:17 2022 From: duke at openjdk.org (Abhishek Kumar) Date: Mon, 5 Sep 2022 16:55:17 GMT Subject: RFR: 8287912: GTK L&F : Background of tree icons are red [v2] In-Reply-To: References: <5rfMGeAuR5EKbTbfDnwIu-7fkuKXMilG8YywPHbfH7s=.5532e2d9-923a-40e2-bbff-e0a9b18dfd17@github.com> <-TZ3xL49ZfKOWCG3ZQ6pIUjrMP5OiXOveJL8SA31eh0=.ade2a135-4c74-4f67-b090-c0a18a101c51@github.com> Message-ID: On Mon, 5 Sep 2022 07:08:13 GMT, Prasanta Sadhukhan wrote: >> For me, test is not failing without the fix. >> Also, if you test entire width and fail if it is not red, it might encounter black pixel of text font too and might fail, so I think it's better to check width/2 to width -1 and not entire width. > > Also, it's might be better to write the image in case of failure so that it gives an idea why it failed. > For me, test is not failing without the fix. Also, if you test entire width and fail if it is not red, it might encounter black pixel of text font too and might fail, so I think it's better to check width/2 to width -1 and not entire width. Test was not failing without the fix because the second argument of getRGB method is height/2, and for that pixel value the returned color is red. Changing the argument from height/2 to height/4 will fail the test without the fix otherwise it will pass the test. Also writing the image in case of failure. ------------- PR: https://git.openjdk.org/jdk/pull/10112 From duke at openjdk.org Mon Sep 5 17:08:57 2022 From: duke at openjdk.org (Abhishek Kumar) Date: Mon, 5 Sep 2022 17:08:57 GMT Subject: RFR: 8287912: GTK L&F : Background of tree icons are red [v3] In-Reply-To: References: Message-ID: <9AWUb8sAYxabyp0I2Xka-6GAFDxUCxCOnVaUbr7Ezj8=.13a72fa3-f5e3-4c24-adbb-885c90d70f86@github.com> > The background of tree icons are not red in GTK LAF when setOpaque is set to false for tree component. > It has been observed that while painting tree cell background in GTK LAF, a rectangular area is also painted with background color (white). > > Proposed solution is to check the opacity of tree component before drawing tree cell background. If the opacity is set to "false" then the background shouldn't be painted. > > An automated test case has been added and checked in CI, link is added in JBS. Abhishek Kumar has updated the pull request incrementally with one additional commit since the last revision: Review comments fix ------------- Changes: - all: https://git.openjdk.org/jdk/pull/10112/files - new: https://git.openjdk.org/jdk/pull/10112/files/fb3db43f..f3fd0e7d Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=10112&range=02 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=10112&range=01-02 Stats: 4 lines in 1 file changed: 1 ins; 0 del; 3 mod Patch: https://git.openjdk.org/jdk/pull/10112.diff Fetch: git fetch https://git.openjdk.org/jdk pull/10112/head:pull/10112 PR: https://git.openjdk.org/jdk/pull/10112 From aturbanov at openjdk.org Mon Sep 5 20:01:53 2022 From: aturbanov at openjdk.org (Andrey Turbanov) Date: Mon, 5 Sep 2022 20:01:53 GMT Subject: Integrated: 8293159: Use try-with-resources in X11FontManager.registerFontDir In-Reply-To: <05z0cNBF7JPLVHQGt0B5WBYiZIXwgEey8XEsWG9yCYg=.9ef77c92-2ef1-4e23-ad44-15da001a4a05@github.com> References: <05z0cNBF7JPLVHQGt0B5WBYiZIXwgEey8XEsWG9yCYg=.9ef77c92-2ef1-4e23-ad44-15da001a4a05@github.com> Message-ID: On Mon, 15 Aug 2022 13:13:33 GMT, Andrey Turbanov wrote: > Makes code easier to read. This pull request has now been integrated. Changeset: ef20ffe4 Author: Andrey Turbanov URL: https://git.openjdk.org/jdk/commit/ef20ffe4d222d48f0bdba81a0b864d9fb455e9a6 Stats: 164 lines in 1 file changed: 45 ins; 55 del; 64 mod 8293159: Use try-with-resources in X11FontManager.registerFontDir Reviewed-by: prr ------------- PR: https://git.openjdk.org/jdk/pull/9879 From psadhukhan at openjdk.org Tue Sep 6 06:04:36 2022 From: psadhukhan at openjdk.org (Prasanta Sadhukhan) Date: Tue, 6 Sep 2022 06:04:36 GMT Subject: RFR: 8075916: The regression-swing case failed as colored text is not shown on disabled checkbox and radio button with Nimbus LAF Message-ID: <_Pu4ZIceztdCjw5gy3bOR39Y0Jvz_TEiHdGMN0rKu-M=.9843abff-48d9-4a66-95f3-198e897c1399@github.com> CheckBox.disabledText and RadioButton.disabledText color UIProperty is not honoured by Nimbus L&F when disabled text is drawn for JCheckBox and JRadioButton, so disabled text color was rendered incorrectly. Fix is to honour these UIProperty color if they are set by user, else use the color from the component or via getColorForState(). Closed test as mentioned in JBS is used to check the fix. ------------- Commit messages: - 8075916: The regression-swing case failed as colored text is not shown on disabled checkbox and radio button with Nimbus LAF Changes: https://git.openjdk.org/jdk/pull/10177/files Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=10177&range=00 Issue: https://bugs.openjdk.org/browse/JDK-8075916 Stats: 8 lines in 1 file changed: 8 ins; 0 del; 0 mod Patch: https://git.openjdk.org/jdk/pull/10177.diff Fetch: git fetch https://git.openjdk.org/jdk pull/10177/head:pull/10177 PR: https://git.openjdk.org/jdk/pull/10177 From duke at openjdk.org Tue Sep 6 06:19:31 2022 From: duke at openjdk.org (Abhishek Kumar) Date: Tue, 6 Sep 2022 06:19:31 GMT Subject: RFR: 8234315: GTK LAF does not gray out disabled JMenu Message-ID: Disabled JMenu foreground color was not grayed out in GTK LAF for version 3. The issue didn't occur in GTK-2. After analysis it has been found that the JMenu widget type was changed to JMenuBar and the color value returned for the foreground color in disabled state was close to black color (RGB 0,0,0) for menubar which is not differentiable from enabled state foreground color. As a fix for this problem, if the menubar is in disabled state then the widget is changed to JMenu and color value returned for disabled menu is gray color. An automated test case has been added and checked in CI, link is added in JBS. ------------- Commit messages: - Whitespace fix - Disabled JMenu foreground color grayed out fix Changes: https://git.openjdk.org/jdk/pull/10176/files Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=10176&range=00 Issue: https://bugs.openjdk.org/browse/JDK-8234315 Stats: 130 lines in 2 files changed: 130 ins; 0 del; 0 mod Patch: https://git.openjdk.org/jdk/pull/10176.diff Fetch: git fetch https://git.openjdk.org/jdk pull/10176/head:pull/10176 PR: https://git.openjdk.org/jdk/pull/10176 From tr at openjdk.org Tue Sep 6 06:36:05 2022 From: tr at openjdk.org (Tejesh R) Date: Tue, 6 Sep 2022 06:36:05 GMT Subject: RFR: 6852577: Only for Nimbus LAF UIManager.get("PasswordField.echoChar") is null In-Reply-To: References: Message-ID: On Fri, 26 Aug 2022 04:47:08 GMT, Prasanta Sadhukhan wrote: > Default echo character obtained through `PasswordField.echoChar` UIProperty returns null for Nimbus L&F, > which is fixed by adding the default character * in the UIDefault table. test/jdk/javax/swing/plaf/nimbus/PasswordFieldTest.java line 56: > 54: if (UIManager.get("PasswordField.echoChar") == null) { > 55: throw new RuntimeException( > 56: "PasswordField.echoChar returns null for NimbusL&F"); Hardcoding of NimbusL&F for exception string can be replaced with L&F name. Since the traversal is happening for all L&F, expecting only Nimbus might not be right I guess. ------------- PR: https://git.openjdk.org/jdk/pull/10035 From psadhukhan at openjdk.org Tue Sep 6 06:56:49 2022 From: psadhukhan at openjdk.org (Prasanta Sadhukhan) Date: Tue, 6 Sep 2022 06:56:49 GMT Subject: RFR: 8287912: GTK L&F : Background of tree icons are red [v3] In-Reply-To: References: <5rfMGeAuR5EKbTbfDnwIu-7fkuKXMilG8YywPHbfH7s=.5532e2d9-923a-40e2-bbff-e0a9b18dfd17@github.com> <-TZ3xL49ZfKOWCG3ZQ6pIUjrMP5OiXOveJL8SA31eh0=.ade2a135-4c74-4f67-b090-c0a18a101c51@github.com> Message-ID: On Mon, 5 Sep 2022 16:51:48 GMT, Abhishek Kumar wrote: >> Also, it's might be better to write the image in case of failure so that it gives an idea why it failed. > >> For me, test is not failing without the fix. Also, if you test entire width and fail if it is not red, it might encounter black pixel of text font too and might fail, so I think it's better to check width/2 to width -1 and not entire width. > > Test was not failing without the fix because the second argument of getRGB method is height/2, and for that pixel value the returned color is red. > Changing the argument from height/2 to height/4 will fail the test without the fix otherwise it will pass the test. > > Also writing the image in case of failure. This looks ok .Please remove the empty 1st line in the test. ------------- PR: https://git.openjdk.org/jdk/pull/10112 From psadhukhan at openjdk.org Tue Sep 6 07:00:43 2022 From: psadhukhan at openjdk.org (Prasanta Sadhukhan) Date: Tue, 6 Sep 2022 07:00:43 GMT Subject: RFR: 6852577: Only for Nimbus LAF UIManager.get("PasswordField.echoChar") is null [v2] In-Reply-To: References: Message-ID: > Default echo character obtained through `PasswordField.echoChar` UIProperty returns null for Nimbus L&F, > which is fixed by adding the default character * in the UIDefault table. Prasanta Sadhukhan has updated the pull request incrementally with one additional commit since the last revision: Removal of Nimbus L&F hardcode ------------- Changes: - all: https://git.openjdk.org/jdk/pull/10035/files - new: https://git.openjdk.org/jdk/pull/10035/files/16f2df60..51919462 Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=10035&range=01 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=10035&range=00-01 Stats: 1 line in 1 file changed: 0 ins; 0 del; 1 mod Patch: https://git.openjdk.org/jdk/pull/10035.diff Fetch: git fetch https://git.openjdk.org/jdk pull/10035/head:pull/10035 PR: https://git.openjdk.org/jdk/pull/10035 From psadhukhan at openjdk.org Tue Sep 6 07:00:44 2022 From: psadhukhan at openjdk.org (Prasanta Sadhukhan) Date: Tue, 6 Sep 2022 07:00:44 GMT Subject: RFR: 6852577: Only for Nimbus LAF UIManager.get("PasswordField.echoChar") is null [v2] In-Reply-To: References: Message-ID: On Tue, 6 Sep 2022 06:33:14 GMT, Tejesh R wrote: >> Prasanta Sadhukhan has updated the pull request incrementally with one additional commit since the last revision: >> >> Removal of Nimbus L&F hardcode > > test/jdk/javax/swing/plaf/nimbus/PasswordFieldTest.java line 56: > >> 54: if (UIManager.get("PasswordField.echoChar") == null) { >> 55: throw new RuntimeException( >> 56: "PasswordField.echoChar returns null for NimbusL&F"); > > Hardcoding of NimbusL&F for exception string can be replaced with L&F name. Since the traversal is happening for all L&F, expecting only Nimbus might not be right I guess. yes, removed since we are already printing the L&F being tested in the beginning. ------------- PR: https://git.openjdk.org/jdk/pull/10035 From duke at openjdk.org Tue Sep 6 07:07:53 2022 From: duke at openjdk.org (Abhishek Kumar) Date: Tue, 6 Sep 2022 07:07:53 GMT Subject: RFR: 8287912: GTK L&F : Background of tree icons are red [v4] In-Reply-To: References: Message-ID: > The background of tree icons are not red in GTK LAF when setOpaque is set to false for tree component. > It has been observed that while painting tree cell background in GTK LAF, a rectangular area is also painted with background color (white). > > Proposed solution is to check the opacity of tree component before drawing tree cell background. If the opacity is set to "false" then the background shouldn't be painted. > > An automated test case has been added and checked in CI, link is added in JBS. Abhishek Kumar has updated the pull request incrementally with one additional commit since the last revision: Empty 1st line removed in test ------------- Changes: - all: https://git.openjdk.org/jdk/pull/10112/files - new: https://git.openjdk.org/jdk/pull/10112/files/f3fd0e7d..930a7fb4 Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=10112&range=03 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=10112&range=02-03 Stats: 1 line in 1 file changed: 0 ins; 1 del; 0 mod Patch: https://git.openjdk.org/jdk/pull/10112.diff Fetch: git fetch https://git.openjdk.org/jdk pull/10112/head:pull/10112 PR: https://git.openjdk.org/jdk/pull/10112 From psadhukhan at openjdk.org Tue Sep 6 07:28:47 2022 From: psadhukhan at openjdk.org (Prasanta Sadhukhan) Date: Tue, 6 Sep 2022 07:28:47 GMT Subject: RFR: 8287912: GTK L&F : Background of tree icons are red [v4] In-Reply-To: References: Message-ID: On Tue, 6 Sep 2022 07:07:53 GMT, Abhishek Kumar wrote: >> The background of tree icons are not red in GTK LAF when setOpaque is set to false for tree component. >> It has been observed that while painting tree cell background in GTK LAF, a rectangular area is also painted with background color (white). >> >> Proposed solution is to check the opacity of tree component before drawing tree cell background. If the opacity is set to "false" then the background shouldn't be painted. >> >> An automated test case has been added and checked in CI, link is added in JBS. > > Abhishek Kumar has updated the pull request incrementally with one additional commit since the last revision: > > Empty 1st line removed in test Marked as reviewed by psadhukhan (Reviewer). ------------- PR: https://git.openjdk.org/jdk/pull/10112 From tr at openjdk.org Tue Sep 6 08:23:43 2022 From: tr at openjdk.org (Tejesh R) Date: Tue, 6 Sep 2022 08:23:43 GMT Subject: RFR: 6852577: Only for Nimbus LAF UIManager.get("PasswordField.echoChar") is null [v2] In-Reply-To: References: Message-ID: <-x20m0yYydYluLbsIi6E0wUrv7V9IU9wGcdi8HqyLRw=.ee1dd71d-fec9-4157-9cdf-bf4d5da5eae2@github.com> On Tue, 6 Sep 2022 07:00:43 GMT, Prasanta Sadhukhan wrote: >> Default echo character obtained through `PasswordField.echoChar` UIProperty returns null for Nimbus L&F, >> which is fixed by adding the default character * in the UIDefault table. > > Prasanta Sadhukhan has updated the pull request incrementally with one additional commit since the last revision: > > Removal of Nimbus L&F hardcode Marked as reviewed by tr (Author). ------------- PR: https://git.openjdk.org/jdk/pull/10035 From duke at openjdk.org Tue Sep 6 08:57:43 2022 From: duke at openjdk.org (Abhishek Kumar) Date: Tue, 6 Sep 2022 08:57:43 GMT Subject: RFR: 4834298: JFileChooser.getSelectedFiles() failed with multi-selection and double-click [v2] In-Reply-To: References: Message-ID: <8myPQ3LIb1PCluP9Bi4JccijmRVF64m42PE09kf-A9w=.cbfa821d-a706-42b5-9901-bb2ed51f33af@github.com> On Thu, 1 Sep 2022 06:40:08 GMT, Tejesh R wrote: >> JFileChooser.getSelectedFiles() failed to retrieve files with multi-selection and double-click. This occurs when a single file is selected then enable multi-selection then select the same file through mouse double-click(Two file chooser dialogs used before and after multi-selection enabled). SelectedFiles are updated when a change in files/directory selection is done or when selection is made through keyboard selection. In this case since a single file is selected before multi-selection is enabled and same file is selected again without changing the selection index/directory, leaving selected Files un-updated. >> **Proposed Fix** : Whenever Multi-Selection is enabled check if any files are selected, if yes update the selected Files of JFileChoooser. > > Tejesh R has updated the pull request incrementally with one additional commit since the last revision: > > Updated based on review comments src/java.desktop/share/classes/sun/swing/FilePane.java line 1763: > 1761: selectedFiles = getFileChooser().getSelectedFiles(); > 1762: } else if (getFileChooser().getSelectedFile() != null) { > 1763: File selectedFile = getFileChooser().getSelectedFile(); File selectedFile = getFileChooser().getSelectedFile(); selectedFiles = new File[1]; selectedFiles[0] = selectedFile; You can directly assign getFileChooser().getSelectedFile() value to selectedFiles[0]. I think no need to create extra selectedFile variable. ------------- PR: https://git.openjdk.org/jdk/pull/9996 From jdv at openjdk.org Tue Sep 6 09:05:41 2022 From: jdv at openjdk.org (Jayathirth D V) Date: Tue, 6 Sep 2022 09:05:41 GMT Subject: RFR: 8287912: GTK L&F : Background of tree icons are red [v4] In-Reply-To: References: Message-ID: On Tue, 6 Sep 2022 07:07:53 GMT, Abhishek Kumar wrote: >> The background of tree icons are not red in GTK LAF when setOpaque is set to false for tree component. >> It has been observed that while painting tree cell background in GTK LAF, a rectangular area is also painted with background color (white). >> >> Proposed solution is to check the opacity of tree component before drawing tree cell background. If the opacity is set to "false" then the background shouldn't be painted. >> >> An automated test case has been added and checked in CI, link is added in JBS. > > Abhishek Kumar has updated the pull request incrementally with one additional commit since the last revision: > > Empty 1st line removed in test Marked as reviewed by jdv (Reviewer). ------------- PR: https://git.openjdk.org/jdk/pull/10112 From duke at openjdk.org Tue Sep 6 09:30:57 2022 From: duke at openjdk.org (Abhishek Kumar) Date: Tue, 6 Sep 2022 09:30:57 GMT Subject: RFR: 4834298: JFileChooser.getSelectedFiles() failed with multi-selection and double-click [v2] In-Reply-To: References: Message-ID: <2QtPmDcACUnqsvjMVDj81t2rN_LahmtRpVokpXAImFE=.15a96cc6-33e6-43df-a85c-7cbe8df581e9@github.com> On Thu, 1 Sep 2022 06:40:08 GMT, Tejesh R wrote: >> JFileChooser.getSelectedFiles() failed to retrieve files with multi-selection and double-click. This occurs when a single file is selected then enable multi-selection then select the same file through mouse double-click(Two file chooser dialogs used before and after multi-selection enabled). SelectedFiles are updated when a change in files/directory selection is done or when selection is made through keyboard selection. In this case since a single file is selected before multi-selection is enabled and same file is selected again without changing the selection index/directory, leaving selected Files un-updated. >> **Proposed Fix** : Whenever Multi-Selection is enabled check if any files are selected, if yes update the selected Files of JFileChoooser. > > Tejesh R has updated the pull request incrementally with one additional commit since the last revision: > > Updated based on review comments test/jdk/javax/swing/JFileChooser/MultiSelectionEnabledSelectedFilesTest.java line 87: > 85: File[] files = chooser.getSelectedFiles(); > 86: > 87: if(files.length <= 0) { `if(files.length <= 0) {` Please add space after if. ------------- PR: https://git.openjdk.org/jdk/pull/9996 From duke at openjdk.org Tue Sep 6 10:58:14 2022 From: duke at openjdk.org (Abhishek Kumar) Date: Tue, 6 Sep 2022 10:58:14 GMT Subject: Integrated: 8287912: GTK L&F : Background of tree icons are red In-Reply-To: References: Message-ID: On Thu, 1 Sep 2022 06:27:17 GMT, Abhishek Kumar wrote: > The background of tree icons are not red in GTK LAF when setOpaque is set to false for tree component. > It has been observed that while painting tree cell background in GTK LAF, a rectangular area is also painted with background color (white). > > Proposed solution is to check the opacity of tree component before drawing tree cell background. If the opacity is set to "false" then the background shouldn't be painted. > > An automated test case has been added and checked in CI, link is added in JBS. This pull request has now been integrated. Changeset: a92c1ff7 Author: Abhishek Kumar Committer: Jayathirth D V URL: https://git.openjdk.org/jdk/commit/a92c1ff700925b400ee92057ae3dc3030487a886 Stats: 115 lines in 2 files changed: 113 ins; 0 del; 2 mod 8287912: GTK L&F : Background of tree icons are red Reviewed-by: psadhukhan, jdv ------------- PR: https://git.openjdk.org/jdk/pull/10112 From tr at openjdk.org Tue Sep 6 11:14:49 2022 From: tr at openjdk.org (Tejesh R) Date: Tue, 6 Sep 2022 11:14:49 GMT Subject: RFR: 4834298: JFileChooser.getSelectedFiles() failed with multi-selection and double-click [v3] In-Reply-To: References: Message-ID: > JFileChooser.getSelectedFiles() failed to retrieve files with multi-selection and double-click. This occurs when a single file is selected then enable multi-selection then select the same file through mouse double-click(Two file chooser dialogs used before and after multi-selection enabled). SelectedFiles are updated when a change in files/directory selection is done or when selection is made through keyboard selection. In this case since a single file is selected before multi-selection is enabled and same file is selected again without changing the selection index/directory, leaving selected Files un-updated. > **Proposed Fix** : Whenever Multi-Selection is enabled check if any files are selected, if yes update the selected Files of JFileChoooser. Tejesh R has updated the pull request incrementally with one additional commit since the last revision: Updated based on review comments ------------- Changes: - all: https://git.openjdk.org/jdk/pull/9996/files - new: https://git.openjdk.org/jdk/pull/9996/files/71c936a0..1d7f271b Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=9996&range=02 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=9996&range=01-02 Stats: 4 lines in 2 files changed: 0 ins; 1 del; 3 mod Patch: https://git.openjdk.org/jdk/pull/9996.diff Fetch: git fetch https://git.openjdk.org/jdk pull/9996/head:pull/9996 PR: https://git.openjdk.org/jdk/pull/9996 From duke at openjdk.org Tue Sep 6 11:14:51 2022 From: duke at openjdk.org (Abhishek Kumar) Date: Tue, 6 Sep 2022 11:14:51 GMT Subject: RFR: 4834298: JFileChooser.getSelectedFiles() failed with multi-selection and double-click [v2] In-Reply-To: References: Message-ID: <5Y6GY-MycmJkFjgVOw7l9ysKuIgWKWVUZ5wwPz-YcU0=.92bf4183-78c0-42d1-b8c4-7cb4a1fe1866@github.com> On Thu, 1 Sep 2022 06:40:08 GMT, Tejesh R wrote: >> JFileChooser.getSelectedFiles() failed to retrieve files with multi-selection and double-click. This occurs when a single file is selected then enable multi-selection then select the same file through mouse double-click(Two file chooser dialogs used before and after multi-selection enabled). SelectedFiles are updated when a change in files/directory selection is done or when selection is made through keyboard selection. In this case since a single file is selected before multi-selection is enabled and same file is selected again without changing the selection index/directory, leaving selected Files un-updated. >> **Proposed Fix** : Whenever Multi-Selection is enabled check if any files are selected, if yes update the selected Files of JFileChoooser. > > Tejesh R has updated the pull request incrementally with one additional commit since the last revision: > > Updated based on review comments I guess copyright year for FilePane.java needs to be updated. ------------- PR: https://git.openjdk.org/jdk/pull/9996 From tr at openjdk.org Tue Sep 6 11:14:53 2022 From: tr at openjdk.org (Tejesh R) Date: Tue, 6 Sep 2022 11:14:53 GMT Subject: RFR: 4834298: JFileChooser.getSelectedFiles() failed with multi-selection and double-click [v2] In-Reply-To: <5Y6GY-MycmJkFjgVOw7l9ysKuIgWKWVUZ5wwPz-YcU0=.92bf4183-78c0-42d1-b8c4-7cb4a1fe1866@github.com> References: <5Y6GY-MycmJkFjgVOw7l9ysKuIgWKWVUZ5wwPz-YcU0=.92bf4183-78c0-42d1-b8c4-7cb4a1fe1866@github.com> Message-ID: On Tue, 6 Sep 2022 11:07:09 GMT, Abhishek Kumar wrote: > I guess copyright year for FilePane.java needs to be updated. Updated. > src/java.desktop/share/classes/sun/swing/FilePane.java line 1763: > >> 1761: selectedFiles = getFileChooser().getSelectedFiles(); >> 1762: } else if (getFileChooser().getSelectedFile() != null) { >> 1763: File selectedFile = getFileChooser().getSelectedFile(); > > File selectedFile = getFileChooser().getSelectedFile(); > selectedFiles = new File[1]; > selectedFiles[0] = selectedFile; > > You can directly assign getFileChooser().getSelectedFile() value to selectedFiles[0]. I think no need to create extra selectedFile variable. Updated. > test/jdk/javax/swing/JFileChooser/MultiSelectionEnabledSelectedFilesTest.java line 87: > >> 85: File[] files = chooser.getSelectedFiles(); >> 86: >> 87: if(files.length <= 0) { > > `if(files.length <= 0) {` > > Please add space after if. Updated. ------------- PR: https://git.openjdk.org/jdk/pull/9996 From duke at openjdk.org Tue Sep 6 11:34:44 2022 From: duke at openjdk.org (Abhishek Kumar) Date: Tue, 6 Sep 2022 11:34:44 GMT Subject: RFR: 4834298: JFileChooser.getSelectedFiles() failed with multi-selection and double-click [v3] In-Reply-To: References: Message-ID: On Tue, 6 Sep 2022 11:14:49 GMT, Tejesh R wrote: >> JFileChooser.getSelectedFiles() failed to retrieve files with multi-selection and double-click. This occurs when a single file is selected then enable multi-selection then select the same file through mouse double-click(Two file chooser dialogs used before and after multi-selection enabled). SelectedFiles are updated when a change in files/directory selection is done or when selection is made through keyboard selection. In this case since a single file is selected before multi-selection is enabled and same file is selected again without changing the selection index/directory, leaving selected Files un-updated. >> **Proposed Fix** : Whenever Multi-Selection is enabled check if any files are selected, if yes update the selected Files of JFileChoooser. > > Tejesh R has updated the pull request incrementally with one additional commit since the last revision: > > Updated based on review comments Applied the patch and tested, attached test case is passed with your fix. ------------- Marked as reviewed by kumarabhi006 at github.com (no known OpenJDK username). PR: https://git.openjdk.org/jdk/pull/9996 From asotona at openjdk.org Tue Sep 6 12:25:24 2022 From: asotona at openjdk.org (Adam Sotona) Date: Tue, 6 Sep 2022 12:25:24 GMT Subject: RFR: 8244681: Add a warning for possibly lossy conversion in compound assignments [v15] In-Reply-To: <80Nc7RlktP0cIEF2KjiCJbdCCg91jrOpT93uTQ7Hn-8=.75c5d4a4-d165-4ab8-941c-0fb5f6e6aa44@github.com> References: <80Nc7RlktP0cIEF2KjiCJbdCCg91jrOpT93uTQ7Hn-8=.75c5d4a4-d165-4ab8-941c-0fb5f6e6aa44@github.com> Message-ID: > Please review this patch adding new lint option, **lossy-conversions**, to javac to warn about type casts in compound assignments with possible lossy conversions. > > The new lint warning is shown if the type of the right-hand operand of a compound assignment is not assignment compatible with the type of the variable. > > The implementation of the warning is based on similar check performed to emit "possible lossy conversion" compilation error for simple assignments. > > Proposed patch also include complex matrix-style test with positive and negative test cases of lossy conversions in compound assignments. > > Proposed patch also disables this new lint option in all affected JDK modules and libraries to allow smooth JDK build. Individual cases to address possibly lossy conversions warnings in JDK are already addressed in a separate umbrella issue and its sub-tasks. > > Thanks for your review, > Adam Adam Sotona has updated the pull request with a new target base due to a merge or a rebase. The pull request now contains 19 commits: - Merge branch 'openjdk:master' into JDK-8244681 - re-enabled lossy conversions warnings for java.security.jgss, jdk.crypto.ec and jdk.internal.le - Merge branch 'openjdk:master' into JDK-8244681 - Merge branch 'openjdk:master' into JDK-8244681 - Merge branch 'openjdk:master' into JDK-8244681 - re-enabled lossy-conversion javac warnings in JDK Build Tools and jdk.compiler module - Added man-page line about lossy-conversion lint - Merge branch 'openjdk:master' into JDK-8244681 - 8244681: Add a warning for possibly lossy conversion in compound assignments re-enabled warnings for java.base, java.rmi and java.smartcardio - Merge branch 'openjdk:master' into JDK-8244681 - ... and 9 more: https://git.openjdk.org/jdk/compare/6a1e98cb...4a7ce942 ------------- Changes: https://git.openjdk.org/jdk/pull/8599/files Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=8599&range=14 Stats: 439 lines in 14 files changed: 437 ins; 0 del; 2 mod Patch: https://git.openjdk.org/jdk/pull/8599.diff Fetch: git fetch https://git.openjdk.org/jdk pull/8599/head:pull/8599 PR: https://git.openjdk.org/jdk/pull/8599 From ihse at openjdk.org Tue Sep 6 12:29:23 2022 From: ihse at openjdk.org (Magnus Ihse Bursie) Date: Tue, 6 Sep 2022 12:29:23 GMT Subject: RFR: 8285306: Fix typos in java.desktop [v7] In-Reply-To: <5gAPAoRiIJr6BEko1UEaMd3QeUte-snqvfc9eNU2Jgk=.a6d39dcd-0d89-4444-a890-a6c53f41245b@github.com> References: <5gAPAoRiIJr6BEko1UEaMd3QeUte-snqvfc9eNU2Jgk=.a6d39dcd-0d89-4444-a890-a6c53f41245b@github.com> Message-ID: > I ran `codespell` on the `src/java.desktop` directory, and accepted those changes where it indeed discovered real typos. > > I ignored typos in public methods and variables. Maybe they can be fixed later on without much fanfare, if they are in internal classes. Typos in exposed APIs are likely here to stay. > > I will update copyright years using a script before pushing (otherwise like every second change would be a copyright update, making reviewing much harder). > > The long term goal here is to make tooling support for running `codespell`. The trouble with automating this is of course all false positives. But before even trying to solve that issue, all true positives must be fixed. Hence this PR. Magnus Ihse Bursie has updated the pull request incrementally with two additional commits since the last revision: - Revert changes in libjpeg - Revert changes in libfreetype ------------- Changes: - all: https://git.openjdk.org/jdk/pull/8328/files - new: https://git.openjdk.org/jdk/pull/8328/files/98e635a5..19409c23 Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=8328&range=06 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=8328&range=05-06 Stats: 9 lines in 6 files changed: 0 ins; 0 del; 9 mod Patch: https://git.openjdk.org/jdk/pull/8328.diff Fetch: git fetch https://git.openjdk.org/jdk pull/8328/head:pull/8328 PR: https://git.openjdk.org/jdk/pull/8328 From ihse at openjdk.org Tue Sep 6 12:42:05 2022 From: ihse at openjdk.org (Magnus Ihse Bursie) Date: Tue, 6 Sep 2022 12:42:05 GMT Subject: RFR: 8285306: Fix typos in java.desktop [v8] In-Reply-To: <5gAPAoRiIJr6BEko1UEaMd3QeUte-snqvfc9eNU2Jgk=.a6d39dcd-0d89-4444-a890-a6c53f41245b@github.com> References: <5gAPAoRiIJr6BEko1UEaMd3QeUte-snqvfc9eNU2Jgk=.a6d39dcd-0d89-4444-a890-a6c53f41245b@github.com> Message-ID: > I ran `codespell` on the `src/java.desktop` directory, and accepted those changes where it indeed discovered real typos. > > I ignored typos in public methods and variables. Maybe they can be fixed later on without much fanfare, if they are in internal classes. Typos in exposed APIs are likely here to stay. > > I will update copyright years using a script before pushing (otherwise like every second change would be a copyright update, making reviewing much harder). > > The long term goal here is to make tooling support for running `codespell`. The trouble with automating this is of course all false positives. But before even trying to solve that issue, all true positives must be fixed. Hence this PR. Magnus Ihse Bursie has updated the pull request with a new target base due to a merge or a rebase. The pull request now contains 46 commits: - Merge branch 'master' into typos-in-java.desktop - Revert changes in libjpeg - Revert changes in libfreetype - Update src/java.desktop/windows/classes/sun/awt/windows/WPrinterJob.java Co-authored-by: Alexey Ivanov <70774172+aivanov-jdk at users.noreply.github.com> - Update src/java.desktop/unix/classes/sun/awt/X11/XBaseMenuWindow.java Co-authored-by: Alexey Ivanov <70774172+aivanov-jdk at users.noreply.github.com> - Update src/java.desktop/unix/classes/sun/awt/X11/XBaseMenuWindow.java Co-authored-by: Alexey Ivanov <70774172+aivanov-jdk at users.noreply.github.com> - Update src/java.desktop/share/classes/sun/swing/SwingUtilities2.java Co-authored-by: Alexey Ivanov <70774172+aivanov-jdk at users.noreply.github.com> - Update src/java.desktop/share/classes/sun/swing/SwingUtilities2.java Co-authored-by: Alexey Ivanov <70774172+aivanov-jdk at users.noreply.github.com> - Update src/java.desktop/share/classes/sun/awt/image/ImagingLib.java Co-authored-by: Alexey Ivanov <70774172+aivanov-jdk at users.noreply.github.com> - Update src/java.desktop/share/classes/sun/awt/image/ImagingLib.java Co-authored-by: Alexey Ivanov <70774172+aivanov-jdk at users.noreply.github.com> - ... and 36 more: https://git.openjdk.org/jdk/compare/6a1e98cb...1ce28314 ------------- Changes: https://git.openjdk.org/jdk/pull/8328/files Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=8328&range=07 Stats: 1028 lines in 486 files changed: 0 ins; 0 del; 1028 mod Patch: https://git.openjdk.org/jdk/pull/8328.diff Fetch: git fetch https://git.openjdk.org/jdk pull/8328/head:pull/8328 PR: https://git.openjdk.org/jdk/pull/8328 From ihse at openjdk.org Tue Sep 6 12:42:05 2022 From: ihse at openjdk.org (Magnus Ihse Bursie) Date: Tue, 6 Sep 2022 12:42:05 GMT Subject: RFR: 8285306: Fix typos in java.desktop [v7] In-Reply-To: References: <5gAPAoRiIJr6BEko1UEaMd3QeUte-snqvfc9eNU2Jgk=.a6d39dcd-0d89-4444-a890-a6c53f41245b@github.com> Message-ID: On Tue, 6 Sep 2022 12:29:23 GMT, Magnus Ihse Bursie wrote: >> I ran `codespell` on the `src/java.desktop` directory, and accepted those changes where it indeed discovered real typos. >> >> I ignored typos in public methods and variables. Maybe they can be fixed later on without much fanfare, if they are in internal classes. Typos in exposed APIs are likely here to stay. >> >> I will update copyright years using a script before pushing (otherwise like every second change would be a copyright update, making reviewing much harder). >> >> The long term goal here is to make tooling support for running `codespell`. The trouble with automating this is of course all false positives. But before even trying to solve that issue, all true positives must be fixed. Hence this PR. > > Magnus Ihse Bursie has updated the pull request incrementally with two additional commits since the last revision: > > - Revert changes in libjpeg > - Revert changes in libfreetype I have now removed the changes to libfreetype, and also libjpeg. These were the only 3rd party source I could locate. I apologize for this PR. It was too huge. If it is of any comfort, I've learnt my lesson and won't repeat it. And once it started getting pushed down by more prioritized work, I got a bit scared about going back and look through all this for additional (unspecified) 3rd party sources, so it got left behind, hanging around. @prrace I hope this is acceptable to merge now. ------------- PR: https://git.openjdk.org/jdk/pull/8328 From tr at openjdk.org Tue Sep 6 16:58:11 2022 From: tr at openjdk.org (Tejesh R) Date: Tue, 6 Sep 2022 16:58:11 GMT Subject: RFR: 8292376: A few Swing methods use inheritDoc on exceptions which are not inherited [v2] In-Reply-To: References: Message-ID: On Wed, 17 Aug 2022 12:07:27 GMT, Abhishek Kumar wrote: >> Document update for getBaselineResizeBehavior() and getBaseline() method description in JSpinner, AbstractBorder and TitledBorder . > > Abhishek Kumar has updated the pull request incrementally with one additional commit since the last revision: > > copyright year updated src/java.desktop/share/classes/javax/swing/border/AbstractBorder.java line 184: > 182: * @return an enum indicating how the baseline changes as the border is > 183: * resized > 184: * @throws NullPointerException if passed in {@code Component} is {@code null} `if passed in {@code Component} is {@code null}` - Rephrasing this sentence would be better. Something like `if {@code Component} is {@code null}`. ------------- PR: https://git.openjdk.org/jdk/pull/9902 From swinxythecat at gmail.com Tue Sep 6 18:49:32 2022 From: swinxythecat at gmail.com (SWinxy) Date: Tue, 6 Sep 2022 14:49:32 -0400 Subject: Inlining SDRenderType returns in QuartzRenderer.m Message-ID: Hey y'all, I was looking at QuartzRenderer.m , and noticed that a bunch of functions could directly return an SDRenderType enum at the end, rather than returning a local variable set at the start . Can they be changed so that the logic to determine what is returned sits at the end of the functions instead? E.g. `return fill ? SD_Fill : SD_Stroke`. Way more concise! Thoughts? -------------- next part -------------- An HTML attachment was scrubbed... URL: From serb at openjdk.org Tue Sep 6 23:00:28 2022 From: serb at openjdk.org (Sergey Bylokhov) Date: Tue, 6 Sep 2022 23:00:28 GMT Subject: RFR: 8234315: GTK LAF does not gray out disabled JMenu In-Reply-To: References: Message-ID: On Tue, 6 Sep 2022 05:37:02 GMT, Abhishek Kumar wrote: > Disabled JMenu foreground color was not grayed out in GTK LAF for version 3. The issue didn't occur in GTK-2. > After analysis it has been found that the JMenu widget type was changed to JMenuBar and the color value returned for the foreground color in disabled state was close to black color (RGB 0,0,0) for menubar which is not differentiable from enabled state foreground color. > > As a fix for this problem, if the menubar is in disabled state then the widget is changed to JMenu and color value returned for disabled menu is gray color. > > An automated test case has been added and checked in CI, link is added in JBS. Does the new color looks the same as in the native applications? ------------- PR: https://git.openjdk.org/jdk/pull/10176 From serb at openjdk.org Tue Sep 6 23:09:49 2022 From: serb at openjdk.org (Sergey Bylokhov) Date: Tue, 6 Sep 2022 23:09:49 GMT Subject: RFR: 6529151: NullPointerException in swing.plaf.synth.SynthLookAndFeel$Handler In-Reply-To: References: Message-ID: On Mon, 5 Sep 2022 12:45:53 GMT, Prasanta Sadhukhan wrote: > NPE is thrown for closed/disposed JDialogs after uninstalling the UI which is because for SynthEditorPaneUI even though is disposed of, Nimbus propertyHandler tries to get the style of this disposed component resulting in NPE, > which is fixed by a null check to prevent deferencing style object to get the color. test/jdk/javax/swing/plaf/synth/RepaintNPE.java line 84: > 82: try > 83: { > 84: Method method = jComp.getClass().getMethod ( "getUI" ); The getUI() method is public, can be used directly. ------------- PR: https://git.openjdk.org/jdk/pull/10167 From serb at openjdk.org Tue Sep 6 23:14:39 2022 From: serb at openjdk.org (Sergey Bylokhov) Date: Tue, 6 Sep 2022 23:14:39 GMT Subject: RFR: 8225012: sanity/client/SwingSet/src/ToolTipDemoTest.java fails on Windows In-Reply-To: <1rb8LBNCEl28QDHvpFScS19N2BP37UKIbc2qyMM33ig=.6957698e-677a-4b5e-bdf1-1f6aa28d4d81@github.com> References: <1rb8LBNCEl28QDHvpFScS19N2BP37UKIbc2qyMM33ig=.6957698e-677a-4b5e-bdf1-1f6aa28d4d81@github.com> Message-ID: On Sat, 27 Aug 2022 00:32:11 GMT, Alexandre Iline wrote: > Activate the window with a mouse click. > Close tooltip by moving the window out of the component. > > Multiple runs have been performed in the CI, totaling 500 runs on each Windows and Mac OS. > > While testing the fix, I have discovered that, while this fixes the problem on Mac and Windows, on linux the test is not fully stable. I have created a bug for that and excluded the test on Linux. Marked as reviewed by serb (Reviewer). ------------- PR: https://git.openjdk.org/jdk/pull/10053 From serb at openjdk.org Tue Sep 6 23:14:44 2022 From: serb at openjdk.org (Sergey Bylokhov) Date: Tue, 6 Sep 2022 23:14:44 GMT Subject: RFR: 6852577: Only for Nimbus LAF UIManager.get("PasswordField.echoChar") is null [v2] In-Reply-To: References: Message-ID: On Tue, 6 Sep 2022 07:00:43 GMT, Prasanta Sadhukhan wrote: >> Default echo character obtained through `PasswordField.echoChar` UIProperty returns null for Nimbus L&F, >> which is fixed by adding the default character * in the UIDefault table. > > Prasanta Sadhukhan has updated the pull request incrementally with one additional commit since the last revision: > > Removal of Nimbus L&F hardcode I guess currently the Nimbus L&F use some char for the password field, how that place will intrract with this new ui property? ------------- PR: https://git.openjdk.org/jdk/pull/10035 From serb at openjdk.org Tue Sep 6 23:26:40 2022 From: serb at openjdk.org (Sergey Bylokhov) Date: Tue, 6 Sep 2022 23:26:40 GMT Subject: RFR: 7148092: [macosx] When Alt+down arrow key is pressed, the combobox popup does not appear. [v3] In-Reply-To: <9_6m09UHBqjqrDWnuPS7Imjl3tciQr1q7RCxyOY0xXs=.47f6bcbe-38db-40c5-86b5-4329d5c365ef@github.com> References: <9_6m09UHBqjqrDWnuPS7Imjl3tciQr1q7RCxyOY0xXs=.47f6bcbe-38db-40c5-86b5-4329d5c365ef@github.com> Message-ID: On Thu, 25 Aug 2022 16:34:32 GMT, Prasanta Sadhukhan wrote: >> When comboBox have focus, pressing Alt+Down (or Up) should render the popup which is not happening for Aqua L&F. >> >> Fix is to add toggleAction for Alt+Down/Up keys as has been done for [MetalLookAndFeel](https://github.com/openjdk/jdk/blob/master/src/java.desktop/share/classes/javax/swing/plaf/metal/MetalLookAndFeel.java#L912) >> >> closed problemlisted test is used to check the fix. > > Prasanta Sadhukhan has updated the pull request incrementally with one additional commit since the last revision: > > Use camelCase Don't we need to align this behaviour to the native apps rather than metal? ------------- PR: https://git.openjdk.org/jdk/pull/10014 From serb at openjdk.org Tue Sep 6 23:34:38 2022 From: serb at openjdk.org (Sergey Bylokhov) Date: Tue, 6 Sep 2022 23:34:38 GMT Subject: RFR: 8292848: AWT_Mixing and TrayIcon tests fail on el8 with hard-coded isOel7 In-Reply-To: References: Message-ID: On Wed, 24 Aug 2022 07:06:15 GMT, KIRIYAMA Takuya wrote: > Could you please review the JDK-8292848 bug fixes? > The purpose of the isOel7 method is to detect differences in GNOME version changes, and the isOel7 > result should be true after version 8. > I modified the isOel7 method to use regular expressions instead of hard-coded versions to be able to > detect the new os version. > I also changed the method name to match the new conditions. Marked as reviewed by serb (Reviewer). ------------- PR: https://git.openjdk.org/jdk/pull/9995 From serb at openjdk.org Tue Sep 6 23:40:45 2022 From: serb at openjdk.org (Sergey Bylokhov) Date: Tue, 6 Sep 2022 23:40:45 GMT Subject: RFR: 8292738 : JInternalFrame backgroundShadowBorder & foregroundShadowBorder line is longer in Mac Look and Feel In-Reply-To: References: Message-ID: <4U8fL_K_ckMSfeKzCjb7g5VsuCumQapEA8NL_29_U2c=.15004b40-aab1-4381-a1a7-4e1ca160fb45@github.com> On Mon, 22 Aug 2022 21:20:54 GMT, lawrence.andrews wrote: > Border line is seen outside round Rectangle both for JInternalFrame backgroundShadowBorder & foregroundShadowBorder line in mac L&F. > ![Screen Shot 2022-08-22 at 4 17 49 PM](https://user-images.githubusercontent.com/87324768/186021010-d21aed21-9e05-4b28-846b-2628e367f183.png) > > I have circled the extra part of the line. To make it more visible I changed the color of the backgroundShadowBorder to red > ![Screen Shot 2022-08-22 at 4 17 37 PM](https://user-images.githubusercontent.com/87324768/186021095-cbfffdba-d43a-47e7-a50b-551c59cb767b.png) > > Fixed the extra length of the line > ![Fixed](https://user-images.githubusercontent.com/87324768/186021195-688c3613-fc50-41c3-8cad-94173385dfeb.png) I assume this is not a regression and reproduced since jdk8? ------------- PR: https://git.openjdk.org/jdk/pull/9971 From duke at openjdk.org Tue Sep 6 23:40:46 2022 From: duke at openjdk.org (lawrence.andrews) Date: Tue, 6 Sep 2022 23:40:46 GMT Subject: RFR: 8292738 : JInternalFrame backgroundShadowBorder & foregroundShadowBorder line is longer in Mac Look and Feel In-Reply-To: References: Message-ID: On Mon, 22 Aug 2022 21:20:54 GMT, lawrence.andrews wrote: > Border line is seen outside round Rectangle both for JInternalFrame backgroundShadowBorder & foregroundShadowBorder line in mac L&F. > ![Screen Shot 2022-08-22 at 4 17 49 PM](https://user-images.githubusercontent.com/87324768/186021010-d21aed21-9e05-4b28-846b-2628e367f183.png) > > I have circled the extra part of the line. To make it more visible I changed the color of the backgroundShadowBorder to red > ![Screen Shot 2022-08-22 at 4 17 37 PM](https://user-images.githubusercontent.com/87324768/186021095-cbfffdba-d43a-47e7-a50b-551c59cb767b.png) > > Fixed the extra length of the line > ![Fixed](https://user-images.githubusercontent.com/87324768/186021195-688c3613-fc50-41c3-8cad-94173385dfeb.png) Yes, this is not a regression & I was able to reproduce this from JDK 1.8.0_201 The line was looking odd hence I added a fix. ------------- PR: https://git.openjdk.org/jdk/pull/9971 From serb at openjdk.org Tue Sep 6 23:42:39 2022 From: serb at openjdk.org (Sergey Bylokhov) Date: Tue, 6 Sep 2022 23:42:39 GMT Subject: RFR: 7175397: The divider color is not changed to green when dragging for Nimbus LaF. [v2] In-Reply-To: <-21DskiK73HbWK0fvkx1WKzGv9hDLuUM7vCMgMDDpG4=.c7df46c6-9f62-45ed-a8f2-d8f309924015@github.com> References: <-21DskiK73HbWK0fvkx1WKzGv9hDLuUM7vCMgMDDpG4=.c7df46c6-9f62-45ed-a8f2-d8f309924015@github.com> Message-ID: On Wed, 24 Aug 2022 04:21:26 GMT, Prasanta Sadhukhan wrote: >> SplitPaneDivider.draggingColor UIProperty was not honoured in Nimbus L&F. >> Added support for setting SplitPane dragging color for Nimbus L&F by drawing a fillRect of the set color as done in BasicLookAndFeel. >> The fix relies on `continuousLayout` property being false by default which is enabled for Nimbus, which is set to default false now, same as in other L&F. I think it was set true just to have documented default value in JDK-6937415 >> >> closed test mentioned in JBS is used for fix check. >> All jtreg swing tests are ok along with SwingSet2 JSplitPane demo in Nimbus L&F. > > Prasanta Sadhukhan has updated the pull request incrementally with one additional commit since the last revision: > > Revert default value Isn't this is a similar bug reported here? https://bugs.openjdk.org/browse/JDK-8075608 Can we compare evaluation of that and this bug? ------------- PR: https://git.openjdk.org/jdk/pull/9937 From serb at openjdk.org Tue Sep 6 23:45:42 2022 From: serb at openjdk.org (Sergey Bylokhov) Date: Tue, 6 Sep 2022 23:45:42 GMT Subject: RFR: 8292328 : AccessibleActionsTest.java test instruction for show popup on JLabel did not specify shift key In-Reply-To: References: Message-ID: <_d6ErXuzVGEE1mM1DwHFE9_vsXynSmFTn_wn4JDfQ5Y=.df53418a-8f15-452a-8346-526f55b5c0b4@github.com> On Sat, 13 Aug 2022 22:44:52 GMT, lawrence.andrews wrote: > Corrected the test instruction to show the popup menu on JLabel when voice over is enabled . > > @shurymury Marked as reviewed by serb (Reviewer). ------------- PR: https://git.openjdk.org/jdk/pull/9868 From psadhukhan at openjdk.org Wed Sep 7 04:31:42 2022 From: psadhukhan at openjdk.org (Prasanta Sadhukhan) Date: Wed, 7 Sep 2022 04:31:42 GMT Subject: RFR: 7148092: [macosx] When Alt+down arrow key is pressed, the combobox popup does not appear. [v3] In-Reply-To: <9_6m09UHBqjqrDWnuPS7Imjl3tciQr1q7RCxyOY0xXs=.47f6bcbe-38db-40c5-86b5-4329d5c365ef@github.com> References: <9_6m09UHBqjqrDWnuPS7Imjl3tciQr1q7RCxyOY0xXs=.47f6bcbe-38db-40c5-86b5-4329d5c365ef@github.com> Message-ID: On Thu, 25 Aug 2022 16:34:32 GMT, Prasanta Sadhukhan wrote: >> When comboBox have focus, pressing Alt+Down (or Up) should render the popup which is not happening for Aqua L&F. >> >> Fix is to add toggleAction for Alt+Down/Up keys as has been done for [MetalLookAndFeel](https://github.com/openjdk/jdk/blob/master/src/java.desktop/share/classes/javax/swing/plaf/metal/MetalLookAndFeel.java#L912) >> >> closed problemlisted test is used to check the fix. > > Prasanta Sadhukhan has updated the pull request incrementally with one additional commit since the last revision: > > Use camelCase Native behaves same as is being done in this PR (which is extra from Metal) which is already mentioned above. ------------- PR: https://git.openjdk.org/jdk/pull/10014 From psadhukhan at openjdk.org Wed Sep 7 04:40:56 2022 From: psadhukhan at openjdk.org (Prasanta Sadhukhan) Date: Wed, 7 Sep 2022 04:40:56 GMT Subject: RFR: 6529151: NullPointerException in swing.plaf.synth.SynthLookAndFeel$Handler [v2] In-Reply-To: References: Message-ID: > NPE is thrown for closed/disposed JDialogs after uninstalling the UI which is because for SynthEditorPaneUI even though is disposed of, Nimbus propertyHandler tries to get the style of this disposed component resulting in NPE, > which is fixed by a null check to prevent deferencing style object to get the color. Prasanta Sadhukhan has updated the pull request incrementally with one additional commit since the last revision: test fix ------------- Changes: - all: https://git.openjdk.org/jdk/pull/10167/files - new: https://git.openjdk.org/jdk/pull/10167/files/44cc6fbd..f62d58b9 Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=10167&range=01 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=10167&range=00-01 Stats: 4 lines in 1 file changed: 0 ins; 3 del; 1 mod Patch: https://git.openjdk.org/jdk/pull/10167.diff Fetch: git fetch https://git.openjdk.org/jdk pull/10167/head:pull/10167 PR: https://git.openjdk.org/jdk/pull/10167 From psadhukhan at openjdk.org Wed Sep 7 04:40:57 2022 From: psadhukhan at openjdk.org (Prasanta Sadhukhan) Date: Wed, 7 Sep 2022 04:40:57 GMT Subject: RFR: 6529151: NullPointerException in swing.plaf.synth.SynthLookAndFeel$Handler [v2] In-Reply-To: References: Message-ID: On Tue, 6 Sep 2022 23:05:59 GMT, Sergey Bylokhov wrote: >> Prasanta Sadhukhan has updated the pull request incrementally with one additional commit since the last revision: >> >> test fix > > test/jdk/javax/swing/plaf/synth/RepaintNPE.java line 84: > >> 82: try >> 83: { >> 84: Method method = jComp.getClass().getMethod ( "getUI" ); > > The getUI() method is public, can be used directly. Yes. modified. ------------- PR: https://git.openjdk.org/jdk/pull/10167 From dnguyen at openjdk.org Wed Sep 7 06:21:48 2022 From: dnguyen at openjdk.org (Damon Nguyen) Date: Wed, 7 Sep 2022 06:21:48 GMT Subject: RFR: 7175397: The divider color is not changed to green when dragging for Nimbus LaF. [v2] In-Reply-To: <-21DskiK73HbWK0fvkx1WKzGv9hDLuUM7vCMgMDDpG4=.c7df46c6-9f62-45ed-a8f2-d8f309924015@github.com> References: <-21DskiK73HbWK0fvkx1WKzGv9hDLuUM7vCMgMDDpG4=.c7df46c6-9f62-45ed-a8f2-d8f309924015@github.com> Message-ID: On Wed, 24 Aug 2022 04:21:26 GMT, Prasanta Sadhukhan wrote: >> SplitPaneDivider.draggingColor UIProperty was not honoured in Nimbus L&F. >> Added support for setting SplitPane dragging color for Nimbus L&F by drawing a fillRect of the set color as done in BasicLookAndFeel. >> The fix relies on `continuousLayout` property being false by default which is enabled for Nimbus, which is set to default false now, same as in other L&F. I think it was set true just to have documented default value in JDK-6937415 >> >> closed test mentioned in JBS is used for fix check. >> All jtreg swing tests are ok along with SwingSet2 JSplitPane demo in Nimbus L&F. > > Prasanta Sadhukhan has updated the pull request incrementally with one additional commit since the last revision: > > Revert default value Changes requested by dnguyen (Author). src/java.desktop/share/classes/javax/swing/plaf/synth/SynthSplitPaneUI.java line 369: > 367: > 368: g.setColor(dividerDraggingColor); > 369: if(jc.getOrientation() == JSplitPane.HORIZONTAL_SPLIT) { I know these if's already existed, but now might be a good time to also update these by adding a space after the if's to match the space after the else? ------------- PR: https://git.openjdk.org/jdk/pull/9937 From psadhukhan at openjdk.org Wed Sep 7 06:21:49 2022 From: psadhukhan at openjdk.org (Prasanta Sadhukhan) Date: Wed, 7 Sep 2022 06:21:49 GMT Subject: RFR: 7175397: The divider color is not changed to green when dragging for Nimbus LaF. [v2] In-Reply-To: References: <-21DskiK73HbWK0fvkx1WKzGv9hDLuUM7vCMgMDDpG4=.c7df46c6-9f62-45ed-a8f2-d8f309924015@github.com> Message-ID: On Tue, 6 Sep 2022 23:39:17 GMT, Sergey Bylokhov wrote: > Isn't this is a similar bug reported here? https://bugs.openjdk.org/browse/JDK-8075608 Can we compare evaluation of that and this bug? It was mentioned in that bug that we need to change the painter to fill the component, which is not the case. We dont necessarily have to change the component to honour this proprty of dragging color. Since this SplitPane dragging color is honoured for **non-continuous layout** only, even for other L&F, we can just a do a fill rect of the specified color and show that rectangle, as is being done, instead of changing the divider component (as is the case for continuous layout) when the divider is moved, so that the specified color rectangle is shown till the divider stops moving, at which point the divider component will be drawn again along with splitted components. In case of **continuous layout**, the divider component needs to be shown **always** along with real-time repaint of splitted components, for which case, this divider dragging color is not honoured. ------------- PR: https://git.openjdk.org/jdk/pull/9937 From duke at openjdk.org Wed Sep 7 07:47:59 2022 From: duke at openjdk.org (Abhishek Kumar) Date: Wed, 7 Sep 2022 07:47:59 GMT Subject: RFR: 8292376: A few Swing methods use inheritDoc on exceptions which are not inherited [v3] In-Reply-To: References: Message-ID: <7DrIMbypxFJ46pfk_b6CdZ030d6p8s-PUJM_XsyQZCI=.a72c2f2c-bbf8-4750-9758-848988642a4f@github.com> > Document update for getBaselineResizeBehavior() and getBaseline() method description in JSpinner, AbstractBorder and TitledBorder . Abhishek Kumar 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/9902/files - new: https://git.openjdk.org/jdk/pull/9902/files/f4e9d288..cae9de86 Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=9902&range=02 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=9902&range=01-02 Stats: 2 lines in 2 files changed: 0 ins; 0 del; 2 mod Patch: https://git.openjdk.org/jdk/pull/9902.diff Fetch: git fetch https://git.openjdk.org/jdk pull/9902/head:pull/9902 PR: https://git.openjdk.org/jdk/pull/9902 From duke at openjdk.org Wed Sep 7 07:48:00 2022 From: duke at openjdk.org (Abhishek Kumar) Date: Wed, 7 Sep 2022 07:48:00 GMT Subject: RFR: 8292376: A few Swing methods use inheritDoc on exceptions which are not inherited [v2] In-Reply-To: References: Message-ID: On Tue, 6 Sep 2022 16:55:12 GMT, Tejesh R wrote: >> Abhishek Kumar has updated the pull request incrementally with one additional commit since the last revision: >> >> copyright year updated > > src/java.desktop/share/classes/javax/swing/border/AbstractBorder.java line 184: > >> 182: * @return an enum indicating how the baseline changes as the border is >> 183: * resized >> 184: * @throws NullPointerException if passed in {@code Component} is {@code null} > > `if passed in {@code Component} is {@code null}` - Rephrasing this sentence would be better. Something like `if {@code Component} is {@code null}`. Updated in method description. ------------- PR: https://git.openjdk.org/jdk/pull/9902 From tr at openjdk.org Wed Sep 7 09:53:37 2022 From: tr at openjdk.org (Tejesh R) Date: Wed, 7 Sep 2022 09:53:37 GMT Subject: RFR: 7175396: The text on label is not painted red for Nimbus LaF. [v2] In-Reply-To: References: Message-ID: On Wed, 24 Aug 2022 04:43:50 GMT, Prasanta Sadhukhan wrote: >> Label.foreground UIProperty is not honored by Nimbus L&F. >> Added support for setting JLabel foreground color for Nimbus L&F > > Prasanta Sadhukhan has updated the pull request incrementally with one additional commit since the last revision: > > Review comments Fix is working fine. ------------- Marked as reviewed by tr (Author). PR: https://git.openjdk.org/jdk/pull/9900 From duke at openjdk.org Wed Sep 7 10:31:46 2022 From: duke at openjdk.org (Abhishek Kumar) Date: Wed, 7 Sep 2022 10:31:46 GMT Subject: RFR: 8234315: GTK LAF does not gray out disabled JMenu In-Reply-To: References: Message-ID: On Tue, 6 Sep 2022 22:57:37 GMT, Sergey Bylokhov wrote: > Does the new color looks the same as in the native applications? I think it is same as in native application. Attached a screenshot of test application and text editor (gedit) in ubuntu. ![DisableMenuColor](https://user-images.githubusercontent.com/107542245/188856123-0aedbfd7-1834-4fb2-ab1a-07ec572627cb.png) ------------- PR: https://git.openjdk.org/jdk/pull/10176 From duke at openjdk.org Wed Sep 7 10:34:44 2022 From: duke at openjdk.org (Abhishek Kumar) Date: Wed, 7 Sep 2022 10:34:44 GMT Subject: RFR: 8292376: A few Swing methods use inheritDoc on exceptions which are not inherited [v3] In-Reply-To: <7DrIMbypxFJ46pfk_b6CdZ030d6p8s-PUJM_XsyQZCI=.a72c2f2c-bbf8-4750-9758-848988642a4f@github.com> References: <7DrIMbypxFJ46pfk_b6CdZ030d6p8s-PUJM_XsyQZCI=.a72c2f2c-bbf8-4750-9758-848988642a4f@github.com> Message-ID: <-6W6lU5fpF4n7PQJ9Jm5rNLQ5x1z8wCghIGnKJ7D-kI=.8829488c-f965-452b-911f-6e9eed34eba2@github.com> On Wed, 7 Sep 2022 07:47:59 GMT, Abhishek Kumar wrote: >> Document update for getBaselineResizeBehavior() and getBaseline() method description in JSpinner, AbstractBorder and TitledBorder . > > Abhishek Kumar has updated the pull request incrementally with one additional commit since the last revision: > > Review comment fix Attached the CSR link https://bugs.openjdk.org/browse/JDK-8293470 ------------- PR: https://git.openjdk.org/jdk/pull/9902 From psadhukhan at openjdk.org Wed Sep 7 12:38:51 2022 From: psadhukhan at openjdk.org (Prasanta Sadhukhan) Date: Wed, 7 Sep 2022 12:38:51 GMT Subject: Integrated: 4850101: Setting mnemonic to VK_F4 underlines the letter S in a button. In-Reply-To: References: Message-ID: On Tue, 2 Aug 2022 10:22:48 GMT, Prasanta Sadhukhan wrote: > It is seen that using VK_F4 in JButton's setMnemonic(int i), causes the letter 'S' in the JButton to be underlined if JButton's text has 'S' in its string. > This is because [**VK_F4**](https://github.com/openjdk/jdk/blob/master/src/java.desktop/share/classes/java/awt/event/KeyEvent.java#L506) keycode is 0x73 (115 in decimal) which happens to be value of lowercase [**'s'** ](https://www.cs.cmu.edu/~pattis/15-1XX/common/handouts/ascii.html) so as per the logic implemented in SwingUtilities.findDisplayedMnemonicIndex(), the first index of the character (either lowecasr or uppercase) is returned as a mnemonic, which gets underlined. > > Fix is made to ignore Action Keys from VK_F1->VK_F11 as displayed mnemonic which corresponds to lowercase p->z This pull request has now been integrated. Changeset: d6961045 Author: Prasanta Sadhukhan URL: https://git.openjdk.org/jdk/commit/d6961045353897967bb734740225bd1cddf158e5 Stats: 129 lines in 2 files changed: 129 ins; 0 del; 0 mod 4850101: Setting mnemonic to VK_F4 underlines the letter S in a button. Reviewed-by: prr ------------- PR: https://git.openjdk.org/jdk/pull/9712 From psadhukhan at openjdk.org Wed Sep 7 16:23:43 2022 From: psadhukhan at openjdk.org (Prasanta Sadhukhan) Date: Wed, 7 Sep 2022 16:23:43 GMT Subject: RFR: 6852577: Only for Nimbus LAF UIManager.get("PasswordField.echoChar") is null [v3] In-Reply-To: References: Message-ID: > Default echo character obtained through `PasswordField.echoChar` UIProperty returns null for Nimbus L&F, > which is fixed by adding the default character * in the UIDefault table. Prasanta Sadhukhan has updated the pull request incrementally with one additional commit since the last revision: Honour PasswordField.echoChar property ------------- Changes: - all: https://git.openjdk.org/jdk/pull/10035/files - new: https://git.openjdk.org/jdk/pull/10035/files/51919462..63998b9c Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=10035&range=02 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=10035&range=01-02 Stats: 9 lines in 1 file changed: 9 ins; 0 del; 0 mod Patch: https://git.openjdk.org/jdk/pull/10035.diff Fetch: git fetch https://git.openjdk.org/jdk pull/10035/head:pull/10035 PR: https://git.openjdk.org/jdk/pull/10035 From psadhukhan at openjdk.org Wed Sep 7 16:23:44 2022 From: psadhukhan at openjdk.org (Prasanta Sadhukhan) Date: Wed, 7 Sep 2022 16:23:44 GMT Subject: RFR: 6852577: Only for Nimbus LAF UIManager.get("PasswordField.echoChar") is null [v2] In-Reply-To: References: Message-ID: On Tue, 6 Sep 2022 23:12:40 GMT, Sergey Bylokhov wrote: > I guess currently the Nimbus L&F use some char for the password field, how that place will intrract with this new ui property? Added code to interact with the property same way other L&F does. tested with public class PasswordFieldTest { public static void main(String[] args) { UIManager.put("PasswordField.echoChar", '@'); JFrame mainFrame = new JFrame(""); JPasswordField passwordField = new javax.swing.JPasswordField(); passwordField.setEnabled(true); passwordField.setText("blahblahblah"); mainFrame.getContentPane().add(passwordField); mainFrame.setSize(300,100); mainFrame.setVisible(true); } } ------------- PR: https://git.openjdk.org/jdk/pull/10035 From duke at openjdk.org Wed Sep 7 18:51:39 2022 From: duke at openjdk.org (SWinxy) Date: Wed, 7 Sep 2022 18:51:39 GMT Subject: RFR: 8293478: [java.desktop/macOS] Condense SDRenderType usages in QuartzRenderer.m Message-ID: The `SDRenderType` enum is often returned using a variable declared at the start of functions. These can be inlined in the `return` itself. Using a ternary operator condenses what may be 12 lines into one, in the most extreme cases. `doRectUsingCG` and `doPolyUsingCG` were both modified more than the rest, but still are equivalent. Example change: SDRenderType renderType = SD_Nothing; if (fill == YES) { renderType = SD_Fill; } else { renderType = SD_Stroke; } // ... return renderType; // ... return fill ? SD_Fill : SD_Stroke; ------------- Commit messages: - Inline SDRenderType in QuartzRenderer.m Changes: https://git.openjdk.org/jdk/pull/10174/files Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=10174&range=00 Issue: https://bugs.openjdk.org/browse/JDK-8293478 Stats: 125 lines in 1 file changed: 17 ins; 68 del; 40 mod Patch: https://git.openjdk.org/jdk/pull/10174.diff Fetch: git fetch https://git.openjdk.org/jdk pull/10174/head:pull/10174 PR: https://git.openjdk.org/jdk/pull/10174 From duke at openjdk.org Wed Sep 7 18:51:39 2022 From: duke at openjdk.org (SWinxy) Date: Wed, 7 Sep 2022 18:51:39 GMT Subject: RFR: 8293478: [java.desktop/macOS] Condense SDRenderType usages in QuartzRenderer.m In-Reply-To: References: Message-ID: On Mon, 5 Sep 2022 23:41:40 GMT, SWinxy wrote: > The `SDRenderType` enum is often returned using a variable declared at the start of functions. These can be inlined in the `return` itself. Using a ternary operator condenses what may be 12 lines into one, in the most extreme cases. `doRectUsingCG` and `doPolyUsingCG` were both modified more than the rest, but still are equivalent. > > Example change: > > SDRenderType renderType = SD_Nothing; > > if (fill == YES) > { > renderType = SD_Fill; > } > else > { > renderType = SD_Stroke; > } > > // ... > > return renderType; > > > > // ... > > return fill ? SD_Fill : SD_Stroke; Hey, @TheShermanTanker, could you please create an issue number for this? Thanks! I have emailed the client-dev group after you mentioned it (though I prefer to keep discussions centralized here, bah). I thought in the past that the checks were necessary but nope, they fail just because. ------------- PR: https://git.openjdk.org/jdk/pull/10174 From jwaters at openjdk.org Wed Sep 7 18:51:40 2022 From: jwaters at openjdk.org (Julian Waters) Date: Wed, 7 Sep 2022 18:51:40 GMT Subject: RFR: 8293478: [java.desktop/macOS] Condense SDRenderType usages in QuartzRenderer.m In-Reply-To: References: Message-ID: On Mon, 5 Sep 2022 23:41:40 GMT, SWinxy wrote: > The `SDRenderType` enum is often returned using a variable declared at the start of functions. These can be inlined in the `return` itself. Using a ternary operator condenses what may be 12 lines into one, in the most extreme cases. `doRectUsingCG` and `doPolyUsingCG` were both modified more than the rest, but still are equivalent. > > Example change: > > SDRenderType renderType = SD_Nothing; > > if (fill == YES) > { > renderType = SD_Fill; > } > else > { > renderType = SD_Stroke; > } > > // ... > > return renderType; > > > > // ... > > return fill ? SD_Fill : SD_Stroke; No problem, but have you checked with the relevant groups about this change yet? If not, I'd recommend doing so before I create the entry for this PR. A MacOS test also seems to be failing, though it doesn't seem to be related to the changes made here I agree it's a frustrating process, but unfortunately that's how most maintainers prefer to discuss changes. However, I've had enough of waiting, so I'm just crossing my fingers and creating it anyway https://bugs.openjdk.org/browse/JDK-8293478 ------------- PR: https://git.openjdk.org/jdk/pull/10174 From duke at openjdk.org Wed Sep 7 18:59:38 2022 From: duke at openjdk.org (SWinxy) Date: Wed, 7 Sep 2022 18:59:38 GMT Subject: RFR: 8293478: [java.desktop/macOS] Condense SDRenderType usages in QuartzRenderer.m In-Reply-To: References: Message-ID: On Mon, 5 Sep 2022 23:41:40 GMT, SWinxy wrote: > The `SDRenderType` enum is often returned using a variable declared at the start of functions. These can be inlined in the `return` itself. Using a ternary operator condenses what may be 12 lines into one, in the most extreme cases. `doRectUsingCG` and `doPolyUsingCG` were both modified more than the rest, but still are equivalent. > > Example change: > > SDRenderType renderType = SD_Nothing; > > if (fill == YES) > { > renderType = SD_Fill; > } > else > { > renderType = SD_Stroke; > } > > // ... > > return renderType; > > > > // ... > > return fill ? SD_Fill : SD_Stroke; Much thanks. I forgot that the bot just *immediately* requests a review when there's a bug in the title. ------------- PR: https://git.openjdk.org/jdk/pull/10174 From duke at openjdk.org Wed Sep 7 21:19:45 2022 From: duke at openjdk.org (ScientificWare) Date: Wed, 7 Sep 2022 21:19:45 GMT Subject: RFR: JDK-8292276 : Missing color names in CSS. [v11] In-Reply-To: References: Message-ID: > This is referenced in Java Bug Database as > - [JDK-8292276 : Missing color names in CSS](https://bugs.java.com/bugdatabase/view_bug.do?bug_id=8292276) > > This is tracked in JBS as > - [JDK-8292276 : Missing color names in CSS](https://bugs.openjdk.java.net/browse/JDK-8292276) > > Adds missing color names, defined by CSS Level 4, in CSS.java : > CSS Color Module Level 4 > W3C Candidate Recommendation Snapshot, 5 July 2022 > [7.1 Named Colors](https://www.w3.org/TR/css-color-4/#named-color) > > Designed from : [ScientificWare JDK-8292276 : Missing color names in CSS](https://github.com/scientificware/jdk/issues/12) ScientificWare has updated the pull request incrementally with one additional commit since the last revision: Adds a test for null value. The stringToColor method accepts null argument and must returns null. ------------- Changes: - all: https://git.openjdk.org/jdk/pull/9825/files - new: https://git.openjdk.org/jdk/pull/9825/files/23416aaa..05ec5d32 Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=9825&range=10 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=9825&range=09-10 Stats: 15 lines in 1 file changed: 6 ins; 0 del; 9 mod Patch: https://git.openjdk.org/jdk/pull/9825.diff Fetch: git fetch https://git.openjdk.org/jdk pull/9825/head:pull/9825 PR: https://git.openjdk.org/jdk/pull/9825 From duke at openjdk.org Wed Sep 7 21:48:03 2022 From: duke at openjdk.org (ScientificWare) Date: Wed, 7 Sep 2022 21:48:03 GMT Subject: RFR: JDK-8292276 : Missing color names in CSS. [v12] In-Reply-To: References: Message-ID: > This is referenced in Java Bug Database as > - [JDK-8292276 : Missing color names in CSS](https://bugs.java.com/bugdatabase/view_bug.do?bug_id=8292276) > > This is tracked in JBS as > - [JDK-8292276 : Missing color names in CSS](https://bugs.openjdk.java.net/browse/JDK-8292276) > > Adds missing color names, defined by CSS Level 4, in CSS.java : > CSS Color Module Level 4 > W3C Candidate Recommendation Snapshot, 5 July 2022 > [7.1 Named Colors](https://www.w3.org/TR/css-color-4/#named-color) > > Designed from : [ScientificWare JDK-8292276 : Missing color names in CSS](https://github.com/scientificware/jdk/issues/12) ScientificWare has updated the pull request incrementally with one additional commit since the last revision: Null value - Opaque color declaration Fixes handling of null argument and simplifies opaque color declarations. ------------- Changes: - all: https://git.openjdk.org/jdk/pull/9825/files - new: https://git.openjdk.org/jdk/pull/9825/files/05ec5d32..1f501bc6 Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=9825&range=11 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=9825&range=10-11 Stats: 152 lines in 1 file changed: 2 ins; 1 del; 149 mod Patch: https://git.openjdk.org/jdk/pull/9825.diff Fetch: git fetch https://git.openjdk.org/jdk pull/9825/head:pull/9825 PR: https://git.openjdk.org/jdk/pull/9825 From duke at openjdk.org Wed Sep 7 21:55:53 2022 From: duke at openjdk.org (ScientificWare) Date: Wed, 7 Sep 2022 21:55:53 GMT Subject: RFR: JDK-8292276 : Missing color names in CSS. [v13] In-Reply-To: References: Message-ID: > This is referenced in Java Bug Database as > - [JDK-8292276 : Missing color names in CSS](https://bugs.java.com/bugdatabase/view_bug.do?bug_id=8292276) > > This is tracked in JBS as > - [JDK-8292276 : Missing color names in CSS](https://bugs.openjdk.java.net/browse/JDK-8292276) > > Adds missing color names, defined by CSS Level 4, in CSS.java : > CSS Color Module Level 4 > W3C Candidate Recommendation Snapshot, 5 July 2022 > [7.1 Named Colors](https://www.w3.org/TR/css-color-4/#named-color) > > Designed from : [ScientificWare JDK-8292276 : Missing color names in CSS](https://github.com/scientificware/jdk/issues/12) ScientificWare has updated the pull request incrementally with one additional commit since the last revision: Whitespace errors Removes whitespaces. ------------- Changes: - all: https://git.openjdk.org/jdk/pull/9825/files - new: https://git.openjdk.org/jdk/pull/9825/files/1f501bc6..c606d8bf Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=9825&range=12 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=9825&range=11-12 Stats: 1 line in 1 file changed: 0 ins; 0 del; 1 mod Patch: https://git.openjdk.org/jdk/pull/9825.diff Fetch: git fetch https://git.openjdk.org/jdk pull/9825/head:pull/9825 PR: https://git.openjdk.org/jdk/pull/9825 From duke at openjdk.org Wed Sep 7 22:13:59 2022 From: duke at openjdk.org (lawrence.andrews) Date: Wed, 7 Sep 2022 22:13:59 GMT Subject: RFR: 8292271 : Fix java/awt/PrintJob/PrintCheckboxTest/PrintCheckboxManualTest.java test [v2] In-Reply-To: References: Message-ID: > 1) This test was failing due to yesno > test result: Error. Parse Exception: Arguments to `manual' option not supported: yesno > 2) PrintCheckboxManualTest.html file was missing > 3) Added os.family since test instruction says that its a linux and solair toolkit only test > 4) Removed Sysout & TestDialog class & added a better manual framework to show the instruction and test frame. > > @shurymury lawrence.andrews has updated the pull request incrementally with one additional commit since the last revision: Show Frame within EDT ------------- Changes: - all: https://git.openjdk.org/jdk/pull/9858/files - new: https://git.openjdk.org/jdk/pull/9858/files/dcfc89a3..7d7d0989 Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=9858&range=01 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=9858&range=00-01 Stats: 2 lines in 1 file changed: 1 ins; 0 del; 1 mod Patch: https://git.openjdk.org/jdk/pull/9858.diff Fetch: git fetch https://git.openjdk.org/jdk pull/9858/head:pull/9858 PR: https://git.openjdk.org/jdk/pull/9858 From duke at openjdk.org Wed Sep 7 22:30:55 2022 From: duke at openjdk.org (lawrence.andrews) Date: Wed, 7 Sep 2022 22:30:55 GMT Subject: RFR: 8292271 : Fix java/awt/PrintJob/PrintCheckboxTest/PrintCheckboxManualTest.java test [v3] In-Reply-To: References: Message-ID: > 1) This test was failing due to yesno > test result: Error. Parse Exception: Arguments to `manual' option not supported: yesno > 2) PrintCheckboxManualTest.html file was missing > 3) Added os.family since test instruction says that its a linux and solair toolkit only test > 4) Removed Sysout & TestDialog class & added a better manual framework to show the instruction and test frame. > > @shurymury lawrence.andrews has updated the pull request incrementally with one additional commit since the last revision: Fixed white space ------------- Changes: - all: https://git.openjdk.org/jdk/pull/9858/files - new: https://git.openjdk.org/jdk/pull/9858/files/7d7d0989..ad3fd8af Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=9858&range=02 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=9858&range=01-02 Stats: 1 line in 1 file changed: 0 ins; 0 del; 1 mod Patch: https://git.openjdk.org/jdk/pull/9858.diff Fetch: git fetch https://git.openjdk.org/jdk pull/9858/head:pull/9858 PR: https://git.openjdk.org/jdk/pull/9858 From duke at openjdk.org Wed Sep 7 22:33:17 2022 From: duke at openjdk.org (lawrence.andrews) Date: Wed, 7 Sep 2022 22:33:17 GMT Subject: RFR: 8292271 : Fix java/awt/PrintJob/PrintCheckboxTest/PrintCheckboxManualTest.java test [v4] In-Reply-To: References: Message-ID: > 1) This test was failing due to yesno > test result: Error. Parse Exception: Arguments to `manual' option not supported: yesno > 2) PrintCheckboxManualTest.html file was missing > 3) Added os.family since test instruction says that its a linux and solair toolkit only test > 4) Removed Sysout & TestDialog class & added a better manual framework to show the instruction and test frame. > > @shurymury lawrence.andrews has updated the pull request incrementally with one additional commit since the last revision: Fixed space issue ------------- Changes: - all: https://git.openjdk.org/jdk/pull/9858/files - new: https://git.openjdk.org/jdk/pull/9858/files/ad3fd8af..7e848533 Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=9858&range=03 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=9858&range=02-03 Stats: 1 line in 1 file changed: 0 ins; 0 del; 1 mod Patch: https://git.openjdk.org/jdk/pull/9858.diff Fetch: git fetch https://git.openjdk.org/jdk pull/9858/head:pull/9858 PR: https://git.openjdk.org/jdk/pull/9858 From duke at openjdk.org Wed Sep 7 22:42:35 2022 From: duke at openjdk.org (lawrence.andrews) Date: Wed, 7 Sep 2022 22:42:35 GMT Subject: RFR: 8292309 : Fix java/awt/PrintJob/ConstrainedPrintingTest/ConstrainedPrintingTest.java test [v2] In-Reply-To: References: Message-ID: > 1) Fixed Parse Exception by removing yesno > test result: Error. Parse Exception: Arguments to `manual' option not supported: yesno > 2) Throw jtreg.SkippedException when printer is not configured on the test host > 3) Replaced Sysout & TestDialog with ManualTestFrame, which allows to the user to better decide test results and to take screen shot if test fails. > > @shurymury lawrence.andrews has updated the pull request incrementally with one additional commit since the last revision: Show Frame with in EDT ------------- Changes: - all: https://git.openjdk.org/jdk/pull/9865/files - new: https://git.openjdk.org/jdk/pull/9865/files/aea79929..07495189 Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=9865&range=01 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=9865&range=00-01 Stats: 7 lines in 1 file changed: 1 ins; 0 del; 6 mod Patch: https://git.openjdk.org/jdk/pull/9865.diff Fetch: git fetch https://git.openjdk.org/jdk pull/9865/head:pull/9865 PR: https://git.openjdk.org/jdk/pull/9865 From serb at openjdk.org Thu Sep 8 03:33:49 2022 From: serb at openjdk.org (Sergey Bylokhov) Date: Thu, 8 Sep 2022 03:33:49 GMT Subject: RFR: 6529151: NullPointerException in swing.plaf.synth.SynthLookAndFeel$Handler [v2] In-Reply-To: References: Message-ID: On Wed, 7 Sep 2022 04:40:56 GMT, Prasanta Sadhukhan wrote: >> NPE is thrown for closed/disposed JDialogs after uninstalling the UI which is because for SynthEditorPaneUI even though is disposed of, Nimbus propertyHandler tries to get the style of this disposed component resulting in NPE, >> which is fixed by a null check to prevent deferencing style object to get the color. > > Prasanta Sadhukhan has updated the pull request incrementally with one additional commit since the last revision: > > test fix Marked as reviewed by serb (Reviewer). ------------- PR: https://git.openjdk.org/jdk/pull/10167 From serb at openjdk.org Thu Sep 8 03:39:42 2022 From: serb at openjdk.org (Sergey Bylokhov) Date: Thu, 8 Sep 2022 03:39:42 GMT Subject: RFR: 6852577: Only for Nimbus LAF UIManager.get("PasswordField.echoChar") is null [v3] In-Reply-To: References: Message-ID: On Wed, 7 Sep 2022 16:23:43 GMT, Prasanta Sadhukhan wrote: >> Default echo character obtained through `PasswordField.echoChar` UIProperty returns null for Nimbus L&F, >> which is fixed by adding the default character * in the UIDefault table. > > Prasanta Sadhukhan has updated the pull request incrementally with one additional commit since the last revision: > > Honour PasswordField.echoChar property src/java.desktop/share/classes/javax/swing/plaf/synth/SynthLookAndFeel.java line 731: > 729: }); > 730: > 731: table.put("PasswordField.echoChar", '*'); It is still unclear where this "*" was stored before(will we ignore it now?), since the Nimbus used that symbol already. ------------- PR: https://git.openjdk.org/jdk/pull/10035 From serb at openjdk.org Thu Sep 8 03:41:50 2022 From: serb at openjdk.org (Sergey Bylokhov) Date: Thu, 8 Sep 2022 03:41:50 GMT Subject: RFR: 8292738 : JInternalFrame backgroundShadowBorder & foregroundShadowBorder line is longer in Mac Look and Feel In-Reply-To: References: Message-ID: On Mon, 22 Aug 2022 21:20:54 GMT, lawrence.andrews wrote: > Border line is seen outside round Rectangle both for JInternalFrame backgroundShadowBorder & foregroundShadowBorder line in mac L&F. > ![Screen Shot 2022-08-22 at 4 17 49 PM](https://user-images.githubusercontent.com/87324768/186021010-d21aed21-9e05-4b28-846b-2628e367f183.png) > > I have circled the extra part of the line. To make it more visible I changed the color of the backgroundShadowBorder to red > ![Screen Shot 2022-08-22 at 4 17 37 PM](https://user-images.githubusercontent.com/87324768/186021095-cbfffdba-d43a-47e7-a50b-551c59cb767b.png) > > Fixed the extra length of the line > ![Fixed](https://user-images.githubusercontent.com/87324768/186021195-688c3613-fc50-41c3-8cad-94173385dfeb.png) Marked as reviewed by serb (Reviewer). ------------- PR: https://git.openjdk.org/jdk/pull/9971 From serb at openjdk.org Thu Sep 8 03:42:45 2022 From: serb at openjdk.org (Sergey Bylokhov) Date: Thu, 8 Sep 2022 03:42:45 GMT Subject: RFR: 7148092: [macosx] When Alt+down arrow key is pressed, the combobox popup does not appear. [v3] In-Reply-To: <9_6m09UHBqjqrDWnuPS7Imjl3tciQr1q7RCxyOY0xXs=.47f6bcbe-38db-40c5-86b5-4329d5c365ef@github.com> References: <9_6m09UHBqjqrDWnuPS7Imjl3tciQr1q7RCxyOY0xXs=.47f6bcbe-38db-40c5-86b5-4329d5c365ef@github.com> Message-ID: On Thu, 25 Aug 2022 16:34:32 GMT, Prasanta Sadhukhan wrote: >> When comboBox have focus, pressing Alt+Down (or Up) should render the popup which is not happening for Aqua L&F. >> >> Fix is to add toggleAction for Alt+Down/Up keys as has been done for [MetalLookAndFeel](https://github.com/openjdk/jdk/blob/master/src/java.desktop/share/classes/javax/swing/plaf/metal/MetalLookAndFeel.java#L912) >> >> closed problemlisted test is used to check the fix. > > Prasanta Sadhukhan has updated the pull request incrementally with one additional commit since the last revision: > > Use camelCase Then the test mentioned above should be updated as well to cover that extra? ------------- PR: https://git.openjdk.org/jdk/pull/10014 From serb at openjdk.org Thu Sep 8 03:45:58 2022 From: serb at openjdk.org (Sergey Bylokhov) Date: Thu, 8 Sep 2022 03:45:58 GMT Subject: RFR: 8234315: GTK LAF does not gray out disabled JMenu In-Reply-To: References: Message-ID: On Tue, 6 Sep 2022 05:37:02 GMT, Abhishek Kumar wrote: > Disabled JMenu foreground color was not grayed out in GTK LAF for version 3. The issue didn't occur in GTK-2. > After analysis it has been found that the JMenu widget type was changed to JMenuBar and the color value returned for the foreground color in disabled state was close to black color (RGB 0,0,0) for menubar which is not differentiable from enabled state foreground color. > > As a fix for this problem, if the menubar is in disabled state then the widget is changed to JMenu and color value returned for disabled menu is gray color. > > An automated test case has been added and checked in CI, link is added in JBS. Looks fine, please double how it will work if the dark theme is set. ------------- Marked as reviewed by serb (Reviewer). PR: https://git.openjdk.org/jdk/pull/10176 From psadhukhan at openjdk.org Thu Sep 8 05:20:56 2022 From: psadhukhan at openjdk.org (Prasanta Sadhukhan) Date: Thu, 8 Sep 2022 05:20:56 GMT Subject: RFR: 6852577: Only for Nimbus LAF UIManager.get("PasswordField.echoChar") is null [v3] In-Reply-To: References: Message-ID: On Thu, 8 Sep 2022 03:37:23 GMT, Sergey Bylokhov wrote: >> Prasanta Sadhukhan has updated the pull request incrementally with one additional commit since the last revision: >> >> Honour PasswordField.echoChar property > > src/java.desktop/share/classes/javax/swing/plaf/synth/SynthLookAndFeel.java line 731: > >> 729: }); >> 730: >> 731: table.put("PasswordField.echoChar", '*'); > > It is still unclear where this "*" was stored before(will we ignore it now?), since the Nimbus used that symbol already. "*" is the default char unless overridden by echoChar property and is set [here](https://github.com/openjdk/jdk/blob/master/src/java.desktop/share/classes/javax/swing/JPasswordField.java#L178) ------------- PR: https://git.openjdk.org/jdk/pull/10035 From duke at openjdk.org Thu Sep 8 05:23:40 2022 From: duke at openjdk.org (SWinxy) Date: Thu, 8 Sep 2022 05:23:40 GMT Subject: RFR: 8293478: [java.desktop/macOS] Condense SDRenderType usages in QuartzRenderer.m [v2] In-Reply-To: References: Message-ID: <5D4kwT0_P1FqA37WkR02ETZmfBBPRVSjRHrNrp_TpVM=.71142c60-22e7-487f-8b77-d30820d5b957@github.com> > The `SDRenderType` enum is often returned using a variable declared at the start of functions. These can be inlined in the `return` itself. Using a ternary operator condenses what may be 12 lines into one, in the most extreme cases. `doRectUsingCG` and `doPolyUsingCG` were both modified more than the rest, but still are equivalent. > > Example change: > > SDRenderType renderType = SD_Nothing; > > if (fill == YES) > { > renderType = SD_Fill; > } > else > { > renderType = SD_Stroke; > } > > // ... > > return renderType; > > > > // ... > > return fill ? SD_Fill : SD_Stroke; SWinxy has updated the pull request incrementally with one additional commit since the last revision: We can do this here, too ------------- Changes: - all: https://git.openjdk.org/jdk/pull/10174/files - new: https://git.openjdk.org/jdk/pull/10174/files/f83cbcdf..8fbaaa69 Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=10174&range=01 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=10174&range=00-01 Stats: 11 lines in 1 file changed: 0 ins; 10 del; 1 mod Patch: https://git.openjdk.org/jdk/pull/10174.diff Fetch: git fetch https://git.openjdk.org/jdk pull/10174/head:pull/10174 PR: https://git.openjdk.org/jdk/pull/10174 From duke at openjdk.org Thu Sep 8 05:44:41 2022 From: duke at openjdk.org (Abhishek Kumar) Date: Thu, 8 Sep 2022 05:44:41 GMT Subject: RFR: 8234315: GTK LAF does not gray out disabled JMenu In-Reply-To: References: Message-ID: On Thu, 8 Sep 2022 03:42:49 GMT, Sergey Bylokhov wrote: > Looks fine, please double how it will work if the dark theme is set. In case of dark theme set, foreground color is grayed out. ![Enabled_Menu_Dark_Theme](https://user-images.githubusercontent.com/107542245/189043107-3393c933-d868-4834-8f3b-e2254969cac7.png) ![Disabled_Menu_Dark_Theme](https://user-images.githubusercontent.com/107542245/189043132-45b75066-083e-4220-adbf-8947c7ee7e43.png) ------------- PR: https://git.openjdk.org/jdk/pull/10176 From psadhukhan at openjdk.org Thu Sep 8 08:01:10 2022 From: psadhukhan at openjdk.org (Prasanta Sadhukhan) Date: Thu, 8 Sep 2022 08:01:10 GMT Subject: RFR: 7148092: [macosx] When Alt+down arrow key is pressed, the combobox popup does not appear. [v4] In-Reply-To: References: Message-ID: > When comboBox have focus, pressing Alt+Down (or Up) should render the popup which is not happening for Aqua L&F. > > Fix is to add toggleAction for Alt+Down/Up keys as has been done for [MetalLookAndFeel](https://github.com/openjdk/jdk/blob/master/src/java.desktop/share/classes/javax/swing/plaf/metal/MetalLookAndFeel.java#L912) > > closed problemlisted test is used to check the fix. Prasanta Sadhukhan has updated the pull request incrementally with one additional commit since the last revision: Add test ------------- Changes: - all: https://git.openjdk.org/jdk/pull/10014/files - new: https://git.openjdk.org/jdk/pull/10014/files/531dec1f..180f73d3 Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=10014&range=03 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=10014&range=02-03 Stats: 121 lines in 2 files changed: 102 ins; 8 del; 11 mod Patch: https://git.openjdk.org/jdk/pull/10014.diff Fetch: git fetch https://git.openjdk.org/jdk pull/10014/head:pull/10014 PR: https://git.openjdk.org/jdk/pull/10014 From psadhukhan at openjdk.org Thu Sep 8 09:55:28 2022 From: psadhukhan at openjdk.org (Prasanta Sadhukhan) Date: Thu, 8 Sep 2022 09:55:28 GMT Subject: RFR: 6286501: JTabbedPane throws NPE from its stateChanged listener in particular case Message-ID: JTabbedPane throws NPE from its stateChanged listener as it tries to access uninstantiated TabbedPane. Fix is to use the tabPane passed to stateChangeListener so that correct tabPane is accessed. ------------- Commit messages: - 6286501: JTabbedPane throws NPE from its stateChanged listener in particular case Changes: https://git.openjdk.org/jdk/pull/10216/files Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=10216&range=00 Issue: https://bugs.openjdk.org/browse/JDK-6286501 Stats: 77 lines in 2 files changed: 76 ins; 0 del; 1 mod Patch: https://git.openjdk.org/jdk/pull/10216.diff Fetch: git fetch https://git.openjdk.org/jdk pull/10216/head:pull/10216 PR: https://git.openjdk.org/jdk/pull/10216 From jdv at openjdk.org Thu Sep 8 09:56:59 2022 From: jdv at openjdk.org (Jayathirth D V) Date: Thu, 8 Sep 2022 09:56:59 GMT Subject: RFR: 4834298: JFileChooser.getSelectedFiles() failed with multi-selection and double-click [v3] In-Reply-To: References: Message-ID: On Tue, 6 Sep 2022 11:14:49 GMT, Tejesh R wrote: >> JFileChooser.getSelectedFiles() failed to retrieve files with multi-selection and double-click. This occurs when a single file is selected then enable multi-selection then select the same file through mouse double-click(Two file chooser dialogs used before and after multi-selection enabled). SelectedFiles are updated when a change in files/directory selection is done or when selection is made through keyboard selection. In this case since a single file is selected before multi-selection is enabled and same file is selected again without changing the selection index/directory, leaving selected Files un-updated. >> **Proposed Fix** : Whenever Multi-Selection is enabled check if any files are selected, if yes update the selected Files of JFileChoooser. > > Tejesh R has updated the pull request incrementally with one additional commit since the last revision: > > Updated based on review comments test/jdk/javax/swing/JFileChooser/MultiSelectionEnabledSelectedFilesTest.java line 39: > 37: * @run main/manual MultiSelectionEnabledSelectedFilesTest > 38: */ > 39: public class MultiSelectionEnabledSelectedFilesTest { Is this bug specific to any platform? Because the test is created to run on all platforms and it doesnt fail in my Mac. test/jdk/javax/swing/JFileChooser/MultiSelectionEnabledSelectedFilesTest.java line 56: > 54: static void runTest() { > 55: //Initialize the components > 56: String INSTRUCTIONS Instruction should be updated to specify that we need to use double-click. Also when i select a file using double click in first and then select same file using double-click(without moving mouse) test doesnt exit. JFileChooser second dialog just stays on the screen. test/jdk/javax/swing/JFileChooser/MultiSelectionEnabledSelectedFilesTest.java line 87: > 85: File[] files = chooser.getSelectedFiles(); > 86: > 87: if (files.length <= 0) { Can File[] length be negative? I think just a "==" to "0" check should suffice. ------------- PR: https://git.openjdk.org/jdk/pull/9996 From tr at openjdk.org Thu Sep 8 10:11:44 2022 From: tr at openjdk.org (Tejesh R) Date: Thu, 8 Sep 2022 10:11:44 GMT Subject: RFR: 4834298: JFileChooser.getSelectedFiles() failed with multi-selection and double-click [v3] In-Reply-To: References: Message-ID: On Thu, 8 Sep 2022 09:50:04 GMT, Jayathirth D V wrote: >> Tejesh R has updated the pull request incrementally with one additional commit since the last revision: >> >> Updated based on review comments > > test/jdk/javax/swing/JFileChooser/MultiSelectionEnabledSelectedFilesTest.java line 39: > >> 37: * @run main/manual MultiSelectionEnabledSelectedFilesTest >> 38: */ >> 39: public class MultiSelectionEnabledSelectedFilesTest { > > Is this bug specific to any platform? > Because the test is created to run on all platforms and it doesnt fail in my Mac. Yeah, it doesn't fail in mac. It does fail in windows and linux, so didn't make any os specific. Still I have tested in all platforms and it works fine. The bug was raised as linux specific. ------------- PR: https://git.openjdk.org/jdk/pull/9996 From jdv at openjdk.org Thu Sep 8 10:21:44 2022 From: jdv at openjdk.org (Jayathirth D V) Date: Thu, 8 Sep 2022 10:21:44 GMT Subject: RFR: 4834298: JFileChooser.getSelectedFiles() failed with multi-selection and double-click [v3] In-Reply-To: References: Message-ID: On Tue, 6 Sep 2022 11:14:49 GMT, Tejesh R wrote: >> JFileChooser.getSelectedFiles() failed to retrieve files with multi-selection and double-click. This occurs when a single file is selected then enable multi-selection then select the same file through mouse double-click(Two file chooser dialogs used before and after multi-selection enabled). SelectedFiles are updated when a change in files/directory selection is done or when selection is made through keyboard selection. In this case since a single file is selected before multi-selection is enabled and same file is selected again without changing the selection index/directory, leaving selected Files un-updated. >> **Proposed Fix** : Whenever Multi-Selection is enabled check if any files are selected, if yes update the selected Files of JFileChoooser. > > Tejesh R has updated the pull request incrementally with one additional commit since the last revision: > > Updated based on review comments src/java.desktop/share/classes/sun/swing/FilePane.java line 1766: > 1764: selectedFiles[0] = getFileChooser().getSelectedFile(); > 1765: } > 1766: Is this problem seen only when single file is selected? What happens when more than one file is selected? By default, is MultiSelection enabled on JfileChooser? In FilePane.java, i see that get/setSelectedFiles() is exclusively used when multi-selection mode is enabled and get/setSelectedFile() is used when multi-selection is not enabled. Using getSelectedFile() to change the state when multi-selection is enabled might introduce state corruption issues in other scenarios. ------------- PR: https://git.openjdk.org/jdk/pull/9996 From tr at openjdk.org Thu Sep 8 10:29:42 2022 From: tr at openjdk.org (Tejesh R) Date: Thu, 8 Sep 2022 10:29:42 GMT Subject: RFR: 4834298: JFileChooser.getSelectedFiles() failed with multi-selection and double-click [v3] In-Reply-To: References: Message-ID: On Thu, 8 Sep 2022 10:18:04 GMT, Jayathirth D V wrote: >> Tejesh R has updated the pull request incrementally with one additional commit since the last revision: >> >> Updated based on review comments > > src/java.desktop/share/classes/sun/swing/FilePane.java line 1766: > >> 1764: selectedFiles[0] = getFileChooser().getSelectedFile(); >> 1765: } >> 1766: > > Is this problem seen only when single file is selected? What happens when more than one file is selected? > By default, is MultiSelection enabled on JfileChooser? > > In FilePane.java, i see that get/setSelectedFiles() is exclusively used when multi-selection mode is enabled and get/setSelectedFile() is used when multi-selection is not enabled. Using getSelectedFile() to change the state when multi-selection is enabled might introduce state corruption issues in other scenarios. This problem occurs when user switch the mode from single selection to multi selection, that too on specified scenario. By default multiselection will be disabled. When user selects a file in single selection and then switch to multi selection the selected single file is not retained in selectedFiles (Even though its a single file). So In order to handle this situation, whenever user switch from any state to multiselection enabled state, the previously selected files(if present) is set to selectedFiles(). ------------- PR: https://git.openjdk.org/jdk/pull/9996 From tr at openjdk.org Thu Sep 8 10:29:43 2022 From: tr at openjdk.org (Tejesh R) Date: Thu, 8 Sep 2022 10:29:43 GMT Subject: RFR: 4834298: JFileChooser.getSelectedFiles() failed with multi-selection and double-click [v3] In-Reply-To: References: Message-ID: On Thu, 8 Sep 2022 10:25:13 GMT, Tejesh R wrote: >> src/java.desktop/share/classes/sun/swing/FilePane.java line 1766: >> >>> 1764: selectedFiles[0] = getFileChooser().getSelectedFile(); >>> 1765: } >>> 1766: >> >> Is this problem seen only when single file is selected? What happens when more than one file is selected? >> By default, is MultiSelection enabled on JfileChooser? >> >> In FilePane.java, i see that get/setSelectedFiles() is exclusively used when multi-selection mode is enabled and get/setSelectedFile() is used when multi-selection is not enabled. Using getSelectedFile() to change the state when multi-selection is enabled might introduce state corruption issues in other scenarios. > > This problem occurs when user switch the mode from single selection to multi selection, that too on specified scenario. By default multiselection will be disabled. When user selects a file in single selection and then switch to multi selection the selected single file is not retained in selectedFiles (Even though its a single file). So In order to handle this situation, whenever user switch from any state to multiselection enabled state, the previously selected files(if present) is set to selectedFiles(). Other state are not altered or modified during the process, just the selected files are set to setSelectedFiles. ------------- PR: https://git.openjdk.org/jdk/pull/9996 From jdv at openjdk.org Thu Sep 8 10:34:43 2022 From: jdv at openjdk.org (Jayathirth D V) Date: Thu, 8 Sep 2022 10:34:43 GMT Subject: RFR: 4834298: JFileChooser.getSelectedFiles() failed with multi-selection and double-click [v3] In-Reply-To: References: Message-ID: <87to_TWEwp56w4tmpqqSwY7DBxBoemZ4t5kZ2v_ebxo=.e604fc0e-d5a2-44d4-b9da-c4765af317af@github.com> On Tue, 6 Sep 2022 11:14:49 GMT, Tejesh R wrote: >> JFileChooser.getSelectedFiles() failed to retrieve files with multi-selection and double-click. This occurs when a single file is selected then enable multi-selection then select the same file through mouse double-click(Two file chooser dialogs used before and after multi-selection enabled). SelectedFiles are updated when a change in files/directory selection is done or when selection is made through keyboard selection. In this case since a single file is selected before multi-selection is enabled and same file is selected again without changing the selection index/directory, leaving selected Files un-updated. >> **Proposed Fix** : Whenever Multi-Selection is enabled check if any files are selected, if yes update the selected Files of JFileChoooser. > > Tejesh R has updated the pull request incrementally with one additional commit since the last revision: > > Updated based on review comments src/java.desktop/share/classes/sun/swing/FilePane.java line 1772: > 1770: } else { > 1771: listSelectionModel.setSelectionMode(ListSelectionModel.SINGLE_SELECTION); > 1772: clearSelection(); When we move from multi-selection enabled to disable. We are clearing the selection and calling setSelectedFiles(null). Do we need to replicate similar state update when we move from multi-selection disable to enable (clearing selection and calling setSelectedFile(null))? It looks like somewhere we are not clearing SelectedFile() and it is causing this issue. ------------- PR: https://git.openjdk.org/jdk/pull/9996 From tr at openjdk.org Thu Sep 8 10:45:49 2022 From: tr at openjdk.org (Tejesh R) Date: Thu, 8 Sep 2022 10:45:49 GMT Subject: RFR: 4834298: JFileChooser.getSelectedFiles() failed with multi-selection and double-click [v3] In-Reply-To: <87to_TWEwp56w4tmpqqSwY7DBxBoemZ4t5kZ2v_ebxo=.e604fc0e-d5a2-44d4-b9da-c4765af317af@github.com> References: <87to_TWEwp56w4tmpqqSwY7DBxBoemZ4t5kZ2v_ebxo=.e604fc0e-d5a2-44d4-b9da-c4765af317af@github.com> Message-ID: On Thu, 8 Sep 2022 10:32:32 GMT, Jayathirth D V wrote: >> Tejesh R has updated the pull request incrementally with one additional commit since the last revision: >> >> Updated based on review comments > > src/java.desktop/share/classes/sun/swing/FilePane.java line 1772: > >> 1770: } else { >> 1771: listSelectionModel.setSelectionMode(ListSelectionModel.SINGLE_SELECTION); >> 1772: clearSelection(); > > When we move from multi-selection enabled to disable. We are clearing the selection and calling setSelectedFiles(null). Do we need to replicate similar state update when we move from multi-selection disable to enable (clearing selection and calling setSelectedFile(null))? > > It looks like somewhere we are not clearing SelectedFile() and it is causing this issue. If we replicate the same then previously selected files will be cleared and user wont be able to retain the selected files. ------------- PR: https://git.openjdk.org/jdk/pull/9996 From tr at openjdk.org Thu Sep 8 10:45:50 2022 From: tr at openjdk.org (Tejesh R) Date: Thu, 8 Sep 2022 10:45:50 GMT Subject: RFR: 4834298: JFileChooser.getSelectedFiles() failed with multi-selection and double-click [v3] In-Reply-To: References: <87to_TWEwp56w4tmpqqSwY7DBxBoemZ4t5kZ2v_ebxo=.e604fc0e-d5a2-44d4-b9da-c4765af317af@github.com> Message-ID: On Thu, 8 Sep 2022 10:38:22 GMT, Tejesh R wrote: >> src/java.desktop/share/classes/sun/swing/FilePane.java line 1772: >> >>> 1770: } else { >>> 1771: listSelectionModel.setSelectionMode(ListSelectionModel.SINGLE_SELECTION); >>> 1772: clearSelection(); >> >> When we move from multi-selection enabled to disable. We are clearing the selection and calling setSelectedFiles(null). Do we need to replicate similar state update when we move from multi-selection disable to enable (clearing selection and calling setSelectedFile(null))? >> >> It looks like somewhere we are not clearing SelectedFile() and it is causing this issue. > > If we replicate the same then previously selected files will be cleared and user wont be able to retain the selected files. Clearing the selection from multi to single is fine, but the reverse might not be right I guess..... Since selected file/files can be retained when user switch to multi selection. ------------- PR: https://git.openjdk.org/jdk/pull/9996 From jdv at openjdk.org Thu Sep 8 10:45:51 2022 From: jdv at openjdk.org (Jayathirth D V) Date: Thu, 8 Sep 2022 10:45:51 GMT Subject: RFR: 4834298: JFileChooser.getSelectedFiles() failed with multi-selection and double-click [v3] In-Reply-To: References: Message-ID: <5ly-7MCOy5_-N5_cKwjASkTLo9uoUDTodkqByDQahZg=.d8e04260-67db-4031-a9d9-599381a6a468@github.com> On Thu, 8 Sep 2022 10:09:24 GMT, Tejesh R wrote: >> test/jdk/javax/swing/JFileChooser/MultiSelectionEnabledSelectedFilesTest.java line 39: >> >>> 37: * @run main/manual MultiSelectionEnabledSelectedFilesTest >>> 38: */ >>> 39: public class MultiSelectionEnabledSelectedFilesTest { >> >> Is this bug specific to any platform? >> Because the test is created to run on all platforms and it doesnt fail in my Mac. > > Yeah, it doesn't fail in mac. It does fail in windows and linux, so didn't make any os specific. Still I have tested in all platforms and it works fine. The bug was raised as linux specific. Why the test doesnt fail in Mac(In my case second dialog doesnt exit and it stays on the screen, which will result in timeout and jtreg error on Mac)? It looks like fix is not some platform specific change. ------------- PR: https://git.openjdk.org/jdk/pull/9996 From jdv at openjdk.org Thu Sep 8 10:53:41 2022 From: jdv at openjdk.org (Jayathirth D V) Date: Thu, 8 Sep 2022 10:53:41 GMT Subject: RFR: 4834298: JFileChooser.getSelectedFiles() failed with multi-selection and double-click [v3] In-Reply-To: References: <87to_TWEwp56w4tmpqqSwY7DBxBoemZ4t5kZ2v_ebxo=.e604fc0e-d5a2-44d4-b9da-c4765af317af@github.com> Message-ID: On Thu, 8 Sep 2022 10:41:11 GMT, Tejesh R wrote: >> If we replicate the same then previously selected files will be cleared and user wont be able to retain the selected files. > > Clearing the selection from multi to single is fine, but the reverse might not be right I guess..... Since selected file/files can be retained when user switch to multi selection. In this scenario we are actually closing the first JFileChooser dialog and then opening another JFileChooser dialog with multi-selection. Do we need to maintain selected file state between these dialogs? If yes, why? Please clarify. ------------- PR: https://git.openjdk.org/jdk/pull/9996 From tr at openjdk.org Thu Sep 8 10:58:58 2022 From: tr at openjdk.org (Tejesh R) Date: Thu, 8 Sep 2022 10:58:58 GMT Subject: RFR: 4834298: JFileChooser.getSelectedFiles() failed with multi-selection and double-click [v3] In-Reply-To: <5ly-7MCOy5_-N5_cKwjASkTLo9uoUDTodkqByDQahZg=.d8e04260-67db-4031-a9d9-599381a6a468@github.com> References: <5ly-7MCOy5_-N5_cKwjASkTLo9uoUDTodkqByDQahZg=.d8e04260-67db-4031-a9d9-599381a6a468@github.com> Message-ID: On Thu, 8 Sep 2022 10:43:45 GMT, Jayathirth D V wrote: >> Yeah, it doesn't fail in mac. It does fail in windows and linux, so didn't make any os specific. Still I have tested in all platforms and it works fine. The bug was raised as linux specific. > > Why the test doesnt fail in Mac(In my case second dialog doesnt exit and it stays on the screen, which will result in timeout and jtreg error on Mac)? > > It looks like fix is not some platform specific change. The fix handles Windows and linux platforms, since FilePane.class is involved on mode selection. In Mac its doesn't come thought this path, I guess it handles some other way. The issue doesn't occur on key press also (All platforms), since the path of setting selected files are different for each scenario. ------------- PR: https://git.openjdk.org/jdk/pull/9996 From tr at openjdk.org Thu Sep 8 10:58:58 2022 From: tr at openjdk.org (Tejesh R) Date: Thu, 8 Sep 2022 10:58:58 GMT Subject: RFR: 4834298: JFileChooser.getSelectedFiles() failed with multi-selection and double-click [v3] In-Reply-To: References: <5ly-7MCOy5_-N5_cKwjASkTLo9uoUDTodkqByDQahZg=.d8e04260-67db-4031-a9d9-599381a6a468@github.com> Message-ID: On Thu, 8 Sep 2022 10:53:53 GMT, Tejesh R wrote: >> Why the test doesnt fail in Mac(In my case second dialog doesnt exit and it stays on the screen, which will result in timeout and jtreg error on Mac)? >> >> It looks like fix is not some platform specific change. > > The fix handles Windows and linux platforms, since FilePane.class is involved on mode selection. In Mac its doesn't come thought this path, I guess it handles some other way. The issue doesn't occur on key press also (All platforms), since the path of setting selected files are different for each scenario. I guess the dialogue is not not been removed when exception is thrown. Will take a look into it. ------------- PR: https://git.openjdk.org/jdk/pull/9996 From tr at openjdk.org Thu Sep 8 11:09:52 2022 From: tr at openjdk.org (Tejesh R) Date: Thu, 8 Sep 2022 11:09:52 GMT Subject: RFR: 4834298: JFileChooser.getSelectedFiles() failed with multi-selection and double-click [v3] In-Reply-To: References: <87to_TWEwp56w4tmpqqSwY7DBxBoemZ4t5kZ2v_ebxo=.e604fc0e-d5a2-44d4-b9da-c4765af317af@github.com> Message-ID: On Thu, 8 Sep 2022 10:51:34 GMT, Jayathirth D V wrote: >> Clearing the selection from multi to single is fine, but the reverse might not be right I guess..... Since selected file/files can be retained when user switch to multi selection. > > In this scenario we are actually closing the first JFileChooser dialog and then opening another JFileChooser dialog with multi-selection. Do we need to maintain selected file state between these dialogs? If yes, why? Please clarify. In mac, the selection is maintained during this state transition, only in this scenario its not handled. And since same filechooser is used in selecting the files ( Just pop-up dialogue is used to select the files) I think it would be better to retain the selection. ------------- PR: https://git.openjdk.org/jdk/pull/9996 From tr at openjdk.org Thu Sep 8 11:09:52 2022 From: tr at openjdk.org (Tejesh R) Date: Thu, 8 Sep 2022 11:09:52 GMT Subject: RFR: 4834298: JFileChooser.getSelectedFiles() failed with multi-selection and double-click [v3] In-Reply-To: References: <87to_TWEwp56w4tmpqqSwY7DBxBoemZ4t5kZ2v_ebxo=.e604fc0e-d5a2-44d4-b9da-c4765af317af@github.com> Message-ID: On Thu, 8 Sep 2022 11:00:14 GMT, Tejesh R wrote: >> In this scenario we are actually closing the first JFileChooser dialog and then opening another JFileChooser dialog with multi-selection. Do we need to maintain selected file state between these dialogs? If yes, why? Please clarify. > > In mac, the selection is maintained during this state transition, only in this scenario its not handled. And since same filechooser is used in selecting the files ( Just pop-up dialogue is used to select the files) I think it would be better to retain the selection. In keyboard selection the state is actually not maintained. Then do you think it better to clear the selection and set selected files to null....? ------------- PR: https://git.openjdk.org/jdk/pull/9996 From tr at openjdk.org Thu Sep 8 11:09:53 2022 From: tr at openjdk.org (Tejesh R) Date: Thu, 8 Sep 2022 11:09:53 GMT Subject: RFR: 4834298: JFileChooser.getSelectedFiles() failed with multi-selection and double-click [v3] In-Reply-To: References: <87to_TWEwp56w4tmpqqSwY7DBxBoemZ4t5kZ2v_ebxo=.e604fc0e-d5a2-44d4-b9da-c4765af317af@github.com> Message-ID: <_usGkRuX1Jrds8aCy2udq6VAL7QY_6VxIO80-8C7TkM=.e6557ae5-92ac-455a-9704-5e0cef679dde@github.com> On Thu, 8 Sep 2022 11:02:24 GMT, Tejesh R wrote: >> In mac, the selection is maintained during this state transition, only in this scenario its not handled. And since same filechooser is used in selecting the files ( Just pop-up dialogue is used to select the files) I think it would be better to retain the selection. > > In keyboard selection the state is actually not maintained. Then do you think it better to clear the selection and set selected files to null....? Clearing the selection and setting it to null also solves the problem though. When we call clear selection, reset will happen and selectedFiles will be set. ------------- PR: https://git.openjdk.org/jdk/pull/9996 From jdv at openjdk.org Thu Sep 8 11:09:55 2022 From: jdv at openjdk.org (Jayathirth D V) Date: Thu, 8 Sep 2022 11:09:55 GMT Subject: RFR: 4834298: JFileChooser.getSelectedFiles() failed with multi-selection and double-click [v3] In-Reply-To: References: <5ly-7MCOy5_-N5_cKwjASkTLo9uoUDTodkqByDQahZg=.d8e04260-67db-4031-a9d9-599381a6a468@github.com> Message-ID: On Thu, 8 Sep 2022 10:54:48 GMT, Tejesh R wrote: >> The fix handles Windows and linux platforms, since FilePane.class is involved on mode selection. In Mac its doesn't come thought this path, I guess it handles some other way. The issue doesn't occur on key press also (All platforms), since the path of setting selected files are different for each scenario. > > I guess the dialogue is not not been removed when exception is thrown. Will take a look into it. If the product fix that is being done will touch only Linux and Windows(And in Mac it looks like it not exiting properly), we can make this regression test to run only on Linux and Windows using jtreg tag: @requires (os.family == "windows" | os.family == "linux") ------------- PR: https://git.openjdk.org/jdk/pull/9996 From jdv at openjdk.org Thu Sep 8 11:51:46 2022 From: jdv at openjdk.org (Jayathirth D V) Date: Thu, 8 Sep 2022 11:51:46 GMT Subject: RFR: 4834298: JFileChooser.getSelectedFiles() failed with multi-selection and double-click [v3] In-Reply-To: <_usGkRuX1Jrds8aCy2udq6VAL7QY_6VxIO80-8C7TkM=.e6557ae5-92ac-455a-9704-5e0cef679dde@github.com> References: <87to_TWEwp56w4tmpqqSwY7DBxBoemZ4t5kZ2v_ebxo=.e604fc0e-d5a2-44d4-b9da-c4765af317af@github.com> <_usGkRuX1Jrds8aCy2udq6VAL7QY_6VxIO80-8C7TkM=.e6557ae5-92ac-455a-9704-5e0cef679dde@github.com> Message-ID: On Thu, 8 Sep 2022 11:05:35 GMT, Tejesh R wrote: >> In keyboard selection the state is actually not maintained. Then do you think it better to clear the selection and set selected files to null....? > > Clearing the selection and setting it to null also solves the problem though. When we call clear selection, reset will happen and selectedFiles will be set. As discussed on call its better to clear selection when we move between multi-selection enabled/disabled as captured in https://github.com/openjdk/jdk/pull/9996#discussion_r965791205 ------------- PR: https://git.openjdk.org/jdk/pull/9996 From duke at openjdk.org Thu Sep 8 12:45:34 2022 From: duke at openjdk.org (duke) Date: Thu, 8 Sep 2022 12:45:34 GMT Subject: Withdrawn: 8282578: AIOOBE in javax.sound.sampled.Clip In-Reply-To: References: Message-ID: On Fri, 3 Jun 2022 15:43:39 GMT, Alexander Zuev wrote: > Add try/catch clause to ignore an exception since it is harmless for we isolated > the massge data before passing it ro processor. > Add test case. This pull request has been closed without being integrated. ------------- PR: https://git.openjdk.org/jdk/pull/9016 From aivanov at openjdk.org Thu Sep 8 14:24:44 2022 From: aivanov at openjdk.org (Alexey Ivanov) Date: Thu, 8 Sep 2022 14:24:44 GMT Subject: RFR: JDK-8292276 : Missing color names in CSS. [v13] In-Reply-To: References: Message-ID: <-sdqQrwQUzVXb1238wegpay5WBEWwp5RqMRzw27j4Lo=.054c3db2-21cf-4688-8040-f821d49c1108@github.com> On Wed, 7 Sep 2022 21:55:53 GMT, ScientificWare wrote: >> This is referenced in Java Bug Database as >> - [JDK-8292276 : Missing color names in CSS](https://bugs.java.com/bugdatabase/view_bug.do?bug_id=8292276) >> >> This is tracked in JBS as >> - [JDK-8292276 : Missing color names in CSS](https://bugs.openjdk.java.net/browse/JDK-8292276) >> >> Adds missing color names, defined by CSS Level 4, in CSS.java : >> CSS Color Module Level 4 >> W3C Candidate Recommendation Snapshot, 5 July 2022 >> [7.1 Named Colors](https://www.w3.org/TR/css-color-4/#named-color) >> >> Designed from : [ScientificWare JDK-8292276 : Missing color names in CSS](https://github.com/scientificware/jdk/issues/12) > > ScientificWare has updated the pull request incrementally with one additional commit since the last revision: > > Whitespace errors > > Removes whitespaces. Swing supports [CSS1](https://www.w3.org/TR/REC-CSS1/) only, it defines color names for [16 colors](https://www.w3.org/TR/REC-CSS1/#color-units): > The suggested list of keyword color names is: aqua, black, blue, fuchsia, gray, green, lime, maroon, navy, olive, purple, red, silver, teal, white, and yellow. These 16 colors are taken from the Windows VGA palette, and their RGB values are not defined in this specification. Would the addition of color names from CSS4 give a wrong impression that Swing implements CSS4? ------------- PR: https://git.openjdk.org/jdk/pull/9825 From shurailine at openjdk.org Thu Sep 8 16:01:40 2022 From: shurailine at openjdk.org (Alexandre Iline) Date: Thu, 8 Sep 2022 16:01:40 GMT Subject: RFR: 8292309 : Fix java/awt/PrintJob/ConstrainedPrintingTest/ConstrainedPrintingTest.java test [v2] In-Reply-To: References: Message-ID: On Wed, 7 Sep 2022 22:42:35 GMT, lawrence.andrews wrote: >> 1) Fixed Parse Exception by removing yesno >> test result: Error. Parse Exception: Arguments to `manual' option not supported: yesno >> 2) Throw jtreg.SkippedException when printer is not configured on the test host >> 3) Replaced Sysout & TestDialog with ManualTestFrame, which allows to the user to better decide test results and to take screen shot if test fails. >> >> @shurymury > > lawrence.andrews has updated the pull request incrementally with one additional commit since the last revision: > > Show Frame with in EDT LGTM ------------- PR: https://git.openjdk.org/jdk/pull/9865 From shurailine at openjdk.org Thu Sep 8 16:09:46 2022 From: shurailine at openjdk.org (Alexandre Iline) Date: Thu, 8 Sep 2022 16:09:46 GMT Subject: RFR: 8292271 : Fix java/awt/PrintJob/PrintCheckboxTest/PrintCheckboxManualTest.java test [v4] In-Reply-To: References: Message-ID: <2HuRkpIul8oVnWgea2W6r6BMN2mRqYMJASZs7bXxP2k=.a4d594e6-ca65-45a7-b9f2-d9887e31ab89@github.com> On Wed, 7 Sep 2022 22:33:17 GMT, lawrence.andrews wrote: >> 1) This test was failing due to yesno >> test result: Error. Parse Exception: Arguments to `manual' option not supported: yesno >> 2) PrintCheckboxManualTest.html file was missing >> 3) Added os.family since test instruction says that its a linux and solair toolkit only test >> 4) Removed Sysout & TestDialog class & added a better manual framework to show the instruction and test frame. >> >> @shurymury > > lawrence.andrews has updated the pull request incrementally with one additional commit since the last revision: > > Fixed space issue test/jdk/java/awt/PrintJob/PrintCheckboxTest/PrintCheckboxManualTest.java line 69: > 67: > 68: String instruction = """ > 69: Linux or Solaris with XToolkit ONLY! since there already is @requires (os.family == "linux" | os.family == "solaris") is this line needed? Can there be anything else besides XToolkit on linux or solaris? If yes, is there a way to determine that programmatically? If no, how does user finds that out? Lastly, what is the test executor supposed to do if it is not XToolkit on linux or solaris? ------------- PR: https://git.openjdk.org/jdk/pull/9858 From aivanov at openjdk.org Thu Sep 8 17:35:04 2022 From: aivanov at openjdk.org (Alexey Ivanov) Date: Thu, 8 Sep 2022 17:35:04 GMT Subject: RFR: 8288882: JFileChooser - empty (0 bytes) file is displayed as 1 KB [v26] In-Reply-To: References: Message-ID: On Fri, 2 Sep 2022 11:12:53 GMT, Abhishek Kumar wrote: >> JFileChooser - empty file size issue fixed. >> For empty file, now the size 0 KB. >> Manual Test Case "FileSizeCheck.java" created. > > Abhishek Kumar has updated the pull request incrementally with one additional commit since the last revision: > > Filesize calculation logic modified Changes requested by aivanov (Reviewer). src/java.desktop/share/classes/sun/swing/FilePane.java line 1277: > 1275: DecimalFormat df = new DecimalFormat("0.0"); > 1276: double val = fileSize/baseFileSize; > 1277: return Double.valueOf(df.format(val)); The new code to round up looks difficult to understand. I liked the previous version better. The only thing required to introduce rounding up is updating `roundToOneDecimalPlace`: private static double roundToOneDecimalPlace(long fileSize) { return Math.ceilDiv(fileSize, 100L) / 10.0d; } [`Math.ceilDiv`](https://docs.oracle.com/en/java/javase/18/docs/api/java.base/java/lang/Math.html#ceilDiv(long,long)) is available since Java 18. However, this code also works and is better suited for backporting: private static double roundToOneDecimalPlace(long fileSize) { return Math.ceil(fileSize / 100.0d) / 10.0d; } Note that the first division is also floating point. ------------- PR: https://git.openjdk.org/jdk/pull/9327 From honkar at openjdk.org Thu Sep 8 20:58:41 2022 From: honkar at openjdk.org (Harshitha Onkar) Date: Thu, 8 Sep 2022 20:58:41 GMT Subject: RFR: 8054572: [macosx] JComboBox paints the border incorrectly [v7] In-Reply-To: References: <-qF2JbwHypKtIsUXDE-lb7efmsC8-_jTjR_VrPYS_44=.514a5514-f2c1-4fa6-8b83-40f476660f5c@github.com> Message-ID: On Wed, 17 Aug 2022 22:37:46 GMT, Damon Nguyen wrote: >> When a JComboBox is editable, the button segment of the combo box is misaligned vertically and has a different height. This change fixes these issues and adds a manual test that checks the appearance of an editable and non-editable JComboBox. >> >> One of the discussions revolving this issue is the native macOS appearance of editable JComboBoxes. After looking through native macOS apps, the only one found is in System Preferences > Date & Time. The problem here is that the native equivalent found here uses a blue button with a single down arrow as the button's symbol. The current swing implementation uses a white button with an up & down arrow symbol for the button. A JRS widget button that has this blue button with a single downward arrow exists but does not support text fields. >> >> As such, I believe the best fix for this issue is to mainly fix the alignment and sizing issue. I looked through Apple's documentation for these UI elements but editable JComboBoxes aren't specifically listed anywhere. Similarly, there's barely any editable JComboBoxes used in native mac apps (only the date & time). So, I don't think it's a major issue if JComboBox does not exactly match the example found in Date & Time. > > Damon Nguyen has updated the pull request incrementally with one additional commit since the last revision: > > Updated copyright date. Added MacOS text to test. Tested on non-retina display, combobox height of 22 works well. Increasing or decreasing the height by 1 produces slight offset. I think height=22 works well here. **With Height = 23** ![image](https://user-images.githubusercontent.com/95945681/189221941-c0293708-0369-41dc-b765-32d7c2985345.png) **With Height = 21** ![image](https://user-images.githubusercontent.com/95945681/189222977-763b3e49-a4d6-47e9-9445-c3caf5baeb66.png) ------------- PR: https://git.openjdk.org/jdk/pull/9473 From duke at openjdk.org Thu Sep 8 21:02:39 2022 From: duke at openjdk.org (lawrence.andrews) Date: Thu, 8 Sep 2022 21:02:39 GMT Subject: RFR: 8292271 : Fix java/awt/PrintJob/PrintCheckboxTest/PrintCheckboxManualTest.java test [v5] In-Reply-To: References: Message-ID: > 1) This test was failing due to yesno > test result: Error. Parse Exception: Arguments to `manual' option not supported: yesno > 2) PrintCheckboxManualTest.html file was missing > 3) Added os.family since test instruction says that its a linux and solair toolkit only test > 4) Removed Sysout & TestDialog class & added a better manual framework to show the instruction and test frame. > > @shurymury lawrence.andrews has updated the pull request incrementally with one additional commit since the last revision: Check for XToolkit ------------- Changes: - all: https://git.openjdk.org/jdk/pull/9858/files - new: https://git.openjdk.org/jdk/pull/9858/files/7e848533..0ef8c12c Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=9858&range=04 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=9858&range=03-04 Stats: 18 lines in 1 file changed: 10 ins; 1 del; 7 mod Patch: https://git.openjdk.org/jdk/pull/9858.diff Fetch: git fetch https://git.openjdk.org/jdk pull/9858/head:pull/9858 PR: https://git.openjdk.org/jdk/pull/9858 From honkar at openjdk.org Thu Sep 8 21:11:32 2022 From: honkar at openjdk.org (Harshitha Onkar) Date: Thu, 8 Sep 2022 21:11:32 GMT Subject: RFR: 8054572: [macosx] JComboBox paints the border incorrectly [v7] In-Reply-To: References: <-qF2JbwHypKtIsUXDE-lb7efmsC8-_jTjR_VrPYS_44=.514a5514-f2c1-4fa6-8b83-40f476660f5c@github.com> Message-ID: On Wed, 17 Aug 2022 22:37:46 GMT, Damon Nguyen wrote: >> When a JComboBox is editable, the button segment of the combo box is misaligned vertically and has a different height. This change fixes these issues and adds a manual test that checks the appearance of an editable and non-editable JComboBox. >> >> One of the discussions revolving this issue is the native macOS appearance of editable JComboBoxes. After looking through native macOS apps, the only one found is in System Preferences > Date & Time. The problem here is that the native equivalent found here uses a blue button with a single down arrow as the button's symbol. The current swing implementation uses a white button with an up & down arrow symbol for the button. A JRS widget button that has this blue button with a single downward arrow exists but does not support text fields. >> >> As such, I believe the best fix for this issue is to mainly fix the alignment and sizing issue. I looked through Apple's documentation for these UI elements but editable JComboBoxes aren't specifically listed anywhere. Similarly, there's barely any editable JComboBoxes used in native mac apps (only the date & time). So, I don't think it's a major issue if JComboBox does not exactly match the example found in Date & Time. > > Damon Nguyen has updated the pull request incrementally with one additional commit since the last revision: > > Updated copyright date. Added MacOS text to test. test/jdk/javax/swing/JComboBox/JComboBoxBorderTest.java line 74: > 72: frame = new JFrame(); > 73: frame.getContentPane().add(panel); > 74: frame.setVisible(true); @DamonGuy To avoid flickering of the test frame move `frame.setVisible(true)` after `PassFailJFrame.positionTestWindow()` ------------- PR: https://git.openjdk.org/jdk/pull/9473 From serb at openjdk.org Thu Sep 8 23:44:41 2022 From: serb at openjdk.org (Sergey Bylokhov) Date: Thu, 8 Sep 2022 23:44:41 GMT Subject: RFR: 6852577: Only for Nimbus LAF UIManager.get("PasswordField.echoChar") is null [v3] In-Reply-To: References: Message-ID: <8_EXfD0W-aphoJsroB4e0r8hsMrcxpfATTWDGHXP_Es=.c22772e4-447a-48b2-b5de-1918059670f2@github.com> On Thu, 8 Sep 2022 05:17:10 GMT, Prasanta Sadhukhan wrote: >> src/java.desktop/share/classes/javax/swing/plaf/synth/SynthLookAndFeel.java line 731: >> >>> 729: }); >>> 730: >>> 731: table.put("PasswordField.echoChar", '*'); >> >> It is still unclear where this "*" was stored before(will we ignore it now?), since the Nimbus used that symbol already. > > "*" is the default char unless overridden by echoChar property and is set [here](https://github.com/openjdk/jdk/blob/master/src/java.desktop/share/classes/javax/swing/JPasswordField.java#L178) I just found my comment at that bug that the ui properties for nimbus are stored in the "skin.laf" and the "echoChar" is missed there. This is the reason why the UIDefaults table is small in Nimbus, unlike Metal where we have a long list of properties. Take a look to the `NimbusDefaults.java` which is generated during the build it contains all the props, and it is a place where I think we should update the echoChar. ------------- PR: https://git.openjdk.org/jdk/pull/10035 From serb at openjdk.org Thu Sep 8 23:46:38 2022 From: serb at openjdk.org (Sergey Bylokhov) Date: Thu, 8 Sep 2022 23:46:38 GMT Subject: RFR: 8075916: The regression-swing case failed as colored text is not shown on disabled checkbox and radio button with Nimbus LAF In-Reply-To: <_Pu4ZIceztdCjw5gy3bOR39Y0Jvz_TEiHdGMN0rKu-M=.9843abff-48d9-4a66-95f3-198e897c1399@github.com> References: <_Pu4ZIceztdCjw5gy3bOR39Y0Jvz_TEiHdGMN0rKu-M=.9843abff-48d9-4a66-95f3-198e897c1399@github.com> Message-ID: On Tue, 6 Sep 2022 05:57:09 GMT, Prasanta Sadhukhan wrote: > CheckBox.disabledText and RadioButton.disabledText color UIProperty is not honoured by Nimbus L&F when disabled text is drawn for JCheckBox and JRadioButton, so disabled text color was rendered incorrectly. > Fix is to honour these UIProperty color if they are set by user, else use the color from the component or via getColorForState(). > > Closed test as mentioned in JBS is used to check the fix. >?? Failed to retrieve information on issue 8075916. JBS issue is closed. ------------- PR: https://git.openjdk.org/jdk/pull/10177 From serb at openjdk.org Thu Sep 8 23:53:29 2022 From: serb at openjdk.org (Sergey Bylokhov) Date: Thu, 8 Sep 2022 23:53:29 GMT Subject: RFR: 8292309 : Fix java/awt/PrintJob/ConstrainedPrintingTest/ConstrainedPrintingTest.java test [v2] In-Reply-To: References: Message-ID: On Wed, 7 Sep 2022 22:42:35 GMT, lawrence.andrews wrote: >> 1) Fixed Parse Exception by removing yesno >> test result: Error. Parse Exception: Arguments to `manual' option not supported: yesno >> 2) Throw jtreg.SkippedException when printer is not configured on the test host >> 3) Replaced Sysout & TestDialog with ManualTestFrame, which allows to the user to better decide test results and to take screen shot if test fails. >> >> @shurymury > > lawrence.andrews has updated the pull request incrementally with one additional commit since the last revision: > > Show Frame with in EDT I still not sure about the case when we start to throw the "SkippedException" if the printer is not found and the "printer" keyword is set, especially for the manual test case. Is it expected that the user will run the "printer" related test and it will pass automcatically, how we will force to actually run the test in proper envirement? ------------- PR: https://git.openjdk.org/jdk/pull/9865 From duke at openjdk.org Fri Sep 9 03:01:48 2022 From: duke at openjdk.org (ScientificWare) Date: Fri, 9 Sep 2022 03:01:48 GMT Subject: RFR: JDK-8292276 : Missing color names in CSS. [v13] In-Reply-To: <-sdqQrwQUzVXb1238wegpay5WBEWwp5RqMRzw27j4Lo=.054c3db2-21cf-4688-8040-f821d49c1108@github.com> References: <-sdqQrwQUzVXb1238wegpay5WBEWwp5RqMRzw27j4Lo=.054c3db2-21cf-4688-8040-f821d49c1108@github.com> Message-ID: On Thu, 8 Sep 2022 14:22:32 GMT, Alexey Ivanov wrote: >> ScientificWare has updated the pull request incrementally with one additional commit since the last revision: >> >> Whitespace errors >> >> Removes whitespaces. > > Swing supports [CSS1](https://www.w3.org/TR/REC-CSS1/) only, it defines color names for [16 colors](https://www.w3.org/TR/REC-CSS1/#color-units): > >> The suggested list of keyword color names is: aqua, black, blue, fuchsia, gray, green, lime, maroon, navy, olive, purple, red, silver, teal, white, and yellow. These 16 colors are taken from the Windows VGA palette, and their RGB values are not defined in this specification. > > Would the addition of color names from CSS4 give a wrong impression that Swing implements CSS4? @aivanov-jdk It's a good question : - knowing that CSS Level 4 doesn't recommend usage of these names. - before my next PR about 3, 4, 6 or 8 digits hex coded colors (following CSS Level 4 Colors recommendations). - and this one in project (https://bugs.openjdk.org/browse/JDK-8289722). ------------- PR: https://git.openjdk.org/jdk/pull/9825 From psadhukhan at openjdk.org Fri Sep 9 04:18:42 2022 From: psadhukhan at openjdk.org (Prasanta Sadhukhan) Date: Fri, 9 Sep 2022 04:18:42 GMT Subject: RFR: 8075916: The regression-swing case failed as colored text is not shown on disabled checkbox and radio button with Nimbus LAF In-Reply-To: <_Pu4ZIceztdCjw5gy3bOR39Y0Jvz_TEiHdGMN0rKu-M=.9843abff-48d9-4a66-95f3-198e897c1399@github.com> References: <_Pu4ZIceztdCjw5gy3bOR39Y0Jvz_TEiHdGMN0rKu-M=.9843abff-48d9-4a66-95f3-198e897c1399@github.com> Message-ID: On Tue, 6 Sep 2022 05:57:09 GMT, Prasanta Sadhukhan wrote: > CheckBox.disabledText and RadioButton.disabledText color UIProperty is not honoured by Nimbus L&F when disabled text is drawn for JCheckBox and JRadioButton, so disabled text color was rendered incorrectly. > Fix is to honour these UIProperty color if they are set by user, else use the color from the component or via getColorForState(). > > Closed test as mentioned in JBS is used to check the fix. Its open now ------------- PR: https://git.openjdk.org/jdk/pull/10177 From psadhukhan at openjdk.org Fri Sep 9 04:25:35 2022 From: psadhukhan at openjdk.org (Prasanta Sadhukhan) Date: Fri, 9 Sep 2022 04:25:35 GMT Subject: RFR: 6852577: Only for Nimbus LAF UIManager.get("PasswordField.echoChar") is null [v3] In-Reply-To: <8_EXfD0W-aphoJsroB4e0r8hsMrcxpfATTWDGHXP_Es=.c22772e4-447a-48b2-b5de-1918059670f2@github.com> References: <8_EXfD0W-aphoJsroB4e0r8hsMrcxpfATTWDGHXP_Es=.c22772e4-447a-48b2-b5de-1918059670f2@github.com> Message-ID: <-qOkFQnlLYWH_LFc0JpgxLICPgTG1mtzXG7xrnRppns=.cf90f4bc-bec9-4f99-aa5c-ee867c585f95@github.com> On Thu, 8 Sep 2022 23:40:59 GMT, Sergey Bylokhov wrote: >> "*" is the default char unless overridden by echoChar property and is set [here](https://github.com/openjdk/jdk/blob/master/src/java.desktop/share/classes/javax/swing/JPasswordField.java#L178) > > I just found my comment at that bug that the ui properties for nimbus are stored in the "skin.laf" and the "echoChar" is missed there. This is the reason why the UIDefaults table is small in Nimbus, unlike Metal where we have a long list of properties. Take a look to the `NimbusDefaults.java` which is generated during the build it contains all the props, and it is a place where I think we should update the echoChar. It will have the problem as you mentioned so I did it as it is. Since we have already UIDefaults table defined, I think it can be used for this, without changing the doc which might cause compatibility issues. ------------- PR: https://git.openjdk.org/jdk/pull/10035 From psadhukhan at openjdk.org Fri Sep 9 04:38:44 2022 From: psadhukhan at openjdk.org (Prasanta Sadhukhan) Date: Fri, 9 Sep 2022 04:38:44 GMT Subject: RFR: 6852577: Only for Nimbus LAF UIManager.get("PasswordField.echoChar") is null [v3] In-Reply-To: <-qOkFQnlLYWH_LFc0JpgxLICPgTG1mtzXG7xrnRppns=.cf90f4bc-bec9-4f99-aa5c-ee867c585f95@github.com> References: <8_EXfD0W-aphoJsroB4e0r8hsMrcxpfATTWDGHXP_Es=.c22772e4-447a-48b2-b5de-1918059670f2@github.com> <-qOkFQnlLYWH_LFc0JpgxLICPgTG1mtzXG7xrnRppns=.cf90f4bc-bec9-4f99-aa5c-ee867c585f95@github.com> Message-ID: <1Y0OKsbNSaopRmrW3VQF8rh6RrClWmjbycO4qgfIY7I=.34c463c5-ccec-4bb5-981b-23e2a5bbab24@github.com> On Fri, 9 Sep 2022 04:21:59 GMT, Prasanta Sadhukhan wrote: >> I just found my comment at that bug that the ui properties for nimbus are stored in the "skin.laf" and the "echoChar" is missed there. This is the reason why the UIDefaults table is small in Nimbus, unlike Metal where we have a long list of properties. Take a look to the `NimbusDefaults.java` which is generated during the build it contains all the props, and it is a place where I think we should update the echoChar. > > It will have the problem as you mentioned so I did it as it is. Since we have already UIDefaults table defined, I think it can be used for this, without changing the doc which might cause compatibility issues. it will also probably need change in compiler as to how it generates/parses the type as I am getting Exception in thread "main" java.lang.NullPointerException: Cannot invoke "build.tools.generatenimbus.UIProperty$PropertyType.ordinal()" because "this.type" is null at build.tools.generatenimbus.UIProperty.write(UIProperty.java:87) at build.tools.generatenimbus.UIStyle.write(UIStyle.java:156) at build.tools.generatenimbus.UIRegion.write(UIRegion.java:213) at build.tools.generatenimbus.SynthModel.write(SynthModel.java:102) at build.tools.generatenimbus.Generator.generate(Generator.java:212) at build.tools.generatenimbus.Generator.main(Generator.java:118) so I think this is the safer and cleaner alternative as I am not creating a new UIDefaults table, just adding a new entry to it.. ------------- PR: https://git.openjdk.org/jdk/pull/10035 From psadhukhan at openjdk.org Fri Sep 9 05:05:45 2022 From: psadhukhan at openjdk.org (Prasanta Sadhukhan) Date: Fri, 9 Sep 2022 05:05:45 GMT Subject: RFR: 8234315: GTK LAF does not gray out disabled JMenu In-Reply-To: References: Message-ID: On Tue, 6 Sep 2022 05:37:02 GMT, Abhishek Kumar wrote: > Disabled JMenu foreground color was not grayed out in GTK LAF for version 3. The issue didn't occur in GTK-2. > After analysis it has been found that the JMenu widget type was changed to JMenuBar and the color value returned for the foreground color in disabled state was close to black color (RGB 0,0,0) for menubar which is not differentiable from enabled state foreground color. > > As a fix for this problem, if the menubar is in disabled state then the widget is changed to JMenu and color value returned for disabled menu is gray color. > > An automated test case has been added and checked in CI, link is added in JBS. Marked as reviewed by psadhukhan (Reviewer). ------------- PR: https://git.openjdk.org/jdk/pull/10176 From dnguyen at openjdk.org Fri Sep 9 06:41:44 2022 From: dnguyen at openjdk.org (Damon Nguyen) Date: Fri, 9 Sep 2022 06:41:44 GMT Subject: RFR: 6529151: NullPointerException in swing.plaf.synth.SynthLookAndFeel$Handler [v2] In-Reply-To: References: Message-ID: On Wed, 7 Sep 2022 04:40:56 GMT, Prasanta Sadhukhan wrote: >> NPE is thrown for closed/disposed JDialogs after uninstalling the UI which is because for SynthEditorPaneUI even though is disposed of, Nimbus propertyHandler tries to get the style of this disposed component resulting in NPE, >> which is fixed by a null check to prevent deferencing style object to get the color. > > Prasanta Sadhukhan has updated the pull request incrementally with one additional commit since the last revision: > > test fix Applied changes and NPE is no longer. Looks good to me ------------- Marked as reviewed by dnguyen (Author). PR: https://git.openjdk.org/jdk/pull/10167 From psadhukhan at openjdk.org Fri Sep 9 07:06:53 2022 From: psadhukhan at openjdk.org (Prasanta Sadhukhan) Date: Fri, 9 Sep 2022 07:06:53 GMT Subject: RFR: 8054572: [macosx] JComboBox paints the border incorrectly [v7] In-Reply-To: References: <-qF2JbwHypKtIsUXDE-lb7efmsC8-_jTjR_VrPYS_44=.514a5514-f2c1-4fa6-8b83-40f476660f5c@github.com> Message-ID: <-4XOW9ZOMRpytje4SYUnP3YjrWhnP8PrQ8960lge76o=.5b845455-a7fa-4fc8-b908-5de2f21dc93e@github.com> On Wed, 17 Aug 2022 22:37:46 GMT, Damon Nguyen wrote: >> When a JComboBox is editable, the button segment of the combo box is misaligned vertically and has a different height. This change fixes these issues and adds a manual test that checks the appearance of an editable and non-editable JComboBox. >> >> One of the discussions revolving this issue is the native macOS appearance of editable JComboBoxes. After looking through native macOS apps, the only one found is in System Preferences > Date & Time. The problem here is that the native equivalent found here uses a blue button with a single down arrow as the button's symbol. The current swing implementation uses a white button with an up & down arrow symbol for the button. A JRS widget button that has this blue button with a single downward arrow exists but does not support text fields. >> >> As such, I believe the best fix for this issue is to mainly fix the alignment and sizing issue. I looked through Apple's documentation for these UI elements but editable JComboBoxes aren't specifically listed anywhere. Similarly, there's barely any editable JComboBoxes used in native mac apps (only the date & time). So, I don't think it's a major issue if JComboBox does not exactly match the example found in Date & Time. > > Damon Nguyen has updated the pull request incrementally with one additional commit since the last revision: > > Updated copyright date. Added MacOS text to test. Marked as reviewed by psadhukhan (Reviewer). ------------- PR: https://git.openjdk.org/jdk/pull/9473 From psadhukhan at openjdk.org Fri Sep 9 07:06:55 2022 From: psadhukhan at openjdk.org (Prasanta Sadhukhan) Date: Fri, 9 Sep 2022 07:06:55 GMT Subject: RFR: 8054572: [macosx] JComboBox paints the border incorrectly [v7] In-Reply-To: References: <-qF2JbwHypKtIsUXDE-lb7efmsC8-_jTjR_VrPYS_44=.514a5514-f2c1-4fa6-8b83-40f476660f5c@github.com> Message-ID: On Wed, 31 Aug 2022 17:49:35 GMT, Damon Nguyen wrote: >> src/java.desktop/macosx/classes/com/apple/laf/AquaComboBoxUI.java line 471: >> >>> 469: >>> 470: if (comboBox.getComponentOrientation().isLeftToRight()) { >>> 471: return new Rectangle(insets.left, insets.top + midHeight, >> >> OK. Since Apple has confirmed combobox height shouldn't change with font size, we can have fixed height. >> >> Only thing I guess, till we sort out JDK-8023912: [macosx] JComboBox RTL orientation problem >> lets use LTR as it seems it might give a false impression that we support RTL when we dont even know if Apple supports it or not. Do you see any difference with combobox if you use LTR code vs RTL code with RTL testcase present in the above JBS? I dont in my BigSur. >> >> It will also be good to test it out in non-retina display to see if this "22" height is being shown ok there. > > I don't see a difference either but was following the same logic as used in BasicComboBoxUI. I can remove the LTR vs RTL logic until the other issue is resolved if needed. You can keep this for now...You can take in JDK-8023912 incase which I guess needs a followup question to Apple. ------------- PR: https://git.openjdk.org/jdk/pull/9473 From duke at openjdk.org Fri Sep 9 07:12:45 2022 From: duke at openjdk.org (Abhishek Kumar) Date: Fri, 9 Sep 2022 07:12:45 GMT Subject: Integrated: 8234315: GTK LAF does not gray out disabled JMenu In-Reply-To: References: Message-ID: On Tue, 6 Sep 2022 05:37:02 GMT, Abhishek Kumar wrote: > Disabled JMenu foreground color was not grayed out in GTK LAF for version 3. The issue didn't occur in GTK-2. > After analysis it has been found that the JMenu widget type was changed to JMenuBar and the color value returned for the foreground color in disabled state was close to black color (RGB 0,0,0) for menubar which is not differentiable from enabled state foreground color. > > As a fix for this problem, if the menubar is in disabled state then the widget is changed to JMenu and color value returned for disabled menu is gray color. > > An automated test case has been added and checked in CI, link is added in JBS. This pull request has now been integrated. Changeset: 9d6b0285 Author: Abhishek Kumar Committer: Prasanta Sadhukhan URL: https://git.openjdk.org/jdk/commit/9d6b0285f53599816c30393b87d16772ef6314b7 Stats: 130 lines in 2 files changed: 130 ins; 0 del; 0 mod 8234315: GTK LAF does not gray out disabled JMenu Reviewed-by: serb, psadhukhan ------------- PR: https://git.openjdk.org/jdk/pull/10176 From tr at openjdk.org Fri Sep 9 08:12:45 2022 From: tr at openjdk.org (Tejesh R) Date: Fri, 9 Sep 2022 08:12:45 GMT Subject: RFR: 4834298: JFileChooser.getSelectedFiles() failed with multi-selection and double-click [v4] In-Reply-To: References: Message-ID: > JFileChooser.getSelectedFiles() failed to retrieve files with multi-selection and double-click. This occurs when a single file is selected then enable multi-selection then select the same file through mouse double-click(Two file chooser dialogs used before and after multi-selection enabled). SelectedFiles are updated when a change in files/directory selection is done or when selection is made through keyboard selection. In this case since a single file is selected before multi-selection is enabled and same file is selected again without changing the selection index/directory, leaving selected Files un-updated. > **Proposed Fix** : Whenever Multi-Selection is enabled check if any files are selected, if yes update the selected Files of JFileChoooser. Tejesh R has updated the pull request incrementally with one additional commit since the last revision: Updated based on review comments ------------- Changes: - all: https://git.openjdk.org/jdk/pull/9996/files - new: https://git.openjdk.org/jdk/pull/9996/files/1d7f271b..c437cdfc Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=9996&range=03 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=9996&range=02-03 Stats: 27 lines in 2 files changed: 2 ins; 15 del; 10 mod Patch: https://git.openjdk.org/jdk/pull/9996.diff Fetch: git fetch https://git.openjdk.org/jdk pull/9996/head:pull/9996 PR: https://git.openjdk.org/jdk/pull/9996 From tr at openjdk.org Fri Sep 9 08:12:46 2022 From: tr at openjdk.org (Tejesh R) Date: Fri, 9 Sep 2022 08:12:46 GMT Subject: RFR: 4834298: JFileChooser.getSelectedFiles() failed with multi-selection and double-click [v3] In-Reply-To: References: <87to_TWEwp56w4tmpqqSwY7DBxBoemZ4t5kZ2v_ebxo=.e604fc0e-d5a2-44d4-b9da-c4765af317af@github.com> <_usGkRuX1Jrds8aCy2udq6VAL7QY_6VxIO80-8C7TkM=.e6557ae5-92ac-455a-9704-5e0cef679dde@github.com> Message-ID: On Thu, 8 Sep 2022 11:49:36 GMT, Jayathirth D V wrote: >> Clearing the selection and setting it to null also solves the problem though. When we call clear selection, reset will happen and selectedFiles will be set. > > As discussed on call its better to clear selection when we move between multi-selection enabled/disabled as captured in https://github.com/openjdk/jdk/pull/9996#discussion_r965791205. > > Because using getSelectedFile() to update setSelectedFiles() might cause state management issues in some other scenarios. Yeah, I have updated as discussed on call and tested. ------------- PR: https://git.openjdk.org/jdk/pull/9996 From tr at openjdk.org Fri Sep 9 08:12:47 2022 From: tr at openjdk.org (Tejesh R) Date: Fri, 9 Sep 2022 08:12:47 GMT Subject: RFR: 4834298: JFileChooser.getSelectedFiles() failed with multi-selection and double-click [v3] In-Reply-To: References: <5ly-7MCOy5_-N5_cKwjASkTLo9uoUDTodkqByDQahZg=.d8e04260-67db-4031-a9d9-599381a6a468@github.com> Message-ID: On Thu, 8 Sep 2022 11:03:32 GMT, Jayathirth D V wrote: >> I guess the dialogue is not not been removed when exception is thrown. Will take a look into it. > > If the product fix that is being done will touch only Linux and Windows(And in Mac it looks like it not exiting properly), we can make this regression test to run only on Linux and Windows using jtreg tag: > @requires (os.family == "windows" | os.family == "linux") Updated. ------------- PR: https://git.openjdk.org/jdk/pull/9996 From tr at openjdk.org Fri Sep 9 08:12:50 2022 From: tr at openjdk.org (Tejesh R) Date: Fri, 9 Sep 2022 08:12:50 GMT Subject: RFR: 4834298: JFileChooser.getSelectedFiles() failed with multi-selection and double-click [v3] In-Reply-To: References: Message-ID: On Thu, 8 Sep 2022 09:51:57 GMT, Jayathirth D V wrote: >> Tejesh R has updated the pull request incrementally with one additional commit since the last revision: >> >> Updated based on review comments > > test/jdk/javax/swing/JFileChooser/MultiSelectionEnabledSelectedFilesTest.java line 56: > >> 54: static void runTest() { >> 55: //Initialize the components >> 56: String INSTRUCTIONS > > Instruction should be updated to specify that we need to use double-click. > Also when i select a file using double click in first and then select same file using double-click(without moving mouse) test doesnt exit. JFileChooser second dialog just stays on the screen. Updated. > test/jdk/javax/swing/JFileChooser/MultiSelectionEnabledSelectedFilesTest.java line 87: > >> 85: File[] files = chooser.getSelectedFiles(); >> 86: >> 87: if (files.length <= 0) { > > Can File[] length be negative? I think just a "==" to "0" check should suffice. Updated. ------------- PR: https://git.openjdk.org/jdk/pull/9996 From duke at openjdk.org Fri Sep 9 08:14:06 2022 From: duke at openjdk.org (Abhishek Kumar) Date: Fri, 9 Sep 2022 08:14:06 GMT Subject: RFR: 8288882: JFileChooser - empty (0 bytes) file is displayed as 1 KB [v26] In-Reply-To: References: Message-ID: <0qCFmGLsWZ9VO8hhO2S0ki-zUpqqBn--Ow7QZrbXW0k=.347077d5-f10d-4f25-a8dc-174d15e9f57a@github.com> On Thu, 8 Sep 2022 17:32:34 GMT, Alexey Ivanov wrote: >> Abhishek Kumar has updated the pull request incrementally with one additional commit since the last revision: >> >> Filesize calculation logic modified > > src/java.desktop/share/classes/sun/swing/FilePane.java line 1277: > >> 1275: DecimalFormat df = new DecimalFormat("0.0"); >> 1276: double val = fileSize/baseFileSize; >> 1277: return Double.valueOf(df.format(val)); > > The new code to round up looks difficult to understand (I mean the addition of 99 and re-worked if-conditions). I liked the previous version better. The only thing required to introduce rounding up is updating `roundToOneDecimalPlace`: > > > private static double roundToOneDecimalPlace(long fileSize) { > return Math.ceilDiv(fileSize, 100L) / 10.0d; > } > > > [`Math.ceilDiv`](https://docs.oracle.com/en/java/javase/18/docs/api/java.base/java/lang/Math.html#ceilDiv(long,long)) is available since Java 18. > > However, this code also works and is better suited for backporting: > > > private static double roundToOneDecimalPlace(long fileSize) { > return Math.ceil(fileSize / 100.0d) / 10.0d; > } > > Note that the first division is also floating point. > > With this implementation of `roundToOneDecimalPlace` and your code before the latest update which introduced `+99`, I get the expected size displayed in `JFileChooser`, that is rounded up if there's a non-zero remainder. Could you please verify that? I have checked with the suggested changes, it rounds up the value if the remainder is non-zero value. But for files >1000 bytes it doesn't return the file size similar to native file manager. FileChooser rounded up the values to next decimal precision. ![FC_FileSize_1](https://user-images.githubusercontent.com/107542245/189302260-f99d175a-133b-45ad-bdf0-52de06aacb7d.png) File sizes are not rounding up in all cases in native file system. For e.g. 1150 bytes file size is is 1.1 KB whereas 1151 bytes file size is 1.2 KB. ![Native_FIleSize](https://user-images.githubusercontent.com/107542245/189302284-55e48e72-c9c0-4abe-aa17-56190f2aeaee.png) To keep it consistent with the native file system for larger files (>1000 bytes), I tried using DecimalFormat. ------------- PR: https://git.openjdk.org/jdk/pull/9327 From tr at openjdk.org Fri Sep 9 08:14:33 2022 From: tr at openjdk.org (Tejesh R) Date: Fri, 9 Sep 2022 08:14:33 GMT Subject: RFR: 4834298: JFileChooser.getSelectedFiles() failed with multi-selection and double-click [v2] In-Reply-To: <5Y6GY-MycmJkFjgVOw7l9ysKuIgWKWVUZ5wwPz-YcU0=.92bf4183-78c0-42d1-b8c4-7cb4a1fe1866@github.com> References: <5Y6GY-MycmJkFjgVOw7l9ysKuIgWKWVUZ5wwPz-YcU0=.92bf4183-78c0-42d1-b8c4-7cb4a1fe1866@github.com> Message-ID: On Tue, 6 Sep 2022 11:07:09 GMT, Abhishek Kumar wrote: >> Tejesh R has updated the pull request incrementally with one additional commit since the last revision: >> >> Updated based on review comments > > I guess copyright year for FilePane.java needs to be updated. @kumarabhi006 U might have to re-review the PR as we have changed the logic. Previously the selected flies state was retained, now the state is been cleared on MultiSelection enabled/disabled switch. ------------- PR: https://git.openjdk.org/jdk/pull/9996 From duke at openjdk.org Fri Sep 9 09:06:48 2022 From: duke at openjdk.org (KIRIYAMA Takuya) Date: Fri, 9 Sep 2022 09:06:48 GMT Subject: RFR: 8292848: AWT_Mixing and TrayIcon tests fail on el8 with hard-coded isOel7 In-Reply-To: References: Message-ID: <8zkl2kX03CNZFOpKTvWi87Gq8a-s2_ObZcx1bzHWgGU=.eb218efd-eedc-4953-adec-18d9eb47b6d0@github.com> On Thu, 25 Aug 2022 18:56:59 GMT, Phil Race wrote: >> Could you please review the JDK-8292848 bug fixes? >> The purpose of the isOel7 method is to detect differences in GNOME version changes, and the isOel7 >> result should be true after version 8. >> I modified the isOel7 method to use regular expressions instead of hard-coded versions to be able to >> detect the new os version. >> I also changed the method name to match the new conditions. > > I guess this will do what was previously being done on OL7 .. but the way it is done it is fragile > and surely it can't be specific to OL .. and there's some pretty hokey adjustments going on in some of these tests. > I think some day these tests will need to be re-examined. @prrace Could you sponsor this pull request, please? ------------- PR: https://git.openjdk.org/jdk/pull/9995 From psadhukhan at openjdk.org Fri Sep 9 09:34:02 2022 From: psadhukhan at openjdk.org (Prasanta Sadhukhan) Date: Fri, 9 Sep 2022 09:34:02 GMT Subject: RFR: 7148092: [macosx] When Alt+down arrow key is pressed, the combobox popup does not appear. [v5] In-Reply-To: References: Message-ID: <03fLl5XUqUXveKPvSjtrRXjx7epMGAVeYgdhECk1iB4=.ca933754-196a-443b-b004-ce4393e62379@github.com> > When comboBox have focus, pressing Alt+Down (or Up) should render the popup which is not happening for Aqua L&F. > > Fix is to add toggleAction for Alt+Down/Up keys as has been done for [MetalLookAndFeel](https://github.com/openjdk/jdk/blob/master/src/java.desktop/share/classes/javax/swing/plaf/metal/MetalLookAndFeel.java#L912) > > closed problemlisted test is used to check the fix. Prasanta Sadhukhan has updated the pull request incrementally with one additional commit since the last revision: Test fix ------------- Changes: - all: https://git.openjdk.org/jdk/pull/10014/files - new: https://git.openjdk.org/jdk/pull/10014/files/180f73d3..925c37d1 Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=10014&range=04 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=10014&range=03-04 Stats: 1 line in 1 file changed: 0 ins; 0 del; 1 mod Patch: https://git.openjdk.org/jdk/pull/10014.diff Fetch: git fetch https://git.openjdk.org/jdk pull/10014/head:pull/10014 PR: https://git.openjdk.org/jdk/pull/10014 From jdv at openjdk.org Fri Sep 9 11:08:05 2022 From: jdv at openjdk.org (Jayathirth D V) Date: Fri, 9 Sep 2022 11:08:05 GMT Subject: RFR: 4834298: JFileChooser.getSelectedFiles() failed with multi-selection and double-click [v2] In-Reply-To: References: <5Y6GY-MycmJkFjgVOw7l9ysKuIgWKWVUZ5wwPz-YcU0=.92bf4183-78c0-42d1-b8c4-7cb4a1fe1866@github.com> Message-ID: On Fri, 9 Sep 2022 08:11:47 GMT, Tejesh R wrote: >> I guess copyright year for FilePane.java needs to be updated. > > @kumarabhi006 U might have to re-review the PR as we have changed the logic. Previously the selected flies state was retained, now the state is been cleared on MultiSelection enabled/disabled switch. @TejeshR13 I see some test failures in latest CI job like javax/swing/JTree/4618767/JTreeSelectedElementTest.java. Have you verified these are not regressions introduced by this change? ------------- PR: https://git.openjdk.org/jdk/pull/9996 From tr at openjdk.org Fri Sep 9 11:08:06 2022 From: tr at openjdk.org (Tejesh R) Date: Fri, 9 Sep 2022 11:08:06 GMT Subject: RFR: 4834298: JFileChooser.getSelectedFiles() failed with multi-selection and double-click [v2] In-Reply-To: References: <5Y6GY-MycmJkFjgVOw7l9ysKuIgWKWVUZ5wwPz-YcU0=.92bf4183-78c0-42d1-b8c4-7cb4a1fe1866@github.com> Message-ID: <6PJllq1vqYfYaSVm-ujBg3tFPGqttm7WB9kzMVGLKls=.f2baace9-bccd-4eca-91dd-da8d5a571f17@github.com> On Fri, 9 Sep 2022 08:11:47 GMT, Tejesh R wrote: >> I guess copyright year for FilePane.java needs to be updated. > > @kumarabhi006 U might have to re-review the PR as we have changed the logic. Previously the selected flies state was retained, now the state is been cleared on MultiSelection enabled/disabled switch. > @TejeshR13 I see some test failures in latest CI job like javax/swing/JTree/4618767/JTreeSelectedElementTest.java. Have you verified these are not regressions introduced by this change? Yeah, those tests are failing without my changes too, so confirmed that it wasn't from my change. ------------- PR: https://git.openjdk.org/jdk/pull/9996 From jdv at openjdk.org Fri Sep 9 11:19:02 2022 From: jdv at openjdk.org (Jayathirth D V) Date: Fri, 9 Sep 2022 11:19:02 GMT Subject: RFR: 4834298: JFileChooser.getSelectedFiles() failed with multi-selection and double-click [v2] In-Reply-To: <6PJllq1vqYfYaSVm-ujBg3tFPGqttm7WB9kzMVGLKls=.f2baace9-bccd-4eca-91dd-da8d5a571f17@github.com> References: <5Y6GY-MycmJkFjgVOw7l9ysKuIgWKWVUZ5wwPz-YcU0=.92bf4183-78c0-42d1-b8c4-7cb4a1fe1866@github.com> <6PJllq1vqYfYaSVm-ujBg3tFPGqttm7WB9kzMVGLKls=.f2baace9-bccd-4eca-91dd-da8d5a571f17@github.com> Message-ID: <-x5W_XBp5PMR7DHa4BvPjBTwVrl-mGLToLuWI6Npf0M=.a13038fb-1102-46e5-adb8-bf18881bf54f@github.com> On Fri, 9 Sep 2022 11:05:09 GMT, Tejesh R wrote: > > @TejeshR13 I see some test failures in latest CI job like javax/swing/JTree/4618767/JTreeSelectedElementTest.java. Have you verified these are not regressions introduced by this change? > > Yeah, those tests are failing without my changes too, so confirmed that it wasn't from my change. Some tests are failing without my fix also, so to ensure that my fix doesn't cause any regression I have tested without my fix and shared the link in JBS. Thanks for adding CI run without fix also in JBS. LGTM. ------------- PR: https://git.openjdk.org/jdk/pull/9996 From jdv at openjdk.org Fri Sep 9 11:34:40 2022 From: jdv at openjdk.org (Jayathirth D V) Date: Fri, 9 Sep 2022 11:34:40 GMT Subject: RFR: 4834298: JFileChooser.getSelectedFiles() failed with multi-selection and double-click [v4] In-Reply-To: References: Message-ID: On Fri, 9 Sep 2022 08:12:45 GMT, Tejesh R wrote: >> JFileChooser.getSelectedFiles() failed to retrieve files with multi-selection and double-click. This occurs when a single file is selected then enable multi-selection then select the same file through mouse double-click(Two file chooser dialogs used before and after multi-selection enabled). SelectedFiles are updated when a change in files/directory selection is done or when selection is made through keyboard selection. In this case since a single file is selected before multi-selection is enabled and same file is selected again without changing the selection index/directory, leaving selected Files un-updated. >> **Proposed Fix** : Whenever Multi-Selection is enabled check if any files are selected, if yes update the selected Files of JFileChoooser. > > Tejesh R has updated the pull request incrementally with one additional commit since the last revision: > > Updated based on review comments Marked as reviewed by jdv (Reviewer). ------------- PR: https://git.openjdk.org/jdk/pull/9996 From duke at openjdk.org Fri Sep 9 11:34:42 2022 From: duke at openjdk.org (Abhishek Kumar) Date: Fri, 9 Sep 2022 11:34:42 GMT Subject: RFR: 4834298: JFileChooser.getSelectedFiles() failed with multi-selection and double-click [v2] In-Reply-To: <5Y6GY-MycmJkFjgVOw7l9ysKuIgWKWVUZ5wwPz-YcU0=.92bf4183-78c0-42d1-b8c4-7cb4a1fe1866@github.com> References: <5Y6GY-MycmJkFjgVOw7l9ysKuIgWKWVUZ5wwPz-YcU0=.92bf4183-78c0-42d1-b8c4-7cb4a1fe1866@github.com> Message-ID: On Tue, 6 Sep 2022 11:07:09 GMT, Abhishek Kumar wrote: >> Tejesh R has updated the pull request incrementally with one additional commit since the last revision: >> >> Updated based on review comments > > I guess copyright year for FilePane.java needs to be updated. > @kumarabhi006 U might have to re-review the PR as we have changed the logic. Previously the selected flies state was retained, now the state is been cleared on MultiSelection enabled/disabled switch. Applied the patch and tested, attached test case is passed with your recent fix. ------------- PR: https://git.openjdk.org/jdk/pull/9996 From mdoerr at openjdk.org Fri Sep 9 15:49:57 2022 From: mdoerr at openjdk.org (Martin Doerr) Date: Fri, 9 Sep 2022 15:49:57 GMT Subject: RFR: JDK-8292866: Java_sun_awt_shell_Win32ShellFolder2_getLinkLocation check MultiByteToWideChar return value for failures [v2] In-Reply-To: References: Message-ID: On Fri, 26 Aug 2022 07:54:24 GMT, Matthias Baesken wrote: >> https://docs.microsoft.com/en-us/windows/win32/api/stringapiset/nf-stringapiset-multibytetowidechar >> states about MultiByteToWideChar : "The function returns 0 if it does not succeed" and lists a few failure cases. >> However we miss checking the failure case in Java_sun_awt_shell_Win32ShellFolder2_getLinkLocation , seems we assume the function always works nicely (in most of the JDK coding the return value is checked ). > > Matthias Baesken has updated the pull request incrementally with one additional commit since the last revision: > > Adjust added return syntax This version LGTM. ------------- Marked as reviewed by mdoerr (Reviewer). PR: https://git.openjdk.org/jdk/pull/10015 From duke at openjdk.org Fri Sep 9 17:24:17 2022 From: duke at openjdk.org (Abhishek Kumar) Date: Fri, 9 Sep 2022 17:24:17 GMT Subject: RFR: 8288882: JFileChooser - empty (0 bytes) file is displayed as 1 KB [v27] In-Reply-To: References: Message-ID: > JFileChooser - empty file size issue fixed. > For empty file, now the size 0 KB. > Manual Test Case "FileSizeCheck.java" created. Abhishek Kumar has updated the pull request incrementally with one additional commit since the last revision: Review comments fix ------------- Changes: - all: https://git.openjdk.org/jdk/pull/9327/files - new: https://git.openjdk.org/jdk/pull/9327/files/cea398f5..99224c1c Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=9327&range=26 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=9327&range=25-26 Stats: 33 lines in 1 file changed: 2 ins; 20 del; 11 mod Patch: https://git.openjdk.org/jdk/pull/9327.diff Fetch: git fetch https://git.openjdk.org/jdk pull/9327/head:pull/9327 PR: https://git.openjdk.org/jdk/pull/9327 From duke at openjdk.org Fri Sep 9 17:24:17 2022 From: duke at openjdk.org (Abhishek Kumar) Date: Fri, 9 Sep 2022 17:24:17 GMT Subject: RFR: 8288882: JFileChooser - empty (0 bytes) file is displayed as 1 KB [v26] In-Reply-To: References: Message-ID: <8UehoJHcX3siRRz4chDJOcxnxAmfbGoKqcDelYlhM0Q=.425a5eb4-2ad8-427f-87d0-c10c8dcf07ea@github.com> On Fri, 2 Sep 2022 11:12:53 GMT, Abhishek Kumar wrote: >> JFileChooser - empty file size issue fixed. >> For empty file, now the size 0 KB. >> Manual Test Case "FileSizeCheck.java" created. > > Abhishek Kumar has updated the pull request incrementally with one additional commit since the last revision: > > Filesize calculation logic modified Updated as per review comments ------------- PR: https://git.openjdk.org/jdk/pull/9327 From honkar at openjdk.org Fri Sep 9 23:18:05 2022 From: honkar at openjdk.org (Harshitha Onkar) Date: Fri, 9 Sep 2022 23:18:05 GMT Subject: RFR: 8054572: [macosx] JComboBox paints the border incorrectly [v8] In-Reply-To: <9GipfZodYw6JMprg7PAn2ysOARY6uqNRgkzQQi57ugE=.fab92818-9a2a-4b8c-b670-fca1d53206af@github.com> References: <-qF2JbwHypKtIsUXDE-lb7efmsC8-_jTjR_VrPYS_44=.514a5514-f2c1-4fa6-8b83-40f476660f5c@github.com> <9GipfZodYw6JMprg7PAn2ysOARY6uqNRgkzQQi57ugE=.fab92818-9a2a-4b8c-b670-fca1d53206af@github.com> Message-ID: On Fri, 9 Sep 2022 23:13:57 GMT, Damon Nguyen wrote: >> When a JComboBox is editable, the button segment of the combo box is misaligned vertically and has a different height. This change fixes these issues and adds a manual test that checks the appearance of an editable and non-editable JComboBox. >> >> One of the discussions revolving this issue is the native macOS appearance of editable JComboBoxes. After looking through native macOS apps, the only one found is in System Preferences > Date & Time. The problem here is that the native equivalent found here uses a blue button with a single down arrow as the button's symbol. The current swing implementation uses a white button with an up & down arrow symbol for the button. A JRS widget button that has this blue button with a single downward arrow exists but does not support text fields. >> >> As such, I believe the best fix for this issue is to mainly fix the alignment and sizing issue. I looked through Apple's documentation for these UI elements but editable JComboBoxes aren't specifically listed anywhere. Similarly, there's barely any editable JComboBoxes used in native mac apps (only the date & time). So, I don't think it's a major issue if JComboBox does not exactly match the example found in Date & Time. > > Damon Nguyen has updated the pull request incrementally with one additional commit since the last revision: > > Reordered set visible Marked as reviewed by honkar (Author). ------------- PR: https://git.openjdk.org/jdk/pull/9473 From dnguyen at openjdk.org Fri Sep 9 23:18:05 2022 From: dnguyen at openjdk.org (Damon Nguyen) Date: Fri, 9 Sep 2022 23:18:05 GMT Subject: RFR: 8054572: [macosx] JComboBox paints the border incorrectly [v8] In-Reply-To: <-qF2JbwHypKtIsUXDE-lb7efmsC8-_jTjR_VrPYS_44=.514a5514-f2c1-4fa6-8b83-40f476660f5c@github.com> References: <-qF2JbwHypKtIsUXDE-lb7efmsC8-_jTjR_VrPYS_44=.514a5514-f2c1-4fa6-8b83-40f476660f5c@github.com> Message-ID: <9GipfZodYw6JMprg7PAn2ysOARY6uqNRgkzQQi57ugE=.fab92818-9a2a-4b8c-b670-fca1d53206af@github.com> > When a JComboBox is editable, the button segment of the combo box is misaligned vertically and has a different height. This change fixes these issues and adds a manual test that checks the appearance of an editable and non-editable JComboBox. > > One of the discussions revolving this issue is the native macOS appearance of editable JComboBoxes. After looking through native macOS apps, the only one found is in System Preferences > Date & Time. The problem here is that the native equivalent found here uses a blue button with a single down arrow as the button's symbol. The current swing implementation uses a white button with an up & down arrow symbol for the button. A JRS widget button that has this blue button with a single downward arrow exists but does not support text fields. > > As such, I believe the best fix for this issue is to mainly fix the alignment and sizing issue. I looked through Apple's documentation for these UI elements but editable JComboBoxes aren't specifically listed anywhere. Similarly, there's barely any editable JComboBoxes used in native mac apps (only the date & time). So, I don't think it's a major issue if JComboBox does not exactly match the example found in Date & Time. Damon Nguyen has updated the pull request incrementally with one additional commit since the last revision: Reordered set visible ------------- Changes: - all: https://git.openjdk.org/jdk/pull/9473/files - new: https://git.openjdk.org/jdk/pull/9473/files/0eae1016..6fec827e Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=9473&range=07 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=9473&range=06-07 Stats: 6 lines in 1 file changed: 2 ins; 2 del; 2 mod Patch: https://git.openjdk.org/jdk/pull/9473.diff Fetch: git fetch https://git.openjdk.org/jdk pull/9473/head:pull/9473 PR: https://git.openjdk.org/jdk/pull/9473 From dnguyen at openjdk.org Fri Sep 9 23:18:05 2022 From: dnguyen at openjdk.org (Damon Nguyen) Date: Fri, 9 Sep 2022 23:18:05 GMT Subject: RFR: 8054572: [macosx] JComboBox paints the border incorrectly [v7] In-Reply-To: References: <-qF2JbwHypKtIsUXDE-lb7efmsC8-_jTjR_VrPYS_44=.514a5514-f2c1-4fa6-8b83-40f476660f5c@github.com> Message-ID: On Thu, 8 Sep 2022 21:07:49 GMT, Harshitha Onkar wrote: >> Damon Nguyen has updated the pull request incrementally with one additional commit since the last revision: >> >> Updated copyright date. Added MacOS text to test. > > test/jdk/javax/swing/JComboBox/JComboBoxBorderTest.java line 74: > >> 72: frame = new JFrame(); >> 73: frame.getContentPane().add(panel); >> 74: frame.setVisible(true); > > @DamonGuy To avoid flickering of the test frame move `frame.setVisible(true)` after `PassFailJFrame.positionTestWindow()` Updated. Thanks, will note for the future. ------------- PR: https://git.openjdk.org/jdk/pull/9473 From duke at openjdk.org Sat Sep 10 13:37:57 2022 From: duke at openjdk.org (ScientificWare) Date: Sat, 10 Sep 2022 13:37:57 GMT Subject: RFR: JDK-8292276 : Missing color names in CSS [v14] In-Reply-To: References: Message-ID: > This is referenced in Java Bug Database as > - [JDK-8292276 : Missing color names in CSS](https://bugs.java.com/bugdatabase/view_bug.do?bug_id=8292276) > > This is tracked in JBS as > - [JDK-8292276 : Missing color names in CSS](https://bugs.openjdk.java.net/browse/JDK-8292276) > > Adds missing color names, defined by CSS Level 4, in CSS.java : > CSS Color Module Level 4 > W3C Candidate Recommendation Snapshot, 5 July 2022 > [7.1 Named Colors](https://www.w3.org/TR/css-color-4/#named-color) > > Designed from : [ScientificWare JDK-8292276 : Missing color names in CSS](https://github.com/scientificware/jdk/issues/12) ScientificWare has updated the pull request incrementally with one additional commit since the last revision: Error in comment. Sync. comment with code : "fails ... if stringToColor(null) doesn't return null". ------------- Changes: - all: https://git.openjdk.org/jdk/pull/9825/files - new: https://git.openjdk.org/jdk/pull/9825/files/c606d8bf..978ad292 Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=9825&range=13 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=9825&range=12-13 Stats: 1 line in 1 file changed: 0 ins; 0 del; 1 mod Patch: https://git.openjdk.org/jdk/pull/9825.diff Fetch: git fetch https://git.openjdk.org/jdk pull/9825/head:pull/9825 PR: https://git.openjdk.org/jdk/pull/9825 From stuefe at openjdk.org Sun Sep 11 06:20:45 2022 From: stuefe at openjdk.org (Thomas Stuefe) Date: Sun, 11 Sep 2022 06:20:45 GMT Subject: RFR: JDK-8292866: Java_sun_awt_shell_Win32ShellFolder2_getLinkLocation check MultiByteToWideChar return value for failures [v2] In-Reply-To: References: Message-ID: On Fri, 26 Aug 2022 07:54:24 GMT, Matthias Baesken wrote: >> https://docs.microsoft.com/en-us/windows/win32/api/stringapiset/nf-stringapiset-multibytetowidechar >> states about MultiByteToWideChar : "The function returns 0 if it does not succeed" and lists a few failure cases. >> However we miss checking the failure case in Java_sun_awt_shell_Win32ShellFolder2_getLinkLocation , seems we assume the function always works nicely (in most of the JDK coding the return value is checked ). > > Matthias Baesken has updated the pull request incrementally with one additional commit since the last revision: > > Adjust added return syntax LGTM ------------- Marked as reviewed by stuefe (Reviewer). PR: https://git.openjdk.org/jdk/pull/10015 From duke at openjdk.org Mon Sep 12 05:31:46 2022 From: duke at openjdk.org (Stanimir Stamenkov) Date: Mon, 12 Sep 2022 05:31:46 GMT Subject: RFR: 8292948: JEditorPane ignores font-size styles in external linked css-file [v3] In-Reply-To: References: Message-ID: <7lFEiyBO3ip7lIq_WpkwFkTnY7KOaIog3FJze9-L8vg=.1ae6f9c7-bea8-437e-873e-e8b920d7c67e@github.com> On Fri, 2 Sep 2022 07:13:20 GMT, Prasanta Sadhukhan wrote: >> Stanimir Stamenkov has updated the pull request incrementally with seven additional commits since the last revision: >> >> - 8292948: Make captureImage() an instance method >> >> Use just the instance editor component. >> - 8292948: Use bigger/different base font than the default >> >> Make potential discrepancies with not resolving the base more obvious. >> - 8292948: Make the setUp(), run/verify() sequence invocation explicit >> >> Simplify overall setup. >> - 8292948: Avoid failing to save image capture when editor == null >> >> The failure to save the image suppresses the original failure. >> - 8292948: Capitalize messages >> - 8292948: Resolve test HTML file from the classpath >> >> Don't rely on the current working directory. >> - 8292948: Adjust @summary > > Marked as reviewed by psadhukhan (Reviewer). If there are no other reviewers, @prsadhuk, would you sponsor this change? ------------- PR: https://git.openjdk.org/jdk/pull/10054 From mbaesken at openjdk.org Mon Sep 12 06:45:07 2022 From: mbaesken at openjdk.org (Matthias Baesken) Date: Mon, 12 Sep 2022 06:45:07 GMT Subject: RFR: JDK-8292866: Java_sun_awt_shell_Win32ShellFolder2_getLinkLocation check MultiByteToWideChar return value for failures [v2] In-Reply-To: References: Message-ID: On Fri, 26 Aug 2022 07:54:24 GMT, Matthias Baesken wrote: >> https://docs.microsoft.com/en-us/windows/win32/api/stringapiset/nf-stringapiset-multibytetowidechar >> states about MultiByteToWideChar : "The function returns 0 if it does not succeed" and lists a few failure cases. >> However we miss checking the failure case in Java_sun_awt_shell_Win32ShellFolder2_getLinkLocation , seems we assume the function always works nicely (in most of the JDK coding the return value is checked ). > > Matthias Baesken has updated the pull request incrementally with one additional commit since the last revision: > > Adjust added return syntax Hi , thanks for the reviews ! ------------- PR: https://git.openjdk.org/jdk/pull/10015 From mbaesken at openjdk.org Mon Sep 12 06:45:08 2022 From: mbaesken at openjdk.org (Matthias Baesken) Date: Mon, 12 Sep 2022 06:45:08 GMT Subject: Integrated: JDK-8292866: Java_sun_awt_shell_Win32ShellFolder2_getLinkLocation check MultiByteToWideChar return value for failures In-Reply-To: References: Message-ID: On Thu, 25 Aug 2022 08:02:00 GMT, Matthias Baesken wrote: > https://docs.microsoft.com/en-us/windows/win32/api/stringapiset/nf-stringapiset-multibytetowidechar > states about MultiByteToWideChar : "The function returns 0 if it does not succeed" and lists a few failure cases. > However we miss checking the failure case in Java_sun_awt_shell_Win32ShellFolder2_getLinkLocation , seems we assume the function always works nicely (in most of the JDK coding the return value is checked ). This pull request has now been integrated. Changeset: 699c4296 Author: Matthias Baesken URL: https://git.openjdk.org/jdk/commit/699c42962eeaa6aa950ad86c2dd1f77316a1da3e Stats: 10 lines in 1 file changed: 7 ins; 0 del; 3 mod 8292866: Java_sun_awt_shell_Win32ShellFolder2_getLinkLocation check MultiByteToWideChar return value for failures Reviewed-by: mdoerr, stuefe ------------- PR: https://git.openjdk.org/jdk/pull/10015 From aivanov at openjdk.org Mon Sep 12 10:47:07 2022 From: aivanov at openjdk.org (Alexey Ivanov) Date: Mon, 12 Sep 2022 10:47:07 GMT Subject: RFR: 8288882: JFileChooser - empty (0 bytes) file is displayed as 1 KB [v27] In-Reply-To: References: Message-ID: On Fri, 9 Sep 2022 17:24:17 GMT, Abhishek Kumar wrote: >> JFileChooser - empty file size issue fixed. >> For empty file, now the size 0 KB. >> Manual Test Case "FileSizeCheck.java" created. > > Abhishek Kumar has updated the pull request incrementally with one additional commit since the last revision: > > Review comments fix Changes requested by aivanov (Reviewer). src/java.desktop/share/classes/sun/swing/FilePane.java line 59: > 57: import java.io.FileNotFoundException; > 58: import java.text.DateFormat; > 59: import java.text.DecimalFormat; `DecimalFormat` has become unused. src/java.desktop/share/classes/sun/swing/FilePane.java line 1212: > 1210: if (listViewWindowsStyle) { > 1211: updateMessageFormatPattern(kiloByteString); > 1212: displayedFileSize[0] = roundToOneDecimalPlace(len); Does it correctly display the file sizes when `listViewWindowsStyle` is `true`? ------------- PR: https://git.openjdk.org/jdk/pull/9327 From aivanov at openjdk.org Mon Sep 12 10:57:59 2022 From: aivanov at openjdk.org (Alexey Ivanov) Date: Mon, 12 Sep 2022 10:57:59 GMT Subject: RFR: 8288882: JFileChooser - empty (0 bytes) file is displayed as 1 KB [v27] In-Reply-To: References: Message-ID: On Fri, 9 Sep 2022 17:24:17 GMT, Abhishek Kumar wrote: >> JFileChooser - empty file size issue fixed. >> For empty file, now the size 0 KB. >> Manual Test Case "FileSizeCheck.java" created. > > Abhishek Kumar has updated the pull request incrementally with one additional commit since the last revision: > > Review comments fix With lots of comments, it has become hard to see the changes in the code. The updated code in `FilePane.java`: * [File size formatting](https://github.com/openjdk/jdk/blob/99224c1c9c82aa2882f001cfd5bf9597c871b4b3/src/java.desktop/share/classes/sun/swing/FilePane.java#L1198-L1231) * Helper method [`updateMessageFormatPattern`](https://github.com/openjdk/jdk/blob/99224c1c9c82aa2882f001cfd5bf9597c871b4b3/src/java.desktop/share/classes/sun/swing/FilePane.java#L1245-L1248) * Helper method [`roundToOneDecimalPlace`](https://github.com/openjdk/jdk/blob/99224c1c9c82aa2882f001cfd5bf9597c871b4b3/src/java.desktop/share/classes/sun/swing/FilePane.java#L1258-L1260) The links above are anchored to Abhishek's latest commit: [99224c1](https://github.com/openjdk/jdk/pull/9327/commits/99224c1c9c82aa2882f001cfd5bf9597c871b4b3) on Sep 9. ------------- PR: https://git.openjdk.org/jdk/pull/9327 From aivanov at openjdk.org Mon Sep 12 11:05:15 2022 From: aivanov at openjdk.org (Alexey Ivanov) Date: Mon, 12 Sep 2022 11:05:15 GMT Subject: RFR: 8288882: JFileChooser - empty (0 bytes) file is displayed as 1 KB [v26] In-Reply-To: <0qCFmGLsWZ9VO8hhO2S0ki-zUpqqBn--Ow7QZrbXW0k=.347077d5-f10d-4f25-a8dc-174d15e9f57a@github.com> References: <0qCFmGLsWZ9VO8hhO2S0ki-zUpqqBn--Ow7QZrbXW0k=.347077d5-f10d-4f25-a8dc-174d15e9f57a@github.com> Message-ID: On Fri, 9 Sep 2022 08:11:56 GMT, Abhishek Kumar wrote: >> src/java.desktop/share/classes/sun/swing/FilePane.java line 1277: >> >>> 1275: DecimalFormat df = new DecimalFormat("0.0"); >>> 1276: double val = fileSize/baseFileSize; >>> 1277: return Double.valueOf(df.format(val)); >> >> The new code to round up looks difficult to understand (I mean the addition of 99 and re-worked if-conditions). I liked the previous version better. The only thing required to introduce rounding up is updating `roundToOneDecimalPlace`: >> >> >> private static double roundToOneDecimalPlace(long fileSize) { >> return Math.ceilDiv(fileSize, 100L) / 10.0d; >> } >> >> >> [`Math.ceilDiv`](https://docs.oracle.com/en/java/javase/18/docs/api/java.base/java/lang/Math.html#ceilDiv(long,long)) is available since Java 18. >> >> However, this code also works and is better suited for backporting: >> >> >> private static double roundToOneDecimalPlace(long fileSize) { >> return Math.ceil(fileSize / 100.0d) / 10.0d; >> } >> >> Note that the first division is also floating point. >> >> With this implementation of `roundToOneDecimalPlace` and your code before the latest update which introduced `+99`, I get the expected size displayed in `JFileChooser`, that is rounded up if there's a non-zero remainder. Could you please verify that? > > I have checked with the suggested changes, it rounds up the value if the remainder is non-zero value. > But for files >1000 bytes it doesn't return the file size similar to native file manager. > > FileChooser rounded up the values to next decimal precision. > ![FC_FileSize_1](https://user-images.githubusercontent.com/107542245/189302260-f99d175a-133b-45ad-bdf0-52de06aacb7d.png) > > File sizes are not rounding up in all cases in native file system. For e.g. 1150 bytes file size is is 1.1 KB whereas 1151 bytes file size is 1.2 KB. > ![Native_FIleSize](https://user-images.githubusercontent.com/107542245/189302284-55e48e72-c9c0-4abe-aa17-56190f2aeaee.png) > > To keep it consistent with the native file system for larger files (>1000 bytes), I tried using DecimalFormat. To clarify: Abhishek and I were discussing the approach, it's still *inconsistent* in the same way: the file size was rounded up if it's less than 1 KB, but rounded (down) if it's larger. The native file manager in Ubuntu rounds the file size. `JFileChooser` does not display bytes that's why we round up the size. To avoid confusion, the size displayed in `JFileChooser` is always rounded up as Phil @prrace suggested. ------------- PR: https://git.openjdk.org/jdk/pull/9327 From psadhukhan at openjdk.org Mon Sep 12 11:47:36 2022 From: psadhukhan at openjdk.org (Prasanta Sadhukhan) Date: Mon, 12 Sep 2022 11:47:36 GMT Subject: RFR: 5074006: Swing JOptionPane shows tag as a string after newline [v2] In-Reply-To: References: Message-ID: <2BmZo0HFOMAvei4VnM5WPD_BoIauCM1nyhnuipD8oV0=.a4b8b627-6d68-4789-99b8-bdd09c8a9cf0@github.com> > If JOptionPane's message contains both linefeed/cursor return and HTML tag ie, **" + "This is a test\n" + "**, > then "" will be shown in the JOptionPane dialog box because after every new line it creates a new messageComponent so the characters after the newline ie ""tag will be considered as a new JLabel string and displayed. > > Fix is to ignore closing html tag if appearing after newline from the displayed string. Prasanta Sadhukhan has updated the pull request incrementally with one additional commit since the last revision: Fix handling HTML message ------------- Changes: - all: https://git.openjdk.org/jdk/pull/10081/files - new: https://git.openjdk.org/jdk/pull/10081/files/deba74f3..2b00d425 Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=10081&range=01 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=10081&range=00-01 Stats: 93 lines in 1 file changed: 50 ins; 35 del; 8 mod Patch: https://git.openjdk.org/jdk/pull/10081.diff Fetch: git fetch https://git.openjdk.org/jdk pull/10081/head:pull/10081 PR: https://git.openjdk.org/jdk/pull/10081 From psadhukhan at openjdk.org Mon Sep 12 11:57:20 2022 From: psadhukhan at openjdk.org (Prasanta Sadhukhan) Date: Mon, 12 Sep 2022 11:57:20 GMT Subject: RFR: 6529151: NullPointerException in swing.plaf.synth.SynthLookAndFeel$Handler [v3] In-Reply-To: References: Message-ID: > NPE is thrown for closed/disposed JDialogs after uninstalling the UI which is because for SynthEditorPaneUI even though is disposed of, Nimbus propertyHandler tries to get the style of this disposed component resulting in NPE, > which is fixed by a null check to prevent deferencing style object to get the color. Prasanta Sadhukhan has updated the pull request incrementally with one additional commit since the last revision: Test made headful ------------- Changes: - all: https://git.openjdk.org/jdk/pull/10167/files - new: https://git.openjdk.org/jdk/pull/10167/files/f62d58b9..8c378448 Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=10167&range=02 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=10167&range=01-02 Stats: 1 line in 1 file changed: 1 ins; 0 del; 0 mod Patch: https://git.openjdk.org/jdk/pull/10167.diff Fetch: git fetch https://git.openjdk.org/jdk pull/10167/head:pull/10167 PR: https://git.openjdk.org/jdk/pull/10167 From psadhukhan at openjdk.org Mon Sep 12 11:58:52 2022 From: psadhukhan at openjdk.org (Prasanta Sadhukhan) Date: Mon, 12 Sep 2022 11:58:52 GMT Subject: Integrated: 6529151: NullPointerException in swing.plaf.synth.SynthLookAndFeel$Handler In-Reply-To: References: Message-ID: On Mon, 5 Sep 2022 12:45:53 GMT, Prasanta Sadhukhan wrote: > NPE is thrown for closed/disposed JDialogs after uninstalling the UI which is because for SynthEditorPaneUI even though is disposed of, Nimbus propertyHandler tries to get the style of this disposed component resulting in NPE, > which is fixed by a null check to prevent deferencing style object to get the color. This pull request has now been integrated. Changeset: 4c77bd32 Author: Prasanta Sadhukhan URL: https://git.openjdk.org/jdk/commit/4c77bd32a0d2cfbdd15e58a9b48f6952d52e7156 Stats: 127 lines in 2 files changed: 127 ins; 0 del; 0 mod 6529151: NullPointerException in swing.plaf.synth.SynthLookAndFeel$Handler Reviewed-by: serb, dnguyen ------------- PR: https://git.openjdk.org/jdk/pull/10167 From aivanov at openjdk.org Mon Sep 12 15:45:43 2022 From: aivanov at openjdk.org (Alexey Ivanov) Date: Mon, 12 Sep 2022 15:45:43 GMT Subject: RFR: 8292738 : JInternalFrame backgroundShadowBorder & foregroundShadowBorder line is longer in Mac Look and Feel In-Reply-To: References: Message-ID: On Mon, 22 Aug 2022 21:20:54 GMT, lawrence.andrews wrote: > Border line is seen outside round Rectangle both for JInternalFrame backgroundShadowBorder & foregroundShadowBorder line in mac L&F. > ![Screen Shot 2022-08-22 at 4 17 49 PM](https://user-images.githubusercontent.com/87324768/186021010-d21aed21-9e05-4b28-846b-2628e367f183.png) > > I have circled the extra part of the line. To make it more visible I changed the color of the backgroundShadowBorder to red > ![Screen Shot 2022-08-22 at 4 17 37 PM](https://user-images.githubusercontent.com/87324768/186021095-cbfffdba-d43a-47e7-a50b-551c59cb767b.png) > > Fixed the extra length of the line > ![Fixed](https://user-images.githubusercontent.com/87324768/186021195-688c3613-fc50-41c3-8cad-94173385dfeb.png) Marked as reviewed by aivanov (Reviewer). ------------- PR: https://git.openjdk.org/jdk/pull/9971 From duke at openjdk.org Mon Sep 12 15:54:53 2022 From: duke at openjdk.org (lawrence.andrews) Date: Mon, 12 Sep 2022 15:54:53 GMT Subject: Integrated: 8292738 : JInternalFrame backgroundShadowBorder & foregroundShadowBorder line is longer in Mac Look and Feel In-Reply-To: References: Message-ID: On Mon, 22 Aug 2022 21:20:54 GMT, lawrence.andrews wrote: > Border line is seen outside round Rectangle both for JInternalFrame backgroundShadowBorder & foregroundShadowBorder line in mac L&F. > ![Screen Shot 2022-08-22 at 4 17 49 PM](https://user-images.githubusercontent.com/87324768/186021010-d21aed21-9e05-4b28-846b-2628e367f183.png) > > I have circled the extra part of the line. To make it more visible I changed the color of the backgroundShadowBorder to red > ![Screen Shot 2022-08-22 at 4 17 37 PM](https://user-images.githubusercontent.com/87324768/186021095-cbfffdba-d43a-47e7-a50b-551c59cb767b.png) > > Fixed the extra length of the line > ![Fixed](https://user-images.githubusercontent.com/87324768/186021195-688c3613-fc50-41c3-8cad-94173385dfeb.png) This pull request has now been integrated. Changeset: cea409cc Author: lawrence.andrews Committer: Alexey Ivanov URL: https://git.openjdk.org/jdk/commit/cea409cc2822ccdc9cbf6df04d46742e3c73b0fe Stats: 2 lines in 1 file changed: 0 ins; 0 del; 2 mod 8292738: JInternalFrame backgroundShadowBorder & foregroundShadowBorder line is longer in Mac Look and Feel Reviewed-by: serb, aivanov ------------- PR: https://git.openjdk.org/jdk/pull/9971 From aivanov at openjdk.org Mon Sep 12 19:52:49 2022 From: aivanov at openjdk.org (Alexey Ivanov) Date: Mon, 12 Sep 2022 19:52:49 GMT Subject: RFR: JDK-8292276 : Missing color names in CSS [v14] In-Reply-To: References: Message-ID: <0aVa8Lbf6gm9jrbAqC_uzqr0HeMwMZIN7KW8fY6KQEQ=.8a320dc0-ce8e-4c95-9c24-55bc93d09882@github.com> On Sat, 10 Sep 2022 13:37:57 GMT, ScientificWare wrote: >> This is referenced in Java Bug Database as >> - [JDK-8292276 : Missing color names in CSS](https://bugs.java.com/bugdatabase/view_bug.do?bug_id=8292276) >> >> This is tracked in JBS as >> - [JDK-8292276 : Missing color names in CSS](https://bugs.openjdk.java.net/browse/JDK-8292276) >> >> Adds missing color names, defined by CSS Level 4, in CSS.java : >> CSS Color Module Level 4 >> W3C Candidate Recommendation Snapshot, 5 July 2022 >> [7.1 Named Colors](https://www.w3.org/TR/css-color-4/#named-color) >> >> Designed from : [ScientificWare JDK-8292276 : Missing color names in CSS](https://github.com/scientificware/jdk/issues/12) > > ScientificWare has updated the pull request incrementally with one additional commit since the last revision: > > Error in comment. > > Sync. comment with code : "fails ... if stringToColor(null) doesn't return null". src/java.desktop/share/classes/javax/swing/text/html/CSS.java line 133: > 131: * @author Timothy Prinzing > 132: * @author Scott Violet > 133: * @author Guy Abossolo Foh - ScientificWare New author tags aren't added. src/java.desktop/share/classes/javax/swing/text/html/CSS.java line 1419: > 1417: } > 1418: > 1419: private static Map colorNamed = It should also be declared `final`. The field should be either `colorNames` or `namedColors`. You meant the former? test/jdk/javax/swing/text/html/CSS/JDK8292276MissingColorNamesInCSS/JDK8292276MissingColorNamesInCSS.java line 31: > 29: * @summary Missing Color Names in CSS > 30: * @run main JDK8292276MissingColorNamesInCSS > 31: * @author Guy Abossolo Foh - ScientificWare Author tags aren't added any more, existing ones are usually removed from tests when modified. test/jdk/javax/swing/text/html/CSS/JDK8292276MissingColorNamesInCSS/JDK8292276MissingColorNamesInCSS.java line 44: > 42: import static javax.swing.text.html.CSS.Attribute.BORDER_RIGHT_COLOR; > 43: > 44: public class JDK8292276MissingColorNamesInCSS { The class name can be shortened: `MissingColorNames`. It should placed in `CSS` folder or add to `ColorValue` folder. test/jdk/javax/swing/text/html/CSS/JDK8292276MissingColorNamesInCSS/JDK8292276MissingColorNamesInCSS.java line 77: > 75: color = attributeSet.getAttribute(COLOR); > 76: bdleftcolor = attributeSet.getAttribute(BORDER_LEFT_COLOR); > 77: bdrightcolor = attributeSet.getAttribute(BORDER_RIGHT_COLOR); Declare the variables where they're used for the first time, `attributeSet` is also included. Use camelCase for readability of `leftColor` and `rightColor`. test/jdk/javax/swing/text/html/CSS/JDK8292276MissingColorNamesInCSS/JDK8292276MissingColorNamesInCSS.java line 79: > 77: bdrightcolor = attributeSet.getAttribute(BORDER_RIGHT_COLOR); > 78: > 79: if(styleSheet.stringToColor(null) != null){ Suggestion: if (styleSheet.stringToColor(null) != null){ Space is missing. ------------- PR: https://git.openjdk.org/jdk/pull/9825 From aivanov at openjdk.org Mon Sep 12 19:52:50 2022 From: aivanov at openjdk.org (Alexey Ivanov) Date: Mon, 12 Sep 2022 19:52:50 GMT Subject: RFR: JDK-8292276 : Missing color names in CSS [v10] In-Reply-To: References: <3K40K0Roy0-H5dqJr4TqChwOOCRbEQYnsezkiKe3gEw=.6a48b650-6421-4b32-abc9-f1543b554ac9@github.com> <6TqA6trYJCQmj_UnMJU5YZYGJvEiIP2h5GGpA3TZ3VI=.15d7a51d-6ca0-4f05-a02b-7eb15bdceae5@github.com> <2q3e4KHR1d_Oit9Byhd3qWwstuG5yPJjB6pSvsYGEQE=.159a981c-7259-444c-be0d-f032dddebf87@github.com> Message-ID: On Sat, 3 Sep 2022 23:40:02 GMT, SWinxy wrote: >> @SWinxy, >> - if you're suggesting this >> ``` >> } else { >> return colorNamed.get(strlc); >> ``` >> We change the behavior (your comment) and lose the last test (color hex coded but without # prefix). >> - or if you have in mind >> >> } else { >> return new Color(colorNamed.get(strlc).color.getRGB(), true); >> >> We preserve the behavior but still lose the last test (color hex coded but without # prefix). >> - The way I interpreted @prrace comment : >> ``` >> } else { >> Color color = colorNamed.get(strlc); >> if (color != null) { >> return color; >> ``` >> We change the behavior : >> - In the code before this PR. The results were : null, Color.Black if "", and new Color Object for all other colors (the 10 named colors and all hex coded colors). >> - In the first implementation achieved in this PR, like the code above, results changed to : null, Color.Black if "", the same Object for each (149) named-color or hex coded color. >> - After your comment, results became : null, Color.Black if "", and new Color Object for all other Color (149 named or hex coded). > > Mmm I completely forgot that we're using the map here, and for that we'll need to create a `new Color` from it. My b. There could be a check to `colorNames.has(str)` and return the `new Color(colorNames.get(str))` since there will never be a `null` returned for a valid key. The old code didn't have any cache, it simply returned a color. Now that the colors are in a map, return the `Color` instance from the map if there's one. ------------- PR: https://git.openjdk.org/jdk/pull/9825 From serb at openjdk.org Tue Sep 13 03:01:48 2022 From: serb at openjdk.org (Sergey Bylokhov) Date: Tue, 13 Sep 2022 03:01:48 GMT Subject: RFR: 6852577: Only for Nimbus LAF UIManager.get("PasswordField.echoChar") is null [v3] In-Reply-To: <1Y0OKsbNSaopRmrW3VQF8rh6RrClWmjbycO4qgfIY7I=.34c463c5-ccec-4bb5-981b-23e2a5bbab24@github.com> References: <8_EXfD0W-aphoJsroB4e0r8hsMrcxpfATTWDGHXP_Es=.c22772e4-447a-48b2-b5de-1918059670f2@github.com> <-qOkFQnlLYWH_LFc0JpgxLICPgTG1mtzXG7xrnRppns=.cf90f4bc-bec9-4f99-aa5c-ee867c585f95@github.com> <1Y0OKsbNSaopRmrW3VQF8rh6RrClWmjbycO4qgfIY7I=.34c463c5-ccec-4bb5-981b-23e2a5bbab24@github.com> Message-ID: On Fri, 9 Sep 2022 04:35:15 GMT, Prasanta Sadhukhan wrote: >> It will have the problem as you mentioned so I did it as it is. Since we have already UIDefaults table defined, I think it can be used for this, without changing the doc which might cause compatibility issues. > > it will also probably need change in compiler as to how it generates/parses the type as I am getting > > Exception in thread "main" java.lang.NullPointerException: Cannot invoke "build.tools.generatenimbus.UIProperty$PropertyType.ordinal()" because "this.type" is null > at build.tools.generatenimbus.UIProperty.write(UIProperty.java:87) > at build.tools.generatenimbus.UIStyle.write(UIStyle.java:156) > at build.tools.generatenimbus.UIRegion.write(UIRegion.java:213) > at build.tools.generatenimbus.SynthModel.write(SynthModel.java:102) > at build.tools.generatenimbus.Generator.generate(Generator.java:212) > at build.tools.generatenimbus.Generator.main(Generator.java:118) > > so I think this is the safer and cleaner alternative as I am not creating a new UIDefaults table, just adding a new entry to it.. It is probably simpler but we already store all tha properties in the generated NimbusDefaults, I do not think we should split the storage in two parts. ------------- PR: https://git.openjdk.org/jdk/pull/10035 From serb at openjdk.org Tue Sep 13 03:02:46 2022 From: serb at openjdk.org (Sergey Bylokhov) Date: Tue, 13 Sep 2022 03:02:46 GMT Subject: RFR: 7148092: [macosx] When Alt+down arrow key is pressed, the combobox popup does not appear. [v5] In-Reply-To: <03fLl5XUqUXveKPvSjtrRXjx7epMGAVeYgdhECk1iB4=.ca933754-196a-443b-b004-ce4393e62379@github.com> References: <03fLl5XUqUXveKPvSjtrRXjx7epMGAVeYgdhECk1iB4=.ca933754-196a-443b-b004-ce4393e62379@github.com> Message-ID: On Fri, 9 Sep 2022 09:34:02 GMT, Prasanta Sadhukhan wrote: >> When comboBox have focus, pressing Alt+Down (or Up) should render the popup which is not happening for Aqua L&F. >> >> Fix is to add toggleAction for Alt+Down/Up keys as has been done for [MetalLookAndFeel](https://github.com/openjdk/jdk/blob/master/src/java.desktop/share/classes/javax/swing/plaf/metal/MetalLookAndFeel.java#L912) >> >> closed problemlisted test is used to check the fix. > > Prasanta Sadhukhan has updated the pull request incrementally with one additional commit since the last revision: > > Test fix Marked as reviewed by serb (Reviewer). ------------- PR: https://git.openjdk.org/jdk/pull/10014 From serb at openjdk.org Tue Sep 13 03:06:42 2022 From: serb at openjdk.org (Sergey Bylokhov) Date: Tue, 13 Sep 2022 03:06:42 GMT Subject: RFR: 7175396: The text on label is not painted red for Nimbus LaF. [v2] In-Reply-To: References: Message-ID: On Wed, 24 Aug 2022 04:43:50 GMT, Prasanta Sadhukhan wrote: >> Label.foreground UIProperty is not honored by Nimbus L&F. >> Added support for setting JLabel foreground color for Nimbus L&F > > Prasanta Sadhukhan has updated the pull request incrementally with one additional commit since the last revision: > > Review comments src/java.desktop/share/classes/javax/swing/plaf/synth/SynthLabelUI.java line 220: > 218: Color col = UIManager.getColor("Label.foreground"); > 219: if (col != null) { > 220: label.setForeground(col); Are you sure that the text color of the label should be changed on each repain? ------------- PR: https://git.openjdk.org/jdk/pull/9900 From tr at openjdk.org Tue Sep 13 04:56:48 2022 From: tr at openjdk.org (Tejesh R) Date: Tue, 13 Sep 2022 04:56:48 GMT Subject: Integrated: 4834298: JFileChooser.getSelectedFiles() failed with multi-selection and double-click In-Reply-To: References: Message-ID: On Wed, 24 Aug 2022 07:44:52 GMT, Tejesh R wrote: > JFileChooser.getSelectedFiles() failed to retrieve files with multi-selection and double-click. This occurs when a single file is selected then enable multi-selection then select the same file through mouse double-click(Two file chooser dialogs used before and after multi-selection enabled). SelectedFiles are updated when a change in files/directory selection is done or when selection is made through keyboard selection. In this case since a single file is selected before multi-selection is enabled and same file is selected again without changing the selection index/directory, leaving selected Files un-updated. > **Proposed Fix** : Whenever Multi-Selection is enabled check if any files are selected, if yes update the selected Files of JFileChoooser. This pull request has now been integrated. Changeset: 9cd3e355 Author: Tejesh R Committer: Jayathirth D V URL: https://git.openjdk.org/jdk/commit/9cd3e355d1f5216626daa6a9669b0c95343ca4f0 Stats: 95 lines in 2 files changed: 93 ins; 1 del; 1 mod 4834298: JFileChooser.getSelectedFiles() failed with multi-selection and double-click Reviewed-by: jdv ------------- PR: https://git.openjdk.org/jdk/pull/9996 From psadhukhan at openjdk.org Tue Sep 13 07:49:38 2022 From: psadhukhan at openjdk.org (Prasanta Sadhukhan) Date: Tue, 13 Sep 2022 07:49:38 GMT Subject: RFR: 7175396: The text on label is not painted red for Nimbus LaF. [v3] In-Reply-To: References: Message-ID: <4VvhgKSAGDnjWdmTfvaNCcTsSmOmCQR8UsYNOSmRO5w=.be1165bd-2d1f-44bc-8027-3ae9923617ce@github.com> > Label.foreground UIProperty is not honored by Nimbus L&F. > Added support for setting JLabel foreground color for Nimbus L&F Prasanta Sadhukhan has updated the pull request incrementally with one additional commit since the last revision: Get color once during init ------------- Changes: - all: https://git.openjdk.org/jdk/pull/9900/files - new: https://git.openjdk.org/jdk/pull/9900/files/e6de6d08..b6d0a8bd Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=9900&range=02 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=9900&range=01-02 Stats: 9 lines in 2 files changed: 4 ins; 2 del; 3 mod Patch: https://git.openjdk.org/jdk/pull/9900.diff Fetch: git fetch https://git.openjdk.org/jdk pull/9900/head:pull/9900 PR: https://git.openjdk.org/jdk/pull/9900 From martin.desruisseaux at geomatys.com Tue Sep 13 09:53:37 2022 From: martin.desruisseaux at geomatys.com (Martin Desruisseaux) Date: Tue, 13 Sep 2022 11:53:37 +0200 Subject: Misleading message when using Image I/O for write operations Message-ID: <87caf995-97f8-d816-821a-66a2d79fc237@geomatys.com> Hello all The ImageIO class contains the following method (copying only relevant parts). The key point to notice is that any IOException is assumed to be a problem with the cache file, never with the main output stream: /** * ?snip? * @return an {@code ImageOutputStream}, or {@code null}. * ?snip? * @exception IOException if a cache file is needed but cannot be created. */ public static ImageOutputStream createImageOutputStream(Object output) throws IOException { // ?snip? try { return spi.createOutputStreamInstance(output, usecache, getCacheDirectory()); } catch (IOException e) { throw new IIOException("Can't create cache file!", e); } // ?snip? return null; } In the particular case where the output is a java.io.File, the SPI implementation is as below (augmented with a copy of the Javadoc from public API). Note that the javadoc does not mention that ImageOutputStreamSpi.createOutputStreamInstance(?) may return null. /** * ?snip? * @return an {@code ImageOutputStream} instance. * ?snip? * @exception IOException if a cache file is needed but cannot be created. */ public ImageOutputStream createOutputStreamInstance(?snip?) throws IOException { // ?snip? try { return new FileImageOutputStream((File)output); } catch (Exception e) { e.printStackTrace(); return null; } // ?snip? } In case of failure to create the output stream, ImageIO.write(?) throws an exception with the "Can't create an ImageOutputStream!" message, but we don't know why. The cause (for example no space left on device) is hidden in the System.err outputs. If we replace the com.sun.imageio.spi.FileImageOutputStreamSpi implementation by our own provider propagating the IOException instead of returning null, it is slightly better but the exception is caught by ImageIO.createImageOutputStream and rethrown with the misleading "Can't create cache file!" message. The consequence is that when writing millions of images (e.g. Earth Observation data) and the process fails somewhere at ImageOutputStream creation time, it is currently difficult to identify the cause. Possible actions for improving the situation could be (from less disruptive to most disruptive): * Replace the e.printStackTrace() call by the use of logger. * Remove the try ? catch block in ImageIO.createImageOutputStream(?), so if an SPI choose to throw IOException (at the cost of violating current Image I/O contract), ImageIO does not misleadingly said that it is a problem with the cache. * Modify ImageIO.createImageOutputStream(?) contract by saying that IOException may be thrown because of failure to create the main output stream, not only because of failure to create the cache file. Adapt FileImageOutputStreamSpi implementation accordingly. Is there any thought about what would be reasonable, what would be too much disruption? ??? Regards, ??? ??? Martin -------------- next part -------------- An HTML attachment was scrubbed... URL: From alanb at openjdk.org Tue Sep 13 13:17:34 2022 From: alanb at openjdk.org (Alan Bateman) Date: Tue, 13 Sep 2022 13:17:34 GMT Subject: RFR: 8289610: Degrade Thread.stop Message-ID: Degrade Thread.stop to throw UOE unconditionally, deprecate ThreadDeath for removal, and remove the remaining special handling of ThreadDeath from the JDK. Thread.stop is inherently unsafe and has been deprecated since JDK 1.2 (1998) with a link to a supplementary page that explains the rationale. Some of the API surface has already been degraded or removed: Thread.stop(Throwable) was degraded to throw UOE in Java 8 and removed in Java 11, and ThreadGroup.stop was degraded to throw UOE in Java 19. As of Java 19, the no-arg Thread.stop continues to work as before for platform threads but throws UOE for virtual threads. The next step in the glacial pace removal is the degrading of the no-arg Thread.stop method to throw UOE for all threads. To keep things manageable, the change proposed here leaves JVM_StopThread in place. A separate issue will remove it and do other cleanup/removal in the VM. We have another JBS issue for the updates to the JLS and JVMS where asynchronous exceptions are defined. There is also some remaining work on a test class used by 6 jshell tests - if they aren't done in time then we will temporarily exclude them. The change here has no impact on the debugger APIs (JVM TI StopThread, JDWP ThreadReference/Stop, and JDI ThreadReference.stop). Debuggers can continue to cause threads to throw an asynchronous exception, as might be done when simulating code throwing an exception at some point in the code. ------------- Commit messages: - Deprecate for removal - Next iteration, update dates in headers - Merge - Initial commit Changes: https://git.openjdk.org/jdk/pull/10230/files Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=10230&range=00 Issue: https://bugs.openjdk.org/browse/JDK-8289610 Stats: 311 lines in 23 files changed: 114 ins; 147 del; 50 mod Patch: https://git.openjdk.org/jdk/pull/10230.diff Fetch: git fetch https://git.openjdk.org/jdk pull/10230/head:pull/10230 PR: https://git.openjdk.org/jdk/pull/10230 From duke at openjdk.org Tue Sep 13 13:17:35 2022 From: duke at openjdk.org (ExE Boss) Date: Tue, 13 Sep 2022 13:17:35 GMT Subject: RFR: 8289610: Degrade Thread.stop In-Reply-To: References: Message-ID: On Fri, 9 Sep 2022 12:44:31 GMT, Alan Bateman wrote: > Degrade Thread.stop to throw UOE unconditionally, deprecate ThreadDeath for removal, and remove the remaining special handling of ThreadDeath from the JDK. > > Thread.stop is inherently unsafe and has been deprecated since JDK 1.2 (1998) with a link to a supplementary page that explains the rationale. Some of the API surface has already been degraded or removed: Thread.stop(Throwable) was degraded to throw UOE in Java 8 and removed in Java 11, and ThreadGroup.stop was degraded to throw UOE in Java 19. As of Java 19, the no-arg Thread.stop continues to work as before for platform threads but throws UOE for virtual threads. The next step in the glacial pace removal is the degrading of the no-arg Thread.stop method to throw UOE for all threads. > > To keep things manageable, the change proposed here leaves JVM_StopThread in place. A separate issue will remove it and do other cleanup/removal in the VM. We have another JBS issue for the updates to the JLS and JVMS where asynchronous exceptions are defined. There is also some remaining work on a test class used by 6 jshell tests - if they aren't done in time then we will temporarily exclude them. > > The change here has no impact on the debugger APIs (JVM TI StopThread, JDWP ThreadReference/Stop, and JDI ThreadReference.stop). Debuggers can continue to cause threads to throw an asynchronous exception, as might be done when simulating code throwing an exception at some point in the code. src/java.base/share/classes/java/lang/ThreadDeath.java line 42: > 40: */ > 41: @Deprecated(since="20") > 42: public class ThreadDeath extends Error { Actually, `ThreadDeath` is?thrown?manually by?**JShell** instrumentation?code since?[JDK?8289613] ([GH?10166])[^1]. [JDK?8289613]: https://bugs.openjdk.org/browse/JDK-8289613 [GH?10166]: https://github.com/openjdk/jdk/pull/10166 [^1]: https://github.com/openjdk/jdk/blob/00befddd7ce97d324250807824469daaa9434eef/src/jdk.jshell/share/classes/jdk/jshell/execution/LocalExecutionControl.java#L104-L107 ------------- PR: https://git.openjdk.org/jdk/pull/10230 From duke at openjdk.org Tue Sep 13 13:45:46 2022 From: duke at openjdk.org (Abhishek Kumar) Date: Tue, 13 Sep 2022 13:45:46 GMT Subject: RFR: 8288882: JFileChooser - empty (0 bytes) file is displayed as 1 KB [v28] In-Reply-To: References: Message-ID: > JFileChooser - empty file size issue fixed. > For empty file, now the size 0 KB. > Manual Test Case "FileSizeCheck.java" created. Abhishek Kumar 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/9327/files - new: https://git.openjdk.org/jdk/pull/9327/files/99224c1c..3d6ae268 Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=9327&range=27 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=9327&range=26-27 Stats: 4 lines in 2 files changed: 0 ins; 1 del; 3 mod Patch: https://git.openjdk.org/jdk/pull/9327.diff Fetch: git fetch https://git.openjdk.org/jdk pull/9327/head:pull/9327 PR: https://git.openjdk.org/jdk/pull/9327 From duke at openjdk.org Tue Sep 13 13:45:50 2022 From: duke at openjdk.org (Abhishek Kumar) Date: Tue, 13 Sep 2022 13:45:50 GMT Subject: RFR: 8288882: JFileChooser - empty (0 bytes) file is displayed as 1 KB [v27] In-Reply-To: References: Message-ID: On Mon, 12 Sep 2022 10:40:35 GMT, Alexey Ivanov wrote: >> Abhishek Kumar has updated the pull request incrementally with one additional commit since the last revision: >> >> Review comments fix > > src/java.desktop/share/classes/sun/swing/FilePane.java line 59: > >> 57: import java.io.FileNotFoundException; >> 58: import java.text.DateFormat; >> 59: import java.text.DecimalFormat; > > `DecimalFormat` has become unused. Updated. > src/java.desktop/share/classes/sun/swing/FilePane.java line 1212: > >> 1210: if (listViewWindowsStyle) { >> 1211: updateMessageFormatPattern(kiloByteString); >> 1212: displayedFileSize[0] = roundToOneDecimalPlace(len); > > Does it correctly display the file sizes when `listViewWindowsStyle` is `true`? Yeah, it will show file size is KB. ------------- PR: https://git.openjdk.org/jdk/pull/9327 From rriggs at openjdk.org Tue Sep 13 14:12:48 2022 From: rriggs at openjdk.org (Roger Riggs) Date: Tue, 13 Sep 2022 14:12:48 GMT Subject: RFR: 8289610: Degrade Thread.stop In-Reply-To: References: Message-ID: On Fri, 9 Sep 2022 12:44:31 GMT, Alan Bateman wrote: > Degrade Thread.stop to throw UOE unconditionally, deprecate ThreadDeath for removal, and remove the remaining special handling of ThreadDeath from the JDK. > > Thread.stop is inherently unsafe and has been deprecated since JDK 1.2 (1998) with a link to a supplementary page that explains the rationale. Some of the API surface has already been degraded or removed: Thread.stop(Throwable) was degraded to throw UOE in Java 8 and removed in Java 11, and ThreadGroup.stop was degraded to throw UOE in Java 19. As of Java 19, the no-arg Thread.stop continues to work as before for platform threads but throws UOE for virtual threads. The next step in the glacial pace removal is the degrading of the no-arg Thread.stop method to throw UOE for all threads. > > To keep things manageable, the change proposed here leaves JVM_StopThread in place. A separate issue will remove it and do other cleanup/removal in the VM. We have another JBS issue for the updates to the JLS and JVMS where asynchronous exceptions are defined. There is also some remaining work on a test class used by 6 jshell tests - if they aren't done in time then we will temporarily exclude them. > > The change here has no impact on the debugger APIs (JVM TI StopThread, JDWP ThreadReference/Stop, and JDI ThreadReference.stop). Debuggers can continue to cause threads to throw an asynchronous exception, as might be done when simulating code throwing an exception at some point in the code. core-libs parts look fine. src/java.base/share/classes/java/lang/Thread.java line 1635: > 1633: * > 1634: * @throws UnsupportedOperationException > 1635: * always fold with previous line. ------------- PR: https://git.openjdk.org/jdk/pull/10230 From aivanov at openjdk.org Tue Sep 13 14:58:01 2022 From: aivanov at openjdk.org (Alexey Ivanov) Date: Tue, 13 Sep 2022 14:58:01 GMT Subject: RFR: 8288882: JFileChooser - empty (0 bytes) file is displayed as 1 KB [v28] In-Reply-To: References: Message-ID: On Tue, 13 Sep 2022 13:45:46 GMT, Abhishek Kumar wrote: >> JFileChooser - empty file size issue fixed. >> For empty file, now the size 0 KB. >> Manual Test Case "FileSizeCheck.java" created. > > Abhishek Kumar has updated the pull request incrementally with one additional commit since the last revision: > > Review comment fix Looks good. Thank you for adding the test case which proves the file size is rounded up. ------------- Marked as reviewed by aivanov (Reviewer). PR: https://git.openjdk.org/jdk/pull/9327 From psadhukhan at openjdk.org Tue Sep 13 14:59:50 2022 From: psadhukhan at openjdk.org (Prasanta Sadhukhan) Date: Tue, 13 Sep 2022 14:59:50 GMT Subject: RFR: 6852577: Only for Nimbus LAF UIManager.get("PasswordField.echoChar") is null [v3] In-Reply-To: References: <8_EXfD0W-aphoJsroB4e0r8hsMrcxpfATTWDGHXP_Es=.c22772e4-447a-48b2-b5de-1918059670f2@github.com> <-qOkFQnlLYWH_LFc0JpgxLICPgTG1mtzXG7xrnRppns=.cf90f4bc-bec9-4f99-aa5c-ee867c585f95@github.com> <1Y0OKsbNSaopRmrW3VQF8rh6RrClWmjbycO4qgfIY7I=.34c463c5-ccec-4bb5-981b-23e2a5bbab24@github.com> Message-ID: On Tue, 13 Sep 2022 02:58:06 GMT, Sergey Bylokhov wrote: >> it will also probably need change in compiler as to how it generates/parses the type as I am getting >> >> Exception in thread "main" java.lang.NullPointerException: Cannot invoke "build.tools.generatenimbus.UIProperty$PropertyType.ordinal()" because "this.type" is null >> at build.tools.generatenimbus.UIProperty.write(UIProperty.java:87) >> at build.tools.generatenimbus.UIStyle.write(UIStyle.java:156) >> at build.tools.generatenimbus.UIRegion.write(UIRegion.java:213) >> at build.tools.generatenimbus.SynthModel.write(SynthModel.java:102) >> at build.tools.generatenimbus.Generator.generate(Generator.java:212) >> at build.tools.generatenimbus.Generator.main(Generator.java:118) >> >> so I think this is the safer and cleaner alternative as I am not creating a new UIDefaults table, just adding a new entry to it.. > > It is probably simpler but we already store all tha properties in the generated NimbusDefaults, I do not think we should split the storage in two parts. Properties are **already** being stored in two parts so I am not inventing it for this fix. I am just adding an entry to the already created UIDefaults. Also, as I told, storing a character in skin.laf involves changing the generator tool which might not be scalable and prone to regressions, not to mention what/where should be changed in the tool for this is not known to me. Also, as Synth is a skinnable look and feel, I think it would have been an issue if the property to be added affects "skin" in anyways, like **color, font, dimension** property etc, in which case it would have made sense to be mandatorily put in skin.laf which is the "visual designer" but this Password echo character property will not affect the skin in anyway, like the other properties added in UIDefaults table in SynthLookAndFeel, so I think it should be ok. ------------- PR: https://git.openjdk.org/jdk/pull/10035 From duke at openjdk.org Tue Sep 13 16:49:59 2022 From: duke at openjdk.org (ScientificWare) Date: Tue, 13 Sep 2022 16:49:59 GMT Subject: RFR: JDK-8292276 : Missing color names in CSS [v15] In-Reply-To: References: Message-ID: <9Df7BTBxCYMa54kW4tC_z2FygYkoY1XRIQbzvl-tguU=.22519568-3e5c-413b-a085-649a4d4b623e@github.com> > This is referenced in Java Bug Database as > - [JDK-8292276 : Missing color names in CSS](https://bugs.java.com/bugdatabase/view_bug.do?bug_id=8292276) > > This is tracked in JBS as > - [JDK-8292276 : Missing color names in CSS](https://bugs.openjdk.java.net/browse/JDK-8292276) > > Adds missing color names, defined by CSS Level 4, in CSS.java : > CSS Color Module Level 4 > W3C Candidate Recommendation Snapshot, 5 July 2022 > [7.1 Named Colors](https://www.w3.org/TR/css-color-4/#named-color) > > Designed from : [ScientificWare JDK-8292276 : Missing color names in CSS](https://github.com/scientificware/jdk/issues/12) ScientificWare has updated the pull request incrementally with one additional commit since the last revision: Update test/jdk/javax/swing/text/html/CSS/JDK8292276MissingColorNamesInCSS/JDK8292276MissingColorNamesInCSS.java Missing space. Co-authored-by: Alexey Ivanov <70774172+aivanov-jdk at users.noreply.github.com> ------------- Changes: - all: https://git.openjdk.org/jdk/pull/9825/files - new: https://git.openjdk.org/jdk/pull/9825/files/978ad292..e6d2ba81 Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=9825&range=14 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=9825&range=13-14 Stats: 1 line in 1 file changed: 0 ins; 0 del; 1 mod Patch: https://git.openjdk.org/jdk/pull/9825.diff Fetch: git fetch https://git.openjdk.org/jdk pull/9825/head:pull/9825 PR: https://git.openjdk.org/jdk/pull/9825 From cjplummer at openjdk.org Tue Sep 13 17:50:55 2022 From: cjplummer at openjdk.org (Chris Plummer) Date: Tue, 13 Sep 2022 17:50:55 GMT Subject: RFR: 8289610: Degrade Thread.stop In-Reply-To: References: Message-ID: <8ZLJ1_MCq61Of0Jb2zUNFDskX7BYN1LFwGQ3JGSPcUQ=.f971b32e-491d-400d-bced-c13aabc30a0f@github.com> On Fri, 9 Sep 2022 12:44:31 GMT, Alan Bateman wrote: > Degrade Thread.stop to throw UOE unconditionally, deprecate ThreadDeath for removal, and remove the remaining special handling of ThreadDeath from the JDK. > > Thread.stop is inherently unsafe and has been deprecated since JDK 1.2 (1998) with a link to a supplementary page that explains the rationale. Some of the API surface has already been degraded or removed: Thread.stop(Throwable) was degraded to throw UOE in Java 8 and removed in Java 11, and ThreadGroup.stop was degraded to throw UOE in Java 19. As of Java 19, the no-arg Thread.stop continues to work as before for platform threads but throws UOE for virtual threads. The next step in the glacial pace removal is the degrading of the no-arg Thread.stop method to throw UOE for all threads. > > To keep things manageable, the change proposed here leaves JVM_StopThread in place. A separate issue will remove it and do other cleanup/removal in the VM. We have another JBS issue for the updates to the JLS and JVMS where asynchronous exceptions are defined. There is also some remaining work on a test class used by 6 jshell tests - if they aren't done in time then we will temporarily exclude them. > > The change here has no impact on the debugger APIs (JVM TI StopThread, JDWP ThreadReference/Stop, and JDI ThreadReference.stop). Debuggers can continue to cause threads to throw an asynchronous exception, as might be done when simulating code throwing an exception at some point in the code. serviceability changes look good ------------- Marked as reviewed by cjplummer (Reviewer). PR: https://git.openjdk.org/jdk/pull/10230 From mullan at openjdk.org Tue Sep 13 19:01:51 2022 From: mullan at openjdk.org (Sean Mullan) Date: Tue, 13 Sep 2022 19:01:51 GMT Subject: RFR: 8289610: Degrade Thread.stop In-Reply-To: References: Message-ID: On Fri, 9 Sep 2022 12:44:31 GMT, Alan Bateman wrote: > Degrade Thread.stop to throw UOE unconditionally, deprecate ThreadDeath for removal, and remove the remaining special handling of ThreadDeath from the JDK. > > Thread.stop is inherently unsafe and has been deprecated since JDK 1.2 (1998) with a link to a supplementary page that explains the rationale. Some of the API surface has already been degraded or removed: Thread.stop(Throwable) was degraded to throw UOE in Java 8 and removed in Java 11, and ThreadGroup.stop was degraded to throw UOE in Java 19. As of Java 19, the no-arg Thread.stop continues to work as before for platform threads but throws UOE for virtual threads. The next step in the glacial pace removal is the degrading of the no-arg Thread.stop method to throw UOE for all threads. > > To keep things manageable, the change proposed here leaves JVM_StopThread in place. A separate issue will remove it and do other cleanup/removal in the VM. We have another JBS issue for the updates to the JLS and JVMS where asynchronous exceptions are defined. There is also some remaining work on a test class used by 6 jshell tests - if they aren't done in time then we will temporarily exclude them. > > The change here has no impact on the debugger APIs (JVM TI StopThread, JDWP ThreadReference/Stop, and JDI ThreadReference.stop). Debuggers can continue to cause threads to throw an asynchronous exception, as might be done when simulating code throwing an exception at some point in the code. What about also removing and undocumenting `RuntimePermission("stopThread")` as part of this change? ------------- PR: https://git.openjdk.org/jdk/pull/10230 From eosterlund at openjdk.org Tue Sep 13 19:09:42 2022 From: eosterlund at openjdk.org (Erik =?UTF-8?B?w5ZzdGVybHVuZA==?=) Date: Tue, 13 Sep 2022 19:09:42 GMT Subject: RFR: 8289610: Degrade Thread.stop In-Reply-To: References: Message-ID: On Fri, 9 Sep 2022 12:44:31 GMT, Alan Bateman wrote: > Degrade Thread.stop to throw UOE unconditionally, deprecate ThreadDeath for removal, and remove the remaining special handling of ThreadDeath from the JDK. > > Thread.stop is inherently unsafe and has been deprecated since JDK 1.2 (1998) with a link to a supplementary page that explains the rationale. Some of the API surface has already been degraded or removed: Thread.stop(Throwable) was degraded to throw UOE in Java 8 and removed in Java 11, and ThreadGroup.stop was degraded to throw UOE in Java 19. As of Java 19, the no-arg Thread.stop continues to work as before for platform threads but throws UOE for virtual threads. The next step in the glacial pace removal is the degrading of the no-arg Thread.stop method to throw UOE for all threads. > > To keep things manageable, the change proposed here leaves JVM_StopThread in place. A separate issue will remove it and do other cleanup/removal in the VM. We have another JBS issue for the updates to the JLS and JVMS where asynchronous exceptions are defined. There is also some remaining work on a test class used by 6 jshell tests - if they aren't done in time then we will temporarily exclude them. > > The change here has no impact on the debugger APIs (JVM TI StopThread, JDWP ThreadReference/Stop, and JDI ThreadReference.stop). Debuggers can continue to cause threads to throw an asynchronous exception, as might be done when simulating code throwing an exception at some point in the code. There is a bunch of VM code for this too. Should we clean that up separately? ------------- PR: https://git.openjdk.org/jdk/pull/10230 From alanb at openjdk.org Tue Sep 13 19:17:45 2022 From: alanb at openjdk.org (Alan Bateman) Date: Tue, 13 Sep 2022 19:17:45 GMT Subject: RFR: 8289610: Degrade Thread.stop In-Reply-To: References: Message-ID: On Tue, 13 Sep 2022 19:06:14 GMT, Erik ?sterlund wrote: > There is a bunch of VM code for this too. Should we clean that up separately? Yes chatted with @dholmes-ora about this recently and he suggested separating out so there is a follow-on JBS issue created for that. Aside from JVM_StopThread, I suspect code that deals with pending exceptions before a thread start can go away as the JVM TI StopThread can't cause an async exception on an unstarted thread. I'm hoping Thread.stillborn can go away too. ------------- PR: https://git.openjdk.org/jdk/pull/10230 From eosterlund at openjdk.org Tue Sep 13 19:17:46 2022 From: eosterlund at openjdk.org (Erik =?UTF-8?B?w5ZzdGVybHVuZA==?=) Date: Tue, 13 Sep 2022 19:17:46 GMT Subject: RFR: 8289610: Degrade Thread.stop In-Reply-To: References: Message-ID: On Tue, 13 Sep 2022 19:12:26 GMT, Alan Bateman wrote: > > There is a bunch of VM code for this too. Should we clean that up separately? > > > > Yes chatted with @dholmes-ora about this recently and he suggested separating out so there is a follow-on JBS issue created for that. Aside from JVM_StopThread, I suspect code that deals with pending exceptions before a thread start can go away as the JVM TI StopThread can't cause an async exception on an unstarted thread. I'm hoping Thread.stillborn can go away too. Sounds good. ------------- PR: https://git.openjdk.org/jdk/pull/10230 From alanb at openjdk.org Tue Sep 13 19:17:47 2022 From: alanb at openjdk.org (Alan Bateman) Date: Tue, 13 Sep 2022 19:17:47 GMT Subject: RFR: 8289610: Degrade Thread.stop In-Reply-To: References: Message-ID: On Tue, 13 Sep 2022 18:57:34 GMT, Sean Mullan wrote: > What about also removing and undocumenting `RuntimePermission("stopThread")` as part of this change? Ah yes, the table RuntimePermission can be updated as part of this (and the corresponding constant in sun/security/util/SecurityConstants). ------------- PR: https://git.openjdk.org/jdk/pull/10230 From duke at openjdk.org Tue Sep 13 19:51:59 2022 From: duke at openjdk.org (ScientificWare) Date: Tue, 13 Sep 2022 19:51:59 GMT Subject: RFR: JDK-8292276 : Missing color names in CSS [v16] In-Reply-To: References: Message-ID: > This is referenced in Java Bug Database as > - [JDK-8292276 : Missing color names in CSS](https://bugs.java.com/bugdatabase/view_bug.do?bug_id=8292276) > > This is tracked in JBS as > - [JDK-8292276 : Missing color names in CSS](https://bugs.openjdk.java.net/browse/JDK-8292276) > > Adds missing color names, defined by CSS Level 4, in CSS.java : > CSS Color Module Level 4 > W3C Candidate Recommendation Snapshot, 5 July 2022 > [7.1 Named Colors](https://www.w3.org/TR/css-color-4/#named-color) > > Designed from : [ScientificWare JDK-8292276 : Missing color names in CSS](https://github.com/scientificware/jdk/issues/12) ScientificWare has updated the pull request incrementally with one additional commit since the last revision: Update and rename test/jdk/javax/swing/text/html/CSS/JDK8292276MissingColorNamesInCSS/JDK8292276MissingColorNamesInCSS.java to test/jdk/javax/swing/text/html/CSS/MissingColorNames.java Removes author tag. Renames this class. Moves the file to the CSS folder. Corrects some variable declarations. Renames some variables according Java usages. Corrects a typo. ------------- Changes: - all: https://git.openjdk.org/jdk/pull/9825/files - new: https://git.openjdk.org/jdk/pull/9825/files/e6d2ba81..f89b6592 Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=9825&range=15 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=9825&range=14-15 Stats: 192 lines in 2 files changed: 93 ins; 99 del; 0 mod Patch: https://git.openjdk.org/jdk/pull/9825.diff Fetch: git fetch https://git.openjdk.org/jdk pull/9825/head:pull/9825 PR: https://git.openjdk.org/jdk/pull/9825 From aivanov at openjdk.org Tue Sep 13 20:07:53 2022 From: aivanov at openjdk.org (Alexey Ivanov) Date: Tue, 13 Sep 2022 20:07:53 GMT Subject: RFR: 8285306: Fix typos in java.desktop [v8] In-Reply-To: References: <5gAPAoRiIJr6BEko1UEaMd3QeUte-snqvfc9eNU2Jgk=.a6d39dcd-0d89-4444-a890-a6c53f41245b@github.com> Message-ID: On Tue, 6 Sep 2022 12:42:05 GMT, Magnus Ihse Bursie wrote: >> I ran `codespell` on the `src/java.desktop` directory, and accepted those changes where it indeed discovered real typos. >> >> I ignored typos in public methods and variables. Maybe they can be fixed later on without much fanfare, if they are in internal classes. Typos in exposed APIs are likely here to stay. >> >> I will update copyright years using a script before pushing (otherwise like every second change would be a copyright update, making reviewing much harder). >> >> The long term goal here is to make tooling support for running `codespell`. The trouble with automating this is of course all false positives. But before even trying to solve that issue, all true positives must be fixed. Hence this PR. > > Magnus Ihse Bursie has updated the pull request with a new target base due to a merge or a rebase. The pull request now contains 46 commits: > > - Merge branch 'master' into typos-in-java.desktop > - Revert changes in libjpeg > - Revert changes in libfreetype > - Update src/java.desktop/windows/classes/sun/awt/windows/WPrinterJob.java > > Co-authored-by: Alexey Ivanov <70774172+aivanov-jdk at users.noreply.github.com> > - Update src/java.desktop/unix/classes/sun/awt/X11/XBaseMenuWindow.java > > Co-authored-by: Alexey Ivanov <70774172+aivanov-jdk at users.noreply.github.com> > - Update src/java.desktop/unix/classes/sun/awt/X11/XBaseMenuWindow.java > > Co-authored-by: Alexey Ivanov <70774172+aivanov-jdk at users.noreply.github.com> > - Update src/java.desktop/share/classes/sun/swing/SwingUtilities2.java > > Co-authored-by: Alexey Ivanov <70774172+aivanov-jdk at users.noreply.github.com> > - Update src/java.desktop/share/classes/sun/swing/SwingUtilities2.java > > Co-authored-by: Alexey Ivanov <70774172+aivanov-jdk at users.noreply.github.com> > - Update src/java.desktop/share/classes/sun/awt/image/ImagingLib.java > > Co-authored-by: Alexey Ivanov <70774172+aivanov-jdk at users.noreply.github.com> > - Update src/java.desktop/share/classes/sun/awt/image/ImagingLib.java > > Co-authored-by: Alexey Ivanov <70774172+aivanov-jdk at users.noreply.github.com> > - ... and 36 more: https://git.openjdk.org/jdk/compare/6a1e98cb...1ce28314 Is `src/java.desktop/share/native/libawt/awt/image/gif/gifdecoder.c` a third-party code? src/java.desktop/macosx/native/libawt_lwawt/java2d/metal/MTLLayer.m line 87: > 85: J2dTraceLn4(J2D_TRACE_VERBOSE, > 86: "MTLLayer.blitTexture: uninitialized (mtlc=%p, javaLayer=%p, buffer=%p, device=%p)", self.ctx, > 87: self.javaLayer, self.buffer, ctx.device); Is this an intended change? Or does it come from a merge? May I suggest wrapping the line after the format string before `self.ctx`? It would make it easier to read. ------------- PR: https://git.openjdk.org/jdk/pull/8328 From ihse at openjdk.org Tue Sep 13 21:26:53 2022 From: ihse at openjdk.org (Magnus Ihse Bursie) Date: Tue, 13 Sep 2022 21:26:53 GMT Subject: RFR: 8285306: Fix typos in java.desktop [v8] In-Reply-To: References: <5gAPAoRiIJr6BEko1UEaMd3QeUte-snqvfc9eNU2Jgk=.a6d39dcd-0d89-4444-a890-a6c53f41245b@github.com> Message-ID: On Tue, 13 Sep 2022 19:48:47 GMT, Alexey Ivanov wrote: >> Magnus Ihse Bursie has updated the pull request with a new target base due to a merge or a rebase. The pull request now contains 46 commits: >> >> - Merge branch 'master' into typos-in-java.desktop >> - Revert changes in libjpeg >> - Revert changes in libfreetype >> - Update src/java.desktop/windows/classes/sun/awt/windows/WPrinterJob.java >> >> Co-authored-by: Alexey Ivanov <70774172+aivanov-jdk at users.noreply.github.com> >> - Update src/java.desktop/unix/classes/sun/awt/X11/XBaseMenuWindow.java >> >> Co-authored-by: Alexey Ivanov <70774172+aivanov-jdk at users.noreply.github.com> >> - Update src/java.desktop/unix/classes/sun/awt/X11/XBaseMenuWindow.java >> >> Co-authored-by: Alexey Ivanov <70774172+aivanov-jdk at users.noreply.github.com> >> - Update src/java.desktop/share/classes/sun/swing/SwingUtilities2.java >> >> Co-authored-by: Alexey Ivanov <70774172+aivanov-jdk at users.noreply.github.com> >> - Update src/java.desktop/share/classes/sun/swing/SwingUtilities2.java >> >> Co-authored-by: Alexey Ivanov <70774172+aivanov-jdk at users.noreply.github.com> >> - Update src/java.desktop/share/classes/sun/awt/image/ImagingLib.java >> >> Co-authored-by: Alexey Ivanov <70774172+aivanov-jdk at users.noreply.github.com> >> - Update src/java.desktop/share/classes/sun/awt/image/ImagingLib.java >> >> Co-authored-by: Alexey Ivanov <70774172+aivanov-jdk at users.noreply.github.com> >> - ... and 36 more: https://git.openjdk.org/jdk/compare/6a1e98cb...1ce28314 > > src/java.desktop/macosx/native/libawt_lwawt/java2d/metal/MTLLayer.m line 87: > >> 85: J2dTraceLn4(J2D_TRACE_VERBOSE, >> 86: "MTLLayer.blitTexture: uninitialized (mtlc=%p, javaLayer=%p, buffer=%p, device=%p)", self.ctx, >> 87: self.javaLayer, self.buffer, ctx.device); > > Is this an intended change? Or does it come from a merge? > > May I suggest wrapping the line after the format string before `self.ctx`? It would make it easier to read. This is from the merge. The only difference wrt to current code is "devide" => "device". I can change wrapping if you request it, but I'd prefer to only fix typos. ------------- PR: https://git.openjdk.org/jdk/pull/8328 From ihse at openjdk.org Tue Sep 13 21:30:43 2022 From: ihse at openjdk.org (Magnus Ihse Bursie) Date: Tue, 13 Sep 2022 21:30:43 GMT Subject: RFR: 8285306: Fix typos in java.desktop [v8] In-Reply-To: References: <5gAPAoRiIJr6BEko1UEaMd3QeUte-snqvfc9eNU2Jgk=.a6d39dcd-0d89-4444-a890-a6c53f41245b@github.com> Message-ID: <0dmtHVVEvfGWQ94u7xMbddzoHbESy3mV5Gh3vdDrh-A=.10ffa679-739f-457c-b77e-c8b26c36146d@github.com> On Tue, 13 Sep 2022 20:04:17 GMT, Alexey Ivanov wrote: > Is `src/java.desktop/share/native/libawt/awt/image/gif/gifdecoder.c` a third-party code? I don't think so. I find no comments in the source code, or any kind of indication on this being so. If you say it is, I can revert the changes in that file. ------------- PR: https://git.openjdk.org/jdk/pull/8328 From ihse at openjdk.org Tue Sep 13 21:36:10 2022 From: ihse at openjdk.org (Magnus Ihse Bursie) Date: Tue, 13 Sep 2022 21:36:10 GMT Subject: RFR: 8285306: Fix typos in java.desktop [v8] In-Reply-To: References: <5gAPAoRiIJr6BEko1UEaMd3QeUte-snqvfc9eNU2Jgk=.a6d39dcd-0d89-4444-a890-a6c53f41245b@github.com> Message-ID: On Tue, 6 Sep 2022 12:42:05 GMT, Magnus Ihse Bursie wrote: >> I ran `codespell` on the `src/java.desktop` directory, and accepted those changes where it indeed discovered real typos. >> >> I ignored typos in public methods and variables. Maybe they can be fixed later on without much fanfare, if they are in internal classes. Typos in exposed APIs are likely here to stay. >> >> I will update copyright years using a script before pushing (otherwise like every second change would be a copyright update, making reviewing much harder). >> >> The long term goal here is to make tooling support for running `codespell`. The trouble with automating this is of course all false positives. But before even trying to solve that issue, all true positives must be fixed. Hence this PR. > > Magnus Ihse Bursie has updated the pull request with a new target base due to a merge or a rebase. The pull request now contains 46 commits: > > - Merge branch 'master' into typos-in-java.desktop > - Revert changes in libjpeg > - Revert changes in libfreetype > - Update src/java.desktop/windows/classes/sun/awt/windows/WPrinterJob.java > > Co-authored-by: Alexey Ivanov <70774172+aivanov-jdk at users.noreply.github.com> > - Update src/java.desktop/unix/classes/sun/awt/X11/XBaseMenuWindow.java > > Co-authored-by: Alexey Ivanov <70774172+aivanov-jdk at users.noreply.github.com> > - Update src/java.desktop/unix/classes/sun/awt/X11/XBaseMenuWindow.java > > Co-authored-by: Alexey Ivanov <70774172+aivanov-jdk at users.noreply.github.com> > - Update src/java.desktop/share/classes/sun/swing/SwingUtilities2.java > > Co-authored-by: Alexey Ivanov <70774172+aivanov-jdk at users.noreply.github.com> > - Update src/java.desktop/share/classes/sun/swing/SwingUtilities2.java > > Co-authored-by: Alexey Ivanov <70774172+aivanov-jdk at users.noreply.github.com> > - Update src/java.desktop/share/classes/sun/awt/image/ImagingLib.java > > Co-authored-by: Alexey Ivanov <70774172+aivanov-jdk at users.noreply.github.com> > - Update src/java.desktop/share/classes/sun/awt/image/ImagingLib.java > > Co-authored-by: Alexey Ivanov <70774172+aivanov-jdk at users.noreply.github.com> > - ... and 36 more: https://git.openjdk.org/jdk/compare/6a1e98cb...1ce28314 I see now that Phil cryptically said: > Regarding changes in gif + freetype diff --git a/src/java.desktop/share/native/libawt/awt/image/gif/gifdecoder.c b/src/java.desktop/share/native/libawt/awt/image/gif/gifdecoder.c \ \ diff --git a/src/java.desktop/share/native/libfontmanager/freetypeScaler.c b/src/java.desktop/share/native/libfontmanager/freetypeScaler.c \ \ Please exclude ALL 3rd party libraries from this PR. That might be interpreted as stating that `gifdecoder.c` is 3rd party source code (although that was by no means clear to me the first time I read it). I'll revert the changes in that file, and also `src/java.desktop/share/native/libfontmanager/freetypeScaler.c`. ------------- PR: https://git.openjdk.org/jdk/pull/8328 From prr at openjdk.org Tue Sep 13 22:05:46 2022 From: prr at openjdk.org (Phil Race) Date: Tue, 13 Sep 2022 22:05:46 GMT Subject: RFR: 8285306: Fix typos in java.desktop [v8] In-Reply-To: References: <5gAPAoRiIJr6BEko1UEaMd3QeUte-snqvfc9eNU2Jgk=.a6d39dcd-0d89-4444-a890-a6c53f41245b@github.com> Message-ID: On Tue, 13 Sep 2022 21:32:44 GMT, Magnus Ihse Bursie wrote: > I see now that Phil cryptically said: > > > Regarding changes in gif + freetype > > diff --git a/src/java.desktop/share/native/libawt/awt/image/gif/gifdecoder.c b/src/java.desktop/share/native/libawt/awt/image/gif/gifdecoder.c > > > > diff --git a/src/java.desktop/share/native/libfontmanager/freetypeScaler.c b/src/java.desktop/share/native/libfontmanager/freetypeScaler.c > > > > Please exclude ALL 3rd party libraries from this PR. > > That might be interpreted as stating that `gifdecoder.c` is 3rd party source code (although that was by no means clear to me the first time I read it). I'll revert the changes in that file, and also `src/java.desktop/share/native/libfontmanager/freetypeScaler.c`. I don't know why I mentioned those two files like that but those particular two are JDK code so are fair game. I did write "Please exclude ALL 3rd party libraries from this PR." and later : "We need to revert the native code changes to "libfreetype". and those points are correct. You did fix the latter, but there are still some 3rd party files in there that are edited : glext.h, wsutils.h, multiVis.c ------------- PR: https://git.openjdk.org/jdk/pull/8328 From mchung at openjdk.org Tue Sep 13 23:54:31 2022 From: mchung at openjdk.org (Mandy Chung) Date: Tue, 13 Sep 2022 23:54:31 GMT Subject: RFR: 8289610: Degrade Thread.stop In-Reply-To: References: Message-ID: On Fri, 9 Sep 2022 12:44:31 GMT, Alan Bateman wrote: > Degrade Thread.stop to throw UOE unconditionally, deprecate ThreadDeath for removal, and remove the remaining special handling of ThreadDeath from the JDK. > > Thread.stop is inherently unsafe and has been deprecated since JDK 1.2 (1998) with a link to a supplementary page that explains the rationale. Some of the API surface has already been degraded or removed: Thread.stop(Throwable) was degraded to throw UOE in Java 8 and removed in Java 11, and ThreadGroup.stop was degraded to throw UOE in Java 19. As of Java 19, the no-arg Thread.stop continues to work as before for platform threads but throws UOE for virtual threads. The next step in the glacial pace removal is the degrading of the no-arg Thread.stop method to throw UOE for all threads. > > To keep things manageable, the change proposed here leaves JVM_StopThread in place. A separate issue will remove it and do other cleanup/removal in the VM. We have another JBS issue for the updates to the JLS and JVMS where asynchronous exceptions are defined. There is also some remaining work on a test class used by 6 jshell tests - if they aren't done in time then we will temporarily exclude them. > > The change here has no impact on the debugger APIs (JVM TI StopThread, JDWP ThreadReference/Stop, and JDI ThreadReference.stop). Debuggers can continue to cause threads to throw an asynchronous exception, as might be done when simulating code throwing an exception at some point in the code. The change looks good. There are other tests that reference `ThreadDeath` for example `test/lib/jdk/test/lib/process/ProcessTools.java`, `test/jdk/java/util/Timer/KillThread.java` , `test/jdk/java/net/httpclient/reactivestreams-tck/org/reactivestreams/tck/flow/support/NonFatal.java` etc. Is it expected to update them in a follow-on issue? ------------- PR: https://git.openjdk.org/jdk/pull/10230 From duke at openjdk.org Wed Sep 14 03:51:40 2022 From: duke at openjdk.org (ScientificWare) Date: Wed, 14 Sep 2022 03:51:40 GMT Subject: RFR: JDK-8292276 : Missing color names in CSS [v17] In-Reply-To: References: Message-ID: > This is referenced in Java Bug Database as > - [JDK-8292276 : Missing color names in CSS](https://bugs.java.com/bugdatabase/view_bug.do?bug_id=8292276) > > This is tracked in JBS as > - [JDK-8292276 : Missing color names in CSS](https://bugs.openjdk.java.net/browse/JDK-8292276) > > Adds missing color names, defined by CSS Level 4, in CSS.java : > CSS Color Module Level 4 > W3C Candidate Recommendation Snapshot, 5 July 2022 > [7.1 Named Colors](https://www.w3.org/TR/css-color-4/#named-color) > > Designed from : [ScientificWare JDK-8292276 : Missing color names in CSS](https://github.com/scientificware/jdk/issues/12) ScientificWare has updated the pull request incrementally with one additional commit since the last revision: Author tag, Modifier, Returned value. Removes the last added author tag. Returns the Color instance from the map if there's one. Renames colorNamed Object to colorNames. Adds final modifier to colorNames. ------------- Changes: - all: https://git.openjdk.org/jdk/pull/9825/files - new: https://git.openjdk.org/jdk/pull/9825/files/f89b6592..4b05b937 Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=9825&range=16 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=9825&range=15-16 Stats: 4 lines in 1 file changed: 0 ins; 1 del; 3 mod Patch: https://git.openjdk.org/jdk/pull/9825.diff Fetch: git fetch https://git.openjdk.org/jdk pull/9825/head:pull/9825 PR: https://git.openjdk.org/jdk/pull/9825 From duke at openjdk.org Wed Sep 14 06:48:34 2022 From: duke at openjdk.org (KIRIYAMA Takuya) Date: Wed, 14 Sep 2022 06:48:34 GMT Subject: RFR: 8292848: AWT_Mixing and TrayIcon tests fail on el8 with hard-coded isOel7 In-Reply-To: References: Message-ID: <4YHfZ-__ULHO7ChfKx9NcWl9fRADxAd74MdOB-eDcGU=.0a3582e2-8a1d-4398-b07b-803bebb3a9e7@github.com> On Wed, 24 Aug 2022 07:06:15 GMT, KIRIYAMA Takuya wrote: > Could you please review the JDK-8292848 bug fixes? > The purpose of the isOel7 method is to detect differences in GNOME version changes, and the isOel7 > result should be true after version 8. > I modified the isOel7 method to use regular expressions instead of hard-coded versions to be able to > detect the new os version. > I also changed the method name to match the new conditions. Thank you for your support. @mrserb If @prrace cannot be sponsor, could you sponsor this pull request, please? ------------- PR: https://git.openjdk.org/jdk/pull/9995 From asotona at openjdk.org Wed Sep 14 11:10:15 2022 From: asotona at openjdk.org (Adam Sotona) Date: Wed, 14 Sep 2022 11:10:15 GMT Subject: RFR: 8244681: Add a warning for possibly lossy conversion in compound assignments [v16] In-Reply-To: <80Nc7RlktP0cIEF2KjiCJbdCCg91jrOpT93uTQ7Hn-8=.75c5d4a4-d165-4ab8-941c-0fb5f6e6aa44@github.com> References: <80Nc7RlktP0cIEF2KjiCJbdCCg91jrOpT93uTQ7Hn-8=.75c5d4a4-d165-4ab8-941c-0fb5f6e6aa44@github.com> Message-ID: > Please review this patch adding new lint option, **lossy-conversions**, to javac to warn about type casts in compound assignments with possible lossy conversions. > > The new lint warning is shown if the type of the right-hand operand of a compound assignment is not assignment compatible with the type of the variable. > > The implementation of the warning is based on similar check performed to emit "possible lossy conversion" compilation error for simple assignments. > > Proposed patch also include complex matrix-style test with positive and negative test cases of lossy conversions in compound assignments. > > Proposed patch also disables this new lint option in all affected JDK modules and libraries to allow smooth JDK build. Individual cases to address possibly lossy conversions warnings in JDK are already addressed in a separate umbrella issue and its sub-tasks. > > Thanks for your review, > Adam Adam Sotona has updated the pull request with a new target base due to a merge or a rebase. The pull request now contains 20 commits: - Merge branch 'openjdk:master' into JDK-8244681 - Merge branch 'openjdk:master' into JDK-8244681 - re-enabled lossy conversions warnings for java.security.jgss, jdk.crypto.ec and jdk.internal.le - Merge branch 'openjdk:master' into JDK-8244681 - Merge branch 'openjdk:master' into JDK-8244681 - Merge branch 'openjdk:master' into JDK-8244681 - re-enabled lossy-conversion javac warnings in JDK Build Tools and jdk.compiler module - Added man-page line about lossy-conversion lint - Merge branch 'openjdk:master' into JDK-8244681 - 8244681: Add a warning for possibly lossy conversion in compound assignments re-enabled warnings for java.base, java.rmi and java.smartcardio - ... and 10 more: https://git.openjdk.org/jdk/compare/7f3250d7...4b78b1c5 ------------- Changes: https://git.openjdk.org/jdk/pull/8599/files Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=8599&range=15 Stats: 439 lines in 14 files changed: 437 ins; 0 del; 2 mod Patch: https://git.openjdk.org/jdk/pull/8599.diff Fetch: git fetch https://git.openjdk.org/jdk pull/8599/head:pull/8599 PR: https://git.openjdk.org/jdk/pull/8599 From asotona at openjdk.org Wed Sep 14 11:25:38 2022 From: asotona at openjdk.org (Adam Sotona) Date: Wed, 14 Sep 2022 11:25:38 GMT Subject: RFR: 8244681: Add a warning for possibly lossy conversion in compound assignments [v16] In-Reply-To: References: <80Nc7RlktP0cIEF2KjiCJbdCCg91jrOpT93uTQ7Hn-8=.75c5d4a4-d165-4ab8-941c-0fb5f6e6aa44@github.com> Message-ID: <7HAZTQI9U8tr8hrc3uRhkeAnZU4yjyjVDhTB2vXd00E=.69ffd410-c37e-45ec-b812-69bf4a2782ea@github.com> On Wed, 14 Sep 2022 11:10:15 GMT, Adam Sotona wrote: >> Please review this patch adding new lint option, **lossy-conversions**, to javac to warn about type casts in compound assignments with possible lossy conversions. >> >> The new lint warning is shown if the type of the right-hand operand of a compound assignment is not assignment compatible with the type of the variable. >> >> The implementation of the warning is based on similar check performed to emit "possible lossy conversion" compilation error for simple assignments. >> >> Proposed patch also include complex matrix-style test with positive and negative test cases of lossy conversions in compound assignments. >> >> Proposed patch also disables this new lint option in all affected JDK modules and libraries to allow smooth JDK build. Individual cases to address possibly lossy conversions warnings in JDK are already addressed in a separate umbrella issue and its sub-tasks. >> >> Thanks for your review, >> Adam > > Adam Sotona has updated the pull request with a new target base due to a merge or a rebase. The pull request now contains 20 commits: > > - Merge branch 'openjdk:master' into JDK-8244681 > - Merge branch 'openjdk:master' into JDK-8244681 > - re-enabled lossy conversions warnings for java.security.jgss, jdk.crypto.ec and jdk.internal.le > - Merge branch 'openjdk:master' into JDK-8244681 > - Merge branch 'openjdk:master' into JDK-8244681 > - Merge branch 'openjdk:master' into JDK-8244681 > - re-enabled lossy-conversion javac warnings in JDK Build Tools and jdk.compiler module > - Added man-page line about lossy-conversion lint > - Merge branch 'openjdk:master' into JDK-8244681 > - 8244681: Add a warning for possibly lossy conversion in compound assignments > re-enabled warnings for java.base, java.rmi and java.smartcardio > - ... and 10 more: https://git.openjdk.org/jdk/compare/7f3250d7...4b78b1c5 Please review also linked Release Note issue. Thanks, Adam ------------- PR: https://git.openjdk.org/jdk/pull/8599 From asotona at openjdk.org Wed Sep 14 11:35:03 2022 From: asotona at openjdk.org (Adam Sotona) Date: Wed, 14 Sep 2022 11:35:03 GMT Subject: RFR: 8244681: Add a warning for possibly lossy conversion in compound assignments [v17] In-Reply-To: <80Nc7RlktP0cIEF2KjiCJbdCCg91jrOpT93uTQ7Hn-8=.75c5d4a4-d165-4ab8-941c-0fb5f6e6aa44@github.com> References: <80Nc7RlktP0cIEF2KjiCJbdCCg91jrOpT93uTQ7Hn-8=.75c5d4a4-d165-4ab8-941c-0fb5f6e6aa44@github.com> Message-ID: > Please review this patch adding new lint option, **lossy-conversions**, to javac to warn about type casts in compound assignments with possible lossy conversions. > > The new lint warning is shown if the type of the right-hand operand of a compound assignment is not assignment compatible with the type of the variable. > > The implementation of the warning is based on similar check performed to emit "possible lossy conversion" compilation error for simple assignments. > > Proposed patch also include complex matrix-style test with positive and negative test cases of lossy conversions in compound assignments. > > Proposed patch also disables this new lint option in all affected JDK modules and libraries to allow smooth JDK build. Individual cases to address possibly lossy conversions warnings in JDK are already addressed in a separate umbrella issue and its sub-tasks. > > Thanks for your review, > Adam Adam Sotona has updated the pull request incrementally with one additional commit since the last revision: re-enabled lossy-conversions warnings for jdk.hotspot.agent ------------- Changes: - all: https://git.openjdk.org/jdk/pull/8599/files - new: https://git.openjdk.org/jdk/pull/8599/files/4b78b1c5..0b93c284 Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=8599&range=16 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=8599&range=15-16 Stats: 1 line in 1 file changed: 0 ins; 0 del; 1 mod Patch: https://git.openjdk.org/jdk/pull/8599.diff Fetch: git fetch https://git.openjdk.org/jdk pull/8599/head:pull/8599 PR: https://git.openjdk.org/jdk/pull/8599 From aivanov at openjdk.org Wed Sep 14 12:09:53 2022 From: aivanov at openjdk.org (Alexey Ivanov) Date: Wed, 14 Sep 2022 12:09:53 GMT Subject: RFR: JDK-8292276 : Missing color names in CSS [v17] In-Reply-To: References: Message-ID: On Wed, 14 Sep 2022 03:51:40 GMT, ScientificWare wrote: >> This is referenced in Java Bug Database as >> - [JDK-8292276 : Missing color names in CSS](https://bugs.java.com/bugdatabase/view_bug.do?bug_id=8292276) >> >> This is tracked in JBS as >> - [JDK-8292276 : Missing color names in CSS](https://bugs.openjdk.java.net/browse/JDK-8292276) >> >> Adds missing color names, defined by CSS Level 4, in CSS.java : >> CSS Color Module Level 4 >> W3C Candidate Recommendation Snapshot, 5 July 2022 >> [7.1 Named Colors](https://www.w3.org/TR/css-color-4/#named-color) >> >> Designed from : [ScientificWare JDK-8292276 : Missing color names in CSS](https://github.com/scientificware/jdk/issues/12) > > ScientificWare has updated the pull request incrementally with one additional commit since the last revision: > > Author tag, Modifier, Returned value. > > Removes the last added author tag. > Returns the Color instance from the map if there's one. > Renames colorNamed Object to colorNames. > Adds final modifier to colorNames. src/java.desktop/share/classes/javax/swing/text/html/CSS.java line 1406: > 1404: } else if (strlc.startsWith("rgba(")) { > 1405: return parseRGBA(str); > 1406: } else if (str.charAt(0) == '#') { Suggestion: } else if (strlc.charAt(0) == '#') { For consistency? test/jdk/javax/swing/text/html/CSS/MissingColorNames.java line 26: > 24: */ > 25: > 26: /* This was right, it should start in the first column. test/jdk/javax/swing/text/html/CSS/MissingColorNames.java line 48: > 46: // Missing Color Names In CSS. > 47: // 'cyan' keyword, as 131 keywords also defined in CSS Color Module > 48: // Level 4, are not referenced in CSS.java. Maybe we should simplify the description? - 'cyan' is one of the missing keywords which are defined in CSS Color Module Level 4. test/jdk/javax/swing/text/html/CSS/MissingColorNames.java line 77: > 75: result.append(" [stringToColor(null) must return null]"); > 76: } > 77: if (!color.toString().toLowerCase(Locale.ROOT).equals("cyan")) { I wonder if `toLowerCase` required here. ------------- PR: https://git.openjdk.org/jdk/pull/9825 From alanb at openjdk.org Wed Sep 14 14:09:52 2022 From: alanb at openjdk.org (Alan Bateman) Date: Wed, 14 Sep 2022 14:09:52 GMT Subject: RFR: 8289610: Degrade Thread.stop [v2] In-Reply-To: References: Message-ID: <01cUinxLbVchDmT0-aFmDnUzbhbjhdk0H7oAMoiXyps=.1f219cd8-d684-4bee-9413-c5cbb9030f78@github.com> > Degrade Thread.stop to throw UOE unconditionally, deprecate ThreadDeath for removal, and remove the remaining special handling of ThreadDeath from the JDK. > > Thread.stop is inherently unsafe and has been deprecated since JDK 1.2 (1998) with a link to a supplementary page that explains the rationale. Some of the API surface has already been degraded or removed: Thread.stop(Throwable) was degraded to throw UOE in Java 8 and removed in Java 11, and ThreadGroup.stop was degraded to throw UOE in Java 19. As of Java 19, the no-arg Thread.stop continues to work as before for platform threads but throws UOE for virtual threads. The next step in the glacial pace removal is the degrading of the no-arg Thread.stop method to throw UOE for all threads. > > To keep things manageable, the change proposed here leaves JVM_StopThread in place. A separate issue will remove it and do other cleanup/removal in the VM. We have another JBS issue for the updates to the JLS and JVMS where asynchronous exceptions are defined. There is also some remaining work on a test class used by 6 jshell tests - if they aren't done in time then we will temporarily exclude them. > > The change here has no impact on the debugger APIs (JVM TI StopThread, JDWP ThreadReference/Stop, and JDI ThreadReference.stop). Debuggers can continue to cause threads to throw an asynchronous exception, as might be done when simulating code throwing an exception at some point in the code. Alan Bateman has updated the pull request with a new target base due to a merge or a rebase. The incremental webrev excludes the unrelated changes brought in by the merge/rebase. The pull request contains six additional commits since the last revision: - Merge - Remove stopThread permission from RuntimePermission table, exclude jshell tests - Deprecate for removal - Next iteration, update dates in headers - Merge - Initial commit ------------- Changes: - all: https://git.openjdk.org/jdk/pull/10230/files - new: https://git.openjdk.org/jdk/pull/10230/files/380e4043..86424b65 Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=10230&range=01 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=10230&range=00-01 Stats: 2990 lines in 108 files changed: 2115 ins; 353 del; 522 mod Patch: https://git.openjdk.org/jdk/pull/10230.diff Fetch: git fetch https://git.openjdk.org/jdk pull/10230/head:pull/10230 PR: https://git.openjdk.org/jdk/pull/10230 From alanb at openjdk.org Wed Sep 14 14:09:53 2022 From: alanb at openjdk.org (Alan Bateman) Date: Wed, 14 Sep 2022 14:09:53 GMT Subject: RFR: 8289610: Degrade Thread.stop In-Reply-To: References: Message-ID: On Tue, 13 Sep 2022 23:51:03 GMT, Mandy Chung wrote: > The change looks good. There are other tests that reference `ThreadDeath` for example `test/lib/jdk/test/lib/process/ProcessTools.java`, `test/jdk/java/util/Timer/KillThread.java` , `test/jdk/java/net/httpclient/reactivestreams-tck/org/reactivestreams/tck/flow/support/NonFatal.java` etc. Is it expected to update them in a follow-on issue? I've been trying to keep the test cleanup separate if possible, only because the changes become unwieldy. Aside from jshell, the tests that used Thread.stop have already been changed or removed in advance of this PR. The tests that have catch blocks for ThreadDeath will work as before as there is no Thread.stop. There are one or two tests that will need special attention - the reactivestreams-tck tests that you listed is 3rd party code and we might decide to do nothing there. ------------- PR: https://git.openjdk.org/jdk/pull/10230 From alanb at openjdk.org Wed Sep 14 14:09:55 2022 From: alanb at openjdk.org (Alan Bateman) Date: Wed, 14 Sep 2022 14:09:55 GMT Subject: RFR: 8289610: Degrade Thread.stop [v2] In-Reply-To: References: Message-ID: On Tue, 13 Sep 2022 14:03:52 GMT, Roger Riggs wrote: > fold with previous line. Done. ------------- PR: https://git.openjdk.org/jdk/pull/10230 From jpai at openjdk.org Wed Sep 14 14:24:42 2022 From: jpai at openjdk.org (Jaikiran Pai) Date: Wed, 14 Sep 2022 14:24:42 GMT Subject: RFR: 8289610: Degrade Thread.stop [v2] In-Reply-To: <01cUinxLbVchDmT0-aFmDnUzbhbjhdk0H7oAMoiXyps=.1f219cd8-d684-4bee-9413-c5cbb9030f78@github.com> References: <01cUinxLbVchDmT0-aFmDnUzbhbjhdk0H7oAMoiXyps=.1f219cd8-d684-4bee-9413-c5cbb9030f78@github.com> Message-ID: On Wed, 14 Sep 2022 14:09:52 GMT, Alan Bateman wrote: >> Degrade Thread.stop to throw UOE unconditionally, deprecate ThreadDeath for removal, and remove the remaining special handling of ThreadDeath from the JDK. >> >> Thread.stop is inherently unsafe and has been deprecated since JDK 1.2 (1998) with a link to a supplementary page that explains the rationale. Some of the API surface has already been degraded or removed: Thread.stop(Throwable) was degraded to throw UOE in Java 8 and removed in Java 11, and ThreadGroup.stop was degraded to throw UOE in Java 19. As of Java 19, the no-arg Thread.stop continues to work as before for platform threads but throws UOE for virtual threads. The next step in the glacial pace removal is the degrading of the no-arg Thread.stop method to throw UOE for all threads. >> >> To keep things manageable, the change proposed here leaves JVM_StopThread in place. A separate issue will remove it and do other cleanup/removal in the VM. We have another JBS issue for the updates to the JLS and JVMS where asynchronous exceptions are defined. There is also some remaining work on a test class used by 6 jshell tests - if they aren't done in time then we will temporarily exclude them. >> >> The change here has no impact on the debugger APIs (JVM TI StopThread, JDWP ThreadReference/Stop, and JDI ThreadReference.stop). Debuggers can continue to cause threads to throw an asynchronous exception, as might be done when simulating code throwing an exception at some point in the code. > > Alan Bateman has updated the pull request with a new target base due to a merge or a rebase. The incremental webrev excludes the unrelated changes brought in by the merge/rebase. The pull request contains six additional commits since the last revision: > > - Merge > - Remove stopThread permission from RuntimePermission table, exclude jshell tests > - Deprecate for removal > - Next iteration, update dates in headers > - Merge > - Initial commit The changes to the `core-libs` look fine to me. There are some test security policy files (for example `IsKeepingAlive.policy`) and the `DynamicPolicy` which use the `stopThread` `RuntimePermission` which no longer exists. Should those policy files and artifacts be updated to remove reference to this permission too? ------------- PR: https://git.openjdk.org/jdk/pull/10230 From jpai at openjdk.org Wed Sep 14 14:29:11 2022 From: jpai at openjdk.org (Jaikiran Pai) Date: Wed, 14 Sep 2022 14:29:11 GMT Subject: RFR: 8289610: Degrade Thread.stop [v2] In-Reply-To: <01cUinxLbVchDmT0-aFmDnUzbhbjhdk0H7oAMoiXyps=.1f219cd8-d684-4bee-9413-c5cbb9030f78@github.com> References: <01cUinxLbVchDmT0-aFmDnUzbhbjhdk0H7oAMoiXyps=.1f219cd8-d684-4bee-9413-c5cbb9030f78@github.com> Message-ID: On Wed, 14 Sep 2022 14:09:52 GMT, Alan Bateman wrote: >> Degrade Thread.stop to throw UOE unconditionally, deprecate ThreadDeath for removal, and remove the remaining special handling of ThreadDeath from the JDK. >> >> Thread.stop is inherently unsafe and has been deprecated since JDK 1.2 (1998) with a link to a supplementary page that explains the rationale. Some of the API surface has already been degraded or removed: Thread.stop(Throwable) was degraded to throw UOE in Java 8 and removed in Java 11, and ThreadGroup.stop was degraded to throw UOE in Java 19. As of Java 19, the no-arg Thread.stop continues to work as before for platform threads but throws UOE for virtual threads. The next step in the glacial pace removal is the degrading of the no-arg Thread.stop method to throw UOE for all threads. >> >> To keep things manageable, the change proposed here leaves JVM_StopThread in place. A separate issue will remove it and do other cleanup/removal in the VM. We have another JBS issue for the updates to the JLS and JVMS where asynchronous exceptions are defined. There is also some remaining work on a test class used by 6 jshell tests - if they aren't done in time then we will temporarily exclude them. >> >> The change here has no impact on the debugger APIs (JVM TI StopThread, JDWP ThreadReference/Stop, and JDI ThreadReference.stop). Debuggers can continue to cause threads to throw an asynchronous exception, as might be done when simulating code throwing an exception at some point in the code. > > Alan Bateman has updated the pull request with a new target base due to a merge or a rebase. The incremental webrev excludes the unrelated changes brought in by the merge/rebase. The pull request contains six additional commits since the last revision: > > - Merge > - Remove stopThread permission from RuntimePermission table, exclude jshell tests > - Deprecate for removal > - Next iteration, update dates in headers > - Merge > - Initial commit src/java.logging/share/classes/java/util/logging/LogManager.java line 2670: > 2668: c.run(); > 2669: } catch (ThreadDeath death) { > 2670: throw death; In theory, before this change, some (odd/weird) application code which was registered as a `listener` could throw a `ThreadDeath` and we would then abort any other `listeners` from being run. With this change that would no longer be that case. However, I think that is fine, since the API doc of `LogManager.addConfigurationListener()` already states: * It is recommended that listeners do not throw errors or exceptions. * * If a listener terminates with an uncaught error or exception then * the first exception will be propagated to the caller of * {@link #readConfiguration()} (or {@link #readConfiguration(java.io.InputStream)}) * after all listeners have been invoked. ------------- PR: https://git.openjdk.org/jdk/pull/10230 From alanb at openjdk.org Wed Sep 14 14:38:41 2022 From: alanb at openjdk.org (Alan Bateman) Date: Wed, 14 Sep 2022 14:38:41 GMT Subject: RFR: 8289610: Degrade Thread.stop [v2] In-Reply-To: References: <01cUinxLbVchDmT0-aFmDnUzbhbjhdk0H7oAMoiXyps=.1f219cd8-d684-4bee-9413-c5cbb9030f78@github.com> Message-ID: On Wed, 14 Sep 2022 14:21:09 GMT, Jaikiran Pai wrote: > The changes to the `core-libs` look fine to me. There are some test security policy files (for example `IsKeepingAlive.policy`) and the `DynamicPolicy` which use the `stopThread` `RuntimePermission` which no longer exists. Should those policy files and artifacts be updated to remove reference to this permission too? Mandy asked the test cleanup too. I'm hoping that we will do the test cleanup separately, only to avoid the changes being too unwieldly. ------------- PR: https://git.openjdk.org/jdk/pull/10230 From jpai at openjdk.org Wed Sep 14 15:26:41 2022 From: jpai at openjdk.org (Jaikiran Pai) Date: Wed, 14 Sep 2022 15:26:41 GMT Subject: RFR: 8289610: Degrade Thread.stop [v2] In-Reply-To: <01cUinxLbVchDmT0-aFmDnUzbhbjhdk0H7oAMoiXyps=.1f219cd8-d684-4bee-9413-c5cbb9030f78@github.com> References: <01cUinxLbVchDmT0-aFmDnUzbhbjhdk0H7oAMoiXyps=.1f219cd8-d684-4bee-9413-c5cbb9030f78@github.com> Message-ID: On Wed, 14 Sep 2022 14:09:52 GMT, Alan Bateman wrote: >> Degrade Thread.stop to throw UOE unconditionally, deprecate ThreadDeath for removal, and remove the remaining special handling of ThreadDeath from the JDK. >> >> Thread.stop is inherently unsafe and has been deprecated since JDK 1.2 (1998) with a link to a supplementary page that explains the rationale. Some of the API surface has already been degraded or removed: Thread.stop(Throwable) was degraded to throw UOE in Java 8 and removed in Java 11, and ThreadGroup.stop was degraded to throw UOE in Java 19. As of Java 19, the no-arg Thread.stop continues to work as before for platform threads but throws UOE for virtual threads. The next step in the glacial pace removal is the degrading of the no-arg Thread.stop method to throw UOE for all threads. >> >> To keep things manageable, the change proposed here leaves JVM_StopThread in place. A separate issue will remove it and do other cleanup/removal in the VM. We have another JBS issue for the updates to the JLS and JVMS where asynchronous exceptions are defined. There is also some remaining work on a test class used by 6 jshell tests - if they aren't done in time then we will temporarily exclude them. >> >> The change here has no impact on the debugger APIs (JVM TI StopThread, JDWP ThreadReference/Stop, and JDI ThreadReference.stop). Debuggers can continue to cause threads to throw an asynchronous exception, as might be done when simulating code throwing an exception at some point in the code. > > Alan Bateman has updated the pull request with a new target base due to a merge or a rebase. The incremental webrev excludes the unrelated changes brought in by the merge/rebase. The pull request contains six additional commits since the last revision: > > - Merge > - Remove stopThread permission from RuntimePermission table, exclude jshell tests > - Deprecate for removal > - Next iteration, update dates in headers > - Merge > - Initial commit Marked as reviewed by jpai (Reviewer). ------------- PR: https://git.openjdk.org/jdk/pull/10230 From jpai at openjdk.org Wed Sep 14 15:26:42 2022 From: jpai at openjdk.org (Jaikiran Pai) Date: Wed, 14 Sep 2022 15:26:42 GMT Subject: RFR: 8289610: Degrade Thread.stop [v2] In-Reply-To: References: <01cUinxLbVchDmT0-aFmDnUzbhbjhdk0H7oAMoiXyps=.1f219cd8-d684-4bee-9413-c5cbb9030f78@github.com> Message-ID: On Wed, 14 Sep 2022 14:35:05 GMT, Alan Bateman wrote: > > The changes to the `core-libs` look fine to me. There are some test security policy files (for example `IsKeepingAlive.policy`) and the `DynamicPolicy` which use the `stopThread` `RuntimePermission` which no longer exists. Should those policy files and artifacts be updated to remove reference to this permission too? > > Mandy asked the test cleanup too. I'm hoping that we will do the test cleanup separately, only to avoid the changes being too unwieldly. Sorry, I missed your previous response to that similar question. Doing those changes separately sounds fine to me. ------------- PR: https://git.openjdk.org/jdk/pull/10230 From rriggs at openjdk.org Wed Sep 14 15:33:45 2022 From: rriggs at openjdk.org (Roger Riggs) Date: Wed, 14 Sep 2022 15:33:45 GMT Subject: RFR: 8289610: Degrade Thread.stop [v2] In-Reply-To: <01cUinxLbVchDmT0-aFmDnUzbhbjhdk0H7oAMoiXyps=.1f219cd8-d684-4bee-9413-c5cbb9030f78@github.com> References: <01cUinxLbVchDmT0-aFmDnUzbhbjhdk0H7oAMoiXyps=.1f219cd8-d684-4bee-9413-c5cbb9030f78@github.com> Message-ID: On Wed, 14 Sep 2022 14:09:52 GMT, Alan Bateman wrote: >> Degrade Thread.stop to throw UOE unconditionally, deprecate ThreadDeath for removal, and remove the remaining special handling of ThreadDeath from the JDK. >> >> Thread.stop is inherently unsafe and has been deprecated since JDK 1.2 (1998) with a link to a supplementary page that explains the rationale. Some of the API surface has already been degraded or removed: Thread.stop(Throwable) was degraded to throw UOE in Java 8 and removed in Java 11, and ThreadGroup.stop was degraded to throw UOE in Java 19. As of Java 19, the no-arg Thread.stop continues to work as before for platform threads but throws UOE for virtual threads. The next step in the glacial pace removal is the degrading of the no-arg Thread.stop method to throw UOE for all threads. >> >> To keep things manageable, the change proposed here leaves JVM_StopThread in place. A separate issue will remove it and do other cleanup/removal in the VM. We have another JBS issue for the updates to the JLS and JVMS where asynchronous exceptions are defined. There is also some remaining work on a test class used by 6 jshell tests - if they aren't done in time then we will temporarily exclude them. >> >> The change here has no impact on the debugger APIs (JVM TI StopThread, JDWP ThreadReference/Stop, and JDI ThreadReference.stop). Debuggers can continue to cause threads to throw an asynchronous exception, as might be done when simulating code throwing an exception at some point in the code. > > Alan Bateman has updated the pull request with a new target base due to a merge or a rebase. The incremental webrev excludes the unrelated changes brought in by the merge/rebase. The pull request contains six additional commits since the last revision: > > - Merge > - Remove stopThread permission from RuntimePermission table, exclude jshell tests > - Deprecate for removal > - Next iteration, update dates in headers > - Merge > - Initial commit LGTM ------------- Marked as reviewed by rriggs (Reviewer). PR: https://git.openjdk.org/jdk/pull/10230 From mchung at openjdk.org Wed Sep 14 15:59:53 2022 From: mchung at openjdk.org (Mandy Chung) Date: Wed, 14 Sep 2022 15:59:53 GMT Subject: RFR: 8289610: Degrade Thread.stop [v2] In-Reply-To: <01cUinxLbVchDmT0-aFmDnUzbhbjhdk0H7oAMoiXyps=.1f219cd8-d684-4bee-9413-c5cbb9030f78@github.com> References: <01cUinxLbVchDmT0-aFmDnUzbhbjhdk0H7oAMoiXyps=.1f219cd8-d684-4bee-9413-c5cbb9030f78@github.com> Message-ID: On Wed, 14 Sep 2022 14:09:52 GMT, Alan Bateman wrote: >> Degrade Thread.stop to throw UOE unconditionally, deprecate ThreadDeath for removal, and remove the remaining special handling of ThreadDeath from the JDK. >> >> Thread.stop is inherently unsafe and has been deprecated since JDK 1.2 (1998) with a link to a supplementary page that explains the rationale. Some of the API surface has already been degraded or removed: Thread.stop(Throwable) was degraded to throw UOE in Java 8 and removed in Java 11, and ThreadGroup.stop was degraded to throw UOE in Java 19. As of Java 19, the no-arg Thread.stop continues to work as before for platform threads but throws UOE for virtual threads. The next step in the glacial pace removal is the degrading of the no-arg Thread.stop method to throw UOE for all threads. >> >> To keep things manageable, the change proposed here leaves JVM_StopThread in place. A separate issue will remove it and do other cleanup/removal in the VM. We have another JBS issue for the updates to the JLS and JVMS where asynchronous exceptions are defined. There is also some remaining work on a test class used by 6 jshell tests - if they aren't done in time then we will temporarily exclude them. >> >> The change here has no impact on the debugger APIs (JVM TI StopThread, JDWP ThreadReference/Stop, and JDI ThreadReference.stop). Debuggers can continue to cause threads to throw an asynchronous exception, as might be done when simulating code throwing an exception at some point in the code. > > Alan Bateman has updated the pull request with a new target base due to a merge or a rebase. The incremental webrev excludes the unrelated changes brought in by the merge/rebase. The pull request contains six additional commits since the last revision: > > - Merge > - Remove stopThread permission from RuntimePermission table, exclude jshell tests > - Deprecate for removal > - Next iteration, update dates in headers > - Merge > - Initial commit Marked as reviewed by mchung (Reviewer). ------------- PR: https://git.openjdk.org/jdk/pull/10230 From aivanov at openjdk.org Wed Sep 14 16:38:22 2022 From: aivanov at openjdk.org (Alexey Ivanov) Date: Wed, 14 Sep 2022 16:38:22 GMT Subject: RFR: 8293811: Provide a reason for PassFailJFrame.forceFail Message-ID: <4UPN6ayNXV_zTOkwv12NUxxXOlFpISWUC5qO6_HPK_w=.16c4cbd2-069c-43cf-afbf-95e8fc6f9aea@github.com> Add `forceFail` implementation which allows passing the reason why the test is failed. I used the newly added method `forceFail(reason)` instead of throwing an exception in `PrintAllPagesTest`. When the test is run outside of jtreg and printing is cancelled, the the test UI becomes ?hung?: clicking Pass or Fail or closing windows does not stop the test. I also converted the `ret` field to local variable. In addition to this, I reduced the size of the test frame, its size of 1000?800 doesn't fit even full HD screens when positioned close to the instruction frame. ------------- Commit messages: - Reduce the frame size where the table is displayed - 8293811: Provide a reason for PassFailJFrame.forceFail Changes: https://git.openjdk.org/jdk/pull/10269/files Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=10269&range=00 Issue: https://bugs.openjdk.org/browse/JDK-8293811 Stats: 26 lines in 2 files changed: 16 ins; 2 del; 8 mod Patch: https://git.openjdk.org/jdk/pull/10269.diff Fetch: git fetch https://git.openjdk.org/jdk pull/10269/head:pull/10269 PR: https://git.openjdk.org/jdk/pull/10269 From prr at openjdk.org Wed Sep 14 17:53:55 2022 From: prr at openjdk.org (Phil Race) Date: Wed, 14 Sep 2022 17:53:55 GMT Subject: RFR: 8289610: Degrade Thread.stop [v2] In-Reply-To: <01cUinxLbVchDmT0-aFmDnUzbhbjhdk0H7oAMoiXyps=.1f219cd8-d684-4bee-9413-c5cbb9030f78@github.com> References: <01cUinxLbVchDmT0-aFmDnUzbhbjhdk0H7oAMoiXyps=.1f219cd8-d684-4bee-9413-c5cbb9030f78@github.com> Message-ID: On Wed, 14 Sep 2022 14:09:52 GMT, Alan Bateman wrote: >> Degrade Thread.stop to throw UOE unconditionally, deprecate ThreadDeath for removal, and remove the remaining special handling of ThreadDeath from the JDK. >> >> Thread.stop is inherently unsafe and has been deprecated since JDK 1.2 (1998) with a link to a supplementary page that explains the rationale. Some of the API surface has already been degraded or removed: Thread.stop(Throwable) was degraded to throw UOE in Java 8 and removed in Java 11, and ThreadGroup.stop was degraded to throw UOE in Java 19. As of Java 19, the no-arg Thread.stop continues to work as before for platform threads but throws UOE for virtual threads. The next step in the glacial pace removal is the degrading of the no-arg Thread.stop method to throw UOE for all threads. >> >> To keep things manageable, the change proposed here leaves JVM_StopThread in place. A separate issue will remove it and do other cleanup/removal in the VM. We have another JBS issue for the updates to the JLS and JVMS where asynchronous exceptions are defined. There is also some remaining work on a test class used by 6 jshell tests - if they aren't done in time then we will temporarily exclude them. >> >> The change here has no impact on the debugger APIs (JVM TI StopThread, JDWP ThreadReference/Stop, and JDI ThreadReference.stop). Debuggers can continue to cause threads to throw an asynchronous exception, as might be done when simulating code throwing an exception at some point in the code. > > Alan Bateman has updated the pull request with a new target base due to a merge or a rebase. The incremental webrev excludes the unrelated changes brought in by the merge/rebase. The pull request contains six additional commits since the last revision: > > - Merge > - Remove stopThread permission from RuntimePermission table, exclude jshell tests > - Deprecate for removal > - Next iteration, update dates in headers > - Merge > - Initial commit Marked as reviewed by prr (Reviewer). ------------- PR: https://git.openjdk.org/jdk/pull/10230 From honkar at openjdk.org Wed Sep 14 18:47:33 2022 From: honkar at openjdk.org (Harshitha Onkar) Date: Wed, 14 Sep 2022 18:47:33 GMT Subject: RFR: JDK-8015739: Background of JInternalFrame is located out of JInternalFrame Message-ID: <3MhNJ89856II0gMHYApX72zGgTm_NSRq9Tf6kdxLolw=.6486f993-6fab-4350-b30b-4e8b7d12024a@github.com> JInternalFrame background color seems to overflow into the border region. This issue is more prominently seen on Windows - Metal LAF (with fractional scaling, as show below). The primary reason is border scaling issue as observed in - [JDK-8279614](https://bugs.openjdk.org/browse/JDK-8279614) & [JDK-8282958](https://bugs.openjdk.org/browse/JDK-8282958) The fix involves a similar approach as described here https://github.com/openjdk/jdk/pull/7449#issuecomment-1068218648. The test checks the midpoint and corners of borders to check if the internal frame's background color is located out of JInternalFrame. ![image](https://user-images.githubusercontent.com/95945681/190233555-a7e00f2c-9003-4c11-84fb-207957838c2f.png) ------------- Commit messages: - added test summary - updated test case - Added test case, minor position changes to shadow lines - expanded imports - JIF Metal Border Scaling - Initial changes Changes: https://git.openjdk.org/jdk/pull/10274/files Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=10274&range=00 Issue: https://bugs.openjdk.org/browse/JDK-8015739 Stats: 402 lines in 2 files changed: 354 ins; 5 del; 43 mod Patch: https://git.openjdk.org/jdk/pull/10274.diff Fetch: git fetch https://git.openjdk.org/jdk pull/10274/head:pull/10274 PR: https://git.openjdk.org/jdk/pull/10274 From aivanov at openjdk.org Wed Sep 14 20:08:47 2022 From: aivanov at openjdk.org (Alexey Ivanov) Date: Wed, 14 Sep 2022 20:08:47 GMT Subject: RFR: 8285306: Fix typos in java.desktop [v8] In-Reply-To: References: <5gAPAoRiIJr6BEko1UEaMd3QeUte-snqvfc9eNU2Jgk=.a6d39dcd-0d89-4444-a890-a6c53f41245b@github.com> Message-ID: On Tue, 13 Sep 2022 21:23:00 GMT, Magnus Ihse Bursie wrote: > I'd prefer to only fix typos. Let us keep only the typos. ------------- PR: https://git.openjdk.org/jdk/pull/8328 From duke at openjdk.org Wed Sep 14 20:20:47 2022 From: duke at openjdk.org (lawrence.andrews) Date: Wed, 14 Sep 2022 20:20:47 GMT Subject: RFR: 8293811: Provide a reason for PassFailJFrame.forceFail In-Reply-To: <4UPN6ayNXV_zTOkwv12NUxxXOlFpISWUC5qO6_HPK_w=.16c4cbd2-069c-43cf-afbf-95e8fc6f9aea@github.com> References: <4UPN6ayNXV_zTOkwv12NUxxXOlFpISWUC5qO6_HPK_w=.16c4cbd2-069c-43cf-afbf-95e8fc6f9aea@github.com> Message-ID: On Wed, 14 Sep 2022 16:27:36 GMT, Alexey Ivanov wrote: > Add `forceFail` implementation which allows passing the reason why the test is failed. > > I used the newly added method `forceFail(reason)` instead of throwing an exception in `PrintAllPagesTest`. When the test is run outside of jtreg and printing is cancelled, the the test UI becomes ?hung?: clicking Pass or Fail or closing windows does not stop the test. > > I also converted the `ret` field to local variable. > > In addition to this, I reduced the size of the test frame, its size of 1000?800 doesn't fit even full HD screens when positioned close to the instruction frame. LGTM ------------- PR: https://git.openjdk.org/jdk/pull/10269 From mullan at openjdk.org Wed Sep 14 20:32:47 2022 From: mullan at openjdk.org (Sean Mullan) Date: Wed, 14 Sep 2022 20:32:47 GMT Subject: RFR: 8289610: Degrade Thread.stop [v2] In-Reply-To: <01cUinxLbVchDmT0-aFmDnUzbhbjhdk0H7oAMoiXyps=.1f219cd8-d684-4bee-9413-c5cbb9030f78@github.com> References: <01cUinxLbVchDmT0-aFmDnUzbhbjhdk0H7oAMoiXyps=.1f219cd8-d684-4bee-9413-c5cbb9030f78@github.com> Message-ID: <7rR40Xh40dmqQRAmSYBOl-h7vbUwKpq204tERqKKn0Q=.c168ee8e-2cb8-4aaa-a6b4-c562367013fb@github.com> On Wed, 14 Sep 2022 14:09:52 GMT, Alan Bateman wrote: >> Degrade Thread.stop to throw UOE unconditionally, deprecate ThreadDeath for removal, and remove the remaining special handling of ThreadDeath from the JDK. >> >> Thread.stop is inherently unsafe and has been deprecated since JDK 1.2 (1998) with a link to a supplementary page that explains the rationale. Some of the API surface has already been degraded or removed: Thread.stop(Throwable) was degraded to throw UOE in Java 8 and removed in Java 11, and ThreadGroup.stop was degraded to throw UOE in Java 19. As of Java 19, the no-arg Thread.stop continues to work as before for platform threads but throws UOE for virtual threads. The next step in the glacial pace removal is the degrading of the no-arg Thread.stop method to throw UOE for all threads. >> >> To keep things manageable, the change proposed here leaves JVM_StopThread in place. A separate issue will remove it and do other cleanup/removal in the VM. We have another JBS issue for the updates to the JLS and JVMS where asynchronous exceptions are defined. There is also some remaining work on a test class used by 6 jshell tests - if they aren't done in time then we will temporarily exclude them. >> >> The change here has no impact on the debugger APIs (JVM TI StopThread, JDWP ThreadReference/Stop, and JDI ThreadReference.stop). Debuggers can continue to cause threads to throw an asynchronous exception, as might be done when simulating code throwing an exception at some point in the code. > > Alan Bateman has updated the pull request with a new target base due to a merge or a rebase. The incremental webrev excludes the unrelated changes brought in by the merge/rebase. The pull request contains six additional commits since the last revision: > > - Merge > - Remove stopThread permission from RuntimePermission table, exclude jshell tests > - Deprecate for removal > - Next iteration, update dates in headers > - Merge > - Initial commit src/java.base/share/classes/java/lang/Thread.java line 1642: > 1640: * {@code ThreadDeath} exception propagating up the stack). If > 1641: * any of the objects previously protected by these monitors were in > 1642: * an inconsistent state, the damaged objects become visible to s/become/became/ (because you are writing in past tense now). ------------- PR: https://git.openjdk.org/jdk/pull/10230 From honkar at openjdk.org Wed Sep 14 21:21:06 2022 From: honkar at openjdk.org (Harshitha Onkar) Date: Wed, 14 Sep 2022 21:21:06 GMT Subject: RFR: 8293811: Provide a reason for PassFailJFrame.forceFail In-Reply-To: <4UPN6ayNXV_zTOkwv12NUxxXOlFpISWUC5qO6_HPK_w=.16c4cbd2-069c-43cf-afbf-95e8fc6f9aea@github.com> References: <4UPN6ayNXV_zTOkwv12NUxxXOlFpISWUC5qO6_HPK_w=.16c4cbd2-069c-43cf-afbf-95e8fc6f9aea@github.com> Message-ID: On Wed, 14 Sep 2022 16:27:36 GMT, Alexey Ivanov wrote: > Add `forceFail` implementation which allows passing the reason why the test is failed. > > I used the newly added method `forceFail(reason)` instead of throwing an exception in `PrintAllPagesTest`. When the test is run outside of jtreg and printing is cancelled, the the test UI becomes ?hung?: clicking Pass or Fail or closing windows does not stop the test. > > I also converted the `ret` field to local variable. > > In addition to this, I reduced the size of the test frame, its size of 1000?800 doesn't fit even full HD screens when positioned close to the instruction frame. Addition of reason to force fail test makes it more clear. Changes look good. ------------- Marked as reviewed by honkar (Author). PR: https://git.openjdk.org/jdk/pull/10269 From prr at openjdk.org Wed Sep 14 21:35:08 2022 From: prr at openjdk.org (Phil Race) Date: Wed, 14 Sep 2022 21:35:08 GMT Subject: RFR: 8288882: JFileChooser - empty (0 bytes) file is displayed as 1 KB [v28] In-Reply-To: References: Message-ID: On Tue, 13 Sep 2022 13:45:46 GMT, Abhishek Kumar wrote: >> JFileChooser - empty file size issue fixed. >> For empty file, now the size 0 KB. >> Manual Test Case "FileSizeCheck.java" created. > > Abhishek Kumar has updated the pull request incrementally with one additional commit since the last revision: > > Review comment fix Rounding to the nearest 0.1KB (or 0.1Mb ?) doesn't work well if it causes you to round the size down to zero. If I am understanding the thread correctly, the native chooser ducks this by displaying the exact byte count for < 1,000 - no rounding either up or down. So if we wanted to round to nearest for > 1KB we'd need to do the same - correct ? But we'd decided (due to localization issues) to just always use Kb not byte, or bytes .. So leaving aside what the native chooser does, we then just have to be consistent and round up. That's what the current version is trying to do isn't it ? Thoughts ? ------------- PR: https://git.openjdk.org/jdk/pull/9327 From duke at openjdk.org Thu Sep 15 02:39:07 2022 From: duke at openjdk.org (ScientificWare) Date: Thu, 15 Sep 2022 02:39:07 GMT Subject: RFR: JDK-8292276 : Missing color names in CSS [v18] In-Reply-To: References: Message-ID: > This is referenced in Java Bug Database as > - [JDK-8292276 : Missing color names in CSS](https://bugs.java.com/bugdatabase/view_bug.do?bug_id=8292276) > > This is tracked in JBS as > - [JDK-8292276 : Missing color names in CSS](https://bugs.openjdk.java.net/browse/JDK-8292276) > > Adds missing color names, defined by CSS Level 4, in CSS.java : > CSS Color Module Level 4 > W3C Candidate Recommendation Snapshot, 5 July 2022 > [7.1 Named Colors](https://www.w3.org/TR/css-color-4/#named-color) > > Designed from : [ScientificWare JDK-8292276 : Missing color names in CSS](https://github.com/scientificware/jdk/issues/12) ScientificWare has updated the pull request incrementally with one additional commit since the last revision: Update src/java.desktop/share/classes/javax/swing/text/html/CSS.java Co-authored-by: Alexey Ivanov <70774172+aivanov-jdk at users.noreply.github.com> ------------- Changes: - all: https://git.openjdk.org/jdk/pull/9825/files - new: https://git.openjdk.org/jdk/pull/9825/files/4b05b937..65c61ea5 Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=9825&range=17 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=9825&range=16-17 Stats: 1 line in 1 file changed: 0 ins; 0 del; 1 mod Patch: https://git.openjdk.org/jdk/pull/9825.diff Fetch: git fetch https://git.openjdk.org/jdk pull/9825/head:pull/9825 PR: https://git.openjdk.org/jdk/pull/9825 From duke at openjdk.org Thu Sep 15 03:32:51 2022 From: duke at openjdk.org (ScientificWare) Date: Thu, 15 Sep 2022 03:32:51 GMT Subject: RFR: JDK-8292276 : Missing color names in CSS [v19] In-Reply-To: References: Message-ID: <283LZGG_MAMDrtvXAZhNiuDzhRP2aYavIY6sHSlZxmM=.a7f022f4-9637-48bd-8fac-58139216dd89@github.com> > This is referenced in Java Bug Database as > - [JDK-8292276 : Missing color names in CSS](https://bugs.java.com/bugdatabase/view_bug.do?bug_id=8292276) > > This is tracked in JBS as > - [JDK-8292276 : Missing color names in CSS](https://bugs.openjdk.java.net/browse/JDK-8292276) > > Adds missing color names, defined by CSS Level 4, in CSS.java : > CSS Color Module Level 4 > W3C Candidate Recommendation Snapshot, 5 July 2022 > [7.1 Named Colors](https://www.w3.org/TR/css-color-4/#named-color) > > Designed from : [ScientificWare JDK-8292276 : Missing color names in CSS](https://github.com/scientificware/jdk/issues/12) ScientificWare has updated the pull request incrementally with one additional commit since the last revision: Simplification, typos, unnecessary conversion. Simplifies cyan issue description. Corrects typos. Removes an unnecessary to lower case conversion. ------------- Changes: - all: https://git.openjdk.org/jdk/pull/9825/files - new: https://git.openjdk.org/jdk/pull/9825/files/65c61ea5..ac7b1731 Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=9825&range=18 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=9825&range=17-18 Stats: 8 lines in 1 file changed: 0 ins; 3 del; 5 mod Patch: https://git.openjdk.org/jdk/pull/9825.diff Fetch: git fetch https://git.openjdk.org/jdk pull/9825/head:pull/9825 PR: https://git.openjdk.org/jdk/pull/9825 From jdv at openjdk.org Thu Sep 15 05:09:04 2022 From: jdv at openjdk.org (Jayathirth D V) Date: Thu, 15 Sep 2022 05:09:04 GMT Subject: RFR: 8293811: Provide a reason for PassFailJFrame.forceFail In-Reply-To: <4UPN6ayNXV_zTOkwv12NUxxXOlFpISWUC5qO6_HPK_w=.16c4cbd2-069c-43cf-afbf-95e8fc6f9aea@github.com> References: <4UPN6ayNXV_zTOkwv12NUxxXOlFpISWUC5qO6_HPK_w=.16c4cbd2-069c-43cf-afbf-95e8fc6f9aea@github.com> Message-ID: On Wed, 14 Sep 2022 16:27:36 GMT, Alexey Ivanov wrote: > Add `forceFail` implementation which allows passing the reason why the test is failed. > > I used the newly added method `forceFail(reason)` instead of throwing an exception in `PrintAllPagesTest`. When the test is run outside of jtreg and printing is cancelled, the the test UI becomes ?hung?: clicking Pass or Fail or closing windows does not stop the test. > > I also converted the `ret` field to local variable. > > In addition to this, I reduced the size of the test frame, its size of 1000?800 doesn't fit even full HD screens when positioned close to the instruction frame. If there are other tests where we can use PassFailJFrame.forceFail(String) instead of throwing RuntimeException, we should raise a bug and keep it for tracking. LGTM. ------------- Marked as reviewed by jdv (Reviewer). PR: https://git.openjdk.org/jdk/pull/10269 From jdv at openjdk.org Thu Sep 15 06:03:43 2022 From: jdv at openjdk.org (Jayathirth D V) Date: Thu, 15 Sep 2022 06:03:43 GMT Subject: RFR: 6286501: JTabbedPane throws NPE from its stateChanged listener in particular case In-Reply-To: References: Message-ID: <9X7VGnQKbpI1FZ_Y-QdV0XS-XqiVIa_g9l1-uVtnEJ8=.a98053ba-1d16-4a9c-9c5b-08e6a824b373@github.com> On Thu, 8 Sep 2022 09:46:03 GMT, Prasanta Sadhukhan wrote: > JTabbedPane throws NPE from its stateChanged listener as it tries to access uninstantiated TabbedPane. > Fix is to use the tabPane passed to stateChangeListener so that correct tabPane is accessed. src/java.desktop/share/classes/javax/swing/plaf/basic/BasicTabbedPaneUI.java line 4102: > 4100: setFocusIndex(tabPane.getSelectedIndex(), false); > 4101: > 4102: if (tabPane.getLayout() instanceof TabbedPaneScrollLayout) { I see BasicTabbedPaneUI.tabPane object getting used in other listeners in this Handler class. Is there a reason why only when we hit stateChanged() function we are seeing NPE? Is this NPE for tabPane object itself or Layout not being initialized? ------------- PR: https://git.openjdk.org/jdk/pull/10216 From jdv at openjdk.org Thu Sep 15 06:16:46 2022 From: jdv at openjdk.org (Jayathirth D V) Date: Thu, 15 Sep 2022 06:16:46 GMT Subject: RFR: 8075916: The regression-swing case failed as colored text is not shown on disabled checkbox and radio button with Nimbus LAF In-Reply-To: <_Pu4ZIceztdCjw5gy3bOR39Y0Jvz_TEiHdGMN0rKu-M=.9843abff-48d9-4a66-95f3-198e897c1399@github.com> References: <_Pu4ZIceztdCjw5gy3bOR39Y0Jvz_TEiHdGMN0rKu-M=.9843abff-48d9-4a66-95f3-198e897c1399@github.com> Message-ID: On Tue, 6 Sep 2022 05:57:09 GMT, Prasanta Sadhukhan wrote: > CheckBox.disabledText and RadioButton.disabledText color UIProperty is not honoured by Nimbus L&F when disabled text is drawn for JCheckBox and JRadioButton, so disabled text color was rendered incorrectly. > Fix is to honour these UIProperty color if they are set by user, else use the color from the component or via getColorForState(). > > Closed test as mentioned in JBS is used to check the fix. Does this fix the issue in GTK LAF also? I see a comment in JBS that same issue is with GTK LAF. ------------- PR: https://git.openjdk.org/jdk/pull/10177 From duke at openjdk.org Thu Sep 15 06:21:32 2022 From: duke at openjdk.org (Abhishek Kumar) Date: Thu, 15 Sep 2022 06:21:32 GMT Subject: RFR: 8271328: User is able to choose the color after disabling the color chooser. Message-ID: The proposed solution for this defect is to check the color chooser enabled state. If it is disabled then disable all the components (spinner, textfield etc.) in panel and don't process the mouse event when user click on a color triangle or color wheel. ------------- Commit messages: - Whitespace error fix - Disabled ColorChooser fix Changes: https://git.openjdk.org/jdk/pull/10276/files Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=10276&range=00 Issue: https://bugs.openjdk.org/browse/JDK-8271328 Stats: 115 lines in 2 files changed: 115 ins; 0 del; 0 mod Patch: https://git.openjdk.org/jdk/pull/10276.diff Fetch: git fetch https://git.openjdk.org/jdk pull/10276/head:pull/10276 PR: https://git.openjdk.org/jdk/pull/10276 From jdv at openjdk.org Thu Sep 15 06:45:43 2022 From: jdv at openjdk.org (Jayathirth D V) Date: Thu, 15 Sep 2022 06:45:43 GMT Subject: RFR: 8075916: The regression-swing case failed as colored text is not shown on disabled checkbox and radio button with Nimbus LAF In-Reply-To: <_Pu4ZIceztdCjw5gy3bOR39Y0Jvz_TEiHdGMN0rKu-M=.9843abff-48d9-4a66-95f3-198e897c1399@github.com> References: <_Pu4ZIceztdCjw5gy3bOR39Y0Jvz_TEiHdGMN0rKu-M=.9843abff-48d9-4a66-95f3-198e897c1399@github.com> Message-ID: On Tue, 6 Sep 2022 05:57:09 GMT, Prasanta Sadhukhan wrote: > CheckBox.disabledText and RadioButton.disabledText color UIProperty is not honoured by Nimbus L&F when disabled text is drawn for JCheckBox and JRadioButton, so disabled text color was rendered incorrectly. > Fix is to honour these UIProperty color if they are set by user, else use the color from the component or via getColorForState(). > > Closed test as mentioned in JBS is used to check the fix. Closed test case mentioned in JBS runs only in Default LAF. We need to explicitly specify LAF. Also it looks like closed test is unstable: 1) With default LAF test hangs in my mac 2) With Nimbus LAF it passes without the fix. Its better to add separate regression test to verify this fix. ------------- PR: https://git.openjdk.org/jdk/pull/10177 From jdv at openjdk.org Thu Sep 15 06:49:48 2022 From: jdv at openjdk.org (Jayathirth D V) Date: Thu, 15 Sep 2022 06:49:48 GMT Subject: RFR: 5074006: Swing JOptionPane shows tag as a string after newline [v2] In-Reply-To: <2BmZo0HFOMAvei4VnM5WPD_BoIauCM1nyhnuipD8oV0=.a4b8b627-6d68-4789-99b8-bdd09c8a9cf0@github.com> References: <2BmZo0HFOMAvei4VnM5WPD_BoIauCM1nyhnuipD8oV0=.a4b8b627-6d68-4789-99b8-bdd09c8a9cf0@github.com> Message-ID: On Mon, 12 Sep 2022 11:47:36 GMT, Prasanta Sadhukhan wrote: >> If JOptionPane's message contains both linefeed/cursor return and HTML tag ie, **" + "This is a test\n" + "**, >> then "" will be shown in the JOptionPane dialog box because after every new line it creates a new messageComponent so the characters after the newline ie ""tag will be considered as a new JLabel string and displayed. >> >> Fix is to ignore closing html tag if appearing after newline from the displayed string. > > Prasanta Sadhukhan has updated the pull request incrementally with one additional commit since the last revision: > > Fix handling HTML message Marked as reviewed by jdv (Reviewer). ------------- PR: https://git.openjdk.org/jdk/pull/10081 From psadhukhan at openjdk.org Thu Sep 15 06:59:47 2022 From: psadhukhan at openjdk.org (Prasanta Sadhukhan) Date: Thu, 15 Sep 2022 06:59:47 GMT Subject: RFR: 8075916: The regression-swing case failed as colored text is not shown on disabled checkbox and radio button with Nimbus LAF In-Reply-To: References: <_Pu4ZIceztdCjw5gy3bOR39Y0Jvz_TEiHdGMN0rKu-M=.9843abff-48d9-4a66-95f3-198e897c1399@github.com> Message-ID: On Thu, 15 Sep 2022 06:42:17 GMT, Jayathirth D V wrote: > Closed test case mentioned in JBS runs only in Default LAF. We need to explicitly specify LAF. Also it looks like closed test is unstable: > > 1. With default LAF test hangs in my mac > > 2. With Nimbus LAF it passes without the fix. > > > Its better to add separate regression test to verify this fix. I dont see this problem. In my mac BigSur, default LAF passed and Nimbus L&F fails without the fix. ------------- PR: https://git.openjdk.org/jdk/pull/10177 From jdv at openjdk.org Thu Sep 15 07:10:44 2022 From: jdv at openjdk.org (Jayathirth D V) Date: Thu, 15 Sep 2022 07:10:44 GMT Subject: RFR: 8075916: The regression-swing case failed as colored text is not shown on disabled checkbox and radio button with Nimbus LAF In-Reply-To: References: <_Pu4ZIceztdCjw5gy3bOR39Y0Jvz_TEiHdGMN0rKu-M=.9843abff-48d9-4a66-95f3-198e897c1399@github.com> Message-ID: <_K3jvfs8QIHYhEf2GtQE-ZRvjE3UM3BU9mLnU9xyuFk=.3ca8830a-80da-4877-805c-cef3330f8f36@github.com> On Thu, 15 Sep 2022 06:57:27 GMT, Prasanta Sadhukhan wrote: > > Closed test case mentioned in JBS runs only in Default LAF. We need to explicitly specify LAF. Also it looks like closed test is unstable: > > ``` > > 1. With default LAF test hangs in my mac > > > > 2. With Nimbus LAF it passes without the fix. > > ``` > > > > > > > > > > > > > > > > > > > > > > > > Its better to add separate regression test to verify this fix. > > I dont see this problem. In my mac BigSur, default LAF passed and Nimbus L&F fails without the fix. I have Monterey. I think its better to have open test case which verifies the behavior specific to Nimbus LAF(and may be GTK LAF if that is also getting fixed under this bug) ------------- PR: https://git.openjdk.org/jdk/pull/10177 From duke at openjdk.org Thu Sep 15 07:26:02 2022 From: duke at openjdk.org (Abhishek Kumar) Date: Thu, 15 Sep 2022 07:26:02 GMT Subject: RFR: 8288882: JFileChooser - empty (0 bytes) file is displayed as 1 KB [v28] In-Reply-To: References: Message-ID: <1cVWZI5OKOOwYmaUzkHFmcT5N8idxaYQPmPg6NHBizk=.cd8ec33c-92d9-48c6-b4b8-9e661862fe25@github.com> On Wed, 14 Sep 2022 21:33:03 GMT, Phil Race wrote: > Rounding to the nearest 0.1KB (or 0.1Mb ?) doesn't work well if it causes you to round the size down to zero. If I am understanding the thread correctly, the native chooser ducks this by displaying the exact byte count for < 1,000 - no rounding either up or down. So if we wanted to round to nearest for > 1KB we'd need to do the same - correct ? But we'd decided (due to localization issues) to just always use Kb not byte, or bytes .. > > So leaving aside what the native chooser does, we then just have to be consistent and round up. > > That's what the current version is trying to do isn't it ? > > Thoughts ? Yeah, as per the current fix we are doing consistently round up for all file sizes. ------------- PR: https://git.openjdk.org/jdk/pull/9327 From psadhukhan at openjdk.org Thu Sep 15 07:36:36 2022 From: psadhukhan at openjdk.org (Prasanta Sadhukhan) Date: Thu, 15 Sep 2022 07:36:36 GMT Subject: RFR: 8075916: The regression-swing case failed as colored text is not shown on disabled checkbox and radio button with Nimbus LAF In-Reply-To: <_K3jvfs8QIHYhEf2GtQE-ZRvjE3UM3BU9mLnU9xyuFk=.3ca8830a-80da-4877-805c-cef3330f8f36@github.com> References: <_Pu4ZIceztdCjw5gy3bOR39Y0Jvz_TEiHdGMN0rKu-M=.9843abff-48d9-4a66-95f3-198e897c1399@github.com> <_K3jvfs8QIHYhEf2GtQE-ZRvjE3UM3BU9mLnU9xyuFk=.3ca8830a-80da-4877-805c-cef3330f8f36@github.com> Message-ID: <06Z2x0bxVe7WfDu4UUTqeYfp0O4t4NAk5kCJZo9zeOg=.88e6e6e4-880c-4b22-89ee-1439626594ca@github.com> On Thu, 15 Sep 2022 07:06:58 GMT, Jayathirth D V wrote: > > > Closed test case mentioned in JBS runs only in Default LAF. We need to explicitly specify LAF. Also it looks like closed test is unstable: > > > ``` > > > 1. With default LAF test hangs in my mac > > > > > > 2. With Nimbus LAF it passes without the fix. > > > ``` > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > Its better to add separate regression test to verify this fix. > > > > > > I dont see this problem. In my mac BigSur, default LAF passed and Nimbus L&F fails without the fix. > > I have Monterey. I think its better to have open test case which verifies the behavior specific to Nimbus LAF(and may be GTK LAF if that is also getting fixed under this bug) I tested on Monterey also and there also I didn't see this problem. Default L&F passed and Nimbus L&F failed without fix. ------------- PR: https://git.openjdk.org/jdk/pull/10177 From psadhukhan at openjdk.org Thu Sep 15 08:18:35 2022 From: psadhukhan at openjdk.org (Prasanta Sadhukhan) Date: Thu, 15 Sep 2022 08:18:35 GMT Subject: RFR: 7172359: HTML parser StackOverflowError on invalid HTML:
  • tag inside an
  • tag inside an
  • tag inside an
  • tag inside an
  • tag inside an
  • tag inside an
  • tag inside an
  • tag inside an
  • tag inside an